diff --git a/.github/workflows/ResInsightWithCache.yml b/.github/workflows/ResInsightWithCache.yml index 0373c9e927..2d7a411fc7 100644 --- a/.github/workflows/ResInsightWithCache.yml +++ b/.github/workflows/ResInsightWithCache.yml @@ -30,9 +30,9 @@ jobs: os: windows-2022, cc: "cl", cxx: "cl", - build-python-module: true, + build-python-module: false, execute-unit-tests: true, - execute-pytests: true, + execute-pytests: false, unity-build: true, publish-to-pypi: false, vcpkg-bootstrap: bootstrap-vcpkg.bat, @@ -96,10 +96,61 @@ jobs: python -m pip install --upgrade pip pip install -r GrpcInterface/Python/build-requirements.txt + - name: Find CMake path and remove from PATH (Linux) + if: contains( matrix.config.os, 'ubuntu') + run: | + sudo rm -rf /usr/local/bin/cmake* + sudo rm -rf /usr/local/share/cmake* + sudo rm -rf /usr/local/doc/cmake* + sudo rm -rf /usr/local/man/man1/cmake* + + # Try to call CMake (should fail or use a different version if removal was successful) + cmake --version || echo "CMake was successfully removed from PATH" + + - name: Find CMake path and remove from PATH (Windows) + shell: powershell + if: contains( matrix.config.os, 'windows') + run: | + # Find the current CMake path + $cmakePath = (Get-Command cmake -ErrorAction SilentlyContinue).Path + Write-Host "Current CMake path: $cmakePath" + + if ($cmakePath) { + # Get the directory containing CMake + $cmakeDir = Split-Path -Parent $cmakePath + Write-Host "CMake directory: $cmakeDir" + + # Save the current PATH + $currentPath = $env:PATH + + # Create a new PATH by removing the CMake directory + # PowerShell uses semicolons as path separators + $newPath = ($currentPath -split ';' | Where-Object { $_ -ne $cmakeDir }) -join ';' + + # Set the new PATH for this job + echo "PATH=$newPath" | Out-File -FilePath $env:GITHUB_ENV -Append + + # Update the current session PATH for verification purposes + $env:PATH = $newPath + + # Verify the change + Write-Host "Updated PATH: $newPath" + + # Try to call CMake (should fail or use a different version if removal was successful) + try { + cmake --version + Write-Host "CMake is still in PATH (possibly from another location)" + } catch { + Write-Host "CMake was successfully removed from PATH" + } + } else { + Write-Host "CMake not found in PATH" + } + - name: Use CMake uses: lukka/get-cmake@latest with: - cmakeVersion: "~3.28.0" + cmakeVersion: "~3.26.0" - name: Use MSVC (Windows) uses: ilammy/msvc-dev-cmd@v1 @@ -274,8 +325,7 @@ jobs: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing # If this is a tagged release - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.base_ref == 'refs/heads/main' steps: - name: Download python distribution folder uses: actions/download-artifact@v4 diff --git a/.github/workflows/cmake-format.yml b/.github/workflows/cmake-format.yml index 32202bb333..beae6c3ec1 100644 --- a/.github/workflows/cmake-format.yml +++ b/.github/workflows/cmake-format.yml @@ -4,7 +4,7 @@ on: [push] jobs: cmake-format-job: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Install cmakelang for cmake-format run: | @@ -30,6 +30,9 @@ jobs: cd Fwk/AppFwk find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i cd .. + cd .. + + ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i ThirdParty/custom-opm-common/CMakeLists.txt git diff - uses: peter-evans/create-pull-request@v7 diff --git a/.github/workflows/python-linting.yml b/.github/workflows/python-linting.yml index 7666ffe855..41c801626c 100644 --- a/.github/workflows/python-linting.yml +++ b/.github/workflows/python-linting.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 047fcb961e..dfb7344092 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: sobolevn/misspell-fixer-action@master diff --git a/.gitmodules b/.gitmodules index 90447290d1..10a49192b7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/CeetronSolutions/qwt.git [submodule "ThirdParty/vcpkg"] path = ThirdParty/vcpkg - url = https://github.com/microsoft/vcpkg + url = https://github.com/CeetronSolutions/vcpkg [submodule "ThirdParty/custom-opm-common/opm-common"] path = ThirdParty/custom-opm-common/opm-common url = https://github.com/CeetronSolutions/opm-common diff --git a/ApplicationExeCode/CMakeLists.txt b/ApplicationExeCode/CMakeLists.txt index 25d331b507..b8c8672eaf 100644 --- a/ApplicationExeCode/CMakeLists.txt +++ b/ApplicationExeCode/CMakeLists.txt @@ -70,43 +70,6 @@ if(RESINSIGHT_ENABLE_GRPC) list(APPEND CODE_SOURCE_FILES RiaGrpcConsoleApplication.cpp RiaGrpcGuiApplication.cpp ) - - list(APPEND QT_MOC_HEADERS RiaGrpcConsoleApplication.h - RiaGrpcGuiApplication.h - ) - - # Find Protobuf installation Looks for protobuf-config.cmake file installed by - # Protobuf's cmake installation. - set(protobuf_MODULE_COMPATIBLE ON) - find_package(Protobuf CONFIG 3.0 QUIET) - - if(Protobuf_FOUND) - # Find gRPC installation Looks for gRPCConfig.cmake file installed by gRPC's - # cmake installation. - find_package(gRPC CONFIG REQUIRED) - set(_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) - set(_GRPC_GRPCPP_UNSECURE gRPC::grpc++_unsecure gRPC::grpc_unsecure - gRPC::gpr - ) - set(GRPC_LINK_LIBRARIES ${_GRPC_GRPCPP_UNSECURE} ${_PROTOBUF_LIBPROTOBUF}) - else() - set(RESINSIGHT_GRPC_INSTALL_PREFIX - "" - CACHE PATH "gRPC : Install prefix for gRPC" - ) - set(ENV{PKG_CONFIG_PATH} "${RESINSIGHT_GRPC_INSTALL_PREFIX}/lib/pkgconfig") - find_package(PkgConfig REQUIRED) - pkg_check_modules( - GRPC - REQUIRED - grpc - grpc++_unsecure>=1.20 - grpc_unsecure - gpr - protobuf - libcares - ) - endif() endif() list(APPEND CPP_SOURCES ${CODE_SOURCE_FILES}) @@ -340,7 +303,6 @@ if(RESINSIGHT_ENABLE_GRPC) add_custom_target( RipsGeneratedPythonClasses ALL SOURCES ${GENERATED_CLASSES_FILE} ) - source_group("Source Files" ${GENERATED_CLASSES_FILE}) add_dependencies(RipsGeneratedPythonClasses ResInsight) # Copy the Python folder to build folder. This will ease debugging of Python diff --git a/ApplicationExeCode/Resources/ResInsight.qrc b/ApplicationExeCode/Resources/ResInsight.qrc index 4a6a82ebc0..27f80da905 100644 --- a/ApplicationExeCode/Resources/ResInsight.qrc +++ b/ApplicationExeCode/Resources/ResInsight.qrc @@ -286,6 +286,7 @@ decline-curve.svg regression-curve.svg padlock.svg + padlock-unlocked.svg warning.svg cloud-and-server.svg Cloud.svg @@ -297,6 +298,8 @@ pinned-remove.svg Select.svg NavigationProperty.svg + user-defined-view.svg + gear.svg fs_CellFace.glsl @@ -320,5 +323,6 @@ components/images/unknown.svg components/images/well.svg components/images/well-completion.svg + components/images/well-completion-01.svg diff --git a/ApplicationExeCode/Resources/components/images/well-completion-01.svg b/ApplicationExeCode/Resources/components/images/well-completion-01.svg new file mode 100644 index 0000000000..f9b0477529 --- /dev/null +++ b/ApplicationExeCode/Resources/components/images/well-completion-01.svg @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ApplicationExeCode/Resources/components/images/well-completion.svg b/ApplicationExeCode/Resources/components/images/well-completion.svg index 9b9cf12cab..d8d9621f85 100644 --- a/ApplicationExeCode/Resources/components/images/well-completion.svg +++ b/ApplicationExeCode/Resources/components/images/well-completion.svg @@ -11,7 +11,7 @@ - + + + + + + \ No newline at end of file diff --git a/ApplicationExeCode/Resources/padlock-unlocked.svg b/ApplicationExeCode/Resources/padlock-unlocked.svg new file mode 100644 index 0000000000..5d48572627 --- /dev/null +++ b/ApplicationExeCode/Resources/padlock-unlocked.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ApplicationExeCode/Resources/padlock.svg b/ApplicationExeCode/Resources/padlock.svg index 5009f6cebf..2fe5d5b683 100644 --- a/ApplicationExeCode/Resources/padlock.svg +++ b/ApplicationExeCode/Resources/padlock.svg @@ -1,11 +1,10 @@ - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/ApplicationExeCode/Resources/user-defined-view.svg b/ApplicationExeCode/Resources/user-defined-view.svg new file mode 100644 index 0000000000..3b0459392f --- /dev/null +++ b/ApplicationExeCode/Resources/user-defined-view.svg @@ -0,0 +1,6 @@ + + + + + U + \ No newline at end of file diff --git a/ApplicationExeCode/RiaMain.cpp b/ApplicationExeCode/RiaMain.cpp index 4a3489ea1e..89a41f2af9 100644 --- a/ApplicationExeCode/RiaMain.cpp +++ b/ApplicationExeCode/RiaMain.cpp @@ -78,6 +78,8 @@ int main( int argc, char* argv[] ) } #endif + RiaMainTools::deleteStaleSettingsLockFiles(); + // The Qt::AA_ShareOpenGLContexts setting is needed when we have multiple viz widgets in flight // and we have a setup where these widgets belong to different top-level windows, or end up // belonging to different top-level windows through re-parenting. diff --git a/ApplicationExeCode/RiaMainTools.cpp b/ApplicationExeCode/RiaMainTools.cpp index 8f5700acbb..f82e3488fe 100644 --- a/ApplicationExeCode/RiaMainTools.cpp +++ b/ApplicationExeCode/RiaMainTools.cpp @@ -17,6 +17,7 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RiaMainTools.h" +#include "RiaBaseDefs.h" #include "RiaFileLogger.h" #include "RiaLogging.h" #include "RiaRegressionTestRunner.h" @@ -27,6 +28,8 @@ #include "cafPdmDefaultObjectFactory.h" #include "cafPdmUiFieldEditorHandle.h" +#include + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -53,10 +56,12 @@ void manageSegFailure( int signalCode ) exit( 1 ); } +namespace RiaMainTools +{ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaMainTools::initializeSingletons() +void initializeSingletons() { caf::CmdFeatureManager::createSingleton(); RiaRegressionTestRunner::createSingleton(); @@ -67,7 +72,7 @@ void RiaMainTools::initializeSingletons() /// This method is used to release memory allocated by static functions. This enables use of memory allocation tools /// after the application has closed down. //-------------------------------------------------------------------------------------------------- -void RiaMainTools::releaseSingletonAndFactoryObjects() +void releaseSingletonAndFactoryObjects() { caf::CmdFeatureManager::deleteSingleton(); RiaRegressionTestRunner::deleteSingleton(); @@ -87,3 +92,51 @@ void RiaMainTools::releaseSingletonAndFactoryObjects() factory->deleteCreatorObjects(); } } + +//-------------------------------------------------------------------------------------------------- +/// On Linux, application settings are stored in a text file in the users home folder. On Windows, these settings are +/// stored in Registry. Users have reported stale lock files the configuration directory. In some cases, these lock +/// files can prevent the application from starting. It appears that the application start, but no GUI is displayed. +/// +/// This method deletes stale lock files. +/// +/// https://github.com/OPM/ResInsight/issues/12205 +//-------------------------------------------------------------------------------------------------- +void deleteStaleSettingsLockFiles() +{ + auto organizationName = QString( RI_COMPANY_NAME ); + auto applicationName = QString( RI_APPLICATION_NAME ); + + auto lockFilePath = QDir::homePath() + "/.config/" + organizationName + "/" + applicationName + ".conf.lock"; + + auto isLockStale = []( const QString& lockFilePath ) -> bool + { + QFileInfo lockFileInfo( lockFilePath ); + + if ( !lockFileInfo.exists() ) return false; + + QDateTime currentTime = QDateTime::currentDateTime(); + int thresholdSeconds = 2 * 60; // 2 minutes + + return lockFileInfo.lastModified().secsTo( currentTime ) > thresholdSeconds; + }; + + if ( isLockStale( lockFilePath ) ) + { + QFile lockFile( lockFilePath ); + + QString logMessage; + if ( lockFile.remove() ) + { + logMessage = QString( "Deleted stale lock file: %1" ).arg( lockFilePath ); + } + else + { + logMessage = QString( "Tried, but failed to delete stale lock file: %1" ).arg( lockFilePath ); + } + + qDebug() << logMessage; + } +} + +} // namespace RiaMainTools diff --git a/ApplicationExeCode/RiaMainTools.h b/ApplicationExeCode/RiaMainTools.h index 025e9bc256..d3add41c2e 100644 --- a/ApplicationExeCode/RiaMainTools.h +++ b/ApplicationExeCode/RiaMainTools.h @@ -17,9 +17,9 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once -class RiaMainTools +namespace RiaMainTools { -public: - static void initializeSingletons(); - static void releaseSingletonAndFactoryObjects(); -}; +void initializeSingletons(); +void releaseSingletonAndFactoryObjects(); +void deleteStaleSettingsLockFiles(); +}; // namespace RiaMainTools diff --git a/ApplicationLibCode/Adm/LicenseInformation.txt b/ApplicationLibCode/Adm/LicenseInformation.txt index 5a2f6d7a3c..caa4c28fdd 100644 --- a/ApplicationLibCode/Adm/LicenseInformation.txt +++ b/ApplicationLibCode/Adm/LicenseInformation.txt @@ -754,3 +754,27 @@ https://github.com/apache/arrow/blob/main/LICENSE.txt Apache License - Version 2.0, January 2004 http://www.apache.org/licenses/ + +=============================================================================== + Notice for pugixml +=============================================================================== +MIT License + +Copyright (c) 2006-2025 Arseny Kapoulkine + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in the +Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ApplicationLibCode/Adm/projectfilekeywords/2025.04/ri-fieldKeywords.txt b/ApplicationLibCode/Adm/projectfilekeywords/2025.04/ri-fieldKeywords.txt new file mode 100644 index 0000000000..be83727204 --- /dev/null +++ b/ApplicationLibCode/Adm/projectfilekeywords/2025.04/ri-fieldKeywords.txt @@ -0,0 +1,6070 @@ +// ResInsight version string : 2025.04.0-RC_3 +// Report generated : Tue Apr 1 13:48:17 2025 +// +// + +AnalysisPlot - class RimAnalysisPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + AnalysisPlotData + TimeStepFilter + TimeSteps + ReferenceCase + IsUsingAutoName + PlotDescription + BarOrientation + MajorGroupType + MediumGroupType + MinorGroupType + ValueSortOperation + groupForColors + UseTopBarsFilter + MaxBarCount + UseBarText + UseCaseInBarText + UseEnsembleInBarText + UseSummaryItemInBarText + UseTimeStepInBarText + UseQuantityInBarText + BarTextFontSize + ValueAxisProperties + PlotDataFilterCollection + +AnalysisPlotCollection - class RimAnalysisPlotCollection + AnalysisPlots + +AnalysisPlotDataEntry - class RimAnalysisPlotDataEntry + SummaryCase + Ensemble + SummaryAddress + IsEnsembleCurve + +Annotations - class RimAnnotationInViewCollection + IsActive + TextAnnotations + AnnotationPlaneDepth + SnapAnnotations + TextAnnotationsInView + ReachCircleAnnotationsInView + AnnotationFontSize + +AsciiDataCurve - class RimAsciiDataCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + PlotAxis + TimeSteps + Values + Title + +CalcScript - class RimCalcScript + AbsolutePath + +CellEdgeResultSlot - class RimCellEdgeColors + EnableCellEdgeColors + propertyType + CellEdgeVariable + UseXVariable + UseYVariable + UseZVariable + LegendDefinition + SelectedProperties + ShowTextValuesIfItemIsUnchecked + SingleVarEdgeResult + +CellFilterCollection - class RimCellFilterCollection + Active + CombineFilterMode + CellFilters + RangeFilters + +CellIndexFilter - class RimCellIndexFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + ElementSetId + +CellPropertyFilter - class RimEclipsePropertyFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + SelectedValues + ResultDefinition + LinkedWithCellResult + LowerBound + UpperBound + CategorySelection + IsDuplicatedFromLinkedView + +CellPropertyFilters - class RimEclipsePropertyFilterCollection + Active + PropertyFilters + +CellRangeFilter - class RimCellRangeFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + StartIndexI + CellCountI + StartIndexJ + CellCountJ + StartIndexK + CellCountK + +CellRangeFilterCollection - class RimCellFilterCollection + Active + CombineFilterMode + CellFilters + RangeFilters + +ChangeDataSourceFeatureUi - class RimWellLogCurveCommonDataSource + CurveCase + SummaryCase + TrajectoryType + CurveWellPath + SimulationWellName + BranchDetection + Allow3DSelectionLink + Branch + CurveTimeStep + WBSSmoothing + WBSSmoothingThreshold + MaximumCurvePointInterval + RftTimeStep + RftWellName + SegmentBranchIndex + SegmentBranchType + +CmdAddItemExecData - class caf::CmdAddItemExecData + PathToField + indexAfter + createdItemIndex + +CmdDeleteItemExecData - class caf::CmdDeleteItemExecData + PathToField + indexToObject + deletedObjectAsXml + +ColorLegend - class RimColorLegend + ColorLegendName + ColorLegendItems + +ColorLegendCollection - class RimColorLegendCollection + CustomColorLegends + +ColorLegendItem - class RimColorLegendItem + Color + CategoryValue + CategoryName + +CompletionTemplateCollection - class RimCompletionTemplateCollection + FractureTemplates + StimPlanModelTemplates + ValveTemplates + FractureGroupStatisticsCollection + +CorrelationMatrixPlot - class RimCorrelationMatrixPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + AnalysisPlotData + TimeStepFilter + TimeStep + AutoTitle + PlotTitle + LabelFontSize + AxisTitleFontSize + AxisValueFontSize + UseCaseFilter + CurveSetForFiltering + EditCaseFilter + CorrelationAbsValues + CorrelationSorting + CorrelationAbsSorting + ExcludeParamsWithoutVariation + ShowOnlyTopNCorrelations + TopNFilterCount + LegendConfig + SelectedParameters + +CorrelationPlot - class RimCorrelationPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + AnalysisPlotData + TimeStepFilter + TimeStep + AutoTitle + PlotTitle + LabelFontSize + AxisTitleFontSize + AxisValueFontSize + UseCaseFilter + CurveSetForFiltering + EditCaseFilter + CorrelationAbsValues + CorrelationAbsSorting + ExcludeParamsWithoutVariation + ShowOnlyTopNCorrelations + TopNFilterCount + SelectedParameters + BarColor + +CorrelationPlotCollection - class RimCorrelationPlotCollection + CorrelationPlots + CorrelationReports + +CorrelationReportPlot - class RimCorrelationReportPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotWindowTitle + MatrixPlot + CorrelationPlot + CrossPlot + SubTitleFontSize + LabelFontSize + AxisTitleFontSize + AxisValueFontSize + +CrossSection - class RimExtrudedCurveIntersection + Active + ShowInactiveCells + UseSeparateIntersectionDataSource + SeparateIntersectionDataSource + UserDescription + Type + Direction + WellPath + SimulationWell + ProjectPolygon + Points + PointsUi + AzimuthAngle + DipAngle + CustomExtrusionPoints + TwoAzimuthPoints + Branch + ExtentLength + lengthUp + lengthDown + SurfaceIntersections + UpperThreshold + LowerThreshold + DepthFilter + CollectionUpperThreshold + CollectionLowerThreshold + ThresholdOverridden + CollectionDepthFilterType + EnableKFilter + KRangeFilter + KFilterCollectionOverride + KRangeCollectionFilter + +CrossSectionCollection - class RimIntersectionCollection + CrossSections + IntersectionBoxes + Active + UpperDepthThreshold + LowerDepthThreshold + DepthFilterOverride + CollectionDepthFilterType + OverrideKFilter + KRangeFilter + ApplyCellFilters + +CsvSummaryCase - class RimCsvSummaryCase + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + FileType + StartDate + +CurveIntersection - class RimExtrudedCurveIntersection + Active + ShowInactiveCells + UseSeparateIntersectionDataSource + SeparateIntersectionDataSource + UserDescription + Type + Direction + WellPath + SimulationWell + ProjectPolygon + Points + PointsUi + AzimuthAngle + DipAngle + CustomExtrusionPoints + TwoAzimuthPoints + Branch + ExtentLength + lengthUp + lengthDown + SurfaceIntersections + UpperThreshold + LowerThreshold + DepthFilter + CollectionUpperThreshold + CollectionLowerThreshold + ThresholdOverridden + CollectionDepthFilterType + EnableKFilter + KRangeFilter + KFilterCollectionOverride + KRangeCollectionFilter + +DataContainerFloat - class RimcDataContainerDouble + values + +DataContainerString - class RimcDataContainerString + values + +DataContainerTime - class RimcDataContainerTime + values + +DeclineCurve - class RimSummaryDeclineCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + SummaryCase + SummaryAddress + Resampling + CurveTypeMode + CurveType + HorizontalAxisType + SummaryCaseX + SummaryAddressX + PlotAxis + Axis + XAxis + SummaryCurveNameConfig + isTopZWithinCategory + DeclineCurveType + PredictionYears + HyperbolicDeclineConstant + MinTimeSliderPosition + MaxTimeSliderPosition + ShowTimeSelectionInPlot + +DepthTrackPlot - class RimDepthTrackPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + TemplateText + PlotNamingMethod + DepthType + DepthUnit + MinimumDepth + MaximumDepth + ShowDepthGridLines + AutoScaleDepthEnabled + DepthAxisVisibility + ShowDepthMarkerLine + AutoZoomMinDepthFactor + AutoZoomMaxDepthFactor + DepthAnnotations + SubTitleFontSize + AxisTitleFontSize + AxisValueFontSize + NameConfig + FilterEnsembleCurveSet + DepthEqualization + Tracks + DepthOrientation + +DoubleParameter - class RimDoubleParameter + Name + Label + Description + Advanced + Valid + Value + +Eclipse2dViewCollection - class RimEclipseContourMapViewCollection + EclipseViews + +EclipseBoundingBoxCase - class RimRegularGridCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + ReservoirViews + MatrixModelResults + FractureModelResults + FlipXAxis + FlipYAxis + ContourMaps + InputPropertyCollection + ViewCollection + WellTargetMappings + UnitSystem + FlowDiagSolutions + SourSimFileName + MswMergeThreshold + Minimum + Maximum + CellCountI + CellCountJ + CellCountK + +EclipseCase - class RimEclipseResultCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + ReservoirViews + MatrixModelResults + FractureModelResults + FlipXAxis + FlipYAxis + ContourMaps + InputPropertyCollection + ViewCollection + WellTargetMappings + UnitSystem + FlowDiagSolutions + SourSimFileName + MswMergeThreshold + +EclipseGeometrySelectionItem - class RimEclipseGeometrySelectionItem + EclipseCase + GridIndex + CellIndex + CellText + +EclipseResultAddress - class RimEclipseResultAddress + ResultName + ResultType + EclipseCase + +EclipseViewCollection - class RimEclipseViewCollection + Views + +ElasticProperties - class RimElasticProperties + FilePath + ShowScaledProperties + PropertyScalingCollection + +ElasticPropertyScaling - class RimElasticPropertyScaling + Name + IsChecked + Formation + Facies + Property + Scale + +ElasticPropertyScalingCollection - class RimElasticPropertyScalingCollection + ElasticPropertyScalings + +EnsembleFractureStatistics - class RimEnsembleFractureStatistics + Name + FilePaths + ExcludeZeroWidthFractures + MeshAlignmentType + MeshType + NumberOfSamplesX + NumberOfSamplesY + AdaptiveMeanType + AdaptiveNumLayersType + AdaptiveNumLayers + SelectedStatisticsType + ComputeStatistics + +EnsembleFractureStatisticsPlot - class RimEnsembleFractureStatisticsPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + NumHistogramBins + HistogramBarColor + HistogramGapWidth + HistogramFrequencyType + Precision + TickNumberFormat + GraphType + AxisValueFontSize + AxisTitleFontSize + EnsembleFractureStatistics + Property + +EnsembleFractureStatisticsPlotCollection - class RimEnsembleFractureStatisticsPlotCollection + EnsembleFractureStatisticsPlots + +EnsembleStatisticsSurface - class RimEnsembleStatisticsSurface + SurfaceUserDecription + SurfaceColor + EnableOpacity + Opacity + DepthOffset + StatisticsType + +EnsembleSurface - class RimEnsembleSurface + SurfaceUserDecription + SubCollections + SurfacesField + FilterEnsembleCurveSet + +EnsembleWellLogStatisticsCurve - class RimEnsembleWellLogStatisticsCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + TrajectoryType + CurveWellPath + ReferenceWellPath + SimulationWellName + BranchDetection + Branch + CurveCase + CurveEclipseResult + CurveGeomechResult + CurveTimeStep + GeomPartId + AddCaseNameToCurveName + AddPropertyToCurveName + AddWellNameToCurveName + AddTimestepToCurveName + AddDateToCurveName + EnsembleWellLogCurveSet + StatisticsType + +EnsembleWellLogs - class RimEnsembleWellLogs + Name + WellLogFiles + +EnsembleWellLogsCollection - class RimEnsembleWellLogsCollection + EnsembleWellLogsCollection + +FaciesInitialPressureConfig - class RimFaciesInitialPressureConfig + IsChecked + FaciesName + FaciesValue + Fraction + +FaciesProperties - class RimFaciesProperties + FilePath + FaciesDefinition + ColorLegend + +Fault - class RimFaultInView + FaultName + ShowFault + Color + +FaultReactivationModel - class RimFaultReactivationModel + Name + IsChecked + UserDescription + GeoMechCase + BaseDirectory + ModelThickness + ModelExtentFromAnchor + ModelMinZ + ModelBelowSize + StartCellIndex + StartCellFace + FaultExtendUpwards + FaultExtendDownwards + FaultZoneCells + ShowModelPlane + Fault + ModelPart1Color + ModelPart2Color + MaxReservoirCellHeight + MinReservoirCellHeight + CellHeightGrowFactor + MinReservoirCellWidth + CellWidthGrowFactor + UseLocalCoordinates + TimeStepFilter + TimeSteps + UseGridPorePressure + UseGridVoidRatio + UseGridTemperature + UseGridDensity + UseGridElasticProperties + WaterDensity + FrictionAngle + SeabedTemperature + LateralStressCoefficient + StressSource + Targets + MaterialParameters + +FaultReactivationModelCollection - class RimFaultReactivationModelCollection + Name + IsChecked + UserDescription + FaultReactivationModels + +Faults - class RimFaultInViewCollection + Active + ShowFaultFaces + ShowOppositeFaultFaces + ApplyCellFilters + MeshLineThickness + OnlyShowWithDefNeighbor + FaultFaceCulling + ShowFaultLabel + FaultLabelColor + ShowNNCs + HideNncsWhenNoResultIsAvailable + Faults + ShowFaultsOutsideFilters + +FileSummaryCase - class RimFileSummaryCase + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + IncludeRestartFiles + AdditionalSummaryFilePath + RftCase + +FileSurface - class RimFileSurface + SurfaceUserDecription + SurfaceColor + EnableOpacity + Opacity + DepthOffset + SurfaceFilePath + +FishbonesCollection - class RimFishbonesCollection + Name + IsChecked + FishbonesSubs + StartMDAuto + StartMD + EndMDAuto + EndMD + MainBoreDiameter + MainBoreSkinFactor + +FishbonesMultipleSubs - class RimFishbones + Active + Name + Color + LateralCountPerSub + LateralLength + LateralExitAngle + LateralBuildAngle + LateralTubingDiameter + LateralOpenHoleRoghnessFactor + LateralTubingRoghnessFactor + LateralInstallSuccessFraction + IcdCount + IcdOrificeDiameter + IcdFlowCoefficient + SubsLocationMode + RangeStart + RangeEnd + RangeSubSpacing + RangeSubCount + LocationOfSubs + ValveLocations + SubsOrientationMode + InstallationRotationAngles + FixedInstallationRotationAngle + LateralDiameter + LateralSkinFactor + PipeProperties + +FishbonesPipeProperties - class RimFishbonesPipeProperties + LateralHoleDiameter + SkinFactor + +FlowCharacteristicsPlot - class RimFlowCharacteristicsPlot + WindowController + ShowWindow + WindowGeometry + FlowCase + FlowDiagSolution + TimeSelectionType + SelectedTimeSteps + SelectedTimeStepsUi + CellPVThreshold + ShowLegend + CellFilter + CellFilterView + TracerFilter + SelectedTracerNames + MinCommunication + MaxTof + +FlowDiagSolution - class RimFlowDiagSolution + UserDescription + +FlowPlotCollection - class RimFlowPlotCollection + FlowCharacteristicsPlot + DefaultWellConnectivityTable + DefaultWellAllocationOverTimePlot + DefaultWellAllocationPlot + WellDistributionPlotCollection + StoredWellAllocationPlots + StoredFlowCharacteristicsPlots + +FormationNames - class RimFormationNames + FormationNamesFileName + +FormationNamesCollectionObject - class RimFormationNamesCollection + FormationNamesList + +FractureContainment - class RimFractureContainment + IsUsingFractureContainment + TopKLayer + BaseKLayer + TruncateAtFaults + FaultThrowValue + +FractureDefinitionCollection - class RimFractureTemplateCollection + DefaultUnitForTemplates + FractureDefinitions + NextValidFractureTemplateId + +FractureGroupStatisticsCollection - class RimEnsembleFractureStatisticsCollection + FractureGroupStatistics + +FractureTemplateCollection - class RimFractureTemplateCollection + DefaultUnitForTemplates + FractureDefinitions + NextValidFractureTemplateId + +GeoMech2dViewCollection - class RimGeoMechContourMapViewCollection + GeoMechViews + +GeoMechGeometrySelectionItem - class RimGeoMechGeometrySelectionItem + GeoMechCase + m_gridIndex + m_cellIndex + m_elementFace + m_hasIntersectionTriangle + m_intersectionTriangle_0 + m_intersectionTriangle_1 + m_intersectionTriangle_2 + m_localIntersectionPoint + +GeoMechPart - class RimGeoMechPart + Name + IsChecked + PartId + +GeoMechPartCollection - class RimGeoMechPartCollection + Parts + +GeoMechPropertyFilter - class RimGeoMechPropertyFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + SelectedValues + ResultDefinition + LinkedWithCellResult + LowerBound + UpperBound + +GeoMechPropertyFilters - class RimGeoMechPropertyFilterCollection + Active + PropertyFilters + +GeoMechResultDefinition - class RimGeoMechResultDefinition + IsChecked + ResultPositionType + ResultFieldName + ResultComponentName + TimeLapseBaseTimeStep + ReferenceTimeStep + CompactionRefLayer + NormalizeByHSP + NormalizationAirGap + +GeoMechResultSlot - class RimGeoMechCellColors + IsChecked + ResultPositionType + ResultFieldName + ResultComponentName + TimeLapseBaseTimeStep + ReferenceTimeStep + CompactionRefLayer + NormalizeByHSP + NormalizationAirGap + LegendDefinition + +GeoMechView - class RimGeoMechView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + CrossSections + IntersectionResultDefColl + ReservoirSurfaceResultDefColl + GridCollection + OverlayInfoConfig + WellMeasurements + SurfaceInViewCollection + SeismicSectionCollection + PolygonInViewCollection + RangeFilters + GridCellResult + TensorResults + FaultReactivationResult + PropertyFilters + Parts + ShowDisplacement + DisplacementScaling + +GridCaseSurface - class RimGridCaseSurface + SurfaceUserDecription + SurfaceColor + EnableOpacity + Opacity + DepthOffset + SourceCase + SliceIndex + Watertight + IncludeInactiveCells + +GridCollection - class RimGridCollection + IsActive + MainGrid + PersistentLgrs + +GridCrossPlotCurve - class RimGridCrossPlotCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + +GridCrossPlotCurveSet - class RimGridCrossPlotDataSet + Name + IsChecked + Case + TimeStep + VisibleCellView + Grouping + XAxisProperty + YAxisProperty + GroupingProperty + NameConfig + CrossPlotCurves + CrossPlotRegressionCurves + UseCustomColor + CustomColor + PlotCellFilterCollection + +GridCrossPlotRegressionCurve - class RimGridCrossPlotRegressionCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + RegressionType + MinExtrapolationRangeX + MaxExtrapolationRangeX + PolynomialDegree + MinRangeX + MaxRangeX + MinRangeY + MaxRangeY + ShowDataSelectionInPlot + +GridInfo - class RimGridInfo + IsActive + GridName + GridIndex + +GridInfoCollection - class RimGridInfoCollection + IsActive + GridInfos + +GridStatisticsPlot - class RimGridStatisticsPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + NumHistogramBins + HistogramBarColor + HistogramGapWidth + HistogramFrequencyType + Precision + TickNumberFormat + GraphType + AxisValueFontSize + AxisTitleFontSize + Case + TimeStep + VisibleCellView + Property + +GridStatisticsPlotCollection - class RimGridStatisticsPlotCollection + GridStatisticsPlots + +GridSummaryCase - class RimGridSummaryCase_obsolete + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + Associated3DCase + CachedCasename + Associated3DCaseGridFileName + IncludeRestartFiles + +GridTimeHistoryCurve - class RimGridTimeHistoryCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + GeometrySelectionText + IsLocked + EclipseResultDefinition + GeoMechResultDefinition + EclipseDataSource + GeoMechDataSource + PlotAxis + GeometrySelectionItem + +IntegerParameter - class RimIntegerParameter + Name + Label + Description + Advanced + Valid + Value + +Intersection2dView - class Rim2dIntersectionView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + Intersection + ShowDefiningPoints + ShowAxisLines + +Intersection2dViewCollection - class Rim2dIntersectionViewCollection + IntersectionViews + +IntersectionBox - class RimBoxIntersection + Active + ShowInactiveCells + UseSeparateIntersectionDataSource + SeparateIntersectionDataSource + UserDescription + singlePlaneState + MinXCoord + MaxXCoord + MinYCoord + MaxYCoord + MinDepth + MaxDepth + xySliderStepSize + DepthSliderStepSize + +IntersectionCollection - class RimIntersectionCollection + CrossSections + IntersectionBoxes + Active + UpperDepthThreshold + LowerDepthThreshold + DepthFilterOverride + CollectionDepthFilterType + OverrideKFilter + KRangeFilter + ApplyCellFilters + +IntersectionResultDefinition - class RimIntersectionResultDefinition + IsActive + Case + TimeStep + IntersectionResultDefinitionDescription + EclipseResultDef + GeoMechResultDef + LegendConfig + TernaryLegendConfig + +Legend - class RimRegularLegendConfig + ShowLegend + NumberOfLevels + Precision + TickNumberFormat + ColorRangeMode + ColorLegend + MappingMode + RangeType + UserDefinedMax + UserDefinedMin + CategoryColorMode + ResultVariableUsage + CenterLegendAroundZero + +ListParameter - class RimListParameter + Name + Label + Description + Advanced + Valid + Value + +MainPlotCollection - class RimMainPlotCollection + Show + WellLogPlotCollection + RftPlotCollection + PltPlotCollection + SummaryMultiPlotCollection + AnalysisPlotCollection + CorrelationPlotCollection + SummaryCrossPlotCollection + SummaryTableCollection + FlowPlotCollection + Rim3dCrossPlotCollection + RimSaturationPressurePlotCollection + RimMultiPlotCollection + StimPlanModelPlotCollection + VfpPlotCollection + GridStatisticsPlotCollection + EnsembleFractureStatisticsPlotCollection + SummaryPlotCollection + +MdiWindowController - class RimMdiWindowController + MainWindowID + xPos + yPos + Width + Height + IsMaximized + +MockModelSettings - class RimMockModelSettings + CellCountX + CellCountY + CellCountZ + TotalCellCount + ResultCount + TimeStepCount + +ModeledWellPath - class RimModeledWellPath + Name + (A)WellPathName + AirGap + DatumElevation + UnitSystem + SimWellName + SimBranchIndex + ShowWellPathLabel + MeasuredDepthLabelInterval + ShowWellPath + WellPathRadiusScale + WellPathColor + Completions + CompletionSettings + WellLogs + (A)WellLogFiles + CollectionOf3dWellLogCurves + WellPathFormationKeyInFile + WellPathFormationFilePath + WellPathAttributes + WellPathTieIn + WellIASettings + WellPathGeometryDef + +MultiPlot - class RimMultiPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + ProjectFileVersionString + ShowTitleInPlot + PlotDescription + Plots + NumberOfColumns + RowsPerPage + ShowPlotTitles + MajorTickmarkCount + SubTitleFontSize + PagePreviewMode + +MultiSnapshotDefinition - class RimAdvancedSnapshotExportDefinition + IsActive + View + EclipseResultType + SelectedEclipseResults + TimeStepStart + TimeStepEnd + SnapShotDirection + RangeFilterStart + RangeFilterEnd + AdditionalCases + +MultiSummaryPlot - class RimSummaryMultiPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + ProjectFileVersionString + ShowTitleInPlot + PlotDescription + Plots + NumberOfColumns + RowsPerPage + ShowPlotTitles + MajorTickmarkCount + SubTitleFontSize + PagePreviewMode + AutoPlotTitle + AutoSubPlotTitle + LinkSubPlotAxes + LinkTimeAxis + AutoAdjustAppearance + Allow3DSelectionLink + ReadOutSettings + AxisRangeAggregation + PlotFilterYAxisThreshold + DefaultStepDimension + +NonNetLayers - class RimNonNetLayers + IsChecked + Cutoff + Facies + FaciesDefinition + +ObservedDataCollection - class RimObservedDataCollection + ObservedDataArray + ObservedFmuRftDataArray + PressureDepthDataArray + +ObservedFmuRftData - class RimObservedFmuRftData + Name + Directory + +ObservedPressureDepthData - class RimPressureDepthData + Name + File + +OsduWellLog - class RimOsduWellLog + Date + WellLogChannels + (A)WellLogFileChannels + Name + WellLogId + +OsduWellLogChannel - class RimOsduWellLogChannel + Name + Id + Description + TopDepth + BaseDepth + InterpreterName + Quality + Unit + DepthUnit + +OsduWellPath - class RimOsduWellPath + Name + (A)WellPathName + AirGap + DatumElevation + UnitSystem + SimWellName + SimBranchIndex + ShowWellPathLabel + MeasuredDepthLabelInterval + ShowWellPath + WellPathRadiusScale + WellPathColor + Completions + CompletionSettings + WellLogs + (A)WellLogFiles + CollectionOf3dWellLogCurves + WellPathFormationKeyInFile + WellPathFormationFilePath + WellPathAttributes + WellPathTieIn + WellIASettings + WellId + WellboreId + WellboreTrajectoryId + DatumElevationFromOsdu + +ParameterGroup - class RimParameterGroup + Parameters + Name + Label + Comment + Expanded + ParameterLists + +ParameterList - class RimParameterList + ParameterNames + Name + Label + +ParameterResultCrossPlot - class RimParameterResultCrossPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + AnalysisPlotData + TimeStepFilter + TimeStep + AutoTitle + PlotTitle + LabelFontSize + AxisTitleFontSize + AxisValueFontSize + UseCaseFilter + CurveSetForFiltering + EditCaseFilter + EnsembleParameter + UseParameterFilter + SummaryFilterRange + ParameterFilterRange + ExcludedCasesText + +PdmDocument - class caf::PdmDocument + DocumentFileName + +PdmObjectCollection - class caf::PdmObjectCollection + PdmObjects + +PdmObjectGroup - class caf::PdmObjectGroup + +Perforation - class RimPerforationInterval + Name + IsChecked + StartMeasuredDepth + EndMeasuredDepth + Diameter + SkinFactor + StartOfHistory + UseCustomStartDate + StartDate + UseCustomEndDate + EndDate + Valves + +PerforationCollection - class RimPerforationCollection + Name + IsChecked + Perforations + NonDarcyParameters + +PlotCurve - class RimPlotCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + +PlotDataFilterCollection - class RimPlotDataFilterCollection + IsActive + PlotDataFiltersField + +PlotDataFilterItem - class RimPlotDataFilterItem + IsActive + FilterTarget + FilterAddressField + QuantityText + FilterOperation + MinTopN + Max + Min + EnsembleParameterValueCategories + ConsideredTimestepsType + ExplicitlySelectedTimeSteps + +PlotTemplateCollection - class RimPlotTemplateFolderItem + FolderName + FileNames + SubFolders + +PlotTemplateFileItem - class RimPlotTemplateFileItem + AbsolutePath + +PolyLineFilter - class RimPolygonFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + PolygonFilterType + PolyIncludeType + PolygonDataSource + GeometricalShape + InternalPolygon + Polygon + EnableFiltering + EnableKFilter + KRangeFilter + Targets + +PolygonFilter - class RimPolygonFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + PolygonFilterType + PolyIncludeType + PolygonDataSource + GeometricalShape + InternalPolygon + Polygon + EnableFiltering + EnableKFilter + KRangeFilter + Targets + +PolylineTarget - class RimPolylineTarget + TargetPointXyd + +PolylinesFromFileAnnotation - class RimPolylinesFromFileAnnotation + IsActive + ClosePolyline + ShowLines + ShowSpheres + Appearance + PolyLineFilePath + PolyLineDescription + +PressureTable - class RimPressureTable + Items + PressureDate + +PressureTableItem - class RimPressureTableItem + Depth + InitialPressure + Pressure + +PropertyFilter - class RimPropertyFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + SelectedValues + +RegressionAnalysisCurve - class RimSummaryRegressionAnalysisCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + SummaryCase + SummaryAddress + Resampling + CurveTypeMode + CurveType + HorizontalAxisType + SummaryCaseX + SummaryAddressX + PlotAxis + Axis + XAxis + SummaryCurveNameConfig + isTopZWithinCategory + DataSourceForRegression + SourceCurveSet + EnsembleStatisticsType + RegressionType + ForecastForward + ForecastBackward + ForecastUnit + PolynomialDegree + TimeRangeSelection + MinTimeSliderPosition + MaxTimeSliderPosition + ShowTimeSelectionInPlot + XRangeSelection + ValueRangeX + YRangeSelection + ValueRangeY + +ResInsightAnalysisModels - class RimEclipseCaseCollection + Reservoirs + CaseGroups + CaseEnsembles + +ResInsightGeoMechCase - class RimGeoMechCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + GeoMechViews + CaseCohesion + FrctionAngleDeg + ElementPropertyFileNames + BiotCoefficientType + BiotFixedCoefficient + BiotResultAddress + InitialPermeabilityType + InitialPermeabilityFixed + InitialPermeabilityAddress + PermeabilityExponent + WaterDensityShearSlipIndicator + ContourMaps + MudWeightWindowParameters + +ResInsightGeoMechModels - class RimGeoMechModels + Cases + +ResInsightOilField - class RimOilField + AnalysisModels + GeoMechModels + WellPathCollection + CompletionTemplateCollection + SummaryCaseCollection + FormationNamesCollection + ObservedDataCollection + AnnotationCollection + EnsembleWellLogsCollection + PolygonCollection + FractureDefinitionCollection + SurfaceCollection + SeismicCollection + SeismicViewCollection + EclipseViewCollection + ContourMaps + VfpDataCollection + CloudDataCollection + +ResInsightProject - class RimProject + DocumentFileName + ProjectFileVersionString + ReferencedExternalFiles + OilFields + ColorLegendCollection + MainPlotCollection + PinnedFieldCollection + LinkedViews + CalculationCollection + GridCalculationCollection + MultiSnapshotDefinitions + TreeViewStates + TreeViewCurrentModelIndexPaths + PlotWindowTreeViewStates + PlotWindowTreeViewCurrentModelIndexPaths + show3DWindow + showPlotWindow + showPlotWindowOnTopOf3DWindow + tiled3DWindow + tiledPlotWindow + DialogData + Reservoirs + CaseGroups + TileMode3DWindow + TileModePlotWindow + AutomationSettings + +ResampleData - class RimcSummaryResampleData + TimeSteps + Values + +ReservoirCellResultStorage - class RimReservoirCellResultsStorage + ResultCacheFileName + ResultCacheEntries + +ReservoirView - class RimEclipseView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + CrossSections + IntersectionResultDefColl + ReservoirSurfaceResultDefColl + GridCollection + OverlayInfoConfig + WellMeasurements + SurfaceInViewCollection + SeismicSectionCollection + PolygonInViewCollection + RangeFilters + CustomEclipseCase + EclipseCase + CaseChangeBehaviour + GridCellResult + GridCellEdgeResult + ElementVectorResult + FaultResultSettings + StimPlanColors + VirtualPerforationResult + WellCollection + FaultCollection + FaultReactivationModelCollection + AnnotationCollection + StreamlineCollection + PropertyFilters + ShowInactiveCells + ShowInvalidCells + AdditionalResultsForResultInfo + CameraPositions + +ResultDefinition - class RimEclipseResultDefinition + IsChecked + ResultType + PorosityModelType + ResultVariable + FlowDiagSolution + TimeLapseBaseTimeStep + DifferenceCase + DivideByCellFaceArea + SelectedInjectorTracers + SelectedProducerTracers + SelectedSouringTracers + FlowTracerSelectionMode + PhaseSelection + ShowOnlyVisibleCategoriesInLegend + MSyncSelectedInjProd + MSyncSelectedProdInj + +ResultSlot - class RimEclipseCellColors + IsChecked + ResultType + PorosityModelType + ResultVariable + FlowDiagSolution + TimeLapseBaseTimeStep + DifferenceCase + DivideByCellFaceArea + SelectedInjectorTracers + SelectedProducerTracers + SelectedSouringTracers + FlowTracerSelectionMode + PhaseSelection + ShowOnlyVisibleCategoriesInLegend + MSyncSelectedInjProd + MSyncSelectedProdInj + LegendDefinition + ResultVarLegendDefinitionList + TernaryLegendDefinition + LegendDefinitionPtrField + +ResultStorageEntryInfo - class RimReservoirCellResultsStorageEntryInfo + ResultType + ResultName + TimeSteps + DaysSinceSimulationStart + FilePositionDataStart + +RftAddress - class RimDataSourceForRftPlt + SourceType + EclipseCase + SummaryCase + Ensemble + WellLogFile + ObservedFmuRftData + PressureDepthData + +RiaMemoryCleanup - class RiaMemoryCleanup + DataCase + ResultsToDelete + +RiaPreferences - class RiaPreferences + navigationPolicy + enableGrpcServer + defaultGrpcPort + scriptDirectory + scriptEditorExecutable + MaxScriptFoldersDepth + octaveExecutable + octaveShowHeaderInfoWhenExecutingScripts + octavePortNumber + pythonExecutable + pythonDebugInfo + loggerFilename + loggerFlushInterval + loggerTrapSignalAndFlush + storeBackupOfProjectFile + defaultMeshModeType + defaultGridLineColors + defaultFaultGridLineColors + defaultWellLableColor + defaultViewerBackgroundColor + defaultScaleFactorZ + defaultSceneFontSizePt + defaultAnnotationFontSizePt + defaultWellLabelFontSizePt + defaultPlotFontSizePt + showLegendBackground + enableFaultsByDefault + showInfoBox + showGridBox + lastUsedProjectFileName + holoLensDisableCertificateVerification + csvTextExportFieldSeparator + dateFormat + timeFormat + useUndoRedo + plotTemplateFolders + MaxPlotTemplateFoldersDepth + defaultPlotTemplate + pageSize + pageOrientation + pageLeftMargin + pageTopMargin + pageRightMargin + pageBottomMargin + openExportedPdfInViewer + writeEchoInGrdeclFiles + useQtChartsPlotByDefault + gridCalculationExpressionFolder + summaryCalculationExpressionFolder + SurfaceImportResamplingDistance + MultiLateralWellPattern + guiTheme + summaryPreferences + gridPreferences + geoMechPreferences + systemPreferences + osduPreferences + sumoPreferences + +RiaPreferencesGeoMech - class RiaPreferencesGeoMech + geomechWIADefaultXML + geomechWIACommand + geomechFRMDefaultXML + geomechFRMCommand + keepTemporaryFile + waitForInputFileEdit + +RiaPreferencesOsdu - class RiaPreferencesOsdu + server + dataPartitionId + authority + scopes + clientId + +RiaPreferencesSummary - class RiaPreferencesSummary + summaryRestartFilesShowImportDialog + summaryImportMode + gridImportMode + summaryEnsembleImportMode + defaultSummaryHistoryCurveStyle + defaultSummaryCurvesTextFilter + defaultSummaryPlot + CrossPlotAddressCombinations + defaultSummaryTemplates + createEnhancedSummaryDataFile_v01 + useEnhancedSummaryDataFile + createH5SummaryDataFile_v01 + createH5SummaryFileThreadCount + summaryReaderType_v01 + showSummaryTimeAsLongString + useMultipleThreadsWhenLoadingSummaryCases + DefaultNumberOfColumns + DefaultRowsPerPage + curveColorByPhase + appendHistoryVectorForDragDrop + historyCurveContrastColor + +RiaPreferencesSumo - class RiaPreferencesSumo + server + authority + scopes + clientId + +RiaPreferencesSystem - class RiaPreferencesSystem + useShaders + showHud + appendClassNameToUiText + appendFieldKeywordToToolTipText + showViewIdInTree + showTestToolbar + includeFractureDebugInfoFile + holoLensExportFolder + showProjectChangedDialog + showProgressBar + showPdfExportDialog + gtestFilter + exportScalingFactor + eclipseReaderMode + KeywordsForLogging + +RiaRegressionTest - class RiaRegressionTest + workingFolder + folderContainingDiffTool + folderContainingGitTool + regressionTestFolder + showInteractiveDiffImages + useOpenMPForGeometryCreation + openReportInBrowser + testFilter + appendTestsAfterTestFilter + invalidateExternalFilePaths + activateObjectsInPropertyEditor + forcePlotEngine + exportSnapshots3dViews + exportSnapshotsPlots + +RicCaseAndFileExportSettingsUi - class RicCaseAndFileExportSettingsUi + Folder + CaseToApply + +RicCellRangeUi - class RicCellRangeUi + Case + GridIndex + StartIndexI + StartIndexJ + StartIndexK + CellCountI + CellCountJ + CellCountK + +RicCreateDepthAdjustedLasFilesUi - class RicCreateDepthAdjustedLasFilesUi + ExportFolder + SelectedCase + SourceWell + WellLogFile + SelectedResultProperties + DestinationWells + +RicCreateEnsembleSurfaceUi - class RicCreateEnsembleSurfaceUi + Layers + AutoCreateEnsembleSurfaces + MinLayer + MaxLayer + +RicCreateEnsembleWellLogUi - class RicCreateEnsembleWellLogUi + AutoCreateEnsembleWellLogs + TimeStep + WellPathSource + WellPath + WellFilePath + SelectedProperties + +RicCreateMultipleWellPathLateralsUi - class RicCreateMultipleWellPathLateralsUi + SourceLaterals + TopLevelWellPath + Locations + +RicCreateRftPlotsFeatureUi - class RicCreateRftPlotsFeatureUi + SelectedWellNames + +RicDeleteItemExecData - class RicDeleteItemExecData + PathToField + Description + indexToObject + deletedObjectAsXml + +RicExportCarfinUi - class RicExportCarfinUi + CellRange + ExportFileName + CaseToApply + CellCountI + CellCountJ + CellCountK + MaxWellCount + +RicExportCompletionDataSettingsUi - class RicExportCompletionDataSettingsUi + Folder + CaseToApply + FileSplit + compdatExport + TimeStepIndex + IncludeMSW + UseLateralNTG + IncludePerforations + IncludeFishbones + IncludeFractures + TransScalingType + TransScalingTimeStep + TransScalingWBHPSource + TransScalingWBHP + ExcludeMainBoreForFishbones + ReportCompletionTypesSeparately + ExportDataSourceAsComment + ExportWelspec + CompletionWelspecAfterMainBore + UseCustomFileName + CustomFileName + +RicExportContourMapToTextUi - class RicExportContourMapToTextUi + ExportFileName + ExportLocalCoordinates + UndefinedValueLabel + ExcludeUndefinedValues + +RicExportEclipseInputGridUi - class RicExportEclipseSectorModelUi + ExportGrid + ExportGridFilename + ExportInLocalCoords + InvisibleCellActnum + GridBoxSelection + MinI + MinJ + MinK + MaxI + MaxJ + MaxK + ExportFaults + ExportFaultsFilename + RefinementCountI + RefinementCountJ + RefinementCountK + ExportParams + ExportParamsFilename + ExportMainKeywords + WriteEchoInGrdeclFiles + ExportFolder + +RicExportLgrUi - class RicExportLgrUi + ExportFolder + CaseToApply + TimeStepIndex + IncludePerforations + IncludeFractures + IncludeFishbones + CellCountI + CellCountJ + CellCountK + SplitType + +RicExportToLasFileObj - class RicExportToLasFileObj + tvdrkbOffset + +RicExportToLasFileResampleUi - class RicExportToLasFileResampleUi + ExportFolder + FilePrefix + CapitalizeFileName + CurveUnitConversion + ActivateResample + ResampleInterval + ExportTvdrkb + tvdrkbOffsets + +RicExportWellPathsUi - class RicExportWellPathsUi + ExportFolder + MdStepSize + +RicGridCalculator - class RicGridCalculatorUi + CurrentCalculation + +RicHoloLensCreateSessionUi - class RicHoloLensCreateSessionUi + SessionName + SessionPinCode + ServerSettings + +RicHoloLensExportToFolderUi - class RicHoloLensExportToFolderUi + ViewForExport + ExportFolder + +RicHoloLensServerSettings - class RicHoloLensServerSettings + ServerAddress + +RicLinkVisibleViewsFeatureUi - class RicLinkVisibleViewsFeatureUi + MasterView + +RicPasteAsciiDataToSummaryPlotFeatureUi - class RicPasteAsciiDataToSummaryPlotFeatureUi + PlotTitle + CurvePrefix + DecimalSeparator + DateFormat + TimeFormat + UseCustomDateFormat + CustomDateTimeFormat + LineStyle + Symbol + SymbolSkipDinstance + CellSeparator + TimeColumnName + +RicSaturationPressureUi - class RicSaturationPressureUi + CaseToApply + TimeStep + +RicSaveEclipseInputVisibleCellsUi - class RicSaveEclipseInputVisibleCellsUi + ExportFilename + ExportKeyword + VisibleActiveCellsValue + HiddenActiveCellsValue + InactiveCellsValue + WriteEchoInGrdeclFiles + +RicSaveMultiPlotTemplateFeatureSettings - class RicSaveMultiPlotTemplateFeatureSettings + FilePath + Name + PersistObjectNameWells + PersistObjectNameGroups + PersistObjectNameRegions + +RicSelectCaseOrEnsembleUi - class RicSelectCaseOrEnsembleUi + SelectedSummaryCase + SelectedEnsemble + +RicSelectPlotTemplateUi - class RicSelectPlotTemplateUi + SelectedPlotTemplates + +RicSelectSummaryPlotUI - class RicSelectSummaryPlotUI + SelectedSummaryPlot + CreateNewPlot + NewViewName + +RicSelectViewUI - class RicSelectViewUI + MasterView + CreateNewView + NewViewName + +RicSelectWellPathUi - class RicSelectWellPathUi + SelectedWellPath + +RicSummaryAddressSelection - class RiuSummaryVectorSelectionUi + SummaryCases + CurrentSummaryCategory + SelectedSummaryCategories + FieldVectors + FieldCalculationIds + Aquifers + AquiferVectors + AquifierCalculationIds + NetworkNames + NetworkVectors + NetworkCalculationIds + MiscVectors + MiscCalculationIds + Regions + RegionsVectors + RegionCalculationIds + Region2RegionRegions + Region2RegionVectors + Region2RegionCalculationIds + WellGroupWellGroupNames + WellGroupVectors + WellGroupCalculationIds + WellWellName + WellVectors + WellCalculationIds + WellConnectionWellName + WellConnectionIjk + WellConnectionVectors + WellConnectionCalculationIds + WellConnectionLgrLgrName + WellConnectionLgrWellName + WellConnectionLgrIjk + WellConnectionLgrVectors + WellConnectionLgrCalculationIds + WellLgrLgrName + WellLgrWellName + WellLgrVectors + WellLgrCalculationIds + WellSegmentWellName + WellSegmentNumber + WellSegmentVectors + WellSegmentCalculationIds + WellCompletionWellName + WellCompletionNumber + WellCompletionVectors + WellCompletionCalculationIds + BlockIjk + BlockVectors + BlockCalculationIds + BlockLgrLgrName + BlockLgrIjk + BlockLgrVectors + BlockLgrCalculationIds + ImportedVectors + ImportedCalculationIds + +RicSummaryCurveCalculator - class RicSummaryCurveCalculatorUi + CurrentCalculation + +RicSummaryCurveCreator - class RicSummaryPlotEditorUi + TargetPlot + ApplySelection + Close + OK + +RicWellPathsUnitSystemSettingsUi - class RicWellPathsUnitSystemSettingsUi + UnitSystem + +RifReaderSettings - class RiaPreferencesGrid + gridModelReader + importFaults + importSimulationNNCs + includeInactiveCellsInFaultGeometry + importAdvancedMswData + useResultIndexFile + skipWellData + includeFileAbsolutePathPrefix + autocomputeDepth + loadAndShowSoil + onlyLoadActiveCells + invalidateLongThinCells + +Rim3dWellLogCurveCollection - class Rim3dWellLogCurveCollection + Show3dWellLogCurves + PlaneWidthScaling + Show3dWellLogGrid + Show3dWellLogBackground + ArrayOf3dWellLogCurves + +Rim3dWellLogExtractionCurve - class Rim3dWellLogExtractionCurve + Show3dWellLogCurve + MinCurveValue + MaxCurveValue + DrawPlane + CurveColor + CurveCase + CurveTimeStep + GeomPartId + CurveEclipseResult + CurveGeomechResult + NameConfig + +Rim3dWellLogFileCurve - class Rim3dWellLogFileCurve + Show3dWellLogCurve + MinCurveValue + MaxCurveValue + DrawPlane + CurveColor + CurveWellLogChannel + WellLog + (A)WellLogFile + NameConfig + +Rim3dWellLogRftCurve - class Rim3dWellLogRftCurve + Show3dWellLogCurve + MinCurveValue + MaxCurveValue + DrawPlane + CurveColor + eclipseResultCase + timeStep + wellLogChannelName + NameConfig + +RimAnnotationCollection - class RimAnnotationCollection + IsActive + TextAnnotations + ReachCircleAnnotations + UserDefinedPolylineAnnotations + PolylineFromFileAnnotations + +RimAnnotationCollectionBase - class RimAnnotationCollectionBase + IsActive + TextAnnotations + +RimAnnotationGroupCollection - class RimAnnotationGroupCollection + IsActive + Annotations + +RimAnnotationLineAppearance - class RimAnnotationLineAppearance + LineFieldsHidden + Color + Thickness + +RimAnnotationTextAppearance - class RimAnnotationTextAppearance + FontSize + FontColor + BackgroundColor + AnchorLineColor + +RimAutomationSettings - class RimAutomationSettings + CellSelectionDestination + +RimBinaryExportSettings - class RimBinaryExportSettings + Filename + EclipseKeyword + UndefinedValue + WriteEchoInGrdeclFiles + +RimCameraPosition - class RimCameraPosition + EclipseCase + CameraPosition + CameraPointOfInterest + +RimCaseCollection - class RimCaseCollection + Reservoirs + +RimCellFilterCollection - class RimCellFilterCollection + Active + CombineFilterMode + CellFilters + RangeFilters + +RimCloudDataSourceCollection - class RimCloudDataSourceCollection + SumoFieldId + SumoCaseId + SumoEnsembleNames + SumoDataSources + +RimCommandRouter - class RimCommandRouter + +RimContourMapView - class RimEclipseContourMapView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + CrossSections + IntersectionResultDefColl + ReservoirSurfaceResultDefColl + GridCollection + OverlayInfoConfig + WellMeasurements + SurfaceInViewCollection + SeismicSectionCollection + PolygonInViewCollection + RangeFilters + CustomEclipseCase + EclipseCase + CaseChangeBehaviour + GridCellResult + GridCellEdgeResult + ElementVectorResult + FaultResultSettings + StimPlanColors + VirtualPerforationResult + WellCollection + FaultCollection + FaultReactivationModelCollection + AnnotationCollection + StreamlineCollection + PropertyFilters + ShowInactiveCells + ShowInvalidCells + AdditionalResultsForResultInfo + CameraPositions + ContourMapProjection + ShowAxisLines + ShowScaleLegend + ShowFaultLines + +RimCsvUserData - class RimCsvUserData + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + UseCustomIdentifier + SummaryType + IdentifierName + ParseOptions + +RimCustomObjectiveFunction - class RimCustomObjectiveFunction + FunctionTitle + CustomFunctionTitle + Weights + ObjectiveFunctions + +RimCustomObjectiveFunctionCollection - class RimCustomObjectiveFunctionCollection + ObjectiveFunctions + +RimCustomObjectiveFunctionWeight - class RimCustomObjectiveFunctionWeight + WeightTitle + ObjectiveSummaryAddress + WeightValue + ObjectiveFunction + +RimCustomVfpPlot - class RimCustomVfpPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + PlotTitle + MainDataSouce + ComparisonTables + CurveValueOptions + CurveMatchingType + TableType + TableNumber + ReferenceDepth + FlowingPhase + FlowingWaterFraction + FlowingGasFraction + InterpolatedVariable + PrimaryVariable + FamilyVariable + LiquidFlowRate + THP + ArtificialLiftQuantity + WaterCut + GasLiquidRatio + xAxisProperties + yAxisProperties + CurveThickness + CurveSymbolSize + PlotCurves + ColorLegend + LegendConfig + +RimDeltaSummaryCase - class RimDeltaSummaryCase + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + SummaryCase1 + Operator + SummaryCase2 + UseFixedTimeStep + FixedTimeStepIndex + InUse + +RimDeltaSummaryEnsemble - class RimDeltaSummaryEnsemble + SummaryCases + SummaryCollectionName + CreateAutoName + UseKey1 + UseKey2 + NameTemplateString + GroupingMode + NameCount + IsEnsemble + Id + (A)EnsembleId + Description + Ensemble1 + Ensemble2 + Operator + CaseCount + MatchOnParameters + DiscardMissingOrIncompleteRealizations + UseFixedTimeStep + FixedTimeStepIndex + +RimDepthSurface - class RimDepthSurface + SurfaceUserDecription + SurfaceColor + EnableOpacity + Opacity + DepthOffset + MinX + MaxX + MinY + MaxY + Depth + DepthLowerLimit + DepthUpperLimit + AreaOfInterestMin + AreaOfInterestMax + +RimDerivedEnsembleCase - class RimDeltaSummaryCase + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + SummaryCase1 + Operator + SummaryCase2 + UseFixedTimeStep + FixedTimeStepIndex + InUse + +RimDerivedEnsembleCaseCollection - class RimDeltaSummaryEnsemble + SummaryCases + SummaryCollectionName + CreateAutoName + UseKey1 + UseKey2 + NameTemplateString + GroupingMode + NameCount + IsEnsemble + Id + (A)EnsembleId + Description + Ensemble1 + Ensemble2 + Operator + CaseCount + MatchOnParameters + DiscardMissingOrIncompleteRealizations + UseFixedTimeStep + FixedTimeStepIndex + +RimDialogData - class RimDialogData + ExportCarfin + ExportCompletionData + MultipleFractionsData + HoloLenseExportToFolderData + ExportwellPathsData + ExportLgr + ExportSectorModel + MockModelSettings + CreateEnsembleSurfaceUi + CreateEnsembleWellLogUi + +RimEclipseCaseEnsemble - class RimEclipseCaseEnsemble + Name + Id + CaseCollection + ViewCollection + WellTargetMappings + StatisticsContourMaps + +RimEclipseContourMapProjection - class RimEclipseContourMapProjection + Name + IsChecked + Resolution + ResultAggregation + OilFloodingType + UserDefinedFloodingOil + GasFloodingType + UserDefinedFloodingGas + ContourLines + ContourLabels + SmoothContourLines + ValueFilterType + UpperThreshold + LowerThreshold + WeightByParameter + WeightingResult + +RimEclipseResultAddressCollection - class RimEclipseResultAddressCollection + Name + Addresses + ResultType + +RimElementVectorResult - class RimElementVectorResult + LegendDefinition + ShowOil + ShowGas + ShowWater + ShowResult + VectorView + VectorSurfaceCrossingLocation + ShowVectorI + ShowVectorJ + ShowVectorK + ShowNncData + Threshold + VectorColor + UniformVectorColor + SizeScale + +RimEllipseFractureTemplate - class RimEllipseFractureTemplate + Id + UserDescription + UnitSystem + Orientation + UserDefinedPerforationLength + AzimuthAngle + SkinFactor + PerforationLength + PerforationEfficiency + WellDiameter + ConductivityType + WellPathDepthAtFracture + FractureContainmentField + NonDarcyFlowType + UserDefinedDFactor + FractureWidthType + FractureWidth + BetaFactorType + InertialCoefficient + PermeabilityType + RelativePermeability + EffectivePermeability + RelativeGasDensity + GasViscosity + HeightScaleFactor + WidthScaleFactor + DFactorScaleFactor + ConductivityFactor + HalfLength + Height + Width + Permeability + +RimEmCase - class RimEmCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + ReservoirViews + MatrixModelResults + FractureModelResults + FlipXAxis + FlipYAxis + ContourMaps + InputPropertyCollection + ViewCollection + WellTargetMappings + +RimEnsembleCurveFilter - class RimEnsembleCurveFilter + FilterTitle + Active + FilterMode + EnsembleParameter + ObjectiveSummaryAddress + ObjectiveFunction + CustomObjectiveFunction + MinValue + MaxValue + Categories + RealizationFilter + +RimEnsembleCurveFilterCollection - class RimEnsembleCurveFilterCollection + Active + CurveFilters + +RimEnsembleCurveSet - class RimEnsembleCurveSet + IsActive + SummaryGroup + SummaryAddress + Resampling + HorizontalAxisType + XAddressSelector + ColorMode + Color + MainEnsembleColor + ColorTransparency + EnsembleParameter + EnsembleParameterSorting + UseCustomAppearance + LineStyle + PointSymbol + SymbolSize + StatisticsUseCustomAppearance + StatisticsLineStyle + StatisticsPointSymbol + StatisticsSymbolSize + ObjectiveSummaryAddress + CustomObjectiveFunction + ShowObjectiveFunctionFormula + MinDateRange + MinTimeSliderPosition + MaxDateRange + MaxTimeSliderPosition + TimeStepFilter + TimeSteps + PlotAxis + Axis + LegendConfig + CurveFilters + CustomObjectiveFunctions + ObjectiveFunction + Statistics + UserDefinedName + AutoName + SummaryAddressNameTools + +RimEnsembleCurveSetCollection - class RimEnsembleCurveSetCollection + EnsembleCurveSets + IsActive + +RimEnsembleStatistics - class RimEnsembleStatistics + Active + ShowStatisticsCurveLegends + HideEnsembleCurves + ShowEnsembleCurves + BasedOnFilteredCases + ShowP10Curve + ShowP50Curve + ShowP90Curve + ShowMeanCurve + ShowCurveLabels + IncludeIncompleteCurves + CrossPlotCurvesBinCount + CrossPlotCurvesStatisticsRealizationCountThresholdPerBin + Color + +RimEnsembleWellLogCurveSet - class RimEnsembleWellLogCurveSet + EnsembleCurveSet + IsActive + EnsembleWellLogs + WellLogChannelName + FilterEnsembleCurveSet + DepthEqualization + ColorMode + Color + Statistics + UserDefinedName + AutoName + PlotCurveAppearance + +RimEquilibriumAxisAnnotation - class RimEquilibriumAxisAnnotation + Active + Name + Value + RangeStart + RangeEnd + PenStyle + TextAlignment + Color + AnnotationType + Associated3DCase + m_equilNum + +RimExportInputSettings - class RimExportInputSettings + Filename + Keyword + WriteEchoInGrdeclFiles + +RimFaultResultSlot - class RimEclipseFaultColors + ShowCustomFaultResult + CustomResultSlot + +RimFieldQuickAccess - class RimFieldQuickAccess + FieldReference + +RimFieldQuickAccessGroup - class RimFieldQuickAccessGroup + Name + FieldReferences + OwnerView + +RimFieldReference - class RimFieldReference + Object + FieldKeyword + +RimFieldSelection - class RimFieldSelection + ObjectName + Keywords + +RimFractureExportSettings - class RimFractureExportSettings + Filename + CaseToApply + +RimFractureSurface - class RimFractureSurface + SurfaceUserDecription + SurfaceColor + EnableOpacity + Opacity + DepthOffset + SurfaceFilePath + +RimGeoMechContourMapProjection - class RimGeoMechContourMapProjection + Name + IsChecked + Resolution + ResultAggregation + OilFloodingType + UserDefinedFloodingOil + GasFloodingType + UserDefinedFloodingGas + ContourLines + ContourLabels + SmoothContourLines + ValueFilterType + UpperThreshold + LowerThreshold + LimitToPorRegion + VerticalLimit + PaddingAroundPorRegion + +RimGeoMechContourMapView - class RimGeoMechContourMapView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + CrossSections + IntersectionResultDefColl + ReservoirSurfaceResultDefColl + GridCollection + OverlayInfoConfig + WellMeasurements + SurfaceInViewCollection + SeismicSectionCollection + PolygonInViewCollection + RangeFilters + GridCellResult + TensorResults + FaultReactivationResult + PropertyFilters + Parts + ShowDisplacement + DisplacementScaling + ContourMapProjection + ShowAxisLines + ShowScaleLegend + +RimGeoMechFaultReactivationResult - class RimGeoMechFaultReactivationResult + DistanceFromFault + FaultNormal + FaultTopPosition + FaultBottomPosition + FaceAWellPath + FaceBWellPath + FaceAWellPathPartIndex + FaceBWellPathPartIndex + +RimGridCalculation - class RimGridCalculation + Description + Expression + Unit + Variables + Id + VisibleCellView + DefaultValueType + DefaultValue + DestinationCase + AllDestinationCase + AdditionalCasesType + AdditionalCaseGroup + AdditionalEnsemble + NonVisibleResultAddress + SelectedTimeSteps + +RimGridCalculationCollection - class RimGridCalculationCollection + Calculations + +RimGridCalculationVariable - class RimGridCalculationVariable + VariableName + ResultType + ResultVariable + EclipseGridCase + TimeStep + +RimGridCrossPlot - class RimGridCrossPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + ShowInfoBox + NameConfig + xAxisProperties + yAxisProperties + CrossPlotCurve + +RimGridCrossPlotCollection - class RimGridCrossPlotCollection + GridCrossPlots + +RimGridCrossPlotCurveSetNameConfig - class RimGridCrossPlotDataSetNameConfig + CustomCurveName + AddCaseName + AddAxisVariables + AddTimeStep + AddGrouping + +RimGridCrossPlotNameConfig - class RimGridCrossPlotNameConfig + CustomCurveName + AddDataSetNames + +RimIdenticalGridCaseGroup - class RimIdenticalGridCaseGroup + UserDescription + GroupId + StatisticsCaseCollection + CaseCollection + +RimInputProperty - class RimEclipseInputProperty + ResultName + EclipseKeyword + FileName + +RimInputPropertyCollection - class RimEclipseInputPropertyCollection + InputProperties + +RimInputReservoir - class RimEclipseInputCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + ReservoirViews + MatrixModelResults + FractureModelResults + FlipXAxis + FlipYAxis + ContourMaps + InputPropertyCollection + ViewCollection + WellTargetMappings + AdditionalFileNamesProxy + +RimIntersectionResultsDefinitionCollection - class RimIntersectionResultsDefinitionCollection + isActive + IntersectionResultDefinitions + +RimMeasurement - class RimMeasurement + +RimMswCompletionParameters - class RimMswCompletionParameters + RefMDType + RefMD + CustomValuesForLateral + LinerDiameter + RoughnessFactor + PressureDrop + LengthAndDepth + EnforceMaxSegmentLength + MaxSegmentLength + +RimMudWeightWindowParameters - class RimMudWeightWindowParameters + WellDeviationSourceType + WellDeviationFixed + WellDeviationAddress + WellAzimuthSourceType + WellAzimuthFixed + WellAzimuthAddress + UCSSourceType + UCSFixed + UCSAddress + PoissonsRatioSourceType + PoissonsRatioFixed + PoissonsRatioAddress + K0_FGSourceType + K0_FGFixed + K0_FGAddress + obg0SourceType + obg0Fixed + obg0Address + AirGap + SHMultiplier + UpperLimitType + LowerLimitType + FractureGradientCalculationType + PorePressureNonReservoirSource + UserPPNonReservoir + PPNonReservoirAddress + ReferenceLayer + +RimMultiPlotCollection - class RimMultiPlotCollection + MultiPlots + +RimMultipleEclipseResults - class RimMultipleEclipseResults + IsChecked + showCenterCoordinates + showCornerCoordinates + SelectedProperties + +RimMultipleLocations - class RimMultipleLocations + LocationMode + RangeStart + RangeEnd + Spacing + RangeValveCount + Locations + +RimMultipleValveLocations - class RimMultipleValveLocations + LocationMode + RangeStart + RangeEnd + ValveSpacing + RangeValveCount + LocationOfValves + +RimNonDarcyPerforationParameters - class RimNonDarcyPerforationParameters + NonDarcyFlowType + UserDefinedDFactor + GridPermeabilityScalingFactor + WellRadius + RelativeGasDensity + GasViscosity + InertialCoefficientBeta0 + PermeabilityScalingFactor + PorosityScalingFactor + +RimObjectiveFunction - class RimObjectiveFunction + FunctionType + NormalizeByNumberOfObservations + NormalizeByNumberOfVectors + ErrorEstimatePercentage + UseSquaredError + +RimObservedEclipseUserData - class RimObservedEclipseUserData + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + UseCustomIdentifier + SummaryType + IdentifierName + +RimPlotAxisAnnotation - class RimPlotAxisAnnotation + Active + Name + Value + RangeStart + RangeEnd + PenStyle + TextAlignment + Color + +RimPlotCellFilterCollection - class RimPlotCellFilterCollection + Name + IsChecked + FilterMode + CellFilters + +RimPlotCellPropertyFilter - class RimPlotCellPropertyFilter + Name + IsChecked + FilterMode + ResultDefinition + LowerBound + UpperBound + +RimPlotRectAnnotation - class RimPlotRectAnnotation + Name + IsChecked + MinX + MaxX + MinY + MaxY + Color + Transparency + Text + +RimPolygon - class RimPolygon + Name + IsReadOnly + PointsInDomainCoords + Appearance + +RimPolygonAppearance - class RimPolygonAppearance + IsClosed + ShowLines + ShowSpheres + LineThickness + SphereRadiusFactor + LineColor + SphereColor + PolygonPlaneDepth + LockPolygon + +RimPolygonCollection - class RimPolygonCollection + Polygons + PolygonFiles + +RimPolygonFileFile - class RimPolygonFile + Name + FileName + (A)StimPlanFileName + Polygons + +RimPolygonInView - class RimPolygonInView + Name + IsChecked + Polygon + HandleScalingFactor + +RimPolygonInViewCollection - class RimPolygonInViewCollection + Name + IsChecked + Polygons + Collections + +RimPolylineAppearance - class RimPolylineAppearance + LineFieldsHidden + Color + Thickness + SphereFieldsHidden + SphereColor + SphereRadiusFactor + +RimProcess - class RimProcess + Command + Description + ID + +RimQuickAccessCollection - class RimQuickAccessCollection + FieldReferencesGroup + +RimReachCircleAnnotation - class RimReachCircleAnnotation + IsActive + CenterPointXyd + Radius + Name + Appearance + +RimReachCircleAnnotationInView - class RimReachCircleAnnotationInView + IsActive + SourceAnnotation + +RimResultSelectionUi - class RimResultSelectionUi + Case + Result + +RimRftCase - class RimRftCase + RftFilePath + DataDeckFilePath + +RimRftTopologyCurve - class RimRftTopologyCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + SummaryCase + TimeStep + WellName + SegmentBranchIndex + SegmentBranchType + CurveType + SymbolLocation + +RimRoffCase - class RimRoffCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + ReservoirViews + MatrixModelResults + FractureModelResults + FlipXAxis + FlipYAxis + ContourMaps + InputPropertyCollection + ViewCollection + WellTargetMappings + +RimSEGYConvertOptions - class RimSEGYConvertOptions + InputFilename + OutputFilename + SampleStartOverride + SampleUnit + HeaderFilename + +RimSaturationPressurePlot - class RimSaturationPressurePlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + ShowInfoBox + NameConfig + xAxisProperties + yAxisProperties + CrossPlotCurve + +RimSaturationPressurePlotCollection - class RimSaturationPressurePlotCollection + SaturationPressurePlots + +RimSeismicView - class RimSeismicView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + SeismicData + SurfaceInViewCollection + SeismicSectionCollection + AnnotationCollection + OverlayInfoConfig + +RimStatisticalCalculation - class RimEclipseStatisticsCase + Name + (A)CaseUserDescription + NameSetting + Id + (A)CaseId + FilePath + (A)CaseFileName + (A)GridFileName + DefaultFormationNames + TimeStepFilter + IntersectionViewCollection + ReservoirViews + MatrixModelResults + FractureModelResults + FlipXAxis + FlipYAxis + ContourMaps + InputPropertyCollection + ViewCollection + WellTargetMappings + DataSourceForStatistics + GridCalculation + GridCalculationFilterView + SelectedTimeSteps + ResultType + PorosityModel + DynamicPropertiesToCalculate + StaticPropertiesToCalculate + GeneratedPropertiesToCalculate + InputPropertiesToCalculate + FractureDynamicPropertiesToCalculate + FractureStaticPropertiesToCalculate + FractureGeneratedPropertiesToCalculate + FractureInputPropertiesToCalculate + CalculatePercentiles + PercentileCalculationType + LowPercentile + MidPercentile + HighPercentile + WellDataSourceCase + UseZeroAsInactiveCellValue + +RimStatisticalCollection - class RimEclipseStatisticsCaseCollection + Reservoirs + +RimStatisticalContourMap - class RimStatisticsContourMap + Name + BoundingBoxExpPercent + Resolution + ResultAggregation + OilFloodingType + UserDefinedFloodingOil + GasFloodingType + UserDefinedFloodingGas + SelectedTimeSteps + ResultDefinition + PrimaryCase + ContourMapViews + EnableFormationFilter + Formations + Polygons + +RimStatisticsContourMapProjection - class RimStatisticsContourMapProjection + Name + IsChecked + Resolution + ResultAggregation + OilFloodingType + UserDefinedFloodingOil + GasFloodingType + UserDefinedFloodingGas + ContourLines + ContourLabels + SmoothContourLines + ValueFilterType + UpperThreshold + LowerThreshold + StatisticsType + +RimStatisticsContourMapView - class RimStatisticsContourMapView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + CrossSections + IntersectionResultDefColl + ReservoirSurfaceResultDefColl + GridCollection + OverlayInfoConfig + WellMeasurements + SurfaceInViewCollection + SeismicSectionCollection + PolygonInViewCollection + RangeFilters + CustomEclipseCase + EclipseCase + CaseChangeBehaviour + GridCellResult + GridCellEdgeResult + ElementVectorResult + FaultResultSettings + StimPlanColors + VirtualPerforationResult + WellCollection + FaultCollection + FaultReactivationModelCollection + AnnotationCollection + StreamlineCollection + PropertyFilters + ShowInactiveCells + ShowInvalidCells + AdditionalResultsForResultInfo + CameraPositions + ContourMapProjection + ShowAxisLines + ShowScaleLegend + ShowFaultLines + StatisticsContourMap + +RimStimPlanColors - class RimStimPlanColors + IsChecked + ResultName + DefaultColor + LegendConfigurations + ShowStimPlanMesh + StimPlanCellVizMode + +RimStimPlanFractureTemplate - class RimStimPlanFractureTemplate + Id + UserDescription + UnitSystem + Orientation + UserDefinedPerforationLength + AzimuthAngle + SkinFactor + PerforationLength + PerforationEfficiency + WellDiameter + ConductivityType + WellPathDepthAtFracture + FractureContainmentField + NonDarcyFlowType + UserDefinedDFactor + FractureWidthType + FractureWidth + BetaFactorType + InertialCoefficient + PermeabilityType + RelativePermeability + EffectivePermeability + RelativeGasDensity + GasViscosity + HeightScaleFactor + WidthScaleFactor + DFactorScaleFactor + ConductivityFactor + StimPlanFileName + UserDefinedWellPathDepthAtFracture + BorderPolygonResultName + ActiveTimeStepIndex + ConductivityResultName + ShowStimPlanMesh + +RimStimPlanLegendConfig - class RimStimPlanLegendConfig + Name + Legend + +RimSummaryAddressCollection - class RimSummaryAddressCollection + Name + ContentsType + SummaryAddresses + AddressSubfolders + CaseId + EnsembleId + +RimSummaryAddressSelector - class RimSummaryAddressSelector + SummaryCase + SummaryCaseCollection + SummaryAddress + PlotAxisProperties + Resampling + +RimSummaryCalculation - class RimSummaryCalculation + Description + Expression + Unit + Variables + Id + DistributeToOtherItems + DistributeToAllCases + +RimSummaryCalculationCollection - class RimSummaryCalculationCollection + Calculations + +RimSummaryCalculationVariable - class RimSummaryCalculationVariable + VariableName + SummaryCase + SummaryAddress + +RimSummaryCaseSumo - class RimSummaryCaseSumo + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + +RimSummaryCurveCollection - class RimSummaryCurveCollection + CollectionCurves + IsActive + +RimSummaryCurveCollectionModifier - class RimSummaryPlotSourceStepping + StepDimension + CurveCase + IncludeEnsembleCasesForCaseStepping + WellName + GroupName + NetworkName + Region + VectorName + CellBlock + Segment + Connection + Aquifer + WellCompletion + Ensemble + Placeholder + AutoUpdateAppearance + +RimSummaryEnsembleSumo - class RimSummaryEnsembleSumo + SummaryCollectionName + CreateAutoName + UseKey1 + UseKey2 + NameTemplateString + GroupingMode + NameCount + IsEnsemble + Id + (A)EnsembleId + Description + SumoDataSource + +RimSummaryMultiPlotCollection - class RimSummaryMultiPlotCollection + MultiSummaryPlots + +RimSummaryPlotManager - class RimSummaryPlotManager + SummaryPlot + FilterText + AddressCandidates + SelectedDataSources + IncludeDiffCurves + IndividualPlotPerObject + IndividualPlotPerVector + IndividualPlotPerDataSource + CreateMultiPlot + +RimSummaryPlotReadOut - class RimSummaryPlotReadOut + ReadOutType + LineAppearance + VerticalLineLabelAlignment + HorizontalLineLabelAlignment + +RimSummarySumoDataSource - class RimSummarySumoDataSource + Name + CaseId + CaseName + EnsembleName + CustomName + RealizationIds + NameProxy + VectorNames + +RimSummaryTable - class RimSummaryTable + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + TableName + AutomaticTableName + SummaryCase + Vector + Categories + ResamplingSelection + ThresholdValue + ExcludedTableRows + ShowValueLabels + MaxTimeLabelCount + AxisTitleFontSize + AxisLabelFontSize + ValueLabelFontSize + LegendConfig + MappingType + RangeType + FilterTimeSteps + StartDate + EndDate + +RimSummaryTableCollection - class RimSummaryTableCollection + SummaryTables + +RimSurfaceIntersectionBand - class RimSurfaceIntersectionBand + IsChecked + LineAppearance + BandColor + BandOpacity + BandPolygonOffsetUnit + Surfaces + NameProxy + +RimSurfaceIntersectionCollection - class RimSurfaceIntersectionCollection + IsChecked + IntersectionBands + IntersectionCurves + +RimSurfaceIntersectionCurve - class RimSurfaceIntersectionCurve + IsChecked + LineAppearance + Surface1 + NameProxy + +RimTensorResults - class RimTensorResults + LegendDefinition + ResultVariable + ShowTensors + Principal1 + Principal2 + Principal3 + Threshold + VectorColor + ScaleMethod + SizeScale + RangeType + +RimTernaryLegendConfig - class RimTernaryLegendConfig + ShowTernaryLegend + Precision + RangeType + ternaryRangeSummary + UserDefinedMaxSoil + UserDefinedMinSoil + UserDefinedMaxSgas + UserDefinedMinSgas + UserDefinedMaxSwat + UserDefinedMinSwat + +RimTextAnnotation - class RimTextAnnotation + AnchorPointXyd + LabelPointXyd + Text + IsActive + TextAppearance + +RimTextAnnotationInView - class RimTextAnnotationInView + IsActive + SourceAnnotation + +RimThermalFractureTemplate - class RimThermalFractureTemplate + Id + UserDescription + UnitSystem + Orientation + UserDefinedPerforationLength + AzimuthAngle + SkinFactor + PerforationLength + PerforationEfficiency + WellDiameter + ConductivityType + WellPathDepthAtFracture + FractureContainmentField + NonDarcyFlowType + UserDefinedDFactor + FractureWidthType + FractureWidth + BetaFactorType + InertialCoefficient + PermeabilityType + RelativePermeability + EffectivePermeability + RelativeGasDensity + GasViscosity + HeightScaleFactor + WidthScaleFactor + DFactorScaleFactor + ConductivityFactor + StimPlanFileName + UserDefinedWellPathDepthAtFracture + BorderPolygonResultName + ActiveTimeStepIndex + ConductivityResultName + FilterCakePressureDrop + +RimTimeAxisAnnotation - class RimTimeAxisAnnotation + Active + Name + Value + RangeStart + RangeEnd + PenStyle + TextAlignment + Color + +RimTimeStepFilter - class RimTimeStepFilter + FilterType + FirstTimeStep + LastTimeStep + Interval + DateFormat + TimeStepIndicesToImport + OnlyLastFrame + +RimUserDefinedIndexFilter - class RimUserDefinedIndexFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + IndividualCellIndexes + +RimVfpDataCollection - class RimVfpDataCollection + VfpPlots + +RimVfpPlotCollection - class RimVfpPlotCollection + CustomVfpPlots + +RimVfpTable - class RimVfpTable + Name + DataSource + TableNumber + TableType + +RimVfpTableData - class RimVfpTableData + Name + FilePath + +RimViewLinkerCollection - class RimViewLinkerCollection + Active + ViewLinkers + +RimViewNameConfig - class RimViewNameConfig + CustomCurveName + AddCaseName + AddAggregationType + AddProperty + AddSampleSpacing + +RimVirtualPerforationResults - class RimVirtualPerforationResults + ShowConnectionFactors + ShowClosedConnections + GeometryScaleFactor + LegendDefinition + +RimWellAllocationOverTimePlot - class RimWellAllocationOverTimePlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + PlotDescription + CurveCase + WellName + FromTimeStep + ToTimeStep + TimeStepRangeFilterMode + TimeStepCount + ExcludeTimeSteps + FlowDiagSolution + FlowValueType + GroupSmallContributions + SmallContributionsThreshold + AxisTitleFontSize + AxisValueFontSize + +RimWellConnectivityTable - class RimWellConnectivityTable + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + CurveCase + VisibleCellView + ViewFilterType + FlowDiagSolution + TimeStepSelectopn + SelectProducersAndInjectorsForTimeSteps + ThresholdValue + TimeSampleValueType + TimeStep + TimeRangeValueType + FromTimeStep + ToTimeStep + TimeStepRangeFilterMode + TimeStepCount + ExcludeTimeSteps + SelectedProducerTracers + SelectedInjectorTracers + SyncSelectedProdInj + SyncSelectedInjProd + ShowValueLabels + AxisTitleFontSize + AxisLabelFontSize + ValueLabelFontSize + LegendConfig + MappingType + RangeType + +RimWellIASettings - class RimWellIASettings + Name + IsChecked + GeomechCase + BaseDir + StartMeasuredDepth + EndMeasuredDepth + BufferXY + ModelingParameters + TimeStepParameters + showBox + startDate + boxValid + +RimWellIASettingsCollection - class RimWellIASettingsCollection + WellIASettings + +RimWellLogExtractionCurve - class RimWellLogExtractionCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + TrajectoryType + CurveWellPath + ReferenceWellPath + SimulationWellName + BranchDetection + Branch + CurveCase + CurveEclipseResult + CurveGeomechResult + CurveTimeStep + GeomPartId + AddCaseNameToCurveName + AddPropertyToCurveName + AddWellNameToCurveName + AddTimestepToCurveName + AddDateToCurveName + +RimWellLogExtractionCurveNameConfig - class RimWellLogExtractionCurveNameConfig + CustomCurveName + AddCaseName + AddProperty + AddWellName + AddTimeStep + AddDate + +RimWellLogFileCurveNameConfig - class RimWellLogLasFileCurveNameConfig + CustomCurveName + +RimWellLogLasFileCurveNameConfig - class RimWellLogLasFileCurveNameConfig + CustomCurveName + +RimWellLogPlotNameConfig - class RimWellLogPlotNameConfig + CustomCurveName + +RimWellLogRftCurveNameConfig - class RimWellLogRftCurveNameConfig + CustomCurveName + +RimWellLogWbsCurve - class RimWellLogWbsCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + TrajectoryType + CurveWellPath + ReferenceWellPath + SimulationWellName + BranchDetection + Branch + CurveCase + CurveEclipseResult + CurveGeomechResult + CurveTimeStep + GeomPartId + AddCaseNameToCurveName + AddPropertyToCurveName + AddWellNameToCurveName + AddTimestepToCurveName + AddDateToCurveName + SmoothCurve + SmoothingThreshold + MaximumCurvePointInterval + +RimWellPathTieIn - class RimWellPathTieIn + ParentWellPath + ChildWellPath + TieInMeasuredDepth + AddValveAtConnection + Valve + +RimWellTargetMapping - class RimWellTargetMapping + TimeStep + VolumeType + VolumeResultType + VolumesType + OilFloodingType + UserDefinedFloodingOil + GasFloodingType + UserDefinedFloodingGas + Pressure + Permeability + Transmissibility + Iterations + MaxNumTargets + ResultDefinition + CellCountI + CellCountJ + CellCountK + EnsembleStatisticsCase + +RiuCreateMultipleFractionsUi - class RiuCreateMultipleFractionsUi + SourceCase + MinDistanceFromWellTd + MaxFracturesPerWell + Options + FractureCreationSummary + +RiuMultipleFractionsOptions - class RicCreateMultipleFracturesOptionItemUi + TopKLayer + BaseKLayer + Template + MinSpacing + +ScriptLocation - class RimScriptCollection + ScriptDirectory + CalcScripts + SubDirectories + +SeismicCollection - class RimSeismicDataCollection + SeismicData + DifferenceData + +SeismicData - class RimSeismicData + LegendDefinition + userClipValue + userMuteThreshold + SeismicUserDecription + SeismicFilePath + +SeismicDataCollection - class RimSeismicDataCollection + SeismicData + DifferenceData + +SeismicDifferenceData - class RimSeismicDifferenceData + LegendDefinition + userClipValue + userMuteThreshold + SeismicUserDecription + SeismicData1 + SeismicData2 + +SeismicSection - class RimSeismicSection + Name + IsChecked + UserDescription + Type + SeismicData + WellPath + Targets + InlineIndex + CrosslineIndex + DepthIndex + LineThickness + LineColor + ShowSeismicOutline + ShowSectionLine + TransparentSection + DepthFilter + UpperThreshold + LowerThreshold + +SeismicSectionCollection - class RimSeismicSectionCollection + Name + IsChecked + UserDescription + SeismicSections + SurfaceIntersectionLinesScaleFactor + SurfacesWithVisibleSurfaceLines + +SeismicView - class RimSeismicView + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + NameConfig + CameraPosition + CameraPointOfInterest + CameraPositionProxy + CameraPointOfInterestProxy + PerspectiveProjection + GridZScale + BackgroundColor + (A)ViewBackgroundColor + MaximumFrameRate + CurrentTimeStep + MeshMode + SurfaceMode + ShowGridBox + DisableLighting + ShowZScale + ComparisonView + FontSize + AnnotationStrategy + AnnotationCountHint + UseCustomAnnotationStrategy + SeismicData + SurfaceInViewCollection + SeismicSectionCollection + AnnotationCollection + OverlayInfoConfig + +SeismicViewCollection - class RimSeismicViewCollection + Views + +StimPlanFractureTemplate - class RimStimPlanFractureTemplate + Id + UserDescription + UnitSystem + Orientation + UserDefinedPerforationLength + AzimuthAngle + SkinFactor + PerforationLength + PerforationEfficiency + WellDiameter + ConductivityType + WellPathDepthAtFracture + FractureContainmentField + NonDarcyFlowType + UserDefinedDFactor + FractureWidthType + FractureWidth + BetaFactorType + InertialCoefficient + PermeabilityType + RelativePermeability + EffectivePermeability + RelativeGasDensity + GasViscosity + HeightScaleFactor + WidthScaleFactor + DFactorScaleFactor + ConductivityFactor + StimPlanFileName + UserDefinedWellPathDepthAtFracture + BorderPolygonResultName + ActiveTimeStepIndex + ConductivityResultName + ShowStimPlanMesh + +StimPlanModel - class RimStimPlanModel + Name + IsChecked + StimPlanModelTemplate + EditModelTemplate + EclipseCase + TimeStep + InitialPressureEclipseCase + StaticEclipseCase + MeasuredDepth + ExtractionOffsetTop + ExtractionOffsetBottom + ExtractionDepthTop + ExtractionDepthBottom + ExtractionType + ThicknessDirectionWellPath + BoundingBoxHorizontal + BoundingBoxVertical + UseDetailedFluidLoss + RelativePermeabilityFactor + PoroElasticConstant + ThermalExpansionCoefficient + PerforationLength + FractureOrientation + AzimuthAngle + FormationDip + AutoComputeBarrier + Barrier + DistanceToBarrier + BarrierDip + WellPenetrationLayer + ShowOnlyBarrierFault + ShowAllFaults + BarrierFaultName + BarrierTextAnnotation + PerforationInterval + +StimPlanModelCollection - class RimStimPlanModelCollection + Name + IsChecked + StimPlanModels + +StimPlanModelCurve - class RimStimPlanModelCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + TrajectoryType + CurveWellPath + ReferenceWellPath + SimulationWellName + BranchDetection + Branch + CurveCase + CurveEclipseResult + CurveGeomechResult + CurveTimeStep + GeomPartId + AddCaseNameToCurveName + AddPropertyToCurveName + AddWellNameToCurveName + AddTimestepToCurveName + AddDateToCurveName + StimPlanModel + CurveProperty + +StimPlanModelPlot - class RimStimPlanModelPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + TemplateText + PlotNamingMethod + DepthType + DepthUnit + MinimumDepth + MaximumDepth + ShowDepthGridLines + AutoScaleDepthEnabled + DepthAxisVisibility + ShowDepthMarkerLine + AutoZoomMinDepthFactor + AutoZoomMaxDepthFactor + DepthAnnotations + SubTitleFontSize + AxisTitleFontSize + AxisValueFontSize + NameConfig + FilterEnsembleCurveSet + DepthEqualization + Tracks + DepthOrientation + StimPlanModel + EditModel + EclipseCase + TimeStep + +StimPlanModelPlotCollection - class RimStimPlanModelPlotCollection + StimPlanModelPlots + +StimPlanModelTemplate - class RimStimPlanModelTemplate + Name + Id + DynamicEclipseCase + TimeStep + InitialPressureEclipseCase + UseForInitialPressure + UseForPressure + EditPressureTable + StaticEclipseCase + UseEqlNumForPressureInterpolation + DefaultPorosity + DefaultPermeability + DefaultFacies + VerticalStress + VerticalStressGradient + StressDepth + ReferenceTemperature + ReferenceTemperatureGradient + ReferenceTemperatureDepth + OverburdenHeight + OverburdenFormation + OverburdenFacies + OverburdenPorosity + OverburdenPermeability + OverburdenFluidDensity + UnderburdenHeight + UnderburdenFormation + UnderburdenFacies + UnderburdenPorosity + UnderburdenPermeability + UnderburdenFluidDensity + FaciesInitialPressureConfigs + PressureTable + ElasticProperties + FaciesProperties + NonNetLayers + +StimPlanModelTemplateCollection - class RimStimPlanModelTemplateCollection + StimPlanModelTemplates + NextValidId + +StreamlineInViewCollection - class RimStreamlineInViewCollection + LegendDefinition + Name + FlowThreshold + LengthThreshold + Resolution + MaxDays + UseProducers + UseInjectors + Phase + isActive + VisualizationMode + ColorMode + AnimationSpeed + AnimationIndex + ScaleFactor + TracerLength + +StringParameter - class RimStringParameter + Name + Label + Description + Advanced + Valid + Value + +SummaryAddress - class RimSummaryAddress + SummaryVarType + SummaryQuantityName + SummaryRegion + SummaryRegion2 + SummaryWellGroup + SummaryNetworkGroup + SummaryWell + SummaryWellSegment + SummaryLgr + SummaryCellI + SummaryCellJ + SummaryCellK + SummaryAquifer + SummaryWellCompletionNumber + IsErrorResult + CalculationId + CaseId + EnsembleId + +SummaryCaseCollection - class RimSummaryCaseMainCollection + SummaryCases + SummaryCaseCollections + +SummaryCaseSubCollection - class RimSummaryEnsemble + SummaryCases + SummaryCollectionName + CreateAutoName + UseKey1 + UseKey2 + NameTemplateString + GroupingMode + NameCount + IsEnsemble + Id + (A)EnsembleId + Description + +SummaryCrossPlot - class RimSummaryCrossPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + IsUsingAutoName + PlotDescription + normalizeCurveYValues + useQtChartsPlot + SummaryCurveCollection + EnsembleCurveSetCollection + GridTimeHistoryCurves + AsciiDataCurves + AxisProperties + LeftYAxisProperties + RightYAxisProperties + BottomAxisProperties + TimeAxisProperties + +SummaryCrossPlotCollection - class RimSummaryCrossPlotCollection + SummaryCrossPlots + +SummaryCurve - class RimSummaryCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + SummaryCase + SummaryAddress + Resampling + CurveTypeMode + CurveType + HorizontalAxisType + SummaryCaseX + SummaryAddressX + PlotAxis + Axis + XAxis + SummaryCurveNameConfig + isTopZWithinCategory + +SummaryCurveAutoName - class RimSummaryCurveAutoName + LongVectorName + VectorName + Unit + RegionNumber + WellGroupName + WellName + WellSegmentNumber + WellCompletionNumber + LgrName + Completion + Aquifer + CaseName + +SummaryObservedDataFile - class RimSummaryObservedDataFile + ShortName + NameSetting + ShowSubNodesInTree + AutoShortyName + SummaryHeaderFilename + Id + (A)CaseId + UseCustomIdentifier + SummaryType + IdentifierName + +SummaryPlot - class RimSummaryPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + IsUsingAutoName + PlotDescription + normalizeCurveYValues + useQtChartsPlot + SummaryCurveCollection + EnsembleCurveSetCollection + GridTimeHistoryCurves + AsciiDataCurves + AxisProperties + LeftYAxisProperties + RightYAxisProperties + BottomAxisProperties + TimeAxisProperties + +SummaryPlotCollection - class RimSummaryPlotCollection + SummaryPlots + +SummaryTimeAxisProperties - class RimSummaryTimeAxisProperties + Active + ShowTitle + Title + ShowLabels + AutoZoom + TimeMode + TimeUnit + VisibleDateRangeMax + VisibleDateRangeMin + VisibleTimeRangeMax + VisibleTimeRangeMin + VisibleTimeModeRangeMax + VisibleTimeModeRangeMin + TitlePosition + FontSize + ValuesFontSize + AutoDate + DateComponents + TimeComponents + DateFormat + TimeFormat + TickmarkType + TickmarkInterval + TickmarkIntervalStep + MajorTickmarkCount + Annotations + +SummaryYAxisProperties - class RimPlotAxisProperties + Active + Name + AxisTitle + AutoTitle + DisplayLongName + DisplayShortName + DisplayUnitText + CustomTitle + VisibleRangeMax + VisibleRangeMin + NumberFormat + Decimals + ScaleFactor + AutoZoom + LogarithmicScale + AxisInverted + ShowNumbers + PlotAxis + PlotAxisIndex + TitlePosition + TitleDeltaFontSize + ValueDeltaFontSize + Annotations + MajorTickmarkCount + +Surface - class RimFileSurface + SurfaceUserDecription + SurfaceColor + EnableOpacity + Opacity + DepthOffset + SurfaceFilePath + +SurfaceCollection - class RimSurfaceCollection + SurfaceUserDecription + SubCollections + SurfacesField + +SurfaceInView - class RimSurfaceInView + Active + ShowInactiveCells + UseSeparateIntersectionDataSource + SeparateIntersectionDataSource + Name + SurfaceRef + ShowMeshLines + ResultDefinition + +SurfaceInViewCollection - class RimSurfaceInViewCollection + Name + IsChecked + SurfacesInViewFieldCollections + SurfacesInViewField + SurfaceCollectionRef + +SurfaceResultDefinition - class RimSurfaceResultDefinition + Name + IsChecked + PropertyName + LegendConfig + SurfaceInView + +ThermalFractureTemplate - class RimThermalFractureTemplate + Id + UserDescription + UnitSystem + Orientation + UserDefinedPerforationLength + AzimuthAngle + SkinFactor + PerforationLength + PerforationEfficiency + WellDiameter + ConductivityType + WellPathDepthAtFracture + FractureContainmentField + NonDarcyFlowType + UserDefinedDFactor + FractureWidthType + FractureWidth + BetaFactorType + InertialCoefficient + PermeabilityType + RelativePermeability + EffectivePermeability + RelativeGasDensity + GasViscosity + HeightScaleFactor + WidthScaleFactor + DFactorScaleFactor + ConductivityFactor + StimPlanFileName + UserDefinedWellPathDepthAtFracture + BorderPolygonResultName + ActiveTimeStepIndex + ConductivityResultName + FilterCakePressureDrop + +TofAccumulatedPhaseFractionsPlot - class RimTofAccumulatedPhaseFractionsPlot + WindowController + ShowWindow + WindowGeometry + PlotDescription + ShowPlotTitle + MaxTof + +TotalWellAllocationPlot - class RimTotalWellAllocationPlot + WindowController + ShowWindow + WindowGeometry + PlotDescription + ShowPlotTitle + +TriangleGeometry - class RimcTriangleGeometry + XCoords + YCoords + ZCoords + Connections + MeshXCoords + MeshYCoords + MeshZCoords + FaultMeshXCoords + FaultMeshYCoords + FaultMeshZCoords + DisplayModelOffset + +UserDefinedFilter - class RimUserDefinedFilter + UserDescription + Active + Case + FilterType + GridIndex + PropagateToSubGrids + IndividualCellIndices + +UserDefinedPolylinesAnnotation - class RimUserDefinedPolylinesAnnotation + IsActive + ClosePolyline + ShowLines + ShowSpheres + Appearance + Name + Targets + +ValveTemplate - class RimValveTemplate + Name + UnitSystem + CompletionType + UserLabel + OrificeDiameter + FlowCoefficient + AICDParameters + +ValveTemplateCollection - class RimValveTemplateCollection + ValveDefinitions + ValveUnits + +View3dOverlayInfoConfig - class Rim3dOverlayInfoConfig + Active + ShowAnimProgress + ShowInfoText + ShowResultInfo + ShowHistogram + ShowVolumeWeightedMean + ShowVersionInfo + StatisticsTimeRange + StatisticsCellRange + +ViewController - class RimViewController + Active + Name + ManagedView + SyncCamera + ShowCursor + SyncTimeStep + SyncCellResult + SyncLegendDefinitions + SyncRangeFilters + SyncPropertyFilters + DuplicatePropertyFilters + +ViewLinker - class RimViewLinker + Name + MainView + ManagedViews + +WbsParameters - class RimWbsParameters + PorePressureReservoirSource + PorePressureNonReservoirSource + UserPPNonReservoir + PoissionRatioSource + UcsSource + OBG0Source + DFSource + K0SHSource + FGShaleSource + K0FGSource + WaterDensitySource + UserPoissonRatio + UserUcs + UserDF + UserK0FG + UserK0SH + FGMultiplier + WaterDensity + GeoMechCase + WellPath + TimeStep + FrameIndex + +Well - class RimSimWellInView + Name + (A)WellName + ShowWell + ShowWellLabel + ShowWellHead + ShowWellPipe + ShowWellSpheres + ShowWellDisks + WellHeadScaleFactor + WellPipeRadiusScale + WellPipeColor + WellDiskColor + ShowWellCells + ShowWellCellFence + +WellAllocationPlot - class RimWellAllocationPlot + WindowController + ShowWindow + WindowGeometry + PlotDescription + ShowPlotTitle + BranchDetection + CurveCase + PlotTimeStep + WellName + FlowDiagSolution + FlowType + GroupSmallContributions + SmallContributionsThreshold + AccumulatedWellFlowPlot + TotalWellFlowPlot + WellAllocLegend + TofAccumulatedPhaseFractionsPlot + +WellAllocationPlotLegend - class RimWellAllocationPlotLegend + ShowPlotLegend + +WellBoreStabilityPlot - class RimWellBoreStabilityPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + TemplateText + PlotNamingMethod + DepthType + DepthUnit + MinimumDepth + MaximumDepth + ShowDepthGridLines + AutoScaleDepthEnabled + DepthAxisVisibility + ShowDepthMarkerLine + AutoZoomMinDepthFactor + AutoZoomMaxDepthFactor + DepthAnnotations + SubTitleFontSize + AxisTitleFontSize + AxisValueFontSize + NameConfig + FilterEnsembleCurveSet + DepthEqualization + Tracks + DepthOrientation + WbsParameters + +WellDistributionPlot - class RimWellDistributionPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + Case + TimeStepIndex + WellName + Phase + GroupSmallContributions + SmallContributionsRelativeThreshold + MaximumTOF + +WellDistributionPlotCollection - class RimWellDistributionPlotCollection + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + Case + TimeStepIndex + WellName + GroupSmallContributions + SmallContributionsRelativeThreshold + MaximumTOF + Plots + ShowOil + ShowGas + ShowWater + PlotDescription + +WellFlowRateCurve - class RimWellFlowRateCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + +WellLogCalculatedCurve - class RimWellLogCalculatedCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + Operator + DepthSource + FirstWellLogCurve + SecondWellLogCurve + +WellLogChannel - class RimWellLogChannel + Name + +WellLogCsvFile - class RimWellLogCsvFile + Date + WellLogChannels + (A)WellLogFileChannels + FileName + WellName + Name + +WellLogExtractionCurve - class RimWellLogExtractionCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + TrajectoryType + CurveWellPath + ReferenceWellPath + SimulationWellName + BranchDetection + Branch + CurveCase + CurveEclipseResult + CurveGeomechResult + CurveTimeStep + GeomPartId + AddCaseNameToCurveName + AddPropertyToCurveName + AddWellNameToCurveName + AddTimestepToCurveName + AddDateToCurveName + +WellLogFile - class RimWellLogLasFile + Date + WellLogChannels + (A)WellLogFileChannels + FileName + WellName + Name + WellFlowCondition + +WellLogFileChannel - class RimWellLogChannel + Name + +WellLogFileCurve - class RimWellLogLasFileCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + CurveWellPath + CurveWellLogChannel + WellLog + (A)WellLogFile + +WellLogLasFile - class RimWellLogLasFile + Date + WellLogChannels + (A)WellLogFileChannels + FileName + WellName + Name + WellFlowCondition + +WellLogLasFileCurve - class RimWellLogLasFileCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + CurveWellPath + CurveWellLogChannel + WellLog + (A)WellLogFile + +WellLogPlot - class RimWellLogPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + TemplateText + PlotNamingMethod + DepthType + DepthUnit + MinimumDepth + MaximumDepth + ShowDepthGridLines + AutoScaleDepthEnabled + DepthAxisVisibility + ShowDepthMarkerLine + AutoZoomMinDepthFactor + AutoZoomMaxDepthFactor + DepthAnnotations + SubTitleFontSize + AxisTitleFontSize + AxisValueFontSize + NameConfig + FilterEnsembleCurveSet + DepthEqualization + Tracks + DepthOrientation + +WellLogPlotCollection - class RimWellLogPlotCollection + WellLogPlots + +WellLogPlotTrack - class RimWellLogTrack + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + RowSpan + ColSpan + TrackDescription + Curves + VisibleXRangeMin + VisibleXRangeMax + AutoScaleX + LogarithmicScaleX + InvertPropertyValueAxis + IsPropertyAxisEnabled + ShowXGridLines + ExplicitTickIntervals + MinAndMaxTicksOnly + MajorTickIntervals + MinorTickIntervals + AxisFontSize + AnnotationType + RegionDisplay + ColorShadingLegend + ColorShadingTransparency + ShowFormationLabels + RegionLabelFontSize + FormationSource + FormationTrajectoryType + FormationWellPath + FormationWellPathForSourceWellPath + FormationSimulationWellName + FormationBranchIndex + FormationBranchDetection + FormationCase + FormationLevel + ShowFormationFluids + ShowWellPathAttributes + WellPathAttributesInLegend + ShowWellPathCompletions + WellPathCompletionsInLegend + ShowWellPathAttrBothSides + ShowWellPathAttrLabels + AttributesWellPathSource + AttributesCollection + AutoCheckStateBasedOnCurveData + OverburdenHeight + UnderburdenHeight + ResultDefinition + EnsembleWellLogCurveSet + +WellLogRftCurve - class RimWellLogRftCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + CurveEclipseResultCase + CurveSummaryCase + CurveEnsemble + ObservedFmuRftData + PressureDepthData + TimeStep + WellName + BranchIndex + BranchDetection + WellLogChannelName + RftDataType + SegmentResultName + SegmentBranchIndex + SegmentBranchType + ScaleFactor + CurveColorByPhase + +WellMeasurement - class RimWellMeasurement + WellName + Depth + Date + Value + Kind + Quality + Remark + FilePath + +WellMeasurementCurve - class RimWellMeasurementCurve + Show + AutoCheckStateBasedOnCurveData + CurveName + TemplateText + CurveNamingMethod + LegendDescription + AutoName + ShowLegend + ShowErrorBars + Color + FillColor + Thickness + CurveInterpolation + LineStyle + FillStyle + PointSymbol + SymbolEdgeColor + SymbolSkipPxDist + SymbolLabel + SymbolSize + SymbolLabelPosition + PlotCurveAppearance + AdditionalDataSources + RectAnnotation + StackCurve + StackPhaseColors + CurveWellPath + CurveMeasurementKind + +WellMeasurementFilePath - class RimWellMeasurementFilePath + UserDecription + FilePath + +WellMeasurementInView - class RimWellMeasurementInView + Name + IsChecked + MeasurementKind + LegendDefinition + WellsSerialized + AvailableWellsSerialized + LowerBound + UpperBound + QualityFilter + RadiusScaleFactor + +WellMeasurements - class RimWellMeasurementCollection + Measurements + ImportedFiles + +WellMeasurementsInView - class RimWellMeasurementInViewCollection + Name + IsChecked + MeasurementKinds + linkWellVisibility + +WellPath - class RimFileWellPath + AirGap + DatumElevation + UnitSystem + SimWellName + SimBranchIndex + ShowWellPathLabel + MeasuredDepthLabelInterval + ShowWellPath + WellPathRadiusScale + WellPathColor + Completions + CompletionSettings + WellLogs + (A)WellLogFiles + CollectionOf3dWellLogCurves + WellPathFormationKeyInFile + WellPathFormationFilePath + WellPathAttributes + WellPathTieIn + WellIASettings + WellPathFilepath + WellPathFilePathInCache + WellPathNumberInFile + UseAutoGeneratedPointAtSeaLevel + +WellPathAicdParameters - class RimWellPathAicdParameters + DeviceOpen + StrengthAICD + DensityCalibrationFluid + ViscosityCalibrationFluid + VolumeFlowRateExponent + ViscosityFunctionExponent + CriticalWaterLiquidFractionEmul + ViscosityTransitionRegionEmul + MaxRatioOfEmulsionVisc + MaxFlowRate + ExponentOilDensity + ExponentWaterDensity + ExponentGasDensity + ExponentOilViscosity + ExponentWaterViscosity + ExponentGasViscosity + +WellPathAttribute - class RimWellPathAttribute + CompletionType + DepthStart + DepthEnd + DiameterInInches + +WellPathAttributes - class RimWellPathAttributeCollection + Name + IsChecked + Attributes + +WellPathBase - class RimWellPath + AirGap + DatumElevation + UnitSystem + SimWellName + SimBranchIndex + ShowWellPathLabel + MeasuredDepthLabelInterval + ShowWellPath + WellPathRadiusScale + WellPathColor + Completions + CompletionSettings + WellLogs + (A)WellLogFiles + CollectionOf3dWellLogCurves + WellPathFormationKeyInFile + WellPathFormationFilePath + WellPathAttributes + WellPathTieIn + WellIASettings + +WellPathCompletionSettings - class RimWellPathCompletionSettings + WellNameForExport + WellGroupNameForExport + ReferenceDepthForExport + WellTypeForExport + DrainageRadiusForPI + GasInflowEq + AutoWellShutIn + AllowWellCrossFlow + WellBoreFluidPVTTable + HydrostaticDensity + FluidInPlaceRegion + MswParameters + MswLinerDiameter + MswRoughness + +WellPathCompletions - class RimWellPathCompletions + Perforations + Fishbones + Fractures + StimPlanModels + WellNameForExport + WellGroupNameForExport + ReferenceDepthForExport + WellTypeForExport + DrainageRadiusForPI + GasInflowEq + AutoWellShutIn + AllowWellCrossFlow + WellBoreFluidPVTTable + HydrostaticDensity + FluidInPlaceRegion + +WellPathFracture - class RimWellPathFracture + Name + IsChecked + FractureDef + EditTemplate + CreateEllipseTemplate + CreateStimPlanTemplate + AutoUpdateWellPathDepthAtFractureFromTemplate + WellPathDepthAtFracture + Azimuth + PerforationLength + PerforationEfficiency + WellDiameter + Dip + Tilt + FractureUnit + TimeIndexToPlot + MeasuredDepth + +WellPathFractureCollection - class RimWellPathFractureCollection + Name + IsChecked + Fractures + +WellPathGeometry - class RimWellPathGeometryDef + ReferencePosUtmXyd + AirGap + MdAtFirstTarget + WellPathTargets + ShowAbsolutePosForWellTargets + UseTopLevelWellReferencePoint + UseAutoGeneratedTargetAtSeaLevel + LinkReferencePointUpdates + AttachedToParentWell + FixedWellPathPoints + FixedMeasuredDepths + ShowSpheres + SphereColor + SphereRadiusFactor + WellTargetHandleScalingFactor + +WellPathGeometryDef - class RimWellPathGeometryDef + ReferencePosUtmXyd + AirGap + MdAtFirstTarget + WellPathTargets + ShowAbsolutePosForWellTargets + UseTopLevelWellReferencePoint + UseAutoGeneratedTargetAtSeaLevel + LinkReferencePointUpdates + AttachedToParentWell + FixedWellPathPoints + FixedMeasuredDepths + ShowSpheres + SphereColor + SphereRadiusFactor + WellTargetHandleScalingFactor + +WellPathGroup - class RimWellPathGroup + AirGap + DatumElevation + UnitSystem + SimWellName + SimBranchIndex + ShowWellPathLabel + MeasuredDepthLabelInterval + ShowWellPath + WellPathRadiusScale + WellPathColor + Completions + CompletionSettings + WellLogs + (A)WellLogFiles + CollectionOf3dWellLogCurves + WellPathFormationKeyInFile + WellPathFormationFilePath + WellPathAttributes + WellPathTieIn + WellIASettings + ChildWellPaths + GroupName + AddValveAtConnection + Valve + +WellPathTarget - class RimWellPathTarget + IsEnabled + TargetPoint + TargetPointForDisplay + TargetMeasuredDepth + Dogleg1 + Dogleg2 + UseFixedAzimuth + Azimuth + UseFixedInclination + Inclination + EstimatedDogleg1 + EstimatedDogleg2 + EstimatedAzimuth + EstimatedInclination + TargetType + HasTangentConstraint + +WellPathValve - class RimWellPathValve + Name + IsChecked + ValveTemplate + StartMeasuredDepth + ValveLocations + EditTemplate + CreateTemplate + +WellPaths - class RimWellPathCollection + Active + ShowWellPathLabel + WellPathLabelColor + GlobalWellPathVisibility + WellPathRadiusScale + WellPathClip + WellPathClipZDistance + WellPaths + WellMeasurements + +WellPltPlot - class RimWellPltPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + TemplateText + PlotNamingMethod + DepthType + DepthUnit + MinimumDepth + MaximumDepth + ShowDepthGridLines + AutoScaleDepthEnabled + DepthAxisVisibility + ShowDepthMarkerLine + AutoZoomMinDepthFactor + AutoZoomMaxDepthFactor + DepthAnnotations + SubTitleFontSize + AxisTitleFontSize + AxisValueFontSize + NameConfig + FilterEnsembleCurveSet + DepthEqualization + Tracks + DepthOrientation + WellLog + WellName + Sources + TimeSteps + UseStandardConditionCurves + UseReservoirConditionCurves + Phases + +WellPltPlotCollection - class RimPltPlotCollection + PltPlots + +WellRftEnsembleCurveSet - class RimWellRftEnsembleCurveSet + Ensemble + ColorMode + EnsembleParameter + LegendConfig + EclipseResultCase + +WellRftPlot - class RimWellRftPlot + WindowController + ShowWindow + WindowGeometry + Id + (A)ViewId + ShowPlotTitle + ShowTrackLegends + TrackLegendsHorizontal + LegendItemsClickable + TitleFontSize + LegendDeltaFontSize + LegendPosition + PlotDescription + TemplateText + PlotNamingMethod + DepthType + DepthUnit + MinimumDepth + MaximumDepth + ShowDepthGridLines + AutoScaleDepthEnabled + DepthAxisVisibility + ShowDepthMarkerLine + AutoZoomMinDepthFactor + AutoZoomMaxDepthFactor + DepthAnnotations + SubTitleFontSize + AxisTitleFontSize + AxisValueFontSize + NameConfig + FilterEnsembleCurveSet + DepthEqualization + Tracks + DepthOrientation + ShowStatisticsCurves + ShowEnsembleCurves + ShowErrorObserved + WellLog + WellName + BranchIndex + BranchDetection + EnsembleCurveSets + EclipseResultCase + +WellRftPlotCollection - class RimRftPlotCollection + RftPlots + +Wells - class RimSimWellInViewCollection + Active + ShowWellsIntersectingVisibleCells + WellHeadScale + WellHeadPositionScaleFactor + WellPipeRadiusScale + CellCenterSphereScale + WellLabelColor + ShowConnectionStatusColors + WellColorForApply + WellPipeColors + WellPipeVertexCount + WellPipeCoordType + DefaultWellFenceDirection + WellCellTransparency + IsAutoDetectingBranches + WellHeadPosition + Wells + ShowWellValvesTristate + WellDiskSummaryCase + WellDiskQuantity + WellDiskPropertyType + WellDiskPropertyConfigType + WellDiskShowQuantityLabels + WellDiskShowLabelsBackground + WellDiskScaleFactor + WellDiskColor + ShowWellCommunicationLines + +cafNamedTreeNode - class cafNamedTreeNode + ChildNodes + Name + IsChecked + +cafObjectReferenceTreeNode - class cafObjectReferenceTreeNode + ChildNodes + ReferencedObject + +cafTreeNode - class cafTreeNode + ChildNodes + +cloneView - class RicfCloneView + viewId + +closeProject - class RicfCloseProject + +computeCaseGroupStatistics - class RicfComputeCaseGroupStatistics + caseGroupId + caseIds + +createGridCaseGroup - class RicfCreateGridCaseGroup + casePaths + +createGridCaseGroupResult - class RicfCreateGridCaseGroupResult + groupId + groupName + +createLgrForCompletions - class RicfCreateLgrForCompletions + caseId + timeStep + wellPathNames + refinementI + refinementJ + refinementK + splitType + +createMultiPlot - class RicNewMultiPlotFeature + plots + +createMultipleFractures - class RicfCreateMultipleFractures + caseId + wellPathNames + minDistFromWellTd + maxFracturesPerWell + templateId + topLayer + baseLayer + spacing + action + +createSaturationPressurePlots - class RicfCreateSaturationPressurePlots + caseIds + +createStatisticsCase - class RicfCreateStatisticsCase + caseGroupId + +createStatisticsCaseResult - class RicfCreateStatisticsCaseResult + caseId + +createView - class RicfCreateView + caseId + +createViewResult - class RicfCreateViewResult + viewId + +createWbsPlotResult - class RicfCreateWbsPlotResult + viewId + +createWellBoreStabilityPlot - class RicfCreateWellBoreStabilityPlotFeature + caseId + wellPath + timeStep + wbsParameters + +exportContourMapToText - class RicExportContourMapToTextFeature + exportFileName + exportLocalCoordinates + undefinedValueLabel + excludeUndefinedValues + viewId + +exportFlowCharacteristics - class RicfExportFlowCharacteristics + caseId + timeSteps + injectors + producers + fileName + minimumCommunication + aquiferCellThreshold + +exportLgrForCompletions - class RicfExportLgrForCompletions + caseId + timeStep + wellPathNames + refinementI + refinementJ + refinementK + splitType + +exportMsw - class RicfExportMsw + caseId + wellPath + includePerforations + includeFishbones + includeFractures + fileSplit + +exportMultiCaseSnapshots - class RicfExportMultiCaseSnapshots + gridListFile + +exportProperty - class RicfExportProperty + caseId + timeStep + property + eclipseKeyword + undefinedValue + exportFile + +exportPropertyInViews - class RicfExportPropertyInViews + caseId + viewIds + viewNames + undefinedValue + +exportSnapshots - class RicfExportSnapshots + type + prefix + caseId + viewId + exportFolder + plotOutputFormat + +exportVisibleCells - class RicfExportVisibleCells + caseId + viewId + viewName + exportKeyword + visibleActiveCellsValue + hiddenActiveCellsValue + inactiveCellsValue + +exportWellLogPlotData - class RicfExportWellLogPlotData + exportFormat + viewId + exportFolder + filePrefix + exportTvdRkb + capitalizeFileNames + resampleInterval + convertCurveUnits + +exportWellLogPlotDataResult - class RicfExportWellLogPlotDataResult + exportedFiles + +exportWellPathCompletions - class RicfExportWellPathCompletions + caseId + timeStep + wellPathNames + fileSplit + compdatExport + combinationMode + includeMsw + useNtgHorizontally + includePerforations + includeFishbones + includeFractures + excludeMainBoreForFishbones + performTransScaling + transScalingTimeStep + transScalingWBHPFromSummary + transScalingWBHP + exportComments + exportWelspec + customFileName + +exportWellPaths - class RicfExportWellPaths + wellPathNames + mdStepSize + +importFormationNames - class RicfImportFormationNames + formationFiles + applyToCaseId + +importWellLogFiles - class RicfImportWellLogFiles + wellLogFolder + wellLogFiles + +importWellLogFilesResult - class RicfImportWellLogFilesResult + wellPathNames + +importWellPaths - class RicImportWellPaths + wellPathFolder + wellPathFiles + +importWellPathsResult - class RicImportWellPathsResult + wellPathNames + +loadCase - class RicfLoadCase + path + gridOnly + +loadCaseResult - class RicfLoadCaseResult + id + +openProject - class RicfOpenProject + path + +replaceCase - class RicfSingleCaseReplace + caseId + newGridFile + +replaceMultipleCases - class RicfMultiCaseReplace + +replaceSourceCases - class RicfReplaceSourceCases + caseGroupId + gridListFile + +runOctaveScript - class RicfRunOctaveScript + path + caseIds + +saveProject - class RicSaveProjectFeature + filePath + +saveProjectAs - class RicSaveProjectAsFeature + filePath + +scaleFractureTemplate - class RicfScaleFractureTemplate + id + halfLength + height + dFactor + conductivity + width + +setExportFolder - class RicfSetExportFolder + type + path + createFolder + +setFractureContainment - class RicfSetFractureContainment + id + topLayer + baseLayer + +setMainWindowSize - class RicfSetMainWindowSize + height + width + +setPlotWindowSize - class RicfSetPlotWindowSize + height + width + +setStartDir - class RicfSetStartDir + path + +setTimeStep - class RicfSetTimeStep + caseId + viewId + timeStep + +stackCurves - class RicStackSelectedCurvesFeature + curves + +unstackCurves - class RicUnstackSelectedCurvesFeature + curves + diff --git a/ApplicationLibCode/Adm/projectfilekeywords/2025.04/ri-objectKeywords.txt b/ApplicationLibCode/Adm/projectfilekeywords/2025.04/ri-objectKeywords.txt new file mode 100644 index 0000000000..2fc4c02097 --- /dev/null +++ b/ApplicationLibCode/Adm/projectfilekeywords/2025.04/ri-objectKeywords.txt @@ -0,0 +1,496 @@ +// ResInsight version string : 2025.04.0-RC_3 +// Report generated : Tue Apr 1 13:48:17 2025 +// +// + +AnalysisPlot +AnalysisPlotCollection +AnalysisPlotDataEntry +Annotations +AsciiDataCurve +CalcScript +CellEdgeResultSlot +CellFilterCollection +CellIndexFilter +CellPropertyFilter +CellPropertyFilters +CellRangeFilter +CellRangeFilterCollection +ChangeDataSourceFeatureUi +CmdAddItemExecData +CmdDeleteItemExecData +ColorLegend +ColorLegendCollection +ColorLegendItem +CompletionTemplateCollection +CorrelationMatrixPlot +CorrelationPlot +CorrelationPlotCollection +CorrelationReportPlot +CrossSection +CrossSectionCollection +CsvSummaryCase +CurveIntersection +DataContainerFloat +DataContainerString +DataContainerTime +DeclineCurve +DepthTrackPlot +DoubleParameter +Eclipse2dViewCollection +EclipseBoundingBoxCase +EclipseCase +EclipseGeometrySelectionItem +EclipseResultAddress +EclipseViewCollection +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 +OsduWellLog +OsduWellLogChannel +OsduWellPath +ParameterGroup +ParameterList +ParameterResultCrossPlot +PdmDocument +PdmObjectCollection +PdmObjectGroup +Perforation +PerforationCollection +PlotCurve +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 +RiaPreferencesOsdu +RiaPreferencesSummary +RiaPreferencesSumo +RiaPreferencesSystem +RiaRegressionTest +RicCaseAndFileExportSettingsUi +RicCellRangeUi +RicCreateDepthAdjustedLasFilesUi +RicCreateEnsembleSurfaceUi +RicCreateEnsembleWellLogUi +RicCreateMultipleWellPathLateralsUi +RicCreateRftPlotsFeatureUi +RicDeleteItemExecData +RicExportCarfinUi +RicExportCompletionDataSettingsUi +RicExportContourMapToTextUi +RicExportEclipseInputGridUi +RicExportLgrUi +RicExportToLasFileObj +RicExportToLasFileResampleUi +RicExportWellPathsUi +RicGridCalculator +RicHoloLensCreateSessionUi +RicHoloLensExportToFolderUi +RicHoloLensServerSettings +RicLinkVisibleViewsFeatureUi +RicPasteAsciiDataToSummaryPlotFeatureUi +RicSaturationPressureUi +RicSaveEclipseInputVisibleCellsUi +RicSaveMultiPlotTemplateFeatureSettings +RicSelectCaseOrEnsembleUi +RicSelectPlotTemplateUi +RicSelectSummaryPlotUI +RicSelectViewUI +RicSelectWellPathUi +RicSummaryAddressSelection +RicSummaryCurveCalculator +RicSummaryCurveCreator +RicWellPathsUnitSystemSettingsUi +RifReaderSettings +Rim3dWellLogCurveCollection +Rim3dWellLogExtractionCurve +Rim3dWellLogFileCurve +Rim3dWellLogRftCurve +RimAnnotationCollection +RimAnnotationCollectionBase +RimAnnotationGroupCollection +RimAnnotationLineAppearance +RimAnnotationTextAppearance +RimAutomationSettings +RimBinaryExportSettings +RimCameraPosition +RimCaseCollection +RimCellFilterCollection +RimCloudDataSourceCollection +RimCommandRouter +RimContourMapView +RimCsvUserData +RimCustomObjectiveFunction +RimCustomObjectiveFunctionCollection +RimCustomObjectiveFunctionWeight +RimCustomVfpPlot +RimDeltaSummaryCase +RimDeltaSummaryEnsemble +RimDepthSurface +RimDerivedEnsembleCase +RimDerivedEnsembleCaseCollection +RimDialogData +RimEclipseCaseEnsemble +RimEclipseContourMapProjection +RimEclipseResultAddressCollection +RimElementVectorResult +RimEllipseFractureTemplate +RimEmCase +RimEnsembleCurveFilter +RimEnsembleCurveFilterCollection +RimEnsembleCurveSet +RimEnsembleCurveSetCollection +RimEnsembleStatistics +RimEnsembleWellLogCurveSet +RimEquilibriumAxisAnnotation +RimExportInputSettings +RimFaultResultSlot +RimFieldQuickAccess +RimFieldQuickAccessGroup +RimFieldReference +RimFieldSelection +RimFractureExportSettings +RimFractureSurface +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 +RimPlotAxisAnnotation +RimPlotCellFilterCollection +RimPlotCellPropertyFilter +RimPlotRectAnnotation +RimPolygon +RimPolygonAppearance +RimPolygonCollection +RimPolygonFileFile +RimPolygonInView +RimPolygonInViewCollection +RimPolylineAppearance +RimProcess +RimQuickAccessCollection +RimReachCircleAnnotation +RimReachCircleAnnotationInView +RimResultSelectionUi +RimRftCase +RimRftTopologyCurve +RimRoffCase +RimSEGYConvertOptions +RimSaturationPressurePlot +RimSaturationPressurePlotCollection +RimSeismicView +RimStatisticalCalculation +RimStatisticalCollection +RimStatisticalContourMap +RimStatisticsContourMapProjection +RimStatisticsContourMapView +RimStimPlanColors +RimStimPlanFractureTemplate +RimStimPlanLegendConfig +RimSummaryAddressCollection +RimSummaryAddressSelector +RimSummaryCalculation +RimSummaryCalculationCollection +RimSummaryCalculationVariable +RimSummaryCaseSumo +RimSummaryCurveCollection +RimSummaryCurveCollectionModifier +RimSummaryEnsembleSumo +RimSummaryMultiPlotCollection +RimSummaryPlotManager +RimSummaryPlotReadOut +RimSummarySumoDataSource +RimSummaryTable +RimSummaryTableCollection +RimSurfaceIntersectionBand +RimSurfaceIntersectionCollection +RimSurfaceIntersectionCurve +RimTensorResults +RimTernaryLegendConfig +RimTextAnnotation +RimTextAnnotationInView +RimThermalFractureTemplate +RimTimeAxisAnnotation +RimTimeStepFilter +RimUserDefinedIndexFilter +RimVfpDataCollection +RimVfpPlotCollection +RimVfpTable +RimVfpTableData +RimViewLinkerCollection +RimViewNameConfig +RimVirtualPerforationResults +RimWellAllocationOverTimePlot +RimWellConnectivityTable +RimWellIASettings +RimWellIASettingsCollection +RimWellLogExtractionCurve +RimWellLogExtractionCurveNameConfig +RimWellLogFileCurveNameConfig +RimWellLogLasFileCurveNameConfig +RimWellLogPlotNameConfig +RimWellLogRftCurveNameConfig +RimWellLogWbsCurve +RimWellPathTieIn +RimWellTargetMapping +RiuCreateMultipleFractionsUi +RiuMultipleFractionsOptions +ScriptLocation +SeismicCollection +SeismicData +SeismicDataCollection +SeismicDifferenceData +SeismicSection +SeismicSectionCollection +SeismicView +SeismicViewCollection +StimPlanFractureTemplate +StimPlanModel +StimPlanModelCollection +StimPlanModelCurve +StimPlanModelPlot +StimPlanModelPlotCollection +StimPlanModelTemplate +StimPlanModelTemplateCollection +StreamlineInViewCollection +StringParameter +SummaryAddress +SummaryCaseCollection +SummaryCaseSubCollection +SummaryCrossPlot +SummaryCrossPlotCollection +SummaryCurve +SummaryCurveAutoName +SummaryObservedDataFile +SummaryPlot +SummaryPlotCollection +SummaryTimeAxisProperties +SummaryYAxisProperties +Surface +SurfaceCollection +SurfaceInView +SurfaceInViewCollection +SurfaceResultDefinition +ThermalFractureTemplate +TofAccumulatedPhaseFractionsPlot +TotalWellAllocationPlot +TriangleGeometry +UserDefinedFilter +UserDefinedPolylinesAnnotation +ValveTemplate +ValveTemplateCollection +View3dOverlayInfoConfig +ViewController +ViewLinker +WbsParameters +Well +WellAllocationPlot +WellAllocationPlotLegend +WellBoreStabilityPlot +WellDistributionPlot +WellDistributionPlotCollection +WellFlowRateCurve +WellLogCalculatedCurve +WellLogChannel +WellLogCsvFile +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 +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 diff --git a/ApplicationLibCode/Application/CMakeLists_files.cmake b/ApplicationLibCode/Application/CMakeLists_files.cmake index 4ffa6f4cba..3208d53bb0 100644 --- a/ApplicationLibCode/Application/CMakeLists_files.cmake +++ b/ApplicationLibCode/Application/CMakeLists_files.cmake @@ -83,8 +83,3 @@ set(SOURCE_GROUP_SOURCE_FILES list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "Application" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Application/Resources/keyword-description/keywords_6x.json b/ApplicationLibCode/Application/Resources/keyword-description/keywords_6x.json index 654a3be371..15a3bf5313 100644 --- a/ApplicationLibCode/Application/Resources/keyword-description/keywords_6x.json +++ b/ApplicationLibCode/Application/Resources/keyword-description/keywords_6x.json @@ -1032,11 +1032,11 @@ "description": "Total Mole Fraction (Component 2) (Matrix 4)" }, "CFGAS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Gas Flow Rate" }, "CPDIAM": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Perforation Diameter" }, "FDG": { @@ -1116,15 +1116,15 @@ "description": "Liquid Injection Total" }, "INFLOW0": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Inflow Rate (Component 0)" }, "INFLOW1": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Inflow Rate (Component 1)" }, "INFLOW2": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Inflow Rate (Component 2)" }, "MEMORYTS": { @@ -1136,7 +1136,7 @@ "description": "Number of Tracer Linear Iterations at the Current Time-Step" }, "MSDEPTH": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Depth of Well Completion" }, "MSUMCHOP": { diff --git a/ApplicationLibCode/Application/Resources/keyword-description/keywords_eclipse.json b/ApplicationLibCode/Application/Resources/keyword-description/keywords_eclipse.json index 4bc4902c6f..fa07c1d388 100644 --- a/ApplicationLibCode/Application/Resources/keyword-description/keywords_eclipse.json +++ b/ApplicationLibCode/Application/Resources/keyword-description/keywords_eclipse.json @@ -875,580 +875,680 @@ "category": "SUMMARY_BLOCK", "description": "Vapor hydrocarbon component mole fraction / vapor steam" }, - "CAMF": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Component aqueous mole fraction, from producing completions" - }, - "CAPI": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil API" - }, - "CCFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Flow Rate" - }, - "CCIC": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Injection Concentration" - }, - "CCIR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Injection Rate" - }, - "CCIT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Injection Total" - }, - "CCPC": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Production Concentration" - }, - "CCPR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Production Rate" - }, - "CCPT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Polymer Production Total" - }, - "CDBF": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Blocking factor for generalized pseudo-pressure method" - }, - "CDFAC": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "D-factor for flow dependent skin factor" - }, - "CDSF": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "PI multiplicative factor due to scale damage" - }, - "CDSM": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Current mass of scale deposited" - }, - "CDSML": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Current mass of scale deposited per unit perforation length" - }, - "CGFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Flow Rate" - }, - "CGFRF": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Free Gas Flow Rate" - }, - "CGFRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Flow Rate" - }, - "CGFRS": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Solution Gas Flow Rate" - }, - "CGFRU": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Sum of connection gas flow rates upstream of, and including, this connection" - }, - "CGIR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Injection Rate" - }, - "CGIRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Injection Rate" - }, - "CGIT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Injection Total" - }, - "CGITL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Injection Total" - }, - "CGLR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas-Liquid Ratio" - }, - "CGLRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas-Liquid Ratio" - }, - "CGOR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas-Oil Ratio" - }, - "CGORL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas-Oil Ratio" - }, - "CGPI": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Potential Injection rate" - }, - "CGPP": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Potential Production rate" - }, - "CGPPTN": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Generalized pseudo-pressure table update counter" - }, - "CGPPTS": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Generalized pseudo-pressure table update status" - }, - "CGPR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Production Rate " - }, - "CGPRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Flow Rate" - }, - "CGPT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Production Total" - }, - "CGPTF": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Free Gas Production Total" - }, - "CGPTL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Production Total" - }, - "CGPTS": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Solution Gas Production Total" - }, - "CGQ": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Gas Quality" - }, - "CKFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Hydrocarbon Component" - }, - "CKFRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Hydrocarbon Component" - }, - "CKFT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Hydrocarbon Component" - }, - "CKFTL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Hydrocarbon Component" - }, - "CLFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Liquid Flow Rate" - }, - "CLFRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Liquid Flow Rate" - }, - "CLPT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Liquid Production Total" - }, - "CLPTL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Liquid Production Total" - }, - "CNFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Solvent Flow Rate" - }, - "CNIT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Solvent Injection Total" - }, - "CNPT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Solvent Production Total" - }, - "COFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil Flow Rate" - }, - "COFRF": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Free Oil Flow Rate" - }, "COFRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Flow Rate" + }, + "WOFRL": { "category": "SUMMARY_WELL_COMPLETION", "description": "Oil Flow Rate" }, - "COFRS": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Solution oil flow rate" + "COPRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Production Rate" }, - "COFRU": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Sum of connection oil flow rates upstream of, and including, this connection" - }, - "COGR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil-Gas Ratio" - }, - "COGRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil-Gas Ratio" - }, - "COIT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil Injection Total" - }, - "COITL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil Injection Total" - }, - "COPI": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil Potential Injection rate" - }, - "COPP": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Oil Potential Production rate" - }, - "COPR": { + "WOPRL": { "category": "SUMMARY_WELL_COMPLETION", "description": "Oil Production Rate" }, - "COPRL": { + "COITL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Injection Total" + }, + "WOITL": { "category": "SUMMARY_WELL_COMPLETION", + "description": "Oil Injection Total" + }, + "CWFRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water Flow Rate" + }, + "WWFRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water Flow Rate" + }, + "CWPRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water Production Rate" + }, + "WWPRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water Production Rate" + }, + "CWPTL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water Production Total" + }, + "WWPTL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water Production Total" + }, + "CWIRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water Injection Rate" + }, + "WWIRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water Injection Rate" + }, + "CWITL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water Injection Total" + }, + "WWITL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water Injection Total" + }, + "CGFRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Flow Rate" + }, + "WGFRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas Flow Rate" + }, + "CGPRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Production Rate" + }, + "WGPRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas Production Rate" + }, + "CGPTL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Production Total" + }, + "WGPTL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas Production Total" + }, + "CGIRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Injection Rate" + }, + "WGIRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas Injection Rate" + }, + "CGITL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Injection Total" + }, + "WGITL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas Injection Total" + }, + "CLFRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Liquid Flow Rate" + }, + "WLFRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Liquid Flow Rate" + }, + "CLPTL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Liquid Production Total" + }, + "WLPTL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Liquid Production Total" + }, + "CVFRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Res Volume Flow Rate" + }, + "WVFRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Res Volume Flow Rate" + }, + "CVPRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Res Volume Production Flow Rate" + }, + "WVPRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Res Volume Production Flow Rate" + }, + "CVIRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Res Volume Injection Flow Rate" + }, + "WVIRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Res Volume Injection Flow Rate" + }, + "CVPTL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Res Volume Production Total" + }, + "WVPTL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Res Volume Production Total" + }, + "CVITL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Res Volume Injection Total" + }, + "WVITL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Res Volume Injection Total" + }, + "CWCTL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water Cut" + }, + "WWCTL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water Cut" + }, + "CGORL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas-Oil Ratio" + }, + "WGORL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas-Oil Ratio" + }, + "COGRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil-Gas Ratio" + }, + "WOGRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Oil-Gas Ratio" + }, + "CWGRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Water-Gas Ratio" + }, + "WWGRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Water-Gas Ratio" + }, + "CGLRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas-Liquid Ratio" + }, + "WGLRL": { + "category": "SUMMARY_WELL_COMPLETION", + "description": "Gas-Liquid Ratio" + }, + "CPRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Connection Pressure in completion" + }, + "CKFRL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Hydrocarbon Component Molar Flow Rate" + }, + "CKFTL": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Hydrocarbon Component Molar Flow Total" + }, + "CAMF": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Component aqueous mole fraction, from producing completions" + }, + "CAPI": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil API" + }, + "CCFR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Flow Rate" + }, + "CCIC": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Injection Concentration" + }, + "CCIR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Injection Rate" + }, + "CCIT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Injection Total" + }, + "CCPC": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Production Concentration" + }, + "CCPR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Production Rate" + }, + "CCPT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Polymer Production Total" + }, + "CDBF": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Blocking factor for generalized pseudo-pressure method" + }, + "CDFAC": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "D-factor for flow dependent skin factor" + }, + "CDSF": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "PI multiplicative factor due to scale damage" + }, + "CDSM": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Current mass of scale deposited" + }, + "CDSML": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Current mass of scale deposited per unit perforation length" + }, + "CGFR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Flow Rate" + }, + "CGFRF": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Free Gas Flow Rate" + }, + "CGFRS": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Solution Gas Flow Rate" + }, + "CGFRU": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Sum of connection gas flow rates upstream of, and including, this connection" + }, + "CGIR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Injection Rate" + }, + "CGIT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Injection Total" + }, + "CGLR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas-Liquid Ratio" + }, + "CGOR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas-Oil Ratio" + }, + "CGPI": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Potential Injection rate" + }, + "CGPP": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Potential Production rate" + }, + "CGPPTN": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Generalized pseudo-pressure table update counter" + }, + "CGPPTS": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Generalized pseudo-pressure table update status" + }, + "CGPR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Production Rate " + }, + "CGPT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Production Total" + }, + "CGPTF": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Free Gas Production Total" + }, + "CGPTS": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Solution Gas Production Total" + }, + "CGQ": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Gas Quality" + }, + "CKFR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Hydrocarbon Component" + }, + "CKFT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Hydrocarbon Component" + }, + "CLFR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Liquid Flow Rate" + }, + "CLPT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Liquid Production Total" + }, + "CNFR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Solvent Flow Rate" + }, + "CNIT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Solvent Injection Total" + }, + "CNPT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Solvent Production Total" + }, + "COFR": { + "category": "SUMMARY_WELL_CONNECTION", "description": "Oil Flow Rate" }, + "COFRF": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Free Oil Flow Rate" + }, + "COFRS": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Solution oil flow rate" + }, + "COFRU": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Sum of connection oil flow rates upstream of, and including, this connection" + }, + "COGR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil-Gas Ratio" + }, + "COIT": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Injection Total" + }, + "COPI": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Potential Injection rate" + }, + "COPP": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Potential Production rate" + }, + "COPR": { + "category": "SUMMARY_WELL_CONNECTION", + "description": "Oil Production Rate" + }, "COPT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Oil Production Total" }, "COPTF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Free Oil Production Total" }, "COPTL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Oil Production Total" }, "COPTS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Solution Oil Production Total" }, "CPI": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Productivity Index of well's preferred phase" }, "CPR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Connection Pressure" }, - "CPRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Average Connection Pressure in completion" - }, "CPU": { "category": "SUMMARY_MISC", "description": "CPU" }, "CRREXCH": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Exchange flux at current time" }, "CRRINJT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Connection cumulative water injection" }, "CRRPROT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Connection cumulative water production" }, "CSFR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Flow Rate" }, "CSIC": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Injection Concentration" }, "CSIR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Injection Rate" }, "CSIT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Injection Total" }, "CSPC": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Production Concentration" }, "CSPR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Production Rate" }, "CSPT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Salt Production Total" }, "CTFAC": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Connection Transmissibility Factor" }, "CTFR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Flow Rate" }, "CTFRALK": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Flow Rate" }, "CTFRANI": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Anion Flow Rate" }, "CTFRCAT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Cation Flow Rate" }, "CTFRFOA": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Flow Rate" }, "CTFRSUR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Flow Rate" }, "CTIC": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Concentration" }, "CTICF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Concentration" }, "CTICS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Concentration" }, "CTIR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Rate" }, "CTIRF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Rate" }, "CTIRS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Rate" }, "CTIT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Total" }, "CTITALK": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Injection Total" }, "CTITANI": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Anion Injection Total" }, "CTITCAT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Cation Injection Total" }, "CTITF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Total" }, "CTITFOA": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Injection Total" }, "CTITS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Injection Total" }, "CTITSUR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Injection Total" }, "CTPC": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Concentration" }, "CTPCF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production" }, "CTPCS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production" }, "CTPR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Rate" }, "CTPRF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Rate" }, "CTPRS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Rate" }, "CTPT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Total" }, "CTPTALK": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Production Total" }, "CTPTANI": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Anion Production Total" }, "CTPTCAT": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Cation Production Total" }, "CTPTF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Total" }, "CTPTFOA": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Production Total" }, "CTPTS": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Tracer Production Total" }, "CTPTSUR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Production Total" }, "CU": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "User-defined connection quantity" }, "CVFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Reservoir" - }, - "CVFRL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Reservoir" }, "CVIR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Res Volume Injection Rate" }, - "CVIRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Res Volume Injection Flow Rate" - }, "CVIT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Res Volume Injection Total" - }, - "CVITL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Res Volume Injection Total" }, "CVPR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Res Volume Production Rate" }, - "CVPRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Res Volume Production Flow Rate" - }, "CVPT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Res Volume Production Total" - }, - "CVPTL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Res Volume Production Total" }, "CWCT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water Cut" - }, - "CWCTL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Cut" }, "CWFR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water Flow Rate" - }, - "CWFRL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Flow Rate" }, "CWFRU": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Sum of connection water flow rates upstream of, and including, this connection" }, "CWGR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water-Gas Ratio" - }, - "CWGRL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water-Gas Ratio" }, "CWIR": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water Injection Rate" - }, - "CWIRL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Injection Rate" }, "CWIT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water Injection Total" - }, - "CWITL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Injection Total" }, "CWPI": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Potential Injection rate" }, "CWPP": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Potential Production rate" }, "CWPR": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Production Rate" }, - "CWPRL": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water Flow Rate" - }, "CWPT": { - "category": "SUMMARY_WELL_COMPLETION", - "description": "Water Production Total" - }, - "CWPTL": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Water Production Total" }, "CZMF": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "Total Mole Fraction" }, "DATE": { @@ -4484,15 +4584,15 @@ "description": "Brine concentration interpolated at a defined coordinate within a local grid" }, "LCGFRU": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "As CGFRU but for local grids" }, "LCOFRU": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "As COFRU but for local grids" }, "LCWFRU": { - "category": "SUMMARY_WELL_COMPLETION", + "category": "SUMMARY_WELL_CONNECTION", "description": "As CWFRU but for local grids" }, "MLINEARS": { @@ -5531,10 +5631,6 @@ "category": "SUMMARY_WELL", "description": "Gas Density at Surface Conditions" }, - "WGFRL": { - "category": "SUMMARY_WELL", - "description": "Gas Flow Rate" - }, "WGFWCn": { "category": "SUMMARY_WELL", "description": "Derivative of well gas flow rate with respect to parameter n" @@ -5559,10 +5655,6 @@ "category": "SUMMARY_WELL", "description": "Gas Injection Rate History" }, - "WGIRL": { - "category": "SUMMARY_WELL", - "description": "Gas Injection Rate" - }, "WGIRT": { "category": "SUMMARY_WELL", "description": "Gas Injection Rate Target/Limit" @@ -5575,10 +5667,6 @@ "category": "SUMMARY_WELL", "description": "Gas Injection Total History" }, - "WGITL": { - "category": "SUMMARY_WELL", - "description": "Gas Injection Total" - }, "WGLIR": { "category": "SUMMARY_WELL", "description": "Gas Lift Injection Rate" @@ -5595,10 +5683,6 @@ "category": "SUMMARY_WELL", "description": "Gas-Liquid Ratio History" }, - "WGLRL": { - "category": "SUMMARY_WELL", - "description": "Gas-Liquid Ratio" - }, "WGMR": { "category": "SUMMARY_WELL", "description": "Gas Mass Rate" @@ -5615,10 +5699,6 @@ "category": "SUMMARY_WELL", "description": "Gas-Oil Ratio History" }, - "WGORL": { - "category": "SUMMARY_WELL", - "description": "Gas-Oil Ratio" - }, "WGPGR": { "category": "SUMMARY_WELL", "description": "Gas Production Guide Rate" @@ -5687,10 +5767,6 @@ "category": "SUMMARY_WELL", "description": "Gas Production Rate History" }, - "WGPRL": { - "category": "SUMMARY_WELL", - "description": "Gas Flow Rate" - }, "WGPRS": { "category": "SUMMARY_WELL", "description": "Solution Gas Production Rate" @@ -5727,10 +5803,6 @@ "category": "SUMMARY_WELL", "description": "Gas Production Total History" }, - "WGPTL": { - "category": "SUMMARY_WELL", - "description": "Gas Production Total" - }, "WGPTS": { "category": "SUMMARY_WELL", "description": "Solution Gas Production Total" @@ -5787,10 +5859,6 @@ "category": "SUMMARY_WELL", "description": "Hydrocarbon Molar Production Total" }, - "WLFRL": { - "category": "SUMMARY_WELL", - "description": "Liquid Flow Rate" - }, "WLPR": { "category": "SUMMARY_WELL", "description": "Liquid Production Rate" @@ -5811,10 +5879,6 @@ "category": "SUMMARY_WELL", "description": "Liquid Production Total History" }, - "WLPTL": { - "category": "SUMMARY_WELL", - "description": "Liquid Production Total" - }, "WMCON": { "category": "SUMMARY_WELL", "description": "The number of connections capable of flowing in the well" @@ -5891,10 +5955,6 @@ "category": "SUMMARY_WELL", "description": "Oil Density at Surface Conditions" }, - "WOFRL": { - "category": "SUMMARY_WELL", - "description": "Oil Flow Rate" - }, "WOFWCn": { "category": "SUMMARY_WELL", "description": "Derivative of well oil flow rate with respect to parameter n" @@ -5911,10 +5971,6 @@ "category": "SUMMARY_WELL", "description": "Oil-Gas Ratio History" }, - "WOGRL": { - "category": "SUMMARY_WELL", - "description": "Oil-Gas Ratio" - }, "WOIGR": { "category": "SUMMARY_WELL", "description": "Oil Injection Guide Rate" @@ -5939,10 +5995,6 @@ "category": "SUMMARY_WELL", "description": "Oil Injection Total History" }, - "WOITL": { - "category": "SUMMARY_WELL", - "description": "Oil Injection Total" - }, "WOMR": { "category": "SUMMARY_WELL", "description": "Oil Mass Rate" @@ -5999,10 +6051,6 @@ "category": "SUMMARY_WELL", "description": "Oil Production Rate History" }, - "WOPRL": { - "category": "SUMMARY_WELL", - "description": "Oil Flow Rate" - }, "WOPRS": { "category": "SUMMARY_WELL", "description": "Solution Oil Production Rate" @@ -6419,18 +6467,10 @@ "category": "SUMMARY_WELL", "description": "User-defined well quantity" }, - "WVFRL": { - "category": "SUMMARY_WELL", - "description": "Res Volume Flow Rate" - }, "WVIR": { "category": "SUMMARY_WELL", "description": "Res Volume Injection Rate" }, - "WVIRL": { - "category": "SUMMARY_WELL", - "description": "Res Volume Injection Flow Rate" - }, "WVIRT": { "category": "SUMMARY_WELL", "description": "Res Volume Injection Rate Target/Limit" @@ -6439,10 +6479,6 @@ "category": "SUMMARY_WELL", "description": "Res Volume Injection Total" }, - "WVITL": { - "category": "SUMMARY_WELL", - "description": "Res Volume Injection Total" - }, "WVPGR": { "category": "SUMMARY_WELL", "description": "Res Volume Production Guide Rate" @@ -6451,10 +6487,6 @@ "category": "SUMMARY_WELL", "description": "Res Volume Production Rate" }, - "WVPRL": { - "category": "SUMMARY_WELL", - "description": "Res Volume Production Flow Rate" - }, "WVPRT": { "category": "SUMMARY_WELL", "description": "Res Volume Production Rate Target/Limit" @@ -6463,10 +6495,6 @@ "category": "SUMMARY_WELL", "description": "Res Volume Production Total" }, - "WVPTL": { - "category": "SUMMARY_WELL", - "description": "Res Volume Production Total" - }, "WWCT": { "category": "SUMMARY_WELL", "description": "Water Cut" @@ -6475,14 +6503,6 @@ "category": "SUMMARY_WELL", "description": "Water Cut History" }, - "WWCTL": { - "category": "SUMMARY_WELL", - "description": "Water Cut" - }, - "WWFRL": { - "category": "SUMMARY_WELL", - "description": "Water Flow Rate" - }, "WWFWCn": { "category": "SUMMARY_WELL", "description": "Derivative of water flow rate with respect to parameter n" @@ -6515,10 +6535,6 @@ "category": "SUMMARY_WELL", "description": "Water-Gas Ratio History" }, - "WWGRL": { - "category": "SUMMARY_WELL", - "description": "Water-Gas Ratio" - }, "WWIGR": { "category": "SUMMARY_WELL", "description": "Water Injection Guide Rate" @@ -6539,10 +6555,6 @@ "category": "SUMMARY_WELL", "description": "Water Injection Rate History" }, - "WWIRL": { - "category": "SUMMARY_WELL", - "description": "Water Injection Rate" - }, "WWIRT": { "category": "SUMMARY_WELL", "description": "Water Injection Rate Target/Limit" @@ -6555,10 +6567,6 @@ "category": "SUMMARY_WELL", "description": "Water Injection Total History" }, - "WWITL": { - "category": "SUMMARY_WELL", - "description": "Water Injection Total" - }, "WWMIR": { "category": "SUMMARY_WELL", "description": "Water component molar injection rate" @@ -6615,10 +6623,6 @@ "category": "SUMMARY_WELL", "description": "Water Production Rate History" }, - "WWPRL": { - "category": "SUMMARY_WELL", - "description": "Water Flow Rate" - }, "WWPRT": { "category": "SUMMARY_WELL", "description": "Water Production Rate Target/Limit" @@ -6631,10 +6635,6 @@ "category": "SUMMARY_WELL", "description": "Water Production Total History" }, - "WWPTL": { - "category": "SUMMARY_WELL", - "description": "Water Production Total" - }, "WWVIR": { "category": "SUMMARY_WELL", "description": "Water Voidage Injection Rate" @@ -6679,4 +6679,4 @@ "category": "SUMMARY_MISC", "description": "Years" } -} +} \ No newline at end of file diff --git a/ApplicationLibCode/Application/RiaApplication.cpp b/ApplicationLibCode/Application/RiaApplication.cpp index 2e310f7b4b..bdf39fc64c 100644 --- a/ApplicationLibCode/Application/RiaApplication.cpp +++ b/ApplicationLibCode/Application/RiaApplication.cpp @@ -45,6 +45,7 @@ #include "RicfCommandFileExecutor.h" #include "RicfCommandObject.h" +#include "Formations/RimFormationNamesCollection.h" #include "PlotTemplates/RimPlotTemplateFolderItem.h" #include "Polygons/RimPolygonCollection.h" #include "QuickAccess/RimQuickAccessCollection.h" @@ -60,7 +61,6 @@ #include "RimFaultReactivationModelCollection.h" #include "RimFileWellPath.h" #include "RimFileWellPathDataLoader.h" -#include "RimFormationNamesCollection.h" #include "RimFractureTemplateCollection.h" #include "RimGeoMechCase.h" #include "RimGeoMechModels.h" @@ -532,7 +532,10 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct // VL check regarding specific order mentioned in comment above... m_preferences->lastUsedProjectFileName = fullPathProjectFileName; - m_preferences->writePreferencesToApplicationStore(); + if ( m_preferencesFileName.isEmpty() ) + { + m_preferences->writePreferencesToApplicationStore(); + } for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ ) { @@ -773,11 +776,11 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct if ( !sumMainCollection ) continue; sumMainCollection->updateAutoShortName(); - for ( auto sumCaseGroup : sumMainCollection->summaryCaseCollections() ) + for ( auto ensemble : sumMainCollection->summaryEnsembles() ) { - sumCaseGroup->ensureNameIsUpdated(); - sumCaseGroup->loadDataAndUpdate(); + ensemble->loadDataAndUpdate(); } + sumMainCollection->updateEnsembleNames(); for ( auto well : oilField->wellPathCollection()->allWellPaths() ) { @@ -857,7 +860,10 @@ bool RiaApplication::saveProjectAs( const QString& fileName, gsl::not_nulllastUsedProjectFileName = fileName; - m_preferences->writePreferencesToApplicationStore(); + if ( m_preferencesFileName.isEmpty() ) + { + m_preferences->writePreferencesToApplicationStore(); + } onProjectSaved(); @@ -1324,7 +1330,10 @@ void RiaApplication::applyPreferences() caf::ProgressInfoStatic::setEnabled( RiaPreferencesSystem::current()->showProgressBar() ); - m_preferences->writePreferencesToApplicationStore(); + if ( m_preferencesFileName.isEmpty() ) + { + m_preferences->writePreferencesToApplicationStore(); + } } //-------------------------------------------------------------------------------------------------- @@ -1484,7 +1493,17 @@ cvf::Font* RiaApplication::defaultWellLabelFont() void RiaApplication::initialize() { m_preferences = std::make_unique(); - caf::PdmSettings::readFieldsFromApplicationStore( m_preferences.get() ); + + if ( !m_preferencesFileName.isEmpty() ) + { + // The text file with preference values has priority above reading from user settings + m_preferences->importPreferenceValuesFromFile( m_preferencesFileName ); + } + else + { + caf::PdmSettings::readFieldsFromApplicationStore( m_preferences.get() ); + } + m_preferences->initAfterReadRecursively(); applyPreferences(); diff --git a/ApplicationLibCode/Application/RiaApplication.h b/ApplicationLibCode/Application/RiaApplication.h index 2246705003..2d0c001d4f 100644 --- a/ApplicationLibCode/Application/RiaApplication.h +++ b/ApplicationLibCode/Application/RiaApplication.h @@ -249,6 +249,8 @@ protected: QString m_commandLineHelpText; QMap m_sessionCache; // Session cache used to store username/passwords per session + QString m_preferencesFileName; + bool m_runningWorkerProcess; private: diff --git a/ApplicationLibCode/Application/RiaConsoleApplication.cpp b/ApplicationLibCode/Application/RiaConsoleApplication.cpp index 5812533cd4..ddf537c816 100644 --- a/ApplicationLibCode/Application/RiaConsoleApplication.cpp +++ b/ApplicationLibCode/Application/RiaConsoleApplication.cpp @@ -159,6 +159,14 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n return RiaApplication::ApplicationStatus::EXIT_COMPLETED; } + if ( cvf::Option o = progOpt->option( "preferences" ) ) + { + CVF_ASSERT( o.valueCount() == 1 ); + m_preferencesFileName = cvfqt::Utils::toQString( o.value( 0 ) ); + RiaApplication::initialize(); + onProjectClosed(); + } + if ( cvf::Option o = progOpt->option( "startdir" ) ) { CVF_ASSERT( o.valueCount() == 1 ); diff --git a/ApplicationLibCode/Application/RiaGuiApplication.cpp b/ApplicationLibCode/Application/RiaGuiApplication.cpp index 82f01ee6b2..8480cf1bf5 100644 --- a/ApplicationLibCode/Application/RiaGuiApplication.cpp +++ b/ApplicationLibCode/Application/RiaGuiApplication.cpp @@ -47,6 +47,7 @@ #include "RicImportGeneralDataFeature.h" #include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" +#include "Formations/RimFormationNamesCollection.h" #include "Rim2dIntersectionViewCollection.h" #include "RimAnnotationCollection.h" #include "RimAnnotationInViewCollection.h" @@ -54,7 +55,6 @@ #include "RimEclipseCaseCollection.h" #include "RimEclipseView.h" #include "RimFlowPlotCollection.h" -#include "RimFormationNamesCollection.h" #include "RimFractureTemplateCollection.h" #include "RimGeoMechCase.h" #include "RimGeoMechCellColors.h" @@ -495,6 +495,14 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n return RiaApplication::ApplicationStatus::EXIT_COMPLETED; } + if ( cvf::Option o = progOpt->option( "preferences" ) ) + { + CVF_ASSERT( o.valueCount() == 1 ); + m_preferencesFileName = cvfqt::Utils::toQString( o.value( 0 ) ); + RiaApplication::initialize(); + onProjectClosed(); + } + if ( cvf::Option o = progOpt->option( "regressiontest" ) ) { CVF_ASSERT( o.valueCount() == 1 ); @@ -1456,7 +1464,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* ( applySettingsToAllViews || rim3dView->backgroundColor() == oldPreferences->defaultViewerBackgroundColor() ) ) { rim3dView->setBackgroundColor( m_preferences->defaultViewerBackgroundColor() ); - rim3dView->applyBackgroundColorAndFontChanges(); + rim3dView->applyFontChanges(); } if ( oldPreferences && ( applySettingsToAllViews || rim3dView->scaleZ() == oldPreferences->defaultScaleFactorZ() ) ) diff --git a/ApplicationLibCode/Application/RiaPlotDefines.cpp b/ApplicationLibCode/Application/RiaPlotDefines.cpp index 5405da79f5..714a137481 100644 --- a/ApplicationLibCode/Application/RiaPlotDefines.cpp +++ b/ApplicationLibCode/Application/RiaPlotDefines.cpp @@ -76,6 +76,15 @@ void caf::AppEnum::setUp() setDefault( RiaDefines::Orientation::VERTICAL ); } +template <> +void caf::AppEnum::setUp() +{ + addItem( RiaDefines::TextAlignment::LEFT, "LEFT", "Left" ); + addItem( RiaDefines::TextAlignment::CENTER, "CENTER", "Center" ); + addItem( RiaDefines::TextAlignment::RIGHT, "RIGHT", "Right" ); + setDefault( RiaDefines::TextAlignment::RIGHT ); +} + template <> void caf::AppEnum::setUp() { diff --git a/ApplicationLibCode/Application/RiaPlotDefines.h b/ApplicationLibCode/Application/RiaPlotDefines.h index 0ecaeeb8bc..1c2fab4be0 100644 --- a/ApplicationLibCode/Application/RiaPlotDefines.h +++ b/ApplicationLibCode/Application/RiaPlotDefines.h @@ -81,6 +81,13 @@ enum class WindowTileMode UNDEFINED, }; +enum class TextAlignment +{ + LEFT, + RIGHT, + CENTER +}; + // Defines relate to curve and plot template names QString namingVariableCase(); QString namingVariableWell(); diff --git a/ApplicationLibCode/Application/RiaPreferences.cpp b/ApplicationLibCode/Application/RiaPreferences.cpp index 0bfa6424b5..912e5524f3 100644 --- a/ApplicationLibCode/Application/RiaPreferences.cpp +++ b/ApplicationLibCode/Application/RiaPreferences.cpp @@ -23,6 +23,7 @@ #include "RiaApplication.h" #include "RiaColorTables.h" +#include "RiaGuiApplication.h" #include "RiaLogging.h" #include "RiaPreferencesGeoMech.h" #include "RiaPreferencesGrid.h" @@ -36,6 +37,7 @@ #include "OsduCommands//RicDeleteOsduTokenFeature.h" #include "Sumo/RicDeleteSumoTokenFeature.h" +#include "RiuFileDialogTools.h" #include "RiuGuiTheme.h" #include "cafPdmFieldCvfColor.h" @@ -178,7 +180,9 @@ RiaPreferences::RiaPreferences() CAF_PDM_InitFieldNoDefault( &defaultSceneFontSize, "defaultSceneFontSizePt", "Viewer Font Size" ); CAF_PDM_InitFieldNoDefault( &defaultAnnotationFontSize, "defaultAnnotationFontSizePt", "Annotation Font Size" ); CAF_PDM_InitFieldNoDefault( &defaultWellLabelFontSize, "defaultWellLabelFontSizePt", "Well Label Font Size" ); - CAF_PDM_InitFieldNoDefault( &defaultPlotFontSize, "defaultPlotFontSizePt", "Plot Font Size" ); + + auto defaultValue = FontSizeEnum( RiaFontCache::FontSize::FONT_SIZE_10 ); + CAF_PDM_InitField( &defaultPlotFontSize, "defaultPlotFontSizePt", defaultValue, "Plot Font Size" ); CAF_PDM_InitField( &m_showLegendBackground, "showLegendBackground", true, "Show Box around Legends" ); caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_showLegendBackground ); @@ -284,6 +288,12 @@ RiaPreferences::RiaPreferences() CAF_PDM_InitField( &m_deleteSumoToken, "deleteSumoToken", false, "" ); caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_deleteSumoToken ); m_deleteSumoToken.xmlCapability()->disableIO(); + + CAF_PDM_InitFieldNoDefault( &m_importPreferences, "importPreferences", "Import From File" ); + caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_importPreferences ); + + CAF_PDM_InitFieldNoDefault( &m_exportPreferences, "exportPreferences", "Export To File" ); + caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_exportPreferences ); } //-------------------------------------------------------------------------------------------------- @@ -357,6 +367,20 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field, QS pbAttribute->m_buttonText = "Delete Token"; } } + else if ( field == &m_importPreferences ) + { + if ( auto* pbAttribute = dynamic_cast( attribute ) ) + { + pbAttribute->m_buttonText = "Import Preferences"; + } + } + else if ( field == &m_exportPreferences ) + { + if ( auto* pbAttribute = dynamic_cast( attribute ) ) + { + pbAttribute->m_buttonText = "Export Preferences"; + } + } } //-------------------------------------------------------------------------------------------------- @@ -398,8 +422,14 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& m_loggerFlushInterval.uiCapability()->setUiReadOnly( !m_loggerFilename().first ); caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" ); + otherGroup->setCollapsedByDefault(); otherGroup->add( &holoLensDisableCertificateVerification ); otherGroup->add( &m_useUndoRedo ); + + caf::PdmUiGroup* importExportGroup = uiOrdering.addNewGroup( "Import and Export" ); + importExportGroup->setCollapsedByDefault(); + importExportGroup->add( &m_importPreferences, { .newRow = false, .totalColumnSpan = 1 } ); + importExportGroup->add( &m_exportPreferences, { .newRow = false, .totalColumnSpan = 1 } ); } else if ( uiConfigName == RiaPreferences::tabNameGrid() ) { @@ -578,6 +608,20 @@ void RiaPreferences::fieldChangedByUi( const caf::PdmFieldHandle* changedField, RicDeleteSumoTokenFeature::deleteUserToken(); m_deleteSumoToken = false; } + else if ( changedField == &m_exportPreferences ) + { + QString filePath = RiuFileDialogTools::getSaveFileName( nullptr, "Export Preferences", "", "XML files (*.xml);;All files(*.*)" ); + exportPreferenceValuesToFile( filePath ); + + m_exportPreferences = false; + } + else if ( changedField == &m_importPreferences ) + { + QString filePath = RiuFileDialogTools::getOpenFileName( nullptr, "Import Preferences", "", "XML files (*.xml);;All files(*.*)" ); + importPreferenceValuesFromFile( filePath ); + + m_importPreferences = false; + } else { m_summaryPreferences->fieldChangedByUi( changedField, oldValue, newValue ); @@ -839,6 +883,8 @@ std::map RiaPreferences::de //-------------------------------------------------------------------------------------------------- void RiaPreferences::writePreferencesToApplicationStore() { + if ( !RiaGuiApplication::isRunning() ) return; + caf::PdmSettings::writeFieldsToApplicationStore( this ); } @@ -1076,3 +1122,54 @@ RiaPreferencesGrid* RiaPreferences::gridPreferences() const { return m_gridPreferences(); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaPreferences::importPreferenceValuesFromFile( const QString& fileName ) +{ + if ( fileName.isEmpty() ) return; + + QFile file( fileName ); + if ( file.open( QIODevice::ReadOnly | QIODevice::Text ) ) + { + QTextStream in( &file ); + QString fileContent = in.readAll(); + file.close(); + if ( !fileContent.isEmpty() ) + { + this->readObjectFromXmlString( fileContent, caf::PdmDefaultObjectFactory::instance() ); + } + auto txt = "Imported preferences from " + fileName; + RiaLogging::info( txt ); + } + else + { + auto txt = QString( "Unable to open file: " ) + fileName; + RiaLogging::error( txt ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaPreferences::exportPreferenceValuesToFile( const QString& fileName ) +{ + QFile file( fileName ); + if ( file.open( QIODevice::WriteOnly | QIODevice::Text ) ) + { + QTextStream out( &file ); + + auto content = this->writeObjectToXmlString(); + out << content; + file.close(); + + QString txt = "Exported preferences to " + fileName; + RiaLogging::info( txt ); + } + else + { + auto txt = QString( "Unable to open file: " ) + fileName; + RiaLogging::error( txt ); + } +} diff --git a/ApplicationLibCode/Application/RiaPreferences.h b/ApplicationLibCode/Application/RiaPreferences.h index 4fc1b41462..57e291815e 100644 --- a/ApplicationLibCode/Application/RiaPreferences.h +++ b/ApplicationLibCode/Application/RiaPreferences.h @@ -132,6 +132,9 @@ public: RiaPreferencesSumo* sumoPreferences() const; RiaPreferencesGrid* gridPreferences() const; + void importPreferenceValuesFromFile( const QString& fileName ); + void exportPreferenceValuesToFile( const QString& fileName ); + public: caf::PdmField enableGrpcServer; caf::PdmField defaultGrpcPortNumber; @@ -251,5 +254,9 @@ private: caf::PdmField m_showInfoBox; caf::PdmField m_showGridBox; + // Load and save preferences + caf::PdmField m_exportPreferences; + caf::PdmField m_importPreferences; + QStringList m_tabNames; }; diff --git a/ApplicationLibCode/Application/RiaPreferencesGrid.cpp b/ApplicationLibCode/Application/RiaPreferencesGrid.cpp index a961af4c84..6e89a69fab 100644 --- a/ApplicationLibCode/Application/RiaPreferencesGrid.cpp +++ b/ApplicationLibCode/Application/RiaPreferencesGrid.cpp @@ -317,3 +317,19 @@ void RiaPreferencesGrid::setGridModelReaderOverride( const std::string& readerNa m_gridModelReaderOverride = readerType; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaPreferencesGrid::setGridModelReaderOverride( const RiaDefines::GridModelReader readerType ) +{ + m_gridModelReaderOverride = readerType; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefines::GridModelReader RiaPreferencesGrid::gridModelReaderOverride() const +{ + return m_gridModelReaderOverride; +} diff --git a/ApplicationLibCode/Application/RiaPreferencesGrid.h b/ApplicationLibCode/Application/RiaPreferencesGrid.h index c748e6ce54..8e95831dc8 100644 --- a/ApplicationLibCode/Application/RiaPreferencesGrid.h +++ b/ApplicationLibCode/Application/RiaPreferencesGrid.h @@ -58,7 +58,10 @@ public: bool invalidateLongThinCells() const; RiaDefines::GridModelReader gridModelReader() const; + void setGridModelReaderOverride( const std::string& readerName ); + void setGridModelReaderOverride( const RiaDefines::GridModelReader readerType ); + RiaDefines::GridModelReader gridModelReaderOverride() const; void appendItems( caf::PdmUiOrdering& uiOrdering ); diff --git a/ApplicationLibCode/Application/RiaPreferencesSummary.cpp b/ApplicationLibCode/Application/RiaPreferencesSummary.cpp index e68fe4904e..d034921d02 100644 --- a/ApplicationLibCode/Application/RiaPreferencesSummary.cpp +++ b/ApplicationLibCode/Application/RiaPreferencesSummary.cpp @@ -18,7 +18,7 @@ #include "RiaPreferencesSummary.h" -#include "PlotTemplateCommands/RicSummaryPlotTemplateTools.h" +#include "Summary/RiaSummaryPlotTemplateTools.h" #include "RiaApplication.h" #include "RiaColorTables.h" diff --git a/ApplicationLibCode/Application/RiaPreferencesSystem.cpp b/ApplicationLibCode/Application/RiaPreferencesSystem.cpp index 6e771f14d5..65f1d9063d 100644 --- a/ApplicationLibCode/Application/RiaPreferencesSystem.cpp +++ b/ApplicationLibCode/Application/RiaPreferencesSystem.cpp @@ -83,6 +83,8 @@ RiaPreferencesSystem::RiaPreferencesSystem() "eclipseReaderMode", EclipseTextFileReaderModeType( RiaPreferencesSystem::EclipseTextFileReaderMode::FILE ), "Eclipse Text File Import mode (GRDECL)" ); + + CAF_PDM_InitField( &m_keywordsForLogging, "KeywordsForLogging", QString(), "Keywords to enable debug logging, separated by semicolon" ); } //-------------------------------------------------------------------------------------------------- @@ -223,6 +225,18 @@ RiaPreferencesSystem::EclipseTextFileReaderMode RiaPreferencesSystem::eclipseTex return m_eclipseReaderMode(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiaPreferencesSystem::isLoggingActivatedForKeyword( const QString& keyword ) const +{ + QStringList keywords = m_keywordsForLogging().split( ";" ); + + if ( keywords.contains( "enable-all" ) ) return true; + + return keywords.contains( keyword ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -241,7 +255,6 @@ void RiaPreferencesSystem::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd group->add( &m_showHud ); } - uiOrdering.add( &m_gtestFilter ); uiOrdering.add( &m_showProjectChangedDialog ); uiOrdering.add( &m_showTestToolbar ); uiOrdering.add( &m_includeFractureDebugInfoFile ); @@ -250,6 +263,13 @@ void RiaPreferencesSystem::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd uiOrdering.add( &m_showPdfExportDialog ); uiOrdering.add( &m_exportScalingFactor ); + uiOrdering.add( &m_eclipseReaderMode ); + + { + caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Developer Settings" ); + group->add( &m_keywordsForLogging ); + group->add( &m_gtestFilter ); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Application/RiaPreferencesSystem.h b/ApplicationLibCode/Application/RiaPreferencesSystem.h index f63f985d75..c58f097fc3 100644 --- a/ApplicationLibCode/Application/RiaPreferencesSystem.h +++ b/ApplicationLibCode/Application/RiaPreferencesSystem.h @@ -59,6 +59,8 @@ public: EclipseTextFileReaderMode eclipseTextFileReaderMode() const; + bool isLoggingActivatedForKeyword( const QString& keyword ) const; + protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; @@ -84,4 +86,6 @@ private: caf::PdmField m_gtestFilter; caf::PdmField m_eclipseReaderMode; + + caf::PdmField m_keywordsForLogging; }; diff --git a/ApplicationLibCode/Application/RiaResultNames.cpp b/ApplicationLibCode/Application/RiaResultNames.cpp index 74f19a0bef..e0498cf9bc 100644 --- a/ApplicationLibCode/Application/RiaResultNames.cpp +++ b/ApplicationLibCode/Application/RiaResultNames.cpp @@ -437,6 +437,14 @@ QString RiaResultNames::facies() return "FACIES"; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaResultNames::porv() +{ + return "PORV"; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -461,6 +469,30 @@ QString RiaResultNames::swat() return "SWAT"; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaResultNames::sowcr() +{ + return "SOWCR"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaResultNames::sogcr() +{ + return "SOGCR"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaResultNames::sgcr() +{ + return "SGCR"; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Application/RiaResultNames.h b/ApplicationLibCode/Application/RiaResultNames.h index 08729868a0..85abdfda1e 100644 --- a/ApplicationLibCode/Application/RiaResultNames.h +++ b/ApplicationLibCode/Application/RiaResultNames.h @@ -83,10 +83,15 @@ RigEclipseResultAddress staticIntegerAddress( const QString& resultName ); QString faultDistanceName(); QString facies(); +QString porv(); QString soil(); QString sgas(); QString swat(); +QString sowcr(); +QString sogcr(); +QString sgcr(); + // Well path derived results QString wbsAzimuthResult(); QString wbsInclinationResult(); diff --git a/ApplicationLibCode/Application/Tools/CMakeLists_files.cmake b/ApplicationLibCode/Application/Tools/CMakeLists_files.cmake index 8907e2e8b0..1910eaf2d9 100644 --- a/ApplicationLibCode/Application/Tools/CMakeLists_files.cmake +++ b/ApplicationLibCode/Application/Tools/CMakeLists_files.cmake @@ -107,11 +107,3 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(QT_MOC_HEADERS ${QT_MOC_HEADERS}) - -source_group( - "Application\\Tools" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Application/Tools/Cloud/CMakeLists_files.cmake b/ApplicationLibCode/Application/Tools/Cloud/CMakeLists_files.cmake index ccb2a99a36..4d6757eebc 100644 --- a/ApplicationLibCode/Application/Tools/Cloud/CMakeLists_files.cmake +++ b/ApplicationLibCode/Application/Tools/Cloud/CMakeLists_files.cmake @@ -16,15 +16,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaOAuthHttpServerReplyHandler.cpp ) -list( - APPEND - QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RiaCloudConnector.h - ${CMAKE_CURRENT_LIST_DIR}/RiaSumoConnector.h - ${CMAKE_CURRENT_LIST_DIR}/RiaOsduConnector.h - ${CMAKE_CURRENT_LIST_DIR}/RiaOAuthHttpServerReplyHandler.h -) - list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) diff --git a/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.cpp b/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.cpp index 1453f70296..e3e3d485f9 100644 --- a/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.cpp +++ b/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.cpp @@ -25,11 +25,15 @@ #include #include +#include #include +#include #include #include +#include #include #include +#include #include //-------------------------------------------------------------------------------------------------- @@ -240,6 +244,26 @@ void RiaCloudConnector::setTokenDataFilePath( const QString& filePath ) m_tokenDataFilePath = filePath; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaCloudConnector::clearTokens() +{ + if ( m_authCodeFlow ) + { + m_authCodeFlow->setToken( "" ); + m_authCodeFlow->setRefreshToken( "" ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RiaCloudConnector::isGranted() const +{ + return m_authCodeFlow->status() == QAbstractOAuth::Status::Granted; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -276,6 +300,75 @@ QString RiaCloudConnector::requestTokenBlocking() return m_authCodeFlow->token(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaCloudConnector::requestTokenWithCancelButton() +{ + QDialog dialog; + dialog.setWindowTitle( "Requesting Token" ); + dialog.setModal( true ); + + QVBoxLayout* layout = new QVBoxLayout( &dialog ); + + QLabel* label = + new QLabel( "Requesting token.\nIf this process takes a long time,\nissue a new authentication process by pressing\n'New " + "Authentication'\n\n Please wait..." ); + label->setAlignment( Qt::AlignHCenter ); + layout->addWidget( label ); + + // Create horizontal button layout + QHBoxLayout* buttonLayout = new QHBoxLayout(); + + // Add buttons to horizontal layout + QPushButton* requestNewAuthenticationButton = new QPushButton( "New Authentication" ); + QPushButton* cancelButton = new QPushButton( "Cancel" ); + buttonLayout->addWidget( requestNewAuthenticationButton ); + buttonLayout->addWidget( cancelButton ); + + // Add button layout to main layout + layout->addLayout( buttonLayout ); + + QTimer timer; + timer.setSingleShot( true ); + + QEventLoop loop; + + connect( this, &RiaCloudConnector::tokenReady, &loop, &QEventLoop::quit ); + connect( &timer, &QTimer::timeout, &loop, &QEventLoop::quit ); + connect( cancelButton, + &QPushButton::clicked, + [&]() + { + RiaLogging::info( "Token request canceled by user." ); + timer.stop(); + loop.quit(); + } ); + + connect( requestNewAuthenticationButton, + &QPushButton::clicked, + [&]() + { + clearTokens(); + requestToken(); + } ); + + connect( &dialog, + &QDialog::rejected, + [&]() + { + timer.stop(); + loop.quit(); + } ); + + requestToken(); + timer.start( RiaCloudDefines::requestTokenTimeoutMillis() ); + + dialog.show(); + loop.exec(); + dialog.close(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.h b/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.h index 0a162f7f6a..d4ddc83b69 100644 --- a/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.h +++ b/ApplicationLibCode/Application/Tools/Cloud/RiaCloudConnector.h @@ -49,6 +49,10 @@ public: QString server() const; QString requestTokenBlocking(); + void requestTokenWithCancelButton(); + void clearTokens(); + + bool isGranted() const; public slots: void requestToken(); diff --git a/ApplicationLibCode/Application/Tools/RiaArgumentParser.cpp b/ApplicationLibCode/Application/Tools/RiaArgumentParser.cpp index 600bdc77b6..6d1838188a 100644 --- a/ApplicationLibCode/Application/Tools/RiaArgumentParser.cpp +++ b/ApplicationLibCode/Application/Tools/RiaArgumentParser.cpp @@ -56,6 +56,8 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt ) progOpt->registerOption( "help", "", "Displays help text and exits." ); progOpt->registerOption( "?", "", "Displays help text and exits." ); + progOpt->registerOption( "preferences", "", "Import Preferences from .", cvf::ProgramOptions::SINGLE_VALUE ); + progOpt->registerOption( "project", "", "Open project file .", cvf::ProgramOptions::SINGLE_VALUE ); progOpt->registerOption( "last", "", "Open last used project." ); progOpt->registerOption( "case", diff --git a/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.cpp b/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.cpp index e6281293d8..c2a2a94c96 100644 --- a/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.cpp @@ -21,6 +21,7 @@ #include "RiaFilePathTools.h" #include "RiaTextStringTools.h" #include "Summary/RiaSummaryDefines.h" +#include "Tools/RiaStdStringTools.h" #include "RimCaseDisplayNameTools.h" #include "RimProject.h" @@ -32,21 +33,114 @@ #include #include -template <> -void caf::AppEnum::setUp() +#include + +namespace internal { - addItem( RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE, "FMU_FOLDER_MODE", "Sub Folder" ); - addItem( RiaEnsembleNameTools::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE, "EVEREST_FOLDER_MODE", "Main Folder" ); - addItem( RiaEnsembleNameTools::EnsembleGroupingMode::NONE, "None", "None" ); - setDefault( RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); + +// Find the last common folder in the common prefix of paths +std::string findLastCommonFolder( const std::vector& paths ) +{ + if ( paths.empty() ) + { + return ""; + } + + auto commonPrefix = RiaStdStringTools::findCommonPrefix( paths ); + if ( commonPrefix.empty() ) + { + return ""; + } + + // Handle the case where common prefix doesn't end at a folder boundary + // Find the last slash in the common prefix + size_t lastSlashPos = commonPrefix.find_last_of( '/' ); + if ( lastSlashPos == std::string::npos ) + { + // No folder structure in the common prefix + return ""; + } + + std::string commonPath = commonPrefix.substr( 0, lastSlashPos ); + std::vector folders = RiaStdStringTools::splitString( commonPath, '/' ); + return folders.empty() ? "" : folders.back(); +} + +} // namespace internal + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map, std::vector> + RiaEnsembleNameTools::groupFilePathsFmu( const std::vector& filepaths ) +{ + std::map, std::vector> groupedPaths; + + // Example path + // "f:/Models/scratch/project_a/realization-0/iter-0/eclipse/model/PROJECT-0.SMSPEC" + // + // Regex pattern to extract case name and iteration folder + // Group 1: Case folder name (top level folder) + // Group 2: Iteration folder name + std::regex pattern( R"(.*[\\/]+([^\\/]+)[\\/]+realization-\d+[\\/]+([^\\/]+).*)", std::regex::icase ); + + for ( const std::string& filepath : filepaths ) + { + std::smatch matches; + if ( std::regex_match( filepath, matches, pattern ) ) + { + auto key = std::make_pair( matches[1].str(), matches[2].str() ); + groupedPaths[key].push_back( filepath ); + } + } + + return groupedPaths; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaEnsembleNameTools::findSuitableEnsembleName( const QStringList& fileNames, EnsembleGroupingMode folderLevel ) +std::map, std::vector> + RiaEnsembleNameTools::groupFilePathsEverest( const std::vector& filepaths ) { - if ( folderLevel == EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) + std::map, std::vector> groupedPaths; + + std::vector normalizedPaths; + for ( const auto& filepath : filepaths ) + { + normalizedPaths.push_back( RiaFilePathTools::normalizePath( filepath ) ); + } + + auto commonPrefix = RiaStdStringTools::findCommonPrefix( normalizedPaths ); + + // strip partial folder name in prefix + auto lastSlashPos = commonPrefix.find_last_of( '/' ); + if ( lastSlashPos != std::string::npos ) + { + commonPrefix = commonPrefix.substr( 0, lastSlashPos ); + } + + auto commonFolder = internal::findLastCommonFolder( normalizedPaths ); + + for ( const auto& filepath : normalizedPaths ) + { + auto rest = filepath.substr( commonPrefix.size() ); + auto parts = RiaStdStringTools::splitString( rest, '/' ); + + std::string firstFolder = parts.empty() ? "" : parts.front(); + + groupedPaths[{ commonFolder, firstFolder }].push_back( filepath ); + } + + return groupedPaths; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaEnsembleNameTools::findSuitableEnsembleName( const QStringList& fileNames, RiaDefines::EnsembleGroupingMode folderLevel ) +{ + if ( folderLevel == RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) { QString commonRoot = RiaTextStringTools::commonRoot( fileNames ); commonRoot = commonRoot.left( commonRoot.lastIndexOf( '/' ) ); @@ -92,7 +186,7 @@ QString RiaEnsembleNameTools::findSuitableEnsembleName( const QStringList& fileN //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RiaEnsembleNameTools::groupFilesByEnsemble( const QStringList& fileNames, EnsembleGroupingMode groupingMode ) +std::vector RiaEnsembleNameTools::groupFilesByEnsemble( const QStringList& fileNames, RiaDefines::EnsembleGroupingMode groupingMode ) { std::vector componentsForAllFilePaths; @@ -176,6 +270,79 @@ std::map RiaEnsembleNameTools::groupFilesByCustomEnsemble( return groupedByIteration; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map RiaEnsembleNameTools::groupFilesByEnsembleName( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ) +{ + std::map ensemblePaths; + + if ( groupingMode == RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ) + { + std::vector allPaths; + for ( const auto& fileName : fileNames ) + { + allPaths.push_back( fileName.toStdString() ); + } + + auto groupedPaths = RiaEnsembleNameTools::groupFilePathsFmu( allPaths ); + + auto shouldIncludeTopLevel = []( const auto& paths ) -> bool + { + std::set topLevelFolderNames; + for ( auto group : paths ) + { + topLevelFolderNames.insert( group.first.first ); + } + + return topLevelFolderNames.size() > 1; + }; + + bool includeTopLevel = shouldIncludeTopLevel( groupedPaths ); + + for ( auto group : groupedPaths ) + { + std::string ensembleName; + if ( includeTopLevel ) + { + ensembleName += group.first.first; + ensembleName += ", "; + } + ensembleName += group.first.second; + + QStringList groupPaths; + for ( const auto& path : group.second ) + { + groupPaths.push_back( QString::fromStdString( path ) ); + } + + ensemblePaths[QString::fromStdString( ensembleName )] = groupPaths; + } + } + else if ( groupingMode == RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) + { + std::vector allPaths; + for ( const auto& fileName : fileNames ) + { + allPaths.push_back( fileName.toStdString() ); + } + auto groupedPaths = RiaEnsembleNameTools::groupFilePathsEverest( allPaths ); + for ( auto group : groupedPaths ) + { + std::string ensembleName = group.first.first + ", " + group.first.second; + QStringList groupPaths; + for ( const auto& path : group.second ) + { + groupPaths.push_back( QString::fromStdString( path ) ); + } + ensemblePaths[QString::fromStdString( ensembleName )] = groupPaths; + } + } + + return ensemblePaths; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -247,12 +414,20 @@ QString RiaEnsembleNameTools::uniqueShortNameForEnsembleCase( RimSummaryCase* su QStringList summaryFilePaths; summaryFilePaths.push_back( summaryCase->summaryHeaderFilename() ); - for ( auto otherSummaryCase : summaryCases ) + // Use a small number of names to find a short name for the ensemble, as RiaEnsembleNameTools::uniqueShortName is slow + if ( !summaryCases.empty() ) { - if ( otherSummaryCase != summaryCase ) + const int maxNameCount = 4; + for ( int i = 0; i < std::min( maxNameCount, static_cast( summaryCases.size() ) ); ++i ) { - summaryFilePaths.push_back( otherSummaryCase->summaryHeaderFilename() ); + auto otherSummaryCase = summaryCases[i]; + if ( otherSummaryCase != summaryCase ) + { + summaryFilePaths.push_back( otherSummaryCase->summaryHeaderFilename() ); + } } + + summaryFilePaths.push_back( summaryCases.back()->summaryHeaderFilename() ); } return RiaEnsembleNameTools::uniqueShortName( summaryCase->summaryHeaderFilename(), summaryFilePaths, ensembleCaseName ); @@ -283,12 +458,12 @@ QString RiaEnsembleNameTools::uniqueShortNameForSummaryCase( RimSummaryCase* sum //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QStringList RiaEnsembleNameTools::findUniqueEnsembleNames( const QStringList& fileNames, - const std::vector& fileNameComponents, - EnsembleGroupingMode groupingMode ) +QStringList RiaEnsembleNameTools::findUniqueEnsembleNames( const QStringList& fileNames, + const std::vector& fileNameComponents, + RiaDefines::EnsembleGroupingMode groupingMode ) { QStringList iterations; - if ( groupingMode == EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) + if ( groupingMode == RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) { QString commonRoot = RiaTextStringTools::commonRoot( fileNames ); QStringList rootComponents = RiaFilePathTools::splitPathIntoComponents( commonRoot ); @@ -319,7 +494,7 @@ QStringList RiaEnsembleNameTools::findUniqueEnsembleNames( const QStringList& iterations.push_back( ensembleName ); } } - else if ( groupingMode == EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ) + else if ( groupingMode == RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ) { // Find list of all folders inside a folder matching realization-* QRegularExpression realizationRe( "realization\\-\\d+" ); diff --git a/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.h b/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.h index f74fc9a246..57bf0ad809 100644 --- a/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.h +++ b/ApplicationLibCode/Application/Tools/RiaEnsembleNameTools.h @@ -26,6 +26,7 @@ #include "Summary/RiaSummaryDefines.h" class RimSummaryCase; +class RimSummaryEnsemble; //================================================================================================== // @@ -33,15 +34,7 @@ class RimSummaryCase; class RiaEnsembleNameTools { public: - enum class EnsembleGroupingMode - { - FMU_FOLDER_STRUCTURE, - EVEREST_FOLDER_STRUCTURE, - NONE - }; - -public: - static QString findSuitableEnsembleName( const QStringList& fileNames, EnsembleGroupingMode groupingMode ); + static QString findSuitableEnsembleName( const QStringList& fileNames, RiaDefines::EnsembleGroupingMode groupingMode ); static QString findCommonBaseName( const QStringList& fileNames ); static QString @@ -51,7 +44,15 @@ public: const std::map& keyFileComponentsForAllFiles, const QString& ensembleCaseName ); - static std::vector groupFilesByEnsemble( const QStringList& fileNames, EnsembleGroupingMode groupingMode ); + static std::map, std::vector> + groupFilePathsFmu( const std::vector& filepaths ); + + static std::map, std::vector> + groupFilePathsEverest( const std::vector& filepaths ); + + static std::vector groupFilesByEnsemble( const QStringList& fileNames, RiaDefines::EnsembleGroupingMode groupingMode ); + static std::map groupFilesByEnsembleName( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ); static std::map groupFilesByCustomEnsemble( const QStringList& fileNames, RiaDefines::FileType fileType ); static std::map> findUniqueCustomEnsembleNames( RiaDefines::FileType fileType, @@ -62,7 +63,7 @@ public: static QString uniqueShortNameForSummaryCase( RimSummaryCase* summaryCase ); private: - static QStringList findUniqueEnsembleNames( const QStringList& fileNames, - const std::vector& fileNameComponents, - EnsembleGroupingMode groupingMode ); + static QStringList findUniqueEnsembleNames( const QStringList& fileNames, + const std::vector& fileNameComponents, + RiaDefines::EnsembleGroupingMode groupingMode ); }; diff --git a/ApplicationLibCode/Application/Tools/RiaFilePathTools.cpp b/ApplicationLibCode/Application/Tools/RiaFilePathTools.cpp index aa3d25796b..5241b27487 100644 --- a/ApplicationLibCode/Application/Tools/RiaFilePathTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaFilePathTools.cpp @@ -29,10 +29,13 @@ #include #include +namespace RiaFilePathTools +{ + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const QChar RiaFilePathTools::separator() +const QChar separator() { return '/'; } @@ -40,7 +43,7 @@ const QChar RiaFilePathTools::separator() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaFilePathTools::toInternalSeparator( const QString& path ) +QString toInternalSeparator( const QString& path ) { QString currNativeSep = QDir::separator(); @@ -58,7 +61,16 @@ QString RiaFilePathTools::toInternalSeparator( const QString& path ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString& RiaFilePathTools::appendSeparatorIfNo( QString& path ) +std::string normalizePath( std::string path ) +{ + std::replace( path.begin(), path.end(), '\\', '/' ); + return path; +}; + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString& appendSeparatorIfNo( QString& path ) { if ( !path.endsWith( separator() ) ) { @@ -70,7 +82,7 @@ QString& RiaFilePathTools::appendSeparatorIfNo( QString& path ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaFilePathTools::relativePath( const QString& rootDir, const QString& dir ) +QString relativePath( const QString& rootDir, const QString& dir ) { if ( dir.startsWith( rootDir ) ) { @@ -89,7 +101,7 @@ QString RiaFilePathTools::relativePath( const QString& rootDir, const QString& d //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RiaFilePathTools::equalPaths( const QString& path1, const QString& path2 ) +bool equalPaths( const QString& path1, const QString& path2 ) { QString p1 = path1; QString p2 = path2; @@ -101,7 +113,7 @@ bool RiaFilePathTools::equalPaths( const QString& path1, const QString& path2 ) //-------------------------------------------------------------------------------------------------- /// Own canonicalPath method since the QDir::canonicalPath seems to not work //-------------------------------------------------------------------------------------------------- -QString RiaFilePathTools::canonicalPath( const QString& path ) +QString canonicalPath( const QString& path ) { return QDir( path ).absolutePath(); } @@ -109,7 +121,7 @@ QString RiaFilePathTools::canonicalPath( const QString& path ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair RiaFilePathTools::toFolderAndFileName( const QString& absFileName ) +std::pair toFolderAndFileName( const QString& absFileName ) { auto absFN = toInternalSeparator( absFileName ); int lastSep = absFN.lastIndexOf( separator() ); @@ -126,7 +138,7 @@ std::pair RiaFilePathTools::toFolderAndFileName( const QString //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaFilePathTools::removeDuplicatePathSeparators( const QString& path ) +QString removeDuplicatePathSeparators( const QString& path ) { QString correctedPath = path; QString prefix; @@ -154,7 +166,7 @@ QString RiaFilePathTools::removeDuplicatePathSeparators( const QString& path ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaFilePathTools::rootSearchPathFromSearchFilter( const QString& searchFilter ) +QString rootSearchPathFromSearchFilter( const QString& searchFilter ) { QStringList pathPartList = searchFilter.split( separator() ); @@ -184,7 +196,7 @@ QString RiaFilePathTools::rootSearchPathFromSearchFilter( const QString& searchF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaFilePathTools::commonRootOfFileNames( const QStringList& fileList ) +QString commonRootOfFileNames( const QStringList& fileList ) { QStringList fileNameList; for ( auto filePath : fileList ) @@ -200,7 +212,7 @@ QString RiaFilePathTools::commonRootOfFileNames( const QStringList& fileList ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QStringList RiaFilePathTools::splitPathIntoComponents( const QString& inputPath, bool splitExtensionIntoSeparateEntry ) +QStringList splitPathIntoComponents( const QString& inputPath, bool splitExtensionIntoSeparateEntry ) { auto path = QDir::cleanPath( inputPath ); @@ -325,7 +337,7 @@ void pathToNode( PathNode* node, QStringList* path ) /// Takes a list of file paths and returns a map with the key components that separate the path /// from the others. //-------------------------------------------------------------------------------------------------- -std::map RiaFilePathTools::keyPathComponentsForEachFilePath( const QStringList& filePaths ) +std::map keyPathComponentsForEachFilePath( const QStringList& filePaths ) { std::map allComponents; @@ -360,7 +372,7 @@ std::map RiaFilePathTools::keyPathComponentsForEachFilePat //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RiaFilePathTools::isFirstOlderThanSecond( const std::string& firstFileName, const std::string& secondFileName ) +bool isFirstOlderThanSecond( const std::string& firstFileName, const std::string& secondFileName ) { if ( !std::filesystem::exists( firstFileName ) || !std::filesystem::exists( secondFileName ) ) return false; @@ -373,7 +385,7 @@ bool RiaFilePathTools::isFirstOlderThanSecond( const std::string& firstFileName, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::string RiaFilePathTools::makeSuitableAsFileName( const std::string candidateName ) +std::string makeSuitableAsFileName( const std::string candidateName ) { if ( candidateName.empty() ) return "noname"; @@ -388,3 +400,5 @@ std::string RiaFilePathTools::makeSuitableAsFileName( const std::string candidat return tmp.toStdString(); } + +} // namespace RiaFilePathTools diff --git a/ApplicationLibCode/Application/Tools/RiaFilePathTools.h b/ApplicationLibCode/Application/Tools/RiaFilePathTools.h index 755aefd4ac..f65933c1e2 100644 --- a/ApplicationLibCode/Application/Tools/RiaFilePathTools.h +++ b/ApplicationLibCode/Application/Tools/RiaFilePathTools.h @@ -28,27 +28,25 @@ //================================================================================================== // -// -// //================================================================================================== -class RiaFilePathTools +namespace RiaFilePathTools { -public: - static const QChar separator(); - static QString toInternalSeparator( const QString& path ); - static QString& appendSeparatorIfNo( QString& path ); - static QString relativePath( const QString& rootDir, const QString& dir ); - static bool equalPaths( const QString& path1, const QString& path2 ); - static QString canonicalPath( const QString& path ); - static std::pair toFolderAndFileName( const QString& absFileName ); - static QString removeDuplicatePathSeparators( const QString& path ); - static QString rootSearchPathFromSearchFilter( const QString& searchFilter ); - static QString commonRootOfFileNames( const QStringList& filePaths ); - static std::string makeSuitableAsFileName( const std::string candidateName ); +const QChar separator(); +QString toInternalSeparator( const QString& path ); +QString& appendSeparatorIfNo( QString& path ); +QString relativePath( const QString& rootDir, const QString& dir ); +bool equalPaths( const QString& path1, const QString& path2 ); +QString canonicalPath( const QString& path ); +std::pair toFolderAndFileName( const QString& absFileName ); +QString removeDuplicatePathSeparators( const QString& path ); +QString rootSearchPathFromSearchFilter( const QString& searchFilter ); +QString commonRootOfFileNames( const QStringList& filePaths ); +std::string makeSuitableAsFileName( const std::string candidateName ); +std::string normalizePath( std::string path ); - static QStringList splitPathIntoComponents( const QString& path, bool splitExtensionIntoSeparateEntry = false ); +QStringList splitPathIntoComponents( const QString& path, bool splitExtensionIntoSeparateEntry = false ); - static std::map keyPathComponentsForEachFilePath( const QStringList& filePaths ); +std::map keyPathComponentsForEachFilePath( const QStringList& filePaths ); - static bool isFirstOlderThanSecond( const std::string& firstFileName, const std::string& secondFileName ); -}; +bool isFirstOlderThanSecond( const std::string& firstFileName, const std::string& secondFileName ); +}; // namespace RiaFilePathTools diff --git a/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp b/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp index b641e99954..22311c4ccf 100644 --- a/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp @@ -20,7 +20,7 @@ #include "ApplicationCommands/RicShowMainWindowFeature.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "SummaryPlotCommands/RicNewSummaryCurveFeature.h" #include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" @@ -199,7 +199,7 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil if ( !candidateCases.empty() && RiaGuiApplication::isRunning() && RiuPlotMainWindow::instance()->isVisible() ) { - RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { candidateCases.front() }, {} ); + RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( { candidateCases.front() }, {} ); RiuPlotMainWindowTools::setExpanded( candidateCases.front() ); } } @@ -391,8 +391,8 @@ int RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( const QStr else { // Make sure the placeholder result entries are created, as this functionality is triggered when creating a - // view. See RimEclipseView::onLoadDataAndUpdate() and the call to openReserviorCase() - rimResultReservoir->openReserviorCase(); + // view. See RimEclipseView::onLoadDataAndUpdate() and the call to openReservoirCase() + rimResultReservoir->openReservoirCase(); analysisModels->updateConnectedEditors(); } diff --git a/ApplicationLibCode/Application/Tools/RiaOptionItemFactory.cpp b/ApplicationLibCode/Application/Tools/RiaOptionItemFactory.cpp index 33aeb9086b..4b40ce5904 100644 --- a/ApplicationLibCode/Application/Tools/RiaOptionItemFactory.cpp +++ b/ApplicationLibCode/Application/Tools/RiaOptionItemFactory.cpp @@ -93,13 +93,16 @@ caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclip iconText = ":/summary/components/images/well.svg"; break; case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION: - iconText = ":/summary/components/images/well-completion.svg"; + iconText = ":/summary/components/images/well.svg"; + break; + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION: + iconText = ":/summary/components/images/block.svg"; break; case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_LGR: iconText = ":/summary/components/images/well.svg"; break; - case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: - iconText = ":/summary/components/images/well-completion.svg"; + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: + iconText = ":/summary/components/images/block.svg"; break; case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT: iconText = ":/summary/components/images/segment.svg"; diff --git a/ApplicationLibCode/Application/Tools/RiaStdStringTools.cpp b/ApplicationLibCode/Application/Tools/RiaStdStringTools.cpp index 0ae2ac76b5..12609b57f1 100644 --- a/ApplicationLibCode/Application/Tools/RiaStdStringTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaStdStringTools.cpp @@ -309,19 +309,30 @@ std::set RiaStdStringTools::valuesFromRangeSelection( const std::string& s std::istringstream tokenStream( token ); int startIndex, endIndex; - char dash; + char dash, colon; + int step = 1; if ( tokenStream >> startIndex ) { if ( tokenStream >> dash && dash == '-' && tokenStream >> endIndex ) { + if ( tokenStream >> colon && colon == ':' ) + { + tokenStream >> step; + } + + if ( step <= 0 ) + { + step = 1; // Ensure step is positive + } + if ( startIndex > endIndex ) { // If start is greater than end, swap them std::swap( startIndex, endIndex ); } - for ( int i = startIndex; i <= endIndex; ++i ) + for ( int i = startIndex; i <= endIndex; i += step ) { result.insert( i ); } @@ -454,3 +465,45 @@ std::string RiaStdStringTools::formatRangeSelection( const std::vector& val return result.str(); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RiaStdStringTools::findCommonPrefix( const std::vector& strings ) +{ + if ( strings.empty() ) + { + return ""; + } + + if ( strings.size() == 1 ) + { + return strings[0]; + } + + // Find the shortest string length as a starting point + // We only need to check up to the length of the shortest string + size_t minLength = strings[0].length(); + for ( const auto& str : strings ) + { + minLength = std::min( minLength, str.length() ); + } + + // Compare characters from left to right + for ( size_t i = 0; i < minLength; ++i ) + { + char current = strings[0][i]; + + for ( size_t j = 1; j < strings.size(); ++j ) + { + if ( strings[j][i] != current ) + { + // Found a mismatch, return the prefix up to this point + return strings[0].substr( 0, i ); + } + } + } + + // If we got here, all characters matched up to minLength + return strings[0].substr( 0, minLength ); +} diff --git a/ApplicationLibCode/Application/Tools/RiaStdStringTools.h b/ApplicationLibCode/Application/Tools/RiaStdStringTools.h index b070aaf9ee..398ec0b6ca 100644 --- a/ApplicationLibCode/Application/Tools/RiaStdStringTools.h +++ b/ApplicationLibCode/Application/Tools/RiaStdStringTools.h @@ -70,6 +70,8 @@ public: // Create a string from a set of values. {1, 2, 3, 5, 6, 7, 8, 10, 11, 12} will be converted to "1, 2, 3, 5-8, 10-12" static std::string formatRangeSelection( const std::vector& values ); + static std::string findCommonPrefix( const std::vector& strings ); + private: template static void splitByDelimiter( const std::string& str, Container& cont, char delimiter = ' ' ); diff --git a/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp b/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp index de4f4a3a34..bc743e1232 100644 --- a/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaTextStringTools.cpp @@ -206,6 +206,25 @@ bool RiaTextStringTools::isNumber( const QString& text, const QString& decimalPo return RiaStdStringTools::isNumber( stdString, decimalChar ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QVector RiaTextStringTools::parseDoubleValues( const QString& input ) +{ + // Flexible regex to extract three double numbers with any surrounding text + QRegularExpression coordRegex( R"([-+]?\d+\.?\d*)" ); + QRegularExpressionMatchIterator it = coordRegex.globalMatch( input ); + + QVector coords; + while ( it.hasNext() ) + { + QRegularExpressionMatch match = it.next(); + coords.append( match.captured().toDouble() ); + } + + return coords; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Application/Tools/RiaTextStringTools.h b/ApplicationLibCode/Application/Tools/RiaTextStringTools.h index 04f5a634db..84bfe25bf1 100644 --- a/ApplicationLibCode/Application/Tools/RiaTextStringTools.h +++ b/ApplicationLibCode/Application/Tools/RiaTextStringTools.h @@ -46,6 +46,8 @@ QString replaceTemplateTextWithValues( const QString& templateText, const std::m bool isTextEqual( QStringView text, QStringView compareText ); bool isNumber( const QString& text, const QString& decimalPoint ); +QVector parseDoubleValues( const QString& input ); + } // namespace RiaTextStringTools #if QT_VERSION < QT_VERSION_CHECK( 6, 8, 0 ) diff --git a/ApplicationLibCode/Application/Tools/Summary/CMakeLists_files.cmake b/ApplicationLibCode/Application/Tools/Summary/CMakeLists_files.cmake index 07642502cf..c96253e11c 100644 --- a/ApplicationLibCode/Application/Tools/Summary/CMakeLists_files.cmake +++ b/ApplicationLibCode/Application/Tools/Summary/CMakeLists_files.cmake @@ -6,6 +6,9 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.h ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryStringTools.h ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryTools.h + ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryPlotTools.h + ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryPlotBuilder.h + ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryPlotTemplateTools.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -16,6 +19,9 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryStringTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryPlotTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryPlotBuilder.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiaSummaryPlotTemplateTools.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.cpp index 7e3a1a2ab2..642e636d99 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.cpp +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.cpp @@ -21,6 +21,8 @@ #include "Summary/RiaSummaryCurveDefinition.h" +#include "RifEclipseSummaryTools.h" + #include "RimSummaryCurve.h" #include "RimSummaryCurveCollection.h" @@ -92,39 +94,12 @@ std::vector RiaSummaryAddressAnalyzer::quantities() const return m_quantities; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::set RiaSummaryAddressAnalyzer::quantityNamesWithHistory() const -{ - assignCategoryToQuantities(); - - return m_quantitiesWithMatchingHistory; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::set RiaSummaryAddressAnalyzer::quantityNamesNoHistory() const -{ - assignCategoryToQuantities(); - - return m_quantitiesNoMatchingHistory; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- bool RiaSummaryAddressAnalyzer::isSingleQuantityIgnoreHistory() const { - if ( quantities().size() == 1 ) return true; - - if ( quantities().size() == 2 && quantityNamesWithHistory().size() == 1 ) - { - return true; - } - - return false; + return quantities().size() == 1; } //-------------------------------------------------------------------------------------------------- @@ -159,9 +134,16 @@ std::string RiaSummaryAddressAnalyzer::quantityNameForTitle() const return title; } - if ( quantities().size() == 2 && quantityNamesWithHistory().size() == 1 ) + // Strip off the extension(H or _DIFF) and return the unique quantity name if there is only one + std::set quantitiesNoExtension; + for ( const auto& quantity : quantities() ) { - return *quantityNamesWithHistory().begin(); + const auto [vectorName, suffix] = RifEclipseSummaryTools::splitVectorNameAndSuffix( quantity ); + quantitiesNoExtension.insert( vectorName ); + } + if ( quantitiesNoExtension.size() == 1 ) + { + return *quantitiesNoExtension.begin(); } return {}; @@ -202,11 +184,11 @@ std::set RiaSummaryAddressAnalyzer::regionNumbers() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::set RiaSummaryAddressAnalyzer::wellCompletions( const std::string& wellName ) const +std::set RiaSummaryAddressAnalyzer::wellConnections( const std::string& wellName ) const { std::set connections; - for ( const auto& conn : m_wellCompletions ) + for ( const auto& conn : m_wellConnections ) { if ( conn.first == wellName ) { @@ -251,6 +233,24 @@ std::set RiaSummaryAddressAnalyzer::aquifers() const return keysInMap( m_aquifers ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RiaSummaryAddressAnalyzer::wellCompletionNumbers( const std::string& wellName ) const +{ + std::set numbers; + + for ( const auto& wellAndNumber : m_wellCompletionNumbers ) + { + if ( wellName.empty() || std::get<0>( wellAndNumber ) == wellName ) + { + numbers.insert( std::get<1>( wellAndNumber ) ); + } + } + + return numbers; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -342,7 +342,15 @@ std::vector RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma } else if ( category == SummaryCategory::SUMMARY_WELL_COMPLETION ) { - auto connections = wellCompletions( secondaryIdentifier ); + auto numbers = wellCompletionNumbers( secondaryIdentifier ); + for ( const auto& number : numbers ) + { + identifierStrings.push_back( QString::number( number ) ); + } + } + else if ( category == SummaryCategory::SUMMARY_WELL_CONNECTION ) + { + auto connections = wellConnections( secondaryIdentifier ); for ( const auto& conn : connections ) { identifierStrings.push_back( QString::fromStdString( conn ) ); @@ -379,22 +387,6 @@ std::vector RiaSummaryAddressAnalyzer::addressesForCat return filteredAddresses; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::string RiaSummaryAddressAnalyzer::correspondingHistorySummaryCurveName( const std::string& curveName ) -{ - static std::string historyIdentifier = "H"; - - if ( RiaStdStringTools::endsWith( curveName, historyIdentifier ) ) - { - std::string candidate = curveName.substr( 0, curveName.size() - 1 ); - return candidate; - } - - return curveName + historyIdentifier; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -417,60 +409,11 @@ void RiaSummaryAddressAnalyzer::clear() m_networkNames.clear(); m_regionNumbers.clear(); m_categories.clear(); - m_wellCompletions.clear(); + m_wellConnections.clear(); m_wellSegmentNumbers.clear(); + m_wellCompletionNumbers.clear(); m_blocks.clear(); m_aquifers.clear(); - - m_quantitiesNoMatchingHistory.clear(); - m_quantitiesWithMatchingHistory.clear(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiaSummaryAddressAnalyzer::assignCategoryToQuantities() const -{ - if ( !m_quantities.empty() ) - { - if ( m_quantitiesWithMatchingHistory.empty() && m_quantitiesNoMatchingHistory.empty() ) - { - computeQuantityNamesWithHistory(); - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiaSummaryAddressAnalyzer::computeQuantityNamesWithHistory() const -{ - m_quantitiesNoMatchingHistory.clear(); - m_quantitiesWithMatchingHistory.clear(); - - const std::string historyIdentifier( "H" ); - - for ( const auto& s : m_quantities ) - { - std::string correspondingHistoryCurve = correspondingHistorySummaryCurveName( s ); - - if ( std::find( m_quantities.begin(), m_quantities.end(), correspondingHistoryCurve ) != m_quantities.end() ) - { - // Insert the curve name without H - if ( RiaStdStringTools::endsWith( s, historyIdentifier ) ) - { - m_quantitiesWithMatchingHistory.insert( correspondingHistoryCurve ); - } - else - { - m_quantitiesWithMatchingHistory.insert( s ); - } - } - else - { - m_quantitiesNoMatchingHistory.insert( s ); - } - } } //-------------------------------------------------------------------------------------------------- @@ -493,12 +436,13 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd m_wellNames.insert( { wellName, address } ); } - if ( !address.vectorName().empty() ) + const auto vectorNameToUse = address.vectorName(); + if ( !vectorNameToUse.empty() ) { // 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() ) + if ( std::find( m_quantities.begin(), m_quantities.end(), vectorNameToUse ) == m_quantities.end() ) { - m_quantities.push_back( address.vectorName() ); + m_quantities.push_back( vectorNameToUse ); } } @@ -512,15 +456,18 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd m_networkNames.insert( { address.networkName(), address } ); } - if ( address.regionNumber() != -1 ) + if ( address.category() == SummaryCategory::SUMMARY_REGION || address.category() == SummaryCategory::SUMMARY_REGION_2_REGION ) { - m_regionNumbers.insert( { address.regionNumber(), address } ); + if ( address.regionNumber() != -1 ) + { + m_regionNumbers.insert( { address.regionNumber(), address } ); + } } - if ( address.category() == SummaryCategory::SUMMARY_WELL_COMPLETION ) + if ( address.category() == SummaryCategory::SUMMARY_WELL_CONNECTION ) { - auto wellNameAndCompletion = std::make_pair( wellName, address.blockAsString() ); - m_wellCompletions.insert( wellNameAndCompletion ); + auto wellNameAndConnection = std::make_pair( wellName, address.connectionAsString() ); + m_wellConnections.insert( wellNameAndConnection ); } else if ( address.category() == SummaryCategory::SUMMARY_WELL_SEGMENT ) { @@ -537,6 +484,11 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd { m_aquifers.insert( { address.aquiferNumber(), address } ); } + else if ( address.category() == SummaryCategory::SUMMARY_WELL_COMPLETION ) + { + auto wellNameAndCompletion = std::make_pair( wellName, address.wellCompletionNumber() ); + m_wellCompletionNumbers.insert( wellNameAndCompletion ); + } else if ( address.category() == SummaryCategory::SUMMARY_FIELD || address.category() == SummaryCategory::SUMMARY_MISC ) { m_otherCategory.push_back( address ); @@ -546,10 +498,10 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd { if ( m_categories.count( address.category() ) == 0 ) { - m_categories[address.category()] = { address.vectorName() }; + m_categories[address.category()] = { vectorNameToUse }; } else - m_categories[address.category()].insert( address.vectorName() ); + m_categories[address.category()].insert( vectorNameToUse ); } } diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.h b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.h index 3e768d147c..4b92e31dca 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.h +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryAddressAnalyzer.h @@ -45,8 +45,6 @@ public: void clear(); std::vector quantities() const; - std::set quantityNamesWithHistory() const; - std::set quantityNamesNoHistory() const; bool isSingleQuantityIgnoreHistory() const; @@ -59,10 +57,11 @@ public: std::set networkNames() const; std::set regionNumbers() const; - std::set wellCompletions( const std::string& wellName ) const; + std::set wellConnections( const std::string& wellName ) const; std::set wellSegmentNumbers( const std::string& wellName ) const; std::set blocks() const; std::set aquifers() const; + std::set wellCompletionNumbers( const std::string& wellName ) const; std::set categories() const; std::vector> addressesGroupedByObject() const; @@ -73,14 +72,9 @@ public: static std::vector addressesForCategory( const std::set& addresses, RifEclipseSummaryAddressDefines::SummaryCategory category ); - static std::string correspondingHistorySummaryCurveName( const std::string& curveName ); - std::set vectorNamesForCategory( RifEclipseSummaryAddressDefines::SummaryCategory category ); private: - void assignCategoryToQuantities() const; - void computeQuantityNamesWithHistory() const; - void analyzeSingleAddress( const RifEclipseSummaryAddress& address ); static std::set keysInMap( const std::multimap& map ); @@ -93,17 +87,16 @@ private: static std::vector> valuesInMap( const std::multimap& map ); private: - std::vector m_quantities; - mutable std::set m_quantitiesWithMatchingHistory; - mutable std::set m_quantitiesNoMatchingHistory; + std::vector m_quantities; std::vector m_otherCategory; std::multimap m_wellNames; std::multimap m_groupNames; std::multimap m_networkNames; std::multimap m_regionNumbers; - std::set> m_wellCompletions; + std::set> m_wellConnections; std::set> m_wellSegmentNumbers; + std::set> m_wellCompletionNumbers; std::multimap m_blocks; std::multimap m_aquifers; diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.cpp index f4a68d48d7..9a1edef39c 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.cpp +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.cpp @@ -38,6 +38,15 @@ void caf::AppEnum::setUp() setDefault( RiaDefines::SummaryCurveTypeMode::AUTO ); } +template <> +void caf::AppEnum::setUp() +{ + addItem( RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE, "FMU_FOLDER_MODE", "Sub Folder" ); + addItem( RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE, "EVEREST_FOLDER_MODE", "Main Folder" ); + addItem( RiaDefines::EnsembleGroupingMode::NONE, "None", "None" ); + setDefault( RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); +} + } // namespace caf //-------------------------------------------------------------------------------------------------- @@ -96,6 +105,14 @@ QString RiaDefines::summaryWell() return "Well"; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaDefines::summaryWellCompletion() +{ + return "Completion"; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -109,15 +126,15 @@ QString RiaDefines::summaryWellGroup() //-------------------------------------------------------------------------------------------------- QString RiaDefines::summaryWellSegment() { - return "Well Segment"; + return "Segment"; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaDefines::summaryCompletion() +QString RiaDefines::summaryWellConnection() { - return "Completion"; + return "Connection"; } //-------------------------------------------------------------------------------------------------- @@ -139,9 +156,9 @@ QString RiaDefines::summaryBlock() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QString RiaDefines::summaryLgrCompletion() +QString RiaDefines::summaryLgrConnection() { - return "LGR Completion"; + return "LGR Connection"; } //-------------------------------------------------------------------------------------------------- @@ -175,3 +192,19 @@ QString RiaDefines::summaryRealizationNumber() { return "RI:REALIZATION_NUM"; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaDefines::key1VariableName() +{ + return "$KEY1"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaDefines::key2VariableName() +{ + return "$KEY2"; +} diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.h b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.h index eeff79fe40..bdf0dc7c69 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.h +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryDefines.h @@ -29,6 +29,13 @@ enum class FileType STIMPLAN_SUMMARY }; +enum class EnsembleGroupingMode +{ + FMU_FOLDER_STRUCTURE, + EVEREST_FOLDER_STRUCTURE, + NONE +}; + enum class HorizontalAxisType { TIME, @@ -48,16 +55,20 @@ QString summaryMisc(); QString summaryRegion(); QString summaryRegion2Region(); QString summaryWell(); +QString summaryWellCompletion(); QString summaryWellGroup(); QString summaryWellSegment(); -QString summaryCompletion(); +QString summaryWellConnection(); QString summarySegment(); QString summaryBlock(); -QString summaryLgrCompletion(); +QString summaryLgrConnection(); QString summaryLgrWell(); QString summaryLgrBlock(); QString summaryCalculated(); QString summaryRealizationNumber(); +QString key1VariableName(); +QString key2VariableName(); + }; // namespace RiaDefines diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotBuilder.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotBuilder.cpp new file mode 100644 index 0000000000..f0bc724fcc --- /dev/null +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotBuilder.cpp @@ -0,0 +1,194 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2021- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiaSummaryPlotBuilder.h" + +#include "Summary/RiaSummaryAddressAnalyzer.h" +#include "Summary/RiaSummaryPlotTools.h" +#include "Summary/RiaSummaryTools.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaSummaryPlotBuilder::RiaSummaryPlotBuilder() + : m_individualPlotPerDataSource( false ) + , m_graphCurveGrouping( RiaSummaryPlotBuilder::RicGraphCurveGrouping::NONE ) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaSummaryPlotBuilder::setDataSources( const std::vector& summaryCases, const std::vector& ensembles ) +{ + m_summaryCases = summaryCases; + m_ensembles = ensembles; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaSummaryPlotBuilder::setAddresses( const std::set& addresses ) +{ + m_addresses = addresses; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaSummaryPlotBuilder::setIndividualPlotPerDataSource( bool enable ) +{ + m_individualPlotPerDataSource = enable; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaSummaryPlotBuilder::setGrouping( RicGraphCurveGrouping groping ) +{ + m_graphCurveGrouping = groping; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RiaSummaryPlotBuilder::createPlots() const +{ + std::vector plots; + + if ( m_individualPlotPerDataSource ) + { + if ( m_graphCurveGrouping == RicGraphCurveGrouping::SINGLE_CURVES ) + { + for ( const auto& adr : m_addresses ) + { + for ( auto summaryCase : m_summaryCases ) + { + auto plot = RiaSummaryPlotTools::createPlot( { adr }, { summaryCase }, {} ); + plots.push_back( plot ); + } + + for ( auto ensemble : m_ensembles ) + { + auto plot = RiaSummaryPlotTools::createPlot( { adr }, {}, { ensemble } ); + plots.push_back( plot ); + } + } + } + else if ( m_graphCurveGrouping == RicGraphCurveGrouping::CURVES_FOR_OBJECT ) + { + RiaSummaryAddressAnalyzer analyzer; + analyzer.appendAddresses( m_addresses ); + + auto groups = analyzer.addressesGroupedByObject(); + for ( const auto& group : groups ) + { + std::set addresses; + addresses.insert( group.begin(), group.end() ); + if ( addresses.empty() ) continue; + + for ( auto summaryCase : m_summaryCases ) + { + auto plot = RiaSummaryPlotTools::createPlot( addresses, { summaryCase }, {} ); + plots.push_back( plot ); + } + + for ( auto ensemble : m_ensembles ) + { + auto plot = RiaSummaryPlotTools::createPlot( addresses, {}, { ensemble } ); + plots.push_back( plot ); + } + } + } + else if ( m_graphCurveGrouping == RicGraphCurveGrouping::NONE ) + { + for ( auto summaryCase : m_summaryCases ) + { + auto plot = RiaSummaryPlotTools::createPlot( m_addresses, { summaryCase }, {} ); + plots.push_back( plot ); + } + + for ( auto ensemble : m_ensembles ) + { + auto plot = RiaSummaryPlotTools::createPlot( m_addresses, {}, { ensemble } ); + plots.push_back( plot ); + } + } + } + else // all data sources in same plot + { + if ( m_graphCurveGrouping == RicGraphCurveGrouping::SINGLE_CURVES ) + { + for ( const auto& adr : m_addresses ) + { + if ( !m_summaryCases.empty() ) + { + auto plot = RiaSummaryPlotTools::createPlot( { adr }, m_summaryCases, {} ); + plots.push_back( plot ); + } + + if ( !m_ensembles.empty() ) + { + auto plot = RiaSummaryPlotTools::createPlot( { adr }, {}, m_ensembles ); + plots.push_back( plot ); + } + } + } + else if ( m_graphCurveGrouping == RicGraphCurveGrouping::CURVES_FOR_OBJECT ) + { + RiaSummaryAddressAnalyzer analyzer; + analyzer.appendAddresses( m_addresses ); + + auto groups = analyzer.addressesGroupedByObject(); + for ( const auto& group : groups ) + { + std::set addresses; + addresses.insert( group.begin(), group.end() ); + if ( addresses.empty() ) continue; + + if ( !m_summaryCases.empty() ) + { + auto plot = RiaSummaryPlotTools::createPlot( addresses, m_summaryCases, {} ); + plots.push_back( plot ); + } + + if ( !m_ensembles.empty() ) + { + auto plot = RiaSummaryPlotTools::createPlot( addresses, {}, m_ensembles ); + plots.push_back( plot ); + } + } + } + else if ( m_graphCurveGrouping == RicGraphCurveGrouping::NONE ) + { + if ( !m_summaryCases.empty() ) + { + auto plot = RiaSummaryPlotTools::createPlot( m_addresses, m_summaryCases, {} ); + plots.push_back( plot ); + } + + if ( !m_ensembles.empty() ) + { + auto plot = RiaSummaryPlotTools::createPlot( m_addresses, {}, m_ensembles ); + plots.push_back( plot ); + } + } + } + + return plots; +} diff --git a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotBuilder.h similarity index 52% rename from ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h rename to ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotBuilder.h index 2793ebcba3..28cc980614 100644 --- a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotBuilder.h @@ -1,6 +1,6 @@ -///////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2017- Statoil ASA +// Copyright (C) 2021- 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,24 +18,45 @@ #pragma once -#include "cafCmdFeature.h" - -#include - +class RifEclipseSummaryAddress; class RimSummaryCase; class RimSummaryEnsemble; +class RimSummaryPlot; + +#include +#include //================================================================================================== /// //================================================================================================== -class RicCreateSummaryCaseCollectionFeature : public caf::CmdFeature +class RiaSummaryPlotBuilder { - CAF_CMD_HEADER_INIT; +public: + enum class RicGraphCurveGrouping + { + SINGLE_CURVES, + CURVES_FOR_OBJECT, + NONE + }; - static RimSummaryEnsemble* groupSummaryCases( std::vector cases, const QString& groupName, bool isEnsemble = false ); +public: + RiaSummaryPlotBuilder(); + + void setDataSources( const std::vector& summaryCases, const std::vector& ensembles ); + + void setAddresses( const std::set& addresses ); + + void setIndividualPlotPerDataSource( bool enable ); + void setGrouping( RicGraphCurveGrouping groping ); + + std::vector createPlots() const; private: - bool isCommandEnabled() const override; - void onActionTriggered( bool isChecked ) override; - void setupActionLook( QAction* actionToSetup ) override; + std::set m_addresses; + std::vector m_summaryCases; + std::vector m_ensembles; + + bool m_individualPlotPerDataSource; + + RicGraphCurveGrouping m_graphCurveGrouping; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSummaryPlotTemplateTools.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTemplateTools.cpp similarity index 99% rename from ApplicationLibCode/Commands/PlotTemplateCommands/RicSummaryPlotTemplateTools.cpp rename to ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTemplateTools.cpp index b9adb4a22d..ff5e4a380e 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSummaryPlotTemplateTools.cpp +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTemplateTools.cpp @@ -16,7 +16,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RicSummaryPlotTemplateTools.h" +#include "RiaSummaryPlotTemplateTools.h" #include "RiaGuiApplication.h" #include "RiaLogging.h" @@ -24,8 +24,7 @@ #include "Summary/RiaSummaryAddressAnalyzer.h" #include "Summary/RiaSummaryTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" -#include "RicSelectPlotTemplateUi.h" +#include "PlotTemplateCommands/RicSelectPlotTemplateUi.h" #include "RifSummaryReaderInterface.h" diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSummaryPlotTemplateTools.h b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTemplateTools.h similarity index 100% rename from ApplicationLibCode/Commands/PlotTemplateCommands/RicSummaryPlotTemplateTools.h rename to ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTemplateTools.h diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp similarity index 64% rename from ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp rename to ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp index 9fc7f26961..684222fac3 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp @@ -16,18 +16,14 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RicSummaryPlotBuilder.h" +#include "RiaSummaryPlotTools.h" -#include "PlotTemplateCommands/RicSummaryPlotTemplateTools.h" #include "SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h" #include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" #include "RiaPreferencesSummary.h" -#include "Summary/RiaSummaryAddressAnalyzer.h" -#include "Summary/RiaSummaryTools.h" +#include "RiaSummaryPlotTemplateTools.h" -#include "RifEclipseSummaryAddress.h" -#include "RifReaderEclipseSummary.h" #include "RifSummaryReaderInterface.h" #include "RimEnsembleCurveSet.h" @@ -45,183 +41,16 @@ #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" +#include "RiuDockWidgetTools.h" #include "RiuPlotMainWindowTools.h" -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RicSummaryPlotBuilder::RicSummaryPlotBuilder() - : m_individualPlotPerDataSource( false ) - , m_graphCurveGrouping( RicSummaryPlotBuilder::RicGraphCurveGrouping::NONE ) +namespace RiaSummaryPlotTools { -} //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicSummaryPlotBuilder::setDataSources( const std::vector& summaryCases, const std::vector& ensembles ) -{ - m_summaryCases = summaryCases; - m_ensembles = ensembles; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicSummaryPlotBuilder::setAddresses( const std::set& addresses ) -{ - m_addresses = addresses; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicSummaryPlotBuilder::setIndividualPlotPerDataSource( bool enable ) -{ - m_individualPlotPerDataSource = enable; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicSummaryPlotBuilder::setGrouping( RicGraphCurveGrouping groping ) -{ - m_graphCurveGrouping = groping; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RicSummaryPlotBuilder::createPlots() const -{ - std::vector plots; - - if ( m_individualPlotPerDataSource ) - { - if ( m_graphCurveGrouping == RicGraphCurveGrouping::SINGLE_CURVES ) - { - for ( const auto& adr : m_addresses ) - { - for ( auto summaryCase : m_summaryCases ) - { - auto plot = createPlot( { adr }, { summaryCase }, {} ); - plots.push_back( plot ); - } - - for ( auto ensemble : m_ensembles ) - { - auto plot = createPlot( { adr }, {}, { ensemble } ); - plots.push_back( plot ); - } - } - } - else if ( m_graphCurveGrouping == RicGraphCurveGrouping::CURVES_FOR_OBJECT ) - { - RiaSummaryAddressAnalyzer analyzer; - analyzer.appendAddresses( m_addresses ); - - auto groups = analyzer.addressesGroupedByObject(); - for ( const auto& group : groups ) - { - std::set addresses; - addresses.insert( group.begin(), group.end() ); - if ( addresses.empty() ) continue; - - for ( auto summaryCase : m_summaryCases ) - { - auto plot = createPlot( addresses, { summaryCase }, {} ); - plots.push_back( plot ); - } - - for ( auto ensemble : m_ensembles ) - { - auto plot = createPlot( addresses, {}, { ensemble } ); - plots.push_back( plot ); - } - } - } - else if ( m_graphCurveGrouping == RicGraphCurveGrouping::NONE ) - { - for ( auto summaryCase : m_summaryCases ) - { - auto plot = createPlot( m_addresses, { summaryCase }, {} ); - plots.push_back( plot ); - } - - for ( auto ensemble : m_ensembles ) - { - auto plot = createPlot( m_addresses, {}, { ensemble } ); - plots.push_back( plot ); - } - } - } - else // all data sources in same plot - { - if ( m_graphCurveGrouping == RicGraphCurveGrouping::SINGLE_CURVES ) - { - for ( const auto& adr : m_addresses ) - { - if ( !m_summaryCases.empty() ) - { - auto plot = createPlot( { adr }, m_summaryCases, {} ); - plots.push_back( plot ); - } - - if ( !m_ensembles.empty() ) - { - auto plot = createPlot( { adr }, {}, m_ensembles ); - plots.push_back( plot ); - } - } - } - else if ( m_graphCurveGrouping == RicGraphCurveGrouping::CURVES_FOR_OBJECT ) - { - RiaSummaryAddressAnalyzer analyzer; - analyzer.appendAddresses( m_addresses ); - - auto groups = analyzer.addressesGroupedByObject(); - for ( const auto& group : groups ) - { - std::set addresses; - addresses.insert( group.begin(), group.end() ); - if ( addresses.empty() ) continue; - - if ( !m_summaryCases.empty() ) - { - auto plot = createPlot( addresses, m_summaryCases, {} ); - plots.push_back( plot ); - } - - if ( !m_ensembles.empty() ) - { - auto plot = createPlot( addresses, {}, m_ensembles ); - plots.push_back( plot ); - } - } - } - else if ( m_graphCurveGrouping == RicGraphCurveGrouping::NONE ) - { - if ( !m_summaryCases.empty() ) - { - auto plot = createPlot( m_addresses, m_summaryCases, {} ); - plots.push_back( plot ); - } - - if ( !m_ensembles.empty() ) - { - auto plot = createPlot( m_addresses, {}, m_ensembles ); - plots.push_back( plot ); - } - } - } - - return plots; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::set RicSummaryPlotBuilder::addressesForSource( caf::PdmObject* summarySource ) +std::set addressesForSource( caf::PdmObject* summarySource ) { auto ensemble = dynamic_cast( summarySource ); if ( ensemble ) @@ -245,7 +74,7 @@ std::set RicSummaryPlotBuilder::addressesForSource( ca //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEnsembleCurveSet* RicSummaryPlotBuilder::createCurveSet( RimSummaryEnsemble* ensemble, const RifEclipseSummaryAddress& addr ) +RimEnsembleCurveSet* createCurveSet( RimSummaryEnsemble* ensemble, const RifEclipseSummaryAddress& addr ) { auto curveSet = new RimEnsembleCurveSet(); @@ -258,20 +87,27 @@ RimEnsembleCurveSet* RicSummaryPlotBuilder::createCurveSet( RimSummaryEnsemble* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCurve* RicSummaryPlotBuilder::createCurve( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& addr ) +RimSummaryCurve* createCurve( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& addr ) { auto curve = new RimSummaryCurve(); curve->setSummaryCaseY( summaryCase ); curve->setSummaryAddressY( addr ); + size_t pos = addr.vectorName().find( '_' ); + if ( pos != std::string::npos ) + { + // https://github.com/OPM/ResInsight/issues/12157 + curve->enableVectorNameInCurveName( true ); + } + return curve; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RicSummaryPlotBuilder::duplicatePlots( const std::vector& sourcePlots ) +std::vector duplicatePlots( const std::vector& sourcePlots ) { std::vector plots; @@ -281,7 +117,7 @@ std::vector RicSummaryPlotBuilder::duplicatePlots( const std::vector m_eclipseCase; - // This pdmpointer must be changed to a ptrField + // This PdmPointer must be changed to a ptrField auto saturationPressurePlotOriginal = dynamic_cast( plot ); auto saturationPressurePlotCopy = dynamic_cast( copy ); @@ -300,7 +136,7 @@ std::vector RicSummaryPlotBuilder::duplicatePlots( const std::vector RicSummaryPlotBuilder::duplicateSummaryPlots( const std::vector& sourcePlots ) +std::vector duplicateSummaryPlots( const std::vector& sourcePlots ) { std::vector plots; @@ -319,7 +155,7 @@ std::vector RicSummaryPlotBuilder::duplicateSummaryPlots( const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimMultiPlot* RicSummaryPlotBuilder::createAndAppendMultiPlot( const std::vector& plots ) +RimMultiPlot* createAndAppendMultiPlot( const std::vector& plots ) { RimMultiPlotCollection* plotCollection = RimMainPlotCollection::current()->multiPlotCollection(); @@ -348,7 +184,7 @@ RimMultiPlot* RicSummaryPlotBuilder::createAndAppendMultiPlot( const std::vector //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( const std::vector& objects ) +RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vector& objects ) { RimSummaryMultiPlotCollection* plotCollection = RimMainPlotCollection::current()->summaryMultiPlotCollection(); @@ -379,7 +215,7 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( con //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicSummaryPlotBuilder::appendPlotsToMultiPlot( RimMultiPlot* multiPlot, const std::vector& plots ) +void appendPlotsToMultiPlot( RimMultiPlot* multiPlot, const std::vector& plots ) { for ( auto plot : plots ) { @@ -399,9 +235,9 @@ void RicSummaryPlotBuilder::appendPlotsToMultiPlot( RimMultiPlot* multiPlot, con //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( const std::vector& cases, - const std::vector& ensembles, - bool skipCreationOfPlotBasedOnPreferences ) +RimSummaryMultiPlot* createAndAppendDefaultSummaryMultiPlot( const std::vector& cases, + const std::vector& ensembles, + bool skipCreationOfPlotBasedOnPreferences ) { RiaPreferencesSummary* prefs = RiaPreferencesSummary::current(); @@ -476,7 +312,7 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlotNoAutoSettings( RimSummaryPlot* plot ) +RimSummaryMultiPlot* createAndAppendSingleSummaryMultiPlotNoAutoSettings( RimSummaryPlot* plot ) { auto* plotCollection = RimMainPlotCollection::current()->summaryMultiPlotCollection(); @@ -513,7 +349,7 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( const std::vector& plots ) +RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vector& plots ) { auto* plotCollection = RimMainPlotCollection::current()->summaryMultiPlotCollection(); @@ -557,7 +393,7 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( con //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( RimSummaryPlot* plot ) +RimSummaryMultiPlot* createAndAppendSingleSummaryMultiPlot( RimSummaryPlot* plot ) { std::vector plots{ plot }; @@ -567,7 +403,7 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicSummaryPlotBuilder::appendPlotsToSummaryMultiPlot( RimSummaryMultiPlot* multiPlot, const std::vector& plots ) +void appendPlotsToSummaryMultiPlot( RimSummaryMultiPlot* multiPlot, const std::vector& plots ) { multiPlot->startBatchAddOperation(); for ( auto plot : plots ) @@ -585,7 +421,7 @@ void RicSummaryPlotBuilder::appendPlotsToSummaryMultiPlot( RimSummaryMultiPlot* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryPlot* RicSummaryPlotBuilder::createPlot( const std::vector& summaryCurves ) +RimSummaryPlot* createPlot( const std::vector& summaryCurves ) { auto* plot = new RimSummaryPlot(); plot->enableAutoPlotTitle( true ); @@ -603,9 +439,9 @@ RimSummaryPlot* RicSummaryPlotBuilder::createPlot( const std::vector& addresses, - const std::vector& summaryCases, - const std::vector& ensembles ) +RimSummaryPlot* createPlot( const std::set& addresses, + const std::vector& summaryCases, + const std::vector& ensembles ) { auto* plot = new RimSummaryPlot(); plot->enableAutoPlotTitle( true ); @@ -620,9 +456,9 @@ RimSummaryPlot* RicSummaryPlotBuilder::createPlot( const std::set& addresses, - const std::vector& summaryCases, - const std::vector& ensembles ) +RimSummaryPlot* createCrossPlot( const std::vector& addresses, + const std::vector& summaryCases, + const std::vector& ensembles ) { auto* summaryPlot = new RimSummaryPlot(); summaryPlot->enableAutoPlotTitle( true ); @@ -655,10 +491,10 @@ RimSummaryPlot* RicSummaryPlotBuilder::createCrossPlot( const std::vector& addresses, - const std::vector& summaryCases, - const std::vector& ensembles ) +void appendCurvesToPlot( RimSummaryPlot* summaryPlot, + const std::set& addresses, + const std::vector& summaryCases, + const std::vector& ensembles ) { for ( const auto& addr : addresses ) { @@ -680,9 +516,7 @@ void RicSummaryPlotBuilder::appendCurvesToPlot( RimSummaryPlot* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEnsembleCurveSet* RicSummaryPlotBuilder::addNewEnsembleCurve( RimSummaryPlot* summaryPlot, - const RiaSummaryCurveAddress& curveAddress, - RimSummaryEnsemble* ensemble ) +RimEnsembleCurveSet* addNewEnsembleCurve( RimSummaryPlot* summaryPlot, const RiaSummaryCurveAddress& curveAddress, RimSummaryEnsemble* ensemble ) { auto* curveSet = new RimEnsembleCurveSet(); @@ -712,14 +546,9 @@ RimEnsembleCurveSet* RicSummaryPlotBuilder::addNewEnsembleCurve( RimSummaryPlot* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryCurve* RicSummaryPlotBuilder::addNewSummaryCurve( RimSummaryPlot* summaryPlot, - const RiaSummaryCurveAddress& curveAddress, - RimSummaryCase* summaryCase ) +RimSummaryCurve* addNewSummaryCurve( RimSummaryPlot* summaryPlot, const RiaSummaryCurveAddress& curveAddress, RimSummaryCase* summaryCase ) { - auto curve = new RimSummaryCurve(); - - curve->setSummaryCaseY( summaryCase ); - curve->setSummaryAddressY( curveAddress.summaryAddressY() ); + auto curve = createCurve( summaryCase, curveAddress.summaryAddressY() ); curve->setSummaryCaseX( summaryCase ); curve->setSummaryAddressX( curveAddress.summaryAddressX() ); @@ -737,3 +566,27 @@ RimSummaryCurve* RicSummaryPlotBuilder::addNewSummaryCurve( RimSummaryPlot* return curve; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set selectedSummaryMultiPlots() +{ + std::set plots; + + auto selectedTreeViewItems = RiuDockWidgetTools::selectedItemsInTreeView( RiuDockWidgetTools::plotMainWindowPlotsTreeName() ); + for ( auto item : selectedTreeViewItems ) + { + if ( auto object = dynamic_cast( item ) ) + { + if ( auto summaryMultiPlot = object->firstAncestorOrThisOfType() ) + { + plots.insert( summaryMultiPlot ); + } + } + } + + return plots; +} + +} // namespace RiaSummaryPlotTools diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.h b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.h new file mode 100644 index 0000000000..0a56a4a225 --- /dev/null +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.h @@ -0,0 +1,90 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2021- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +class RimPlot; +class RimMultiPlot; +class RifEclipseSummaryAddress; +class RimSummaryCase; +class RimSummaryEnsemble; +class RimSummaryPlot; +class RimEnsembleCurveSet; +class RimSummaryCurve; +class RimSummaryMultiPlot; +class RiaSummaryCurveAddress; + +namespace caf +{ +class PdmObject; +class PdmObjectHandle; +} // namespace caf + +#include +#include + +//================================================================================================== +/// +//================================================================================================== +namespace RiaSummaryPlotTools +{ + +std::set addressesForSource( caf::PdmObject* summarySource ); + +RimEnsembleCurveSet* createCurveSet( RimSummaryEnsemble* ensemble, const RifEclipseSummaryAddress& addr ); +RimSummaryCurve* createCurve( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& addr ); + +std::vector duplicatePlots( const std::vector& plots ); +std::vector duplicateSummaryPlots( const std::vector& plots ); + +RimMultiPlot* createAndAppendMultiPlot( const std::vector& plots ); +void appendPlotsToMultiPlot( RimMultiPlot* multiPlot, const std::vector& plots ); + +RimSummaryMultiPlot* createAndAppendDefaultSummaryMultiPlot( const std::vector& cases, + const std::vector& ensembles, + bool skipCreationOfPlotBasedOnPreferences = true ); + +RimSummaryMultiPlot* createAndAppendSingleSummaryMultiPlotNoAutoSettings( RimSummaryPlot* plot ); +RimSummaryMultiPlot* createAndAppendSingleSummaryMultiPlot( RimSummaryPlot* plot ); +RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vector& plots ); +RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vector& objects ); +void appendPlotsToSummaryMultiPlot( RimSummaryMultiPlot* multiPlot, const std::vector& plots ); + +RimSummaryPlot* createPlot( const std::vector& summaryCurves ); + +RimSummaryPlot* createPlot( const std::set& addresses, + const std::vector& summaryCases, + const std::vector& ensembles ); + +RimSummaryPlot* createCrossPlot( const std::vector& addresses, + const std::vector& summaryCases, + const std::vector& ensembles ); + +void appendCurvesToPlot( RimSummaryPlot* summaryPlot, + const std::set& addresses, + const std::vector& summaryCases, + const std::vector& ensembles ); + +RimEnsembleCurveSet* + addNewEnsembleCurve( RimSummaryPlot* summaryPlot, const RiaSummaryCurveAddress& curveAddress, RimSummaryEnsemble* ensemble ); + +RimSummaryCurve* addNewSummaryCurve( RimSummaryPlot* summaryPlot, const RiaSummaryCurveAddress& curveAddress, RimSummaryCase* summaryCase ); + +std::set selectedSummaryMultiPlots(); + +}; // namespace RiaSummaryPlotTools diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryStringTools.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryStringTools.cpp index 7d1f0a57d0..4d2d2a02c9 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryStringTools.cpp +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryStringTools.cpp @@ -149,7 +149,7 @@ std::pair, std::vector> RiaSum if ( !sumCaseMainColl ) return { {}, {} }; auto summaryCases = sumCaseMainColl->topLevelSummaryCases(); - auto ensembles = sumCaseMainColl->summaryCaseCollections(); + auto ensembles = sumCaseMainColl->summaryEnsembles(); return { summaryCases, ensembles }; } diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.cpp index 9c40bab613..6a7cc2349a 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.cpp +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.cpp @@ -23,6 +23,7 @@ #include "RifEclipseSummaryAddress.h" +#include "RimDepthTrackPlot.h" #include "RimMainPlotCollection.h" #include "RimObservedDataCollection.h" #include "RimOilField.h" @@ -40,8 +41,11 @@ #include "RimSummaryPlot.h" #include "RimSummaryTable.h" #include "RimSummaryTableCollection.h" +#include "RimWellPlotTools.h" +#include "RimWellRftPlot.h" #include "cafPdmObject.h" +#include "cafPdmObjectHandleTools.h" #include @@ -385,7 +389,7 @@ bool RiaSummaryTools::isCalculationRequired( const RimUserDefinedCalculation* su //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaSummaryTools::reloadSummaryCase( RimSummaryCase* summaryCase ) +void RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( RimSummaryCase* summaryCase ) { if ( !summaryCase ) return; @@ -409,12 +413,15 @@ void RiaSummaryTools::reloadSummaryCase( RimSummaryCase* summaryCase ) multiPlot->updatePlotTitles(); } + + auto depthTrackPlots = caf::PdmObjectHandleTools::referringAncestorOfType( { summaryCase } ); + RimWellPlotTools::loadDataAndUpdateDepthTrackPlots( depthTrackPlots ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaSummaryTools::reloadSummaryEnsemble( RimSummaryEnsemble* ensemble ) +void RiaSummaryTools::updateConnectedPlots( RimSummaryEnsemble* ensemble ) { RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection(); for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() ) @@ -429,6 +436,9 @@ void RiaSummaryTools::reloadSummaryEnsemble( RimSummaryEnsemble* ensemble ) multiPlot->updatePlotTitles(); } + + auto depthTrackPlots = caf::PdmObjectHandleTools::referringAncestorOfType( { ensemble } ); + RimWellPlotTools::loadDataAndUpdateDepthTrackPlots( depthTrackPlots ); } //-------------------------------------------------------------------------------------------------- @@ -442,3 +452,14 @@ time_t RiaSummaryTools::calculateTimeThreshold( const time_t& minimum, const tim return timeThreshold; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaSummaryTools::updateSummaryEnsembleNames() +{ + if ( auto sumCaseMainColl = RiaSummaryTools::summaryCaseMainCollection() ) + { + sumCaseMainColl->updateEnsembleNames(); + } +} diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.h b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.h index e3f3e4a06b..d5f11c52b5 100644 --- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.h +++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryTools.h @@ -94,11 +94,13 @@ public: static void copyCurveDataSources( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve ); static void copyCurveAxisData( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve ); - static void reloadSummaryCase( RimSummaryCase* summaryCase ); - static void reloadSummaryEnsemble( RimSummaryEnsemble* ensemble ); + static void reloadSummaryCaseAndUpdateConnectedPlots( RimSummaryCase* summaryCase ); + static void updateConnectedPlots( RimSummaryEnsemble* ensemble ); static time_t calculateTimeThreshold( const time_t& minimum, const time_t& maximum ); + static void updateSummaryEnsembleNames(); + private: static void updateRequiredCalculatedCurves( RimSummaryCase* sourceSummaryCase ); static bool isCalculationRequired( const RimUserDefinedCalculation* summaryCalculation, const RimSummaryCase* summaryCase ); diff --git a/ApplicationLibCode/Application/Tools/WellPathTools/CMakeLists_files.cmake b/ApplicationLibCode/Application/Tools/WellPathTools/CMakeLists_files.cmake index 7e20e2818b..68b0b64219 100644 --- a/ApplicationLibCode/Application/Tools/WellPathTools/CMakeLists_files.cmake +++ b/ApplicationLibCode/Application/Tools/WellPathTools/CMakeLists_files.cmake @@ -19,11 +19,3 @@ set(SOURCE_GROUP_SOURCE_FILES list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(QT_MOC_HEADERS ${QT_MOC_HEADERS}) - -source_group( - "Application\\Tools\\WellPathTools" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/CMakeLists.txt b/ApplicationLibCode/CMakeLists.txt index c54a0ba788..fa513f67a5 100644 --- a/ApplicationLibCode/CMakeLists.txt +++ b/ApplicationLibCode/CMakeLists.txt @@ -93,6 +93,7 @@ list( ReservoirDataModel/CMakeLists_files.cmake ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake ReservoirDataModel/Completions/CMakeLists_files.cmake + ReservoirDataModel/ContourMap/CMakeLists_files.cmake ReservoirDataModel/ResultAccessors/CMakeLists_files.cmake ReservoirDataModel/ResultCalculators/CMakeLists_files.cmake ReservoirDataModel/Well/CMakeLists_files.cmake @@ -100,6 +101,7 @@ list( ProjectDataModel/CMakeLists_files.cmake ProjectDataModel/AnalysisPlots/CMakeLists_files.cmake ProjectDataModel/CorrelationPlots/CMakeLists_files.cmake + ProjectDataModel/ContourMap/CMakeLists_files.cmake ProjectDataModel/Cloud/CMakeLists_files.cmake ProjectDataModel/Faults/CMakeLists_files.cmake ProjectDataModel/GeoMech/CMakeLists_files.cmake @@ -108,6 +110,7 @@ list( ProjectDataModel/Summary/CMakeLists_files.cmake ProjectDataModel/Summary/Sumo/CMakeLists_files.cmake ProjectDataModel/Flow/CMakeLists_files.cmake + ProjectDataModel/Formations/CMakeLists_files.cmake ProjectDataModel/Annotations/CMakeLists_files.cmake ProjectDataModel/Completions/CMakeLists_files.cmake ProjectDataModel/Measurement/CMakeLists_files.cmake @@ -211,16 +214,8 @@ if(RESINSIGHT_FOUND_HDF5) else() list(APPEND RI_PRIVATE_INCLUDES ${HDF5_INCLUDE_DIRS}) endif() # MSVC - - source_group("FileInterface\\HDF5" FILES ${HDF5_FILES}) - endif() -# ############################################################################## -# Create source groups - see also included CMakeLists_files.cmake -# ############################################################################## -source_group("ModelVisualization" FILES ${MODEL_VISUALIZATION_FILES}) - qt_add_resources(QRC_FILES Application/Resources/ApplicationLibCode.qrc) list(APPEND ALL_SOURCE_FILES ${CPP_SOURCES} ${MOC_SOURCE_FILES} @@ -404,6 +399,7 @@ set(UNITY_EXCLUDE_FILES FileInterface/RifOsduWellLogReader.cpp FileInterface/RifByteArrayArrowRandomAccessFile.cpp FileInterface/RifArrowTools.cpp + FileInterface/RifReaderOpmRft.cpp ) message("Files excluded from UNITY_BUILD : ${UNITY_EXCLUDE_FILES}") diff --git a/ApplicationLibCode/CommandFileInterface/CMakeLists_files.cmake b/ApplicationLibCode/CommandFileInterface/CMakeLists_files.cmake index 58f7e0900b..a64e24d426 100644 --- a/ApplicationLibCode/CommandFileInterface/CMakeLists_files.cmake +++ b/ApplicationLibCode/CommandFileInterface/CMakeLists_files.cmake @@ -5,7 +5,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.h - ${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellFractureCompletions.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.h ${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.h @@ -46,7 +45,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicfExportMsw.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportMultiCaseSnapshots.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportProperty.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicfExportSimWellFractureCompletions.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.cpp @@ -83,9 +81,3 @@ set(SOURCE_GROUP_SOURCE_FILES list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFileInterface" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/CommandFileInterface/Core/CMakeLists_files.cmake b/ApplicationLibCode/CommandFileInterface/Core/CMakeLists_files.cmake index d541606e5f..97cf83b7ea 100644 --- a/ApplicationLibCode/CommandFileInterface/Core/CMakeLists_files.cmake +++ b/ApplicationLibCode/CommandFileInterface/Core/CMakeLists_files.cmake @@ -8,11 +8,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFileInterface\\Core" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportProperty.cpp b/ApplicationLibCode/CommandFileInterface/RicfExportProperty.cpp index 047fa8a447..7012de7c89 100644 --- a/ApplicationLibCode/CommandFileInterface/RicfExportProperty.cpp +++ b/ApplicationLibCode/CommandFileInterface/RicfExportProperty.cpp @@ -48,14 +48,12 @@ CAF_PDM_SOURCE_INIT( RicfExportProperty, "exportProperty" ); //-------------------------------------------------------------------------------------------------- RicfExportProperty::RicfExportProperty() { - // clang-format off - CAF_PDM_InitScriptableField(&m_caseId, "caseId", -1, "Case ID"); - CAF_PDM_InitScriptableField(&m_timeStepIndex, "timeStep", -1, "Time Step Index"); - CAF_PDM_InitScriptableField(&m_propertyName, "property", QString(), "Property Name"); - CAF_PDM_InitScriptableField(&m_eclipseKeyword, "eclipseKeyword", QString(), "Eclipse Keyword"); - CAF_PDM_InitScriptableField(&m_undefinedValue, "undefinedValue", 0.0, "Undefined Value"); - CAF_PDM_InitScriptableField(&m_exportFileName, "exportFile", QString(), "Export FileName"); - // clang-format on + CAF_PDM_InitScriptableField( &m_caseId, "caseId", -1, "Case ID" ); + CAF_PDM_InitScriptableField( &m_timeStepIndex, "timeStep", -1, "Time Step Index" ); + CAF_PDM_InitScriptableField( &m_propertyName, "property", QString(), "Property Name" ); + CAF_PDM_InitScriptableField( &m_eclipseKeyword, "eclipseKeyword", QString(), "Eclipse Keyword" ); + CAF_PDM_InitScriptableField( &m_undefinedValue, "undefinedValue", 0.0, "Undefined Value" ); + CAF_PDM_InitScriptableField( &m_exportFileName, "exportFile", QString(), "Export FileName" ); } //-------------------------------------------------------------------------------------------------- @@ -76,7 +74,7 @@ caf::PdmScriptResponse RicfExportProperty::execute() if ( !eclipseCase->eclipseCaseData() ) { - if ( !eclipseCase->openReserviorCase() ) + if ( !eclipseCase->openReservoirCase() ) { QString error = QString( "exportProperty: Could not find eclipseCaseData with ID %1" ).arg( m_caseId() ); RiaLogging::error( error ); diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportSimWellFractureCompletions.cpp b/ApplicationLibCode/CommandFileInterface/RicfExportSimWellFractureCompletions.cpp deleted file mode 100644 index 69018158a6..0000000000 --- a/ApplicationLibCode/CommandFileInterface/RicfExportSimWellFractureCompletions.cpp +++ /dev/null @@ -1,156 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2017 Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicfExportSimWellFractureCompletions.h" - -#include "RicfApplicationTools.h" -#include "RicfCommandFileExecutor.h" - -#include "RiaApplication.h" -#include "RiaLogging.h" - -#include "RimDialogData.h" -#include "RimEclipseCase.h" -#include "RimEclipseCaseCollection.h" -#include "RimEclipseView.h" -#include "RimOilField.h" -#include "RimProject.h" -#include "RimSimWellInView.h" -#include "RimSimWellInViewCollection.h" -#include "RimWellPath.h" -#include "RimWellPathCollection.h" - -#include "CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h" - -#include "cafPdmFieldScriptingCapability.h" - -CAF_PDM_SOURCE_INIT( RicfExportSimWellFractureCompletions, "exportSimWellFractureCompletions" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RicfExportSimWellFractureCompletions::RicfExportSimWellFractureCompletions() -{ - CAF_PDM_InitScriptableField( &m_caseId, "caseId", -1, "Case ID" ); - CAF_PDM_InitScriptableField( &m_viewId, "viewId", -1, "View ID" ); - CAF_PDM_InitScriptableField( &m_viewName, "viewName", QString( "" ), "View Name" ); - CAF_PDM_InitScriptableField( &m_timeStep, "timeStep", -1, "Time Step Index" ); - CAF_PDM_InitScriptableField( &m_simWellNames, "simulationWellNames", std::vector(), "Simulation Well Names" ); - CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" ); - CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -caf::PdmScriptResponse RicfExportSimWellFractureCompletions::execute() -{ - using TOOLS = RicfApplicationTools; - - RicExportCompletionDataSettingsUi exportSettings; - - exportSettings.timeStep = m_timeStep; - exportSettings.fileSplit = m_fileSplit; - exportSettings.compdatExport = m_compdatExport; - exportSettings.setExportDataSourceAsComment( true ); - - { - auto eclipseCase = TOOLS::caseFromId( m_caseId() ); - if ( !eclipseCase ) - { - QString error = QString( "exportSimWellCompletions: Could not find case with ID %1" ).arg( m_caseId() ); - RiaLogging::error( error ); - return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error ); - } - exportSettings.caseToApply = eclipseCase; - } - - QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS ); - if ( exportFolder.isNull() ) - { - exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" ); - } - exportSettings.folder = exportFolder; - - std::vector views; - for ( Rim3dView* v : exportSettings.caseToApply->views() ) - { - RimEclipseView* eclipseView = dynamic_cast( v ); - if ( eclipseView && ( eclipseView->id() == m_viewId() || eclipseView->name() == m_viewName() ) ) - { - views.push_back( eclipseView ); - } - } - if ( views.empty() ) - { - QString error = QString( "exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the " - "case with ID %3" ) - .arg( m_viewId ) - .arg( m_viewName ) - .arg( m_caseId() ); - RiaLogging::error( error ); - return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error ); - } - - caf::PdmScriptResponse response; - - std::vector simWells; - if ( m_simWellNames().empty() ) - { - for ( RimEclipseView* view : views ) - { - for ( auto simWell : view->wellCollection()->wells ) - { - if ( simWell->showWell() ) - { - simWells.push_back( simWell ); - } - } - } - } - else - { - for ( const QString& wellPathName : m_simWellNames() ) - { - for ( RimEclipseView* view : views ) - { - RimSimWellInView* simWell = view->wellCollection()->findWell( wellPathName ); - if ( simWell ) - { - simWells.push_back( simWell ); - } - else - { - QString warning = QString( "exportSimWellCompletions: Could not find well with name %1 in view " - "\"%2\" on case with ID %2" ) - .arg( wellPathName ) - .arg( m_viewName ) - .arg( m_caseId() ); - RiaLogging::warning( warning ); - response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning ); - } - } - } - } - - std::vector wellPaths; - - RicWellPathExportCompletionDataFeatureImpl::exportCompletions( wellPaths, simWells, exportSettings ); - - return response; -} diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportWellPathCompletions.cpp b/ApplicationLibCode/CommandFileInterface/RicfExportWellPathCompletions.cpp index 3ddc780787..5f38308b4f 100644 --- a/ApplicationLibCode/CommandFileInterface/RicfExportWellPathCompletions.cpp +++ b/ApplicationLibCode/CommandFileInterface/RicfExportWellPathCompletions.cpp @@ -187,9 +187,7 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute() } } - std::vector simWells; - - RicWellPathExportCompletionDataFeatureImpl::exportCompletions( wellPaths, simWells, exportSettings ); + RicWellPathExportCompletionDataFeatureImpl::exportCompletions( wellPaths, exportSettings ); return response; } diff --git a/ApplicationLibCode/CommandFileInterface/RicfImportFormationNames.cpp b/ApplicationLibCode/CommandFileInterface/RicfImportFormationNames.cpp index 578291ce00..87976f94a8 100644 --- a/ApplicationLibCode/CommandFileInterface/RicfImportFormationNames.cpp +++ b/ApplicationLibCode/CommandFileInterface/RicfImportFormationNames.cpp @@ -19,8 +19,8 @@ #include "RicImportFormationNamesFeature.h" +#include "Formations/RimFormationNames.h" #include "RimCase.h" -#include "RimFormationNames.h" #include "RimProject.h" #include "cafPdmFieldScriptingCapability.h" diff --git a/ApplicationLibCode/CommandFileInterface/RicfSetExportFolder.cpp b/ApplicationLibCode/CommandFileInterface/RicfSetExportFolder.cpp index 42eddc3eac..c49288ef9b 100644 --- a/ApplicationLibCode/CommandFileInterface/RicfSetExportFolder.cpp +++ b/ApplicationLibCode/CommandFileInterface/RicfSetExportFolder.cpp @@ -31,11 +31,12 @@ CAF_PDM_SOURCE_INIT( RicfSetExportFolder, "setExportFolder" ); //-------------------------------------------------------------------------------------------------- RicfSetExportFolder::RicfSetExportFolder() { - // clang-format off - CAF_PDM_InitScriptableField(&m_type, "type", RicfCommandFileExecutor::ExportTypeEnum(RicfCommandFileExecutor::ExportType::COMPLETIONS), "Type"); - CAF_PDM_InitScriptableField(&m_path, "path", QString(), "Path"); - CAF_PDM_InitScriptableField(&m_createFolder, "createFolder", false, "Create Folder"); - // clang-format on + CAF_PDM_InitScriptableField( &m_type, + "type", + RicfCommandFileExecutor::ExportTypeEnum( RicfCommandFileExecutor::ExportType::COMPLETIONS ), + "Type" ); + CAF_PDM_InitScriptableField( &m_path, "path", QString(), "Path" ); + CAF_PDM_InitScriptableField( &m_createFolder, "createFolder", false, "Create Folder" ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake b/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake new file mode 100644 index 0000000000..d0d398c456 --- /dev/null +++ b/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake @@ -0,0 +1,12 @@ +set(SOURCE_GROUP_HEADER_FILES + ${CMAKE_CURRENT_LIST_DIR}/RicApplyUserDefinedCameraFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicStoreUserDefinedCameraFeature.h +) + +set(SOURCE_GROUP_SOURCE_FILES + ${CMAKE_CURRENT_LIST_DIR}/RicApplyUserDefinedCameraFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicStoreUserDefinedCameraFeature.cpp +) + +list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) +list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) diff --git a/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp b/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp new file mode 100644 index 0000000000..613e8d63b6 --- /dev/null +++ b/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.cpp @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicApplyUserDefinedCameraFeature.h" +#include "RicStoreUserDefinedCameraFeature.h" + +#include "RiaApplication.h" + +#include "RimGridView.h" + +#include "RiuViewer.h" + +#include "cvfCamera.h" + +#include +#include + +CAF_CMD_SOURCE_INIT( RicApplyUserDefinedCameraFeature, "RicApplyUserDefinedCameraFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicApplyUserDefinedCameraFeature::isCommandEnabled() const +{ + if ( !RicStoreUserDefinedCameraFeature::activeCamera() ) return false; + + cvf::Vec3d eye = cvf::Vec3d::UNDEFINED; + cvf::Vec3d vrp = cvf::Vec3d::UNDEFINED; + cvf::Vec3d up = cvf::Vec3d::UNDEFINED; + + readCameraFromSettings( eye, vrp, up ); + if ( eye.isUndefined() || vrp.isUndefined() || up.isUndefined() ) return false; + + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicApplyUserDefinedCameraFeature::onActionTriggered( bool isChecked ) +{ + if ( auto camera = RicStoreUserDefinedCameraFeature::activeCamera() ) + { + cvf::Vec3d eye = cvf::Vec3d::UNDEFINED; + cvf::Vec3d vrp = cvf::Vec3d::UNDEFINED; + cvf::Vec3d up = cvf::Vec3d::UNDEFINED; + + readCameraFromSettings( eye, vrp, up ); + if ( eye.isUndefined() || vrp.isUndefined() || up.isUndefined() ) return; + + RicStoreUserDefinedCameraFeature::activeCamera()->setFromLookAt( eye, vrp, up ); + RiaApplication::instance()->activeReservoirView()->updateDisplayModelForCurrentTimeStepAndRedraw(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicApplyUserDefinedCameraFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setText( "User Defined View" ); + actionToSetup->setToolTip( "User Defined View (Ctrl+Alt+U)" ); + actionToSetup->setIcon( QIcon( ":/user-defined-view.svg" ) ); + applyShortcutWithHintToAction( actionToSetup, QKeySequence( tr( "Ctrl+Alt+U" ) ) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicApplyUserDefinedCameraFeature::readCameraFromSettings( cvf::Vec3d& eye, cvf::Vec3d& vrp, cvf::Vec3d& up ) +{ + eye = cvf::Vec3d::UNDEFINED; + vrp = cvf::Vec3d::UNDEFINED; + up = cvf::Vec3d::UNDEFINED; + + QSettings settings; + settings.beginGroup( RicStoreUserDefinedCameraFeature::groupName() ); + + QVariant eyeVariant = settings.value( RicStoreUserDefinedCameraFeature::eyeName() ); + QVariant vrpVariant = settings.value( RicStoreUserDefinedCameraFeature::viewReferencePointName() ); + QVariant upVariant = settings.value( RicStoreUserDefinedCameraFeature::upName() ); + if ( eyeVariant.isNull() || vrpVariant.isNull() || upVariant.isNull() ) return; + + caf::PdmValueFieldSpecialization::setFromVariant( eyeVariant, eye ); + caf::PdmValueFieldSpecialization::setFromVariant( vrpVariant, vrp ); + caf::PdmValueFieldSpecialization::setFromVariant( upVariant, up ); +} diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h b/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.h similarity index 84% rename from ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h rename to ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.h index 973fa317ce..e6356a2c94 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h +++ b/ApplicationLibCode/Commands/3dView/RicApplyUserDefinedCameraFeature.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2017 Statoil ASA +// Copyright (C) 2025 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 @@ -20,12 +20,12 @@ #include "cafCmdFeature.h" -class RimSimWellInView; +#include "cvfVector3.h" //================================================================================================== /// //================================================================================================== -class RicExportCompletionsForVisibleSimWellsFeature : public caf::CmdFeature +class RicApplyUserDefinedCameraFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; @@ -35,5 +35,5 @@ protected: void setupActionLook( QAction* actionToSetup ) override; private: - static std::vector visibleSimWells(); + static void readCameraFromSettings( cvf::Vec3d& eye, cvf::Vec3d& vrp, cvf::Vec3d& up ); }; diff --git a/ApplicationLibCode/Commands/3dView/RicStoreUserDefinedCameraFeature.cpp b/ApplicationLibCode/Commands/3dView/RicStoreUserDefinedCameraFeature.cpp new file mode 100644 index 0000000000..3d3c5eb49d --- /dev/null +++ b/ApplicationLibCode/Commands/3dView/RicStoreUserDefinedCameraFeature.cpp @@ -0,0 +1,127 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicStoreUserDefinedCameraFeature.h" + +#include "RiaApplication.h" + +#include "RimGridView.h" +#include "RiuMainWindow.h" + +#include "RiuViewer.h" + +#include "cvfCamera.h" + +#include +#include + +CAF_CMD_SOURCE_INIT( RicStoreUserDefinedCameraFeature, "RicStoreUserDefinedCameraFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicStoreUserDefinedCameraFeature::groupName() +{ + return "UserDefinedCamera"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicStoreUserDefinedCameraFeature::eyeName() +{ + return "Eye"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicStoreUserDefinedCameraFeature::viewReferencePointName() +{ + return "ViewReferencePoint"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RicStoreUserDefinedCameraFeature::upName() +{ + return "Up"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Camera* RicStoreUserDefinedCameraFeature::activeCamera() +{ + if ( auto activeView = RiaApplication::instance()->activeReservoirView() ) + { + if ( activeView->viewer() && activeView->viewer()->mainCamera() ) + { + return activeView->viewer()->mainCamera(); + } + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicStoreUserDefinedCameraFeature::isCommandEnabled() const +{ + return activeCamera() != nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicStoreUserDefinedCameraFeature::onActionTriggered( bool isChecked ) +{ + if ( auto camera = activeCamera() ) + { + QSettings settings; + settings.beginGroup( RicStoreUserDefinedCameraFeature::groupName() ); + + cvf::Vec3d eye; + cvf::Vec3d vrp; + cvf::Vec3d up; + + camera->toLookAt( &eye, &vrp, &up ); + + QVariant eyeVariant = caf::PdmValueFieldSpecialization::convert( eye ); + settings.setValue( RicStoreUserDefinedCameraFeature::eyeName(), eyeVariant ); + + QVariant vrpVariant = caf::PdmValueFieldSpecialization::convert( vrp ); + settings.setValue( RicStoreUserDefinedCameraFeature::viewReferencePointName(), vrpVariant ); + + QVariant upVariant = caf::PdmValueFieldSpecialization::convert( up ); + settings.setValue( RicStoreUserDefinedCameraFeature::upName(), upVariant ); + + RiuMainWindow::instance()->refreshViewActions(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicStoreUserDefinedCameraFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setText( "Store User Defined View" ); + actionToSetup->setIcon( QIcon( ":/user-defined-view.svg" ) ); +} diff --git a/ApplicationLibCode/Commands/3dView/RicStoreUserDefinedCameraFeature.h b/ApplicationLibCode/Commands/3dView/RicStoreUserDefinedCameraFeature.h new file mode 100644 index 0000000000..cc11658ce0 --- /dev/null +++ b/ApplicationLibCode/Commands/3dView/RicStoreUserDefinedCameraFeature.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +namespace cvf +{ +class Camera; +}; + +//================================================================================================== +/// +//================================================================================================== +class RicStoreUserDefinedCameraFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +public: + static QString groupName(); + static QString eyeName(); + static QString viewReferencePointName(); + static QString upName(); + static cvf::Camera* activeCamera(); + +protected: + bool isCommandEnabled() const override; + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; +}; diff --git a/ApplicationLibCode/Commands/AnalysisPlotCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/AnalysisPlotCommands/CMakeLists_files.cmake index 963c58b3ee..8ea8358bec 100644 --- a/ApplicationLibCode/Commands/AnalysisPlotCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/AnalysisPlotCommands/CMakeLists_files.cmake @@ -9,11 +9,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\AnalysisPlotCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/AnnotationCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/AnnotationCommands/CMakeLists_files.cmake index a48bf8d500..452ffabb79 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/AnnotationCommands/CMakeLists_files.cmake @@ -13,16 +13,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(COMMAND_QT_MOC_HEADERS - ${COMMAND_QT_MOC_HEADERS} - ${CMAKE_CURRENT_LIST_DIR}/RicTextAnnotation3dEditor.h -) - -source_group( - "CommandFeature\\AnnotationCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp index 8ee1c57dfa..c8a4393012 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp @@ -20,9 +20,9 @@ #include "RiaApplication.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RimAnnotationInViewCollection.h" #include "RimCase.h" -#include "RimEclipseContourMapView.h" #include "RimGridView.h" #include "RimTextAnnotation.h" diff --git a/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake index f75d1b73a8..4062b93901 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake @@ -49,15 +49,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND COMMAND_QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RicSumoDataFeature.h -) - -source_group( - "CommandFeature\\Application" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp index eecc502e6b..2c94660cf6 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp @@ -107,7 +107,9 @@ void RicHelpAboutFeature::onActionTriggered( bool isChecked ) txt = " Use of SSL is available"; if ( isSslSupported ) { - txt += " and supported"; + txt += " and supported : "; + txt += QSslSocket::sslLibraryVersionString(); + txt += ", Build: " + QSslSocket::sslLibraryBuildVersionString(); } else { diff --git a/ApplicationLibCode/Commands/CMakeLists.txt b/ApplicationLibCode/Commands/CMakeLists.txt index 9697a4989a..c20ad01675 100644 --- a/ApplicationLibCode/Commands/CMakeLists.txt +++ b/ApplicationLibCode/Commands/CMakeLists.txt @@ -60,6 +60,7 @@ set(COMMAND_REFERENCED_CMAKE_FILES PolygonCommands/CMakeLists_files.cmake Sumo/CMakeLists_files.cmake ToolCommands/CMakeLists_files.cmake + 3dView/CMakeLists_files.cmake ) # Include source file lists from *.cmake files @@ -138,5 +139,3 @@ endif() set(LINK_LIBRARIES ApplicationLibCode ResultStatisticsCache) target_link_libraries(${PROJECT_NAME} PRIVATE ${LINK_LIBRARIES}) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/ApplicationLibCode/Commands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/CMakeLists_files.cmake index fabb8395fe..7363af1ffd 100644 --- a/ApplicationLibCode/Commands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/CMakeLists_files.cmake @@ -4,7 +4,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCloseSummaryCaseFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCloseSummaryCaseInCollectionFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCloseObservedDataFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicCreateSummaryCaseCollectionFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewViewFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewContourMapViewFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicImportFaciesFeature.h @@ -42,7 +41,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicReloadCaseFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicReplaceCaseFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicReloadSummaryCaseFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicReplaceSummaryCaseFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicFlyToObjectFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicGridStatisticsDialog.h ${CMAKE_CURRENT_LIST_DIR}/RicShowGridStatisticsFeature.h @@ -51,7 +49,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicImportEnsembleFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicImportSummaryGroupFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicImportEnsembleSurfaceFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicConvertGroupToEnsembleFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicImportEnsembleWellLogsFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicResampleDialog.h ${CMAKE_CURRENT_LIST_DIR}/RicCreateTemporaryLgrFeature.h @@ -96,8 +93,14 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicImportWellLogCsvFileFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewViewForGridEnsembleFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewCustomVfpPlotFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicNewWellTargetCandidatesGeneratorFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicNewWellTargetMappingFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewStatisticsContourMapFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicNewStatisticsContourMapViewFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonAdvancedFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonTools.h + ${CMAKE_CURRENT_LIST_DIR}/RicPolygonFromImageDialog.h + ${CMAKE_CURRENT_LIST_DIR}/RicCreateSummaryEnsembleFeature.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -106,7 +109,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCloseSummaryCaseFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCloseSummaryCaseInCollectionFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCloseObservedDataFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicCreateSummaryCaseCollectionFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewViewFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewContourMapViewFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicImportFaciesFeature.cpp @@ -143,7 +145,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicReloadCaseFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicReplaceCaseFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicReloadSummaryCaseFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicReplaceSummaryCaseFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicFlyToObjectFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicGridStatisticsDialog.cpp ${CMAKE_CURRENT_LIST_DIR}/RicShowGridStatisticsFeature.cpp @@ -152,7 +153,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicImportEnsembleFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicImportSummaryGroupFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicImportEnsembleSurfaceFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicConvertGroupToEnsembleFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicImportEnsembleWellLogsFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicResampleDialog.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCreateTemporaryLgrFeature.cpp @@ -198,8 +198,14 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicImportWellLogOsduFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewViewForGridEnsembleFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewCustomVfpPlotFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicNewWellTargetCandidatesGeneratorFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicNewWellTargetMappingFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewStatisticsContourMapFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicNewStatisticsContourMapViewFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonAdvancedFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicCreateContourMapPolygonTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicPolygonFromImageDialog.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicCreateSummaryEnsembleFeature.cpp ) if(RESINSIGHT_USE_QT_CHARTS) @@ -216,23 +222,4 @@ if(RESINSIGHT_USE_QT_CHARTS) endif() list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list( - APPEND - COMMAND_QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RicGridStatisticsDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicRecursiveFileSearchDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryCaseRestartDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicResampleDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicUserDefinedCalculatorDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicGridCalculatorDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicCalculatorWidgetCreator.h -) - -source_group( - "CommandFeature" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/CellFilterCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/CellFilterCommands/CMakeLists_files.cmake index 5ffc9c2e24..e90ef2462c 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/CellFilterCommands/CMakeLists_files.cmake @@ -27,11 +27,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\CellFilterCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/ColorLegendCommands/CMakeLists_files.cmake index 5945101d7b..4b03455210 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/ColorLegendCommands/CMakeLists_files.cmake @@ -13,11 +13,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\ColorLegend" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/CompletionCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/CompletionCommands/CMakeLists_files.cmake index c805413ba9..f428e66d90 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/CompletionCommands/CMakeLists_files.cmake @@ -33,11 +33,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\Completion" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp index b276dc5465..3502ca6556 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp @@ -50,7 +50,7 @@ void RicImportEnsembleFractureStatisticsFeature::onActionTriggered( bool isCheck QString pathCacheName = "INPUT_FILES"; auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import StimPlan Fractures", pathCacheName ); - if ( groupByEnsemble == RiaEnsembleNameTools::EnsembleGroupingMode::NONE ) + if ( groupByEnsemble == RiaDefines::EnsembleGroupingMode::NONE ) { importSingleEnsembleFractureStatistics( fileNames ); } @@ -71,7 +71,7 @@ void RicImportEnsembleFractureStatisticsFeature::importSingleEnsembleFractureSta { auto fractureGroupStatistics = new RimEnsembleFractureStatistics; QString ensembleNameSuggestion = - RiaEnsembleNameTools::findSuitableEnsembleName( fileNames, RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); + RiaEnsembleNameTools::findSuitableEnsembleName( fileNames, RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); fractureGroupStatistics->setName( ensembleNameSuggestion ); caf::ProgressInfo progInfo( fileNames.size() + 1, "Creating Ensemble Fracture Statistics" ); @@ -116,7 +116,7 @@ void RicImportEnsembleFractureStatisticsFeature::setupActionLook( QAction* actio //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair +std::pair RicImportEnsembleFractureStatisticsFeature::runRecursiveFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName ) { RiaApplication* app = RiaApplication::instance(); @@ -136,7 +136,7 @@ std::pair m_pathFilter = result.pathFilter; m_fileNameFilter = result.fileNameFilter; - if ( !result.ok ) return std::make_pair( QStringList(), RiaEnsembleNameTools::EnsembleGroupingMode::NONE ); + if ( !result.ok ) return std::make_pair( QStringList(), RiaDefines::EnsembleGroupingMode::NONE ); // Remember the path to next time app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() ); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h index ea730a16c0..2c1b7d5670 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h @@ -34,8 +34,8 @@ class RicImportEnsembleFractureStatisticsFeature : public caf::CmdFeature public: RicImportEnsembleFractureStatisticsFeature() {} - static std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, - const QString& pathCacheName ); + static std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, + const QString& pathCacheName ); protected: static void importSingleEnsembleFractureStatistics( const QStringList& fileNames ); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp index 73d3f3403f..cc43cebee3 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp @@ -85,7 +85,7 @@ bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicNewFishbonesSubsAtMeasuredDepthFeature::createFishbones( const RicFishbonesSystemParameters& customParameters ) +void RicNewFishbonesSubsAtMeasuredDepthFeature::createFishbones( const RimFishbonesDefines::RicFishbonesSystemParameters& customParameters ) { RiuWellPathSelectionItem* wellPathSelItem = RiuWellPathSelectionItem::wellPathSelectionItem(); CVF_ASSERT( wellPathSelItem ); @@ -120,7 +120,7 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::createFishbones( const RicFishbo //-------------------------------------------------------------------------------------------------- void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingStandard() { - createFishbones( RicNewFishbonesSubsFeature::drillingStandardParameters() ); + createFishbones( RimFishbonesDefines::drillingStandardParameters() ); } //-------------------------------------------------------------------------------------------------- @@ -128,7 +128,7 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingStandard() //-------------------------------------------------------------------------------------------------- void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingExtended() { - createFishbones( RicNewFishbonesSubsFeature::drillingExtendedParameters() ); + createFishbones( RimFishbonesDefines::drillingExtendedParameters() ); } //-------------------------------------------------------------------------------------------------- @@ -136,5 +136,5 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingExtended() //-------------------------------------------------------------------------------------------------- void RicNewFishbonesSubsAtMeasuredDepthFeature::onAcidJetting() { - createFishbones( RicNewFishbonesSubsFeature::acidJettingParameters() ); + createFishbones( RimFishbonesDefines::acidJettingParameters() ); } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h index f324d2932e..75c9c62428 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h @@ -19,6 +19,7 @@ #pragma once #include "RicNewFishbonesSubsFeature.h" +#include "RimFishbonesDefines.h" //================================================================================================== /// @@ -32,7 +33,7 @@ private: void setupActionLook( QAction* actionToSetup ) override; bool isCommandEnabled() const override; - void createFishbones( const RicFishbonesSystemParameters& customParameters ); + void createFishbones( const RimFishbonesDefines::RicFishbonesSystemParameters& customParameters ); void onDrillingStandard(); void onDrillingExtended(); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp index 48508927b9..57745d4bdf 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp @@ -59,7 +59,7 @@ void RicNewFishbonesSubsFeature::onActionTriggered( bool isChecked ) //-------------------------------------------------------------------------------------------------- void RicNewFishbonesSubsFeature::onDrillingStandard() { - createFishbones( RicNewFishbonesSubsFeature::drillingStandardParameters() ); + createFishbones( RimFishbonesDefines::drillingStandardParameters() ); } //-------------------------------------------------------------------------------------------------- @@ -67,7 +67,7 @@ void RicNewFishbonesSubsFeature::onDrillingStandard() //-------------------------------------------------------------------------------------------------- void RicNewFishbonesSubsFeature::onDrillingExtended() { - createFishbones( RicNewFishbonesSubsFeature::drillingExtendedParameters() ); + createFishbones( RimFishbonesDefines::drillingExtendedParameters() ); } //-------------------------------------------------------------------------------------------------- @@ -75,13 +75,13 @@ void RicNewFishbonesSubsFeature::onDrillingExtended() //-------------------------------------------------------------------------------------------------- void RicNewFishbonesSubsFeature::onAcidJetting() { - createFishbones( RicNewFishbonesSubsFeature::acidJettingParameters() ); + createFishbones( RimFishbonesDefines::acidJettingParameters() ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicNewFishbonesSubsFeature::createFishbones( const RicFishbonesSystemParameters& customParameters ) +void RicNewFishbonesSubsFeature::createFishbones( const RimFishbonesDefines::RicFishbonesSystemParameters& customParameters ) { RimFishbonesCollection* fishbonesCollection = selectedFishbonesCollection(); CVF_ASSERT( fishbonesCollection ); @@ -121,30 +121,6 @@ void RicNewFishbonesSubsFeature::createFishbones( const RicFishbonesSystemParame proj->reloadCompletionTypeResultsInAllViews(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RicFishbonesSystemParameters RicNewFishbonesSubsFeature::drillingStandardParameters() -{ - return { .lateralsPerSub = 3, .lateralLength = 11.0, .holeDiameter = 12.5, .buildAngle = 6.0, .icdsPerSub = 3 }; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RicFishbonesSystemParameters RicNewFishbonesSubsFeature::drillingExtendedParameters() -{ - return { .lateralsPerSub = 3, .lateralLength = 18.0, .holeDiameter = 12.5, .buildAngle = 4.0, .icdsPerSub = 3 }; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RicFishbonesSystemParameters RicNewFishbonesSubsFeature::acidJettingParameters() -{ - return { .lateralsPerSub = 4, .lateralLength = 12.0, .holeDiameter = 15.0, .buildAngle = 6.0, .icdsPerSub = 4 }; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h index 082fae20e6..13e67d59e5 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h @@ -20,18 +20,10 @@ #include "cafCmdFeature.h" +#include "RimFishbonesDefines.h" + class RimFishbonesCollection; -struct RicFishbonesSystemParameters -{ - int lateralsPerSub; - double lateralLength; - double holeDiameter; - double buildAngle; - - int icdsPerSub; -}; - //================================================================================================== /// //================================================================================================== @@ -40,10 +32,6 @@ class RicNewFishbonesSubsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - static RicFishbonesSystemParameters drillingStandardParameters(); - static RicFishbonesSystemParameters drillingExtendedParameters(); - static RicFishbonesSystemParameters acidJettingParameters(); - static void adjustWellPathScaling( RimFishbonesCollection* fishboneCollection ); private: @@ -55,7 +43,7 @@ private: void onDrillingExtended(); void onAcidJetting(); - void createFishbones( const RicFishbonesSystemParameters& customParameters ); + void createFishbones( const RimFishbonesDefines::RicFishbonesSystemParameters& customParameters ); static RimFishbonesCollection* selectedFishbonesCollection(); }; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/CompletionExportCommands/CMakeLists_files.cmake index 5118c85375..0b3de886ba 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/CompletionExportCommands/CMakeLists_files.cmake @@ -9,7 +9,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.h ${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleSimWellsFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicMswBranch.h ${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.h ${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.h @@ -34,7 +33,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.cpp ${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleWellPathsFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionsForVisibleSimWellsFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicMswBranch.cpp ${CMAKE_CURRENT_LIST_DIR}/RicMswCompletions.cpp ${CMAKE_CURRENT_LIST_DIR}/RicMswExportInfo.cpp @@ -49,11 +47,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\CompletionExport" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp index 0cbd13dbe9..a1b18d65e1 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp @@ -26,44 +26,46 @@ #include "RimWellPath.h" #include "RimWellPathCompletions.h" -// clang-format off namespace caf { - template<> - void RicExportCompletionDataSettingsUi::ExportSplitType::setUp() - { - addItem(RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE, "UNIFIED_FILE", "Unified File"); - addItem(RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL, "SPLIT_ON_WELL", "Split on Well"); - addItem(RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE, "SPLIT_ON_WELL_AND_COMPLETION_TYPE", "Split on Well and Completion Type"); - setDefault(RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE); - } - - template<> - void RicExportCompletionDataSettingsUi::CompdatExportType::setUp() - { - addItem(RicExportCompletionDataSettingsUi::CompdatExport::TRANSMISSIBILITIES, "TRANSMISSIBILITIES", "Calculated Transmissibilities"); - addItem(RicExportCompletionDataSettingsUi::CompdatExport::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS, "WPIMULT_AND_DEFAULT_CONNECTION_FACTORS", "Default Connection Factors and WPIMULT (Fractures Not Supported)"); - setDefault(RicExportCompletionDataSettingsUi::CompdatExport::TRANSMISSIBILITIES); - } - - template<> - void RicExportCompletionDataSettingsUi::CombinationModeType::setUp() - { - addItem(RicExportCompletionDataSettingsUi::CombinationMode::INDIVIDUALLY, "INDIVIDUALLY", "Individually"); - addItem(RicExportCompletionDataSettingsUi::CombinationMode::COMBINED, "COMBINED", "Combined"); - setDefault(RicExportCompletionDataSettingsUi::CombinationMode::INDIVIDUALLY); - } - - template<> - void RicExportCompletionDataSettingsUi::TransScalingWBHPSource::setUp() - { - addItem(RicExportFractureCompletionsImpl::WBHP_FROM_SUMMARY, "WBHP_SUMMARY", "WBHP From Summary Case"); - addItem(RicExportFractureCompletionsImpl::WBHP_FROM_USER_DEF, "WBHP_USER_DEFINED", "Fixed User Defined WBHP"); - - setDefault(RicExportFractureCompletionsImpl::WBHP_FROM_SUMMARY); - } +template <> +void RicExportCompletionDataSettingsUi::ExportSplitType::setUp() +{ + addItem( RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE, "UNIFIED_FILE", "Unified File" ); + addItem( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL, "SPLIT_ON_WELL", "Split on Well" ); + addItem( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE, + "SPLIT_ON_WELL_AND_COMPLETION_TYPE", + "Split on Well and Completion Type" ); + setDefault( RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE ); } -// clang-format on + +template <> +void RicExportCompletionDataSettingsUi::CompdatExportType::setUp() +{ + addItem( RicExportCompletionDataSettingsUi::CompdatExport::TRANSMISSIBILITIES, "TRANSMISSIBILITIES", "Calculated Transmissibilities" ); + addItem( RicExportCompletionDataSettingsUi::CompdatExport::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS, + "WPIMULT_AND_DEFAULT_CONNECTION_FACTORS", + "Default Connection Factors and WPIMULT (Fractures Not Supported)" ); + setDefault( RicExportCompletionDataSettingsUi::CompdatExport::TRANSMISSIBILITIES ); +} + +template <> +void RicExportCompletionDataSettingsUi::CombinationModeType::setUp() +{ + addItem( RicExportCompletionDataSettingsUi::CombinationMode::INDIVIDUALLY, "INDIVIDUALLY", "Individually" ); + addItem( RicExportCompletionDataSettingsUi::CombinationMode::COMBINED, "COMBINED", "Combined" ); + setDefault( RicExportCompletionDataSettingsUi::CombinationMode::INDIVIDUALLY ); +} + +template <> +void RicExportCompletionDataSettingsUi::TransScalingWBHPSource::setUp() +{ + addItem( RicExportFractureCompletionsImpl::WBHP_FROM_SUMMARY, "WBHP_SUMMARY", "WBHP From Summary Case" ); + addItem( RicExportFractureCompletionsImpl::WBHP_FROM_USER_DEF, "WBHP_USER_DEFINED", "Fixed User Defined WBHP" ); + + setDefault( RicExportFractureCompletionsImpl::WBHP_FROM_SUMMARY ); +} +} // namespace caf CAF_PDM_SOURCE_INIT( RicExportCompletionDataSettingsUi, "RicExportCompletionDataSettingsUi" ); @@ -112,8 +114,6 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi() CAF_PDM_InitField( &m_useCustomFileName, "UseCustomFileName", false, "Use Custom Filename" ); CAF_PDM_InitField( &m_customFileName, "CustomFileName", {}, "Custom Filename" ); - m_displayForSimWell = true; - m_fracturesEnabled = true; m_perforationsEnabled = true; m_fishbonesEnabled = true; @@ -127,22 +127,6 @@ void RicExportCompletionDataSettingsUi::enableIncludeMsw() includeMsw = true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicExportCompletionDataSettingsUi::showForSimWells() -{ - m_displayForSimWell = true; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicExportCompletionDataSettingsUi::showForWellPath() -{ - m_displayForSimWell = false; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -381,17 +365,14 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering( QString uiConfigName, { caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Completions Export Selection" ); - if ( !m_displayForSimWell ) + if ( m_perforationsEnabled ) { - if ( m_perforationsEnabled ) - { - group->add( &includePerforations ); - group->add( &timeStep ); - if ( !includePerforations ) - timeStep.uiCapability()->setUiReadOnly( true ); - else - timeStep.uiCapability()->setUiReadOnly( false ); - } + group->add( &includePerforations ); + group->add( &timeStep ); + if ( !includePerforations ) + timeStep.uiCapability()->setUiReadOnly( true ); + else + timeStep.uiCapability()->setUiReadOnly( false ); } if ( m_fracturesEnabled ) @@ -442,19 +423,16 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering( QString uiConfigName, !includeMsw ); } - if ( !m_displayForSimWell ) + if ( m_fishbonesEnabled ) { - if ( m_fishbonesEnabled ) - { - group->add( &includeFishbones ); - group->add( &excludeMainBoreForFishbones ); + group->add( &includeFishbones ); + group->add( &excludeMainBoreForFishbones ); - // Set visibility - if ( !includeFishbones ) - excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( true ); - else - excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( false ); - } + // Set visibility + if ( !includeFishbones ) + excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( true ); + else + excludeMainBoreForFishbones.uiCapability()->setUiReadOnly( false ); } } diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h index 5d425deefc..d491c0d6f4 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h @@ -81,8 +81,6 @@ public: caf::PdmField includeFractures; void enableIncludeMsw(); - void showForSimWells(); - void showForWellPath(); void setCombinationMode( CombinationMode combinationMode ); @@ -121,7 +119,6 @@ private: caf::PdmField m_useCustomFileName; caf::PdmField m_customFileName; - bool m_displayForSimWell; bool m_fracturesEnabled; bool m_perforationsEnabled; bool m_fishbonesEnabled; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp index c649af87cf..e1f6ec64b1 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp @@ -61,10 +61,8 @@ void RicExportCompletionsForTemporaryLgrsFeature::onActionTriggered( bool isChec return; } - std::vector simWells; - QString dialogTitle = "Export Completion Data for Temporary LGRs"; - - RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells ); + QString dialogTitle = "Export Completion Data for Temporary LGRs"; + RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp deleted file mode 100644 index 276b9b3895..0000000000 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp +++ /dev/null @@ -1,107 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2017 Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicExportCompletionsForVisibleSimWellsFeature.h" - -#include "RicWellPathExportCompletionDataFeature.h" - -#include "RimSimWellInView.h" -#include "RimSimWellInViewCollection.h" - -#include "cafSelectionManager.h" - -#include - -CAF_CMD_SOURCE_INIT( RicExportCompletionsForVisibleSimWellsFeature, "RicExportCompletionsForVisibleSimWellsFeature" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicExportCompletionsForVisibleSimWellsFeature::isCommandEnabled() const -{ - std::vector simWells = visibleSimWells(); - - return !simWells.empty(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicExportCompletionsForVisibleSimWellsFeature::onActionTriggered( bool isChecked ) -{ - std::vector simWells = visibleSimWells(); - CVF_ASSERT( !simWells.empty() ); - - std::vector wellPaths; - QString dialogTitle = "Export Completion Data for Visible Simulation Wells"; - - RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicExportCompletionsForVisibleSimWellsFeature::setupActionLook( QAction* actionToSetup ) -{ - actionToSetup->setText( "Export Completion Data for Visible Simulation Wells" ); - actionToSetup->setIcon( QIcon( ":/ExportCompletionsSymbol16x16.png" ) ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RicExportCompletionsForVisibleSimWellsFeature::visibleSimWells() -{ - std::vector simWells; - - { - std::vector simWellCollection; - caf::SelectionManager::instance()->objectsByType( &simWellCollection ); - - if ( simWellCollection.empty() ) - { - std::vector selectedSimWells; - caf::SelectionManager::instance()->objectsByType( &selectedSimWells ); - - if ( !selectedSimWells.empty() ) - { - RimSimWellInViewCollection* parent = selectedSimWells[0]->firstAncestorOrThisOfType(); - if ( parent ) - { - simWellCollection.push_back( parent ); - } - } - } - - for ( auto coll : simWellCollection ) - { - for ( const auto& wellPath : coll->wells() ) - { - if ( wellPath->showWell() ) - { - simWells.push_back( wellPath ); - } - } - } - } - - std::set uniqueWellPaths( simWells.begin(), simWells.end() ); - simWells.assign( uniqueWellPaths.begin(), uniqueWellPaths.end() ); - - return simWells; -} diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp index dd77bb0a27..52dc3f982b 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp @@ -71,10 +71,8 @@ void RicExportCompletionsForVisibleWellPathsFeature::onActionTriggered( bool isC std::vector wellPaths = visibleWellPaths(); if ( wellPaths.empty() ) return RiaLogging::warning( "No visible well paths found, no data exported." ); - std::vector simWells; - QString dialogTitle = "Export Completion Data for Visible Well Paths"; - - RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells ); + QString dialogTitle = "Export Completion Data for Visible Well Paths"; + RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp index 5fe2c9c0c8..45028fb597 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp @@ -35,9 +35,6 @@ #include "RimObservedEclipseUserData.h" #include "RimProject.h" #include "RimReloadCaseTools.h" -#include "RimSimWellFracture.h" -#include "RimSimWellFractureCollection.h" -#include "RimSimWellInView.h" #include "RimStimPlanFractureTemplate.h" #include "RimSummaryCase.h" #include "RimWellPath.h" @@ -97,46 +94,6 @@ std::vector pdParams ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector - RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell( RimEclipseCase* eclipseCase, - const RimSimWellInView* well, - QTextStream* outputStreamForIntermediateResultsText, - PressureDepletionParameters pdParams ) -{ - std::vector completionData; - - auto branches = well->wellPipeBranches(); - - for ( size_t branchIndex = 0; branchIndex < branches.size(); ++branchIndex ) - { - std::vector fractures; - for ( RimSimWellFracture* fracture : well->simwellFractureCollection->simwellFractures() ) - { - if ( fracture->isChecked() && static_cast( fracture->branchIndex() ) == branchIndex ) - { - fracture->ensureValidNonDarcyProperties(); - - fractures.push_back( fracture ); - } - } - - std::vector branchCompletions = generateCompdatValues( eclipseCase, - well->name(), - branches[branchIndex], - fractures, - nullptr, - outputStreamForIntermediateResultsText, - pdParams ); - - completionData.insert( completionData.end(), branchCompletions.begin(), branchCompletions.end() ); - } - - return completionData; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.h index 5efa699f29..684f8746c1 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.h @@ -37,7 +37,6 @@ class RigCaseCellResultsData; class RimEclipseCase; class RimFracture; class RimFractureTemplate; -class RimSimWellInView; class RimWellPath; class QTextStream; @@ -84,12 +83,6 @@ public: QTextStream* outputStreamForIntermediateResultsText, PressureDepletionParameters pdParams = PressureDepletionParameters() ); - static std::vector - generateCompdatValuesForSimWell( RimEclipseCase* eclipseCase, - const RimSimWellInView* well, - QTextStream* outputStreamForIntermediateResultsText, - PressureDepletionParameters pdParams = PressureDepletionParameters() ); - static std::vector generateCompdatValues( RimEclipseCase* caseToApply, const QString& wellNameForExport, const RigWellPath* wellPathGeometry, diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp index 9618f4a790..a864ff7fe1 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp @@ -29,9 +29,6 @@ #include "RimFishbones.h" #include "RimPerforationInterval.h" #include "RimProject.h" -#include "RimSimWellFracture.h" -#include "RimSimWellInView.h" -#include "RimSimWellInViewCollection.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" #include "RimWellPathCompletions.h" @@ -51,9 +48,8 @@ CAF_CMD_SOURCE_INIT( RicWellPathExportCompletionDataFeature, "RicWellPathExportC //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( const QString& dialogTitle, - const std::vector& wellPaths, - const std::vector& simWells ) +void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( const QString& dialogTitle, + const std::vector& wellPaths ) { RiaApplication* app = RiaApplication::instance(); RimProject* project = app->project(); @@ -61,15 +57,6 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(); - if ( wellPaths.empty() ) - { - exportSettings->showForSimWells(); - } - else - { - exportSettings->showForWellPath(); - } - if ( !exportSettings->caseToApply() ) { std::vector cases = app->project()->allGridCases(); @@ -86,17 +73,10 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl if ( exportSettings->folder().isEmpty() ) exportSettings->folder = defaultDir; - std::vector simWellFractures; std::vector wellPathFractures; std::vector wellPathFishbones; std::vector wellPathPerforations; - for ( auto s : simWells ) - { - auto fratures = s->descendantsIncludingThisOfType(); - simWellFractures.insert( simWellFractures.end(), fratures.begin(), fratures.end() ); - } - std::vector topLevelWells; { std::set myWells; @@ -137,7 +117,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl wellPathPerforations.insert( wellPathPerforations.end(), perforations.begin(), perforations.end() ); } - if ( ( !simWellFractures.empty() ) || ( !wellPathFractures.empty() ) ) + if ( !wellPathFractures.empty() ) { exportSettings->showFractureInUi( true ); } @@ -194,7 +174,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl RiaApplication::instance()->setLastUsedDialogDirectory( "COMPLETIONS", exportSettings->folder ); - RicWellPathExportCompletionDataFeatureImpl::exportCompletions( topLevelWells, simWells, *exportSettings ); + RicWellPathExportCompletionDataFeatureImpl::exportCompletions( topLevelWells, *exportSettings ); } } @@ -216,10 +196,8 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered( bool isChecked ) std::vector wellPaths = selectedWellPaths(); CVF_ASSERT( !wellPaths.empty() ); - std::vector simWells; - QString dialogTitle = "Export Completion Data for Selected Well Paths"; - - RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths, simWells ); + QString dialogTitle = "Export Completion Data for Selected Well Paths"; + RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompletions( dialogTitle, wellPaths ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h index b74182ec34..23b82a52a9 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h @@ -31,9 +31,7 @@ class RicWellPathExportCompletionDataFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - static void prepareExportSettingsAndExportCompletions( const QString& dialogTitle, - const std::vector& wellPaths, - const std::vector& simWells ); + static void prepareExportSettingsAndExportCompletions( const QString& dialogTitle, const std::vector& wellPaths ); protected: bool isCommandEnabled() const override; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp index 9788290fa4..1a0d2940a3 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp @@ -88,7 +88,6 @@ /// //-------------------------------------------------------------------------------------------------- void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::vector& wellPaths, - const std::vector& simWells, const RicExportCompletionDataSettingsUi& exportSettings ) { if ( exportSettings.caseToApply() == nullptr ) @@ -223,6 +222,9 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v if ( exportSettings.includeFishbones ) { + // Make sure the start and end location is computed if needed + wellPathLateral->fishbonesCollection()->computeStartAndEndLocation(); + std::vector fishbonesCompletionData = RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPathLateral, exportSettings ); @@ -281,28 +283,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v } } - for ( auto simWell : simWells ) - { - std::map> completionsPerEclipseCell; - - std::vector fractureCompletionData = RicExportFractureCompletionsImpl:: - generateCompdatValuesForSimWell( exportSettings.caseToApply(), - simWell, - fractureTransmissibilityExportInformationStream.get(), - RicExportFractureCompletionsImpl:: - PressureDepletionParameters( exportSettings.performTransScaling(), - exportSettings.transScalingTimeStep(), - exportSettings.transScalingWBHPSource(), - exportSettings.transScalingWBHP() ) ); - - appendCompletionData( &completionsPerEclipseCell, fractureCompletionData ); - - for ( auto& data : completionsPerEclipseCell ) - { - completions.push_back( combineEclipseCellCompletions( data.second, exportSettings ) ); - } - } - const QString eclipseCaseName = exportSettings.caseToApply->caseUserDescription(); if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::UNIFIED_FILE ) @@ -413,35 +393,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v } } } - - // Export sim wells - if ( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL || - exportSettings.fileSplit == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL_AND_COMPLETION_TYPE ) - { - for ( auto simWell : simWells ) - { - std::vector wellCompletions; - for ( const auto& completion : completions ) - { - if ( completion.wellName() == simWell->name() ) - { - wellCompletions.push_back( completion ); - } - } - - if ( wellCompletions.empty() ) continue; - - QString fileName = QString( "%1_Fractures_%2" ).arg( simWell->name() ).arg( eclipseCaseName ); - sortAndExportCompletionsToFile( exportSettings.caseToApply, - exportSettings.folder, - fileName, - wellCompletions, - fractureDataReportItems, - exportSettings.compdatExport, - exportSettings.exportDataSourceAsComment(), - exportSettings.exportWelspec() ); - } - } } if ( exportSettings.includeMsw ) diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h index 7668f3e278..45bc91dfda 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.h @@ -38,7 +38,6 @@ class RigEclipseCaseData; class RigMainGrid; class RimEclipseCase; class RimFishbones; -class RimSimWellInView; class RimPerforationInterval; class RimWellPath; class RimWellPathValve; @@ -117,9 +116,7 @@ public: const RimNonDarcyPerforationParameters* nonDarcyParameters, const double effectivePermeability ); - static void exportCompletions( const std::vector& wellPaths, - const std::vector& simWells, - const RicExportCompletionDataSettingsUi& exportSettings ); + static void exportCompletions( const std::vector& wellPaths, const RicExportCompletionDataSettingsUi& exportSettings ); static std::vector computeStaticCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase ); diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/CorrelationPlotCommands/CMakeLists_files.cmake index fd833d71a8..9a903aec0f 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/CMakeLists_files.cmake @@ -3,6 +3,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicNewCorrelationReportPlotFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewCorrelationMatrixPlotFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewParameterResultCrossPlotFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicCreateEnsembleFromFilteredCasesFeature.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -10,14 +11,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicNewCorrelationMatrixPlotFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewParameterResultCrossPlotFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewCorrelationReportPlotFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicCreateEnsembleFromFilteredCasesFeature.cpp ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\CorrelationPlotCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicCreateEnsembleFromFilteredCasesFeature.cpp b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicCreateEnsembleFromFilteredCasesFeature.cpp new file mode 100644 index 0000000000..3fa82f1355 --- /dev/null +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicCreateEnsembleFromFilteredCasesFeature.cpp @@ -0,0 +1,126 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicCreateEnsembleFromFilteredCasesFeature.h" + +#include "RiaLogging.h" + +#include "RicImportEnsembleFeature.h" + +#include "RimCorrelationPlot.h" +#include "RimCorrelationPlotCollection.h" +#include "RimCorrelationReportPlot.h" +#include "RimEnsembleCurveSet.h" +#include "RimParameterResultCrossPlot.h" +#include "RimSummaryCase.h" +#include "RimSummaryEnsemble.h" + +#include "cafSelectionManager.h" +#include "cafSelectionManagerTools.h" + +#include + +CAF_CMD_SOURCE_INIT( RicCreateEnsembleFromFilteredCasesFeature, "RicCreateEnsembleFromFilteredCasesFeature" ); + +namespace internal +{ +RimParameterResultCrossPlot* selectedCrossPlot() +{ + auto selectedPlots = caf::selectedObjectsByTypeStrict(); + if ( selectedPlots.size() == 1 ) return selectedPlots.front(); + + if ( auto reportPlot = caf::firstAncestorOfTypeFromSelectedObject() ) + { + return reportPlot->crossPlot(); + } + + return nullptr; +} + +RimEnsembleCurveSet* ensembleCurveSet() +{ + return caf::firstAncestorOfTypeFromSelectedObject(); +} +} // namespace internal + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicCreateEnsembleFromFilteredCasesFeature::isCommandEnabled() const +{ + if ( internal::ensembleCurveSet() != nullptr ) return true; + + return internal::selectedCrossPlot() != nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateEnsembleFromFilteredCasesFeature::onActionTriggered( bool isChecked ) +{ + std::vector casesForNewEnsemble; + + if ( auto crossPlot = internal::selectedCrossPlot() ) + { + auto excludedCases = crossPlot->summaryCasesExcludedByFilter(); + if ( !excludedCases.empty() ) + { + if ( auto ensemble = excludedCases.front()->ensemble() ) + { + auto casesForNewEnsemble = ensemble->allSummaryCases(); + for ( auto excludedCase : excludedCases ) + { + casesForNewEnsemble.erase( std::remove( casesForNewEnsemble.begin(), casesForNewEnsemble.end(), excludedCase ), + casesForNewEnsemble.end() ); + } + } + } + } + + if ( auto curveSet = internal::ensembleCurveSet() ) + { + if ( auto ensemble = curveSet->summaryEnsemble() ) + { + casesForNewEnsemble = curveSet->filterEnsembleCases( ensemble->allSummaryCases() ); + } + } + + if ( casesForNewEnsemble.empty() ) + { + RiaLogging::info( "No filtered cases found, no ensemble created." ); + return; + } + + if ( auto newEnsemble = RicImportEnsembleFeature::createSummaryEnsemble( casesForNewEnsemble ) ) + { + RiaLogging::info( "Created ensemble " + newEnsemble->name() ); + } + else + { + RiaLogging::error( "Failed to create ensemble from filtered cases." ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateEnsembleFromFilteredCasesFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setIcon( QIcon( ":/SummaryEnsemble.svg" ) ); + actionToSetup->setText( "Create Ensemble from Filtered Cases" ); +} diff --git a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicCreateEnsembleFromFilteredCasesFeature.h similarity index 88% rename from ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h rename to ApplicationLibCode/Commands/CorrelationPlotCommands/RicCreateEnsembleFromFilteredCasesFeature.h index 2e3ce2a30b..8ea3f6bdd3 100644 --- a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicCreateEnsembleFromFilteredCasesFeature.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2016- Statoil ASA +// Copyright (C) 2025 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 @@ -20,18 +20,14 @@ #include "cafCmdFeature.h" -#include - -class RimSummaryCase; - //================================================================================================== /// //================================================================================================== -class RicConvertGroupToEnsembleFeature : public caf::CmdFeature +class RicCreateEnsembleFromFilteredCasesFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; -protected: +private: bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CrossSectionCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/CrossSectionCommands/CMakeLists_files.cmake index bb0d00bef9..efc61812f2 100644 --- a/ApplicationLibCode/Commands/CrossSectionCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/CrossSectionCommands/CMakeLists_files.cmake @@ -21,11 +21,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\CrossSection" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/EclipseCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/EclipseCommands/CMakeLists_files.cmake index b829a33814..e2a8537a0a 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/EclipseCommands/CMakeLists_files.cmake @@ -22,6 +22,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicImportRoffCaseFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicAddGridCalculationFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCaseEnsemblesFromFilesFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicAddLinkedEclipsePropertyFilterFeature.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -48,14 +49,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicImportRoffCaseFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicAddGridCalculationFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCaseEnsemblesFromFilesFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicAddLinkedEclipsePropertyFilterFeature.cpp ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\Eclipse" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake index 4c50fc6d14..9eaff0d640 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake @@ -1,19 +1,14 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicEclipseWellFeatureImpl.h ${CMAKE_CURRENT_LIST_DIR}/RicEclipseWellShowFeatures.h + ${CMAKE_CURRENT_LIST_DIR}/RicCreateWellPathFromSimulationWellFeature.h ) set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicEclipseWellFeatureImpl.cpp ${CMAKE_CURRENT_LIST_DIR}/RicEclipseWellShowFeatures.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicCreateWellPathFromSimulationWellFeature.cpp ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\Eclipse\\Well" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicCreateWellPathFromSimulationWellFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicCreateWellPathFromSimulationWellFeature.cpp new file mode 100644 index 0000000000..60e10d88ae --- /dev/null +++ b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicCreateWellPathFromSimulationWellFeature.cpp @@ -0,0 +1,150 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicCreateWellPathFromSimulationWellFeature.h" + +#include "RiaColorTables.h" + +#include "RicEclipseWellFeatureImpl.h" + +#include "RimEclipseCase.h" +#include "RimModeledWellPath.h" +#include "RimProject.h" +#include "RimSimWellInView.h" +#include "RimSimWellInViewCollection.h" +#include "RimTools.h" +#include "RimWellPath.h" +#include "RimWellPathCollection.h" +#include "RimWellPathGeometryDef.h" + +#include "Riu3DMainWindowTools.h" + +#include "Well/RigSimulationWellCenterLineCalculator.h" + +#include "cvfVector3.h" + +#include + +CAF_CMD_SOURCE_INIT( RicCreateWellPathFromSimulationWellFeature, "RicCreateWellPathFromSimulationWellFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateWellPathFromSimulationWellFeature::onActionTriggered( bool isChecked ) +{ + auto createWellPathForSimulationWell = []( const RimSimWellInView& simulationWell ) -> std::vector + { + auto simWellCellBranches = simulationWell.wellBranchesForVisualization(); + const auto& [coords, wellCells] = RigSimulationWellCenterLineCalculator::extractBranchData( simWellCellBranches ); + + if ( coords.empty() ) return {}; + + // Take only the first branch. + return coords.front(); + }; + + auto filterWellPathPoints = []( const std::vector& wellPathPoints, double distance ) + { + std::vector filteredWellPathPoints; + if ( wellPathPoints.size() > 2 ) + { + // Always keep first point + filteredWellPathPoints.push_back( wellPathPoints.front() ); + + // Keep only points that are a given distance apart to get + // reasonable number of them in the well path. + size_t lastUsedPoint = 0; + for ( size_t i = 1; i < wellPathPoints.size() - 1; i++ ) + { + if ( wellPathPoints[lastUsedPoint].pointDistance( wellPathPoints[i] ) > distance ) + { + filteredWellPathPoints.push_back( wellPathPoints[i] ); + lastUsedPoint = i; + } + } + + // Always keep last point + filteredWellPathPoints.push_back( wellPathPoints.back() ); + } + + return filteredWellPathPoints; + }; + + std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); + + RimProject* project = RimProject::current(); + if ( !project ) return; + + RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection(); + if ( !wellPathCollection ) return; + + std::vector newWellPaths; + + size_t numAddedWells = 0; + size_t modelledWellpathCount = wellPathCollection->modelledWellPathCount(); + + RimModeledWellPath* lastAddedWell = nullptr; + for ( const RimSimWellInView* simulationWell : selection ) + { + auto wellPathPoints = createWellPathForSimulationWell( *simulationWell ); + + std::vector filteredWellPathPoints = filterWellPathPoints( wellPathPoints, 100.0 ); + + // Need at least two points to add create a well + if ( filteredWellPathPoints.size() >= 2 ) + { + auto newModeledWellPath = new RimModeledWellPath(); + newModeledWellPath->geometryDefinition()->createAndInsertTargets( filteredWellPathPoints ); + newModeledWellPath->createWellPathGeometry(); + newModeledWellPath->setUnitSystem( project->commonUnitSystemForAllCases() ); + + newModeledWellPath->setWellPathColor( + RiaColorTables::editableWellPathsPaletteColors().cycledColor3f( modelledWellpathCount + numAddedWells ) ); + + newModeledWellPath->setName( simulationWell->name ); + newWellPaths.push_back( newModeledWellPath ); + + lastAddedWell = newModeledWellPath; + numAddedWells++; + } + } + + wellPathCollection->addWellPaths( newWellPaths ); + wellPathCollection->uiCapability()->updateConnectedEditors(); + + project->scheduleCreateDisplayModelAndRedrawAllViews(); + + if ( lastAddedWell ) Riu3DMainWindowTools::selectAsCurrentItem( lastAddedWell->geometryDefinition() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateWellPathFromSimulationWellFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setText( "Create Well Path" ); + actionToSetup->setIcon( QIcon( ":/Well.svg" ) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicCreateWellPathFromSimulationWellFeature::isCommandEnabled() const +{ + return RicEclipseWellFeatureImpl::isAnyWellSelected(); +} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicCreateWellPathFromSimulationWellFeature.h similarity index 90% rename from ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h rename to ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicCreateWellPathFromSimulationWellFeature.h index 3360ff858a..0ca585d351 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicCreateWellPathFromSimulationWellFeature.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2016- Statoil ASA +// Copyright (C) 2025 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 @@ -20,12 +20,10 @@ #include "cafCmdFeature.h" -#include - //================================================================================================== /// //================================================================================================== -class RicNewSimWellFractureFeature : public caf::CmdFeature +class RicCreateWellPathFromSimulationWellFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; diff --git a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicAddLinkedEclipsePropertyFilterFeature.cpp similarity index 50% rename from ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp rename to ApplicationLibCode/Commands/EclipseCommands/RicAddLinkedEclipsePropertyFilterFeature.cpp index 3196571cfc..48c6ef1cc9 100644 --- a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicAddLinkedEclipsePropertyFilterFeature.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2016- Statoil ASA +// Copyright (C) 2024- 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 @@ -16,67 +16,55 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RicConvertGroupToEnsembleFeature.h" +#include "RicAddLinkedEclipsePropertyFilterFeature.h" -#include "RiaPreferences.h" +#include "RicEclipsePropertyFilterFeatureImpl.h" -#include "RicCreateSummaryCaseCollectionFeature.h" -#include "RicImportEnsembleFeature.h" +#include "RimEclipsePropertyFilter.h" +#include "RimEclipsePropertyFilterCollection.h" -#include "RifSummaryCaseRestartSelector.h" - -#include "RimMainPlotCollection.h" -#include "RimOilField.h" -#include "RimProject.h" -#include "RimSummaryCase.h" -#include "RimSummaryCaseMainCollection.h" -#include "RimSummaryEnsemble.h" - -#include "RiuMainWindow.h" -#include "RiuPlotMainWindow.h" - -#include "cafSelectionManagerTools.h" +#include "Riu3DMainWindowTools.h" #include -#include -CAF_CMD_SOURCE_INIT( RicConvertGroupToEnsembleFeature, "RicConvertGroupToEnsembleFeature" ); +CAF_CMD_SOURCE_INIT( RicAddLinkedEclipsePropertyFilterFeature, "RicAddLinkedEclipsePropertyFilterFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicConvertGroupToEnsembleFeature::isCommandEnabled() const +bool RicAddLinkedEclipsePropertyFilterFeature::isCommandEnabled() const { - const auto& selGroups = caf::selectedObjectsByTypeStrict(); - if ( selGroups.empty() ) return false; - - for ( const auto& group : selGroups ) + auto filterCollections = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilterCollections(); + if ( filterCollections.size() == 1 ) { - if ( !group->isEnsemble() ) return true; + return RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable( filterCollections[0] ); } + return false; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicConvertGroupToEnsembleFeature::onActionTriggered( bool isChecked ) +void RicAddLinkedEclipsePropertyFilterFeature::onActionTriggered( bool isChecked ) { - const auto& selGroups = caf::selectedObjectsByTypeStrict(); + auto filterCollections = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilterCollections(); - for ( const auto& group : selGroups ) + if ( filterCollections.size() == 1 ) { - if ( group->isEnsemble() ) continue; + auto coll = filterCollections[0]; + auto filter = coll->addFilterLinkedToCellResult(); + coll->updateAllRequiredEditors(); - group->setAsEnsemble( true ); + Riu3DMainWindowTools::setExpanded( filter ); } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicConvertGroupToEnsembleFeature::setupActionLook( QAction* actionToSetup ) +void RicAddLinkedEclipsePropertyFilterFeature::setupActionLook( QAction* actionToSetup ) { - actionToSetup->setIcon( QIcon( ":/SummaryEnsemble.svg" ) ); - actionToSetup->setText( "Convert to Ensemble" ); + actionToSetup->setIcon( QIcon( ":/CellFilter_Values.png" ) ); + actionToSetup->setText( "Add Property Filter Linked to Cell Result" ); } diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicAddLinkedEclipsePropertyFilterFeature.h similarity index 90% rename from ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h rename to ApplicationLibCode/Commands/EclipseCommands/RicAddLinkedEclipsePropertyFilterFeature.h index 18437a7ac3..fa7624920c 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicAddLinkedEclipsePropertyFilterFeature.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2016- Statoil ASA +// Copyright (C) 2024- 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 @@ -20,17 +20,15 @@ #include "cafCmdFeature.h" -#include - //================================================================================================== /// //================================================================================================== -class RicNewSimWellFractureAtPosFeature : public caf::CmdFeature +class RicAddLinkedEclipsePropertyFilterFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.cpp index 2810064dcd..b353fb55a5 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.cpp @@ -20,11 +20,18 @@ #include "RiaApplication.h" #include "RiaImportEclipseCaseTools.h" +#include "RiaLogging.h" #include "RicCreateGridCaseGroupFromFilesFeature.h" +#include "RicImportFormationNamesFeature.h" #include "RicNewViewFeature.h" #include "RicRecursiveFileSearchDialog.h" +#include "RigFormationNames.h" + +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" +#include "Formations/RimFormationTools.h" #include "Rim3dView.h" #include "RimEclipseCaseCollection.h" #include "RimEclipseCaseEnsemble.h" @@ -35,8 +42,10 @@ #include "cafProgressInfo.h" #include "cafSelectionManager.h" +#include "cafUtils.h" #include +#include #include CAF_CMD_SOURCE_INIT( RicCreateGridCaseEnsemblesFromFilesFeature, "RicCreateGridCaseEnsemblesFromFilesFeature" ); @@ -51,7 +60,7 @@ void RicCreateGridCaseEnsemblesFromFilesFeature::onActionTriggered( bool isCheck std::vector gridEnsembles; - if ( groupByEnsemble == RiaEnsembleNameTools::EnsembleGroupingMode::NONE ) + if ( groupByEnsemble == RiaDefines::EnsembleGroupingMode::NONE ) { gridEnsembles.push_back( importSingleGridCaseEnsemble( fileNames ) ); } @@ -102,12 +111,12 @@ RimEclipseCaseEnsemble* RicCreateGridCaseEnsemblesFromFilesFeature::importSingle auto eclipseCaseEnsemble = new RimEclipseCaseEnsemble; QString ensembleNameSuggestion = - RiaEnsembleNameTools::findSuitableEnsembleName( fileNames, RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); + RiaEnsembleNameTools::findSuitableEnsembleName( fileNames, RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); eclipseCaseEnsemble->setName( ensembleNameSuggestion ); caf::ProgressInfo progInfo( fileNames.size() + 1, "Creating Grid Ensembles" ); - for ( auto caseFileName : fileNames ) + for ( const auto& caseFileName : fileNames ) { auto task = progInfo.task( "Loading files", 1 ); @@ -115,9 +124,19 @@ RimEclipseCaseEnsemble* RicCreateGridCaseEnsemblesFromFilesFeature::importSingle QString caseName = gridFileName.completeBaseName(); - auto* rimResultReservoir = new RimEclipseResultCase(); - rimResultReservoir->setCaseInfo( caseName, caseFileName ); - eclipseCaseEnsemble->addCase( rimResultReservoir ); + auto* rimResultCase = new RimEclipseResultCase(); + rimResultCase->setDisplayNameType( RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME ); + rimResultCase->setCaseInfo( caseName, caseFileName ); + eclipseCaseEnsemble->addCase( rimResultCase ); + + auto folderNames = RimFormationTools::formationFoldersFromCaseFileName( caseFileName ); + RimFormationNames* formations = RimFormationTools::loadFormationNamesFromFolder( folderNames ); + if ( formations != nullptr ) rimResultCase->setFormationNames( formations ); + } + + for ( auto gridCase : eclipseCaseEnsemble->cases() ) + { + gridCase->updateAutoShortName(); } oilfield->analysisModels()->caseEnsembles.push_back( eclipseCaseEnsemble ); @@ -129,7 +148,7 @@ RimEclipseCaseEnsemble* RicCreateGridCaseEnsemblesFromFilesFeature::importSingle //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair +std::pair RicCreateGridCaseEnsemblesFromFilesFeature::runRecursiveFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName ) { RiaApplication* app = RiaApplication::instance(); @@ -147,7 +166,7 @@ std::pair m_pathFilter = result.pathFilter; m_fileNameFilter = result.fileNameFilter; - if ( !result.ok ) return std::make_pair( QStringList(), RiaEnsembleNameTools::EnsembleGroupingMode::NONE ); + if ( !result.ok ) return std::make_pair( QStringList(), RiaDefines::EnsembleGroupingMode::NONE ); // Remember the path to next time app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() ); diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.h index 653f348c17..1625e8d6c1 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseEnsemblesFromFilesFeature.h @@ -25,6 +25,7 @@ #include class RimEclipseCaseEnsemble; +class RimFormationNames; //================================================================================================== /// @@ -44,9 +45,9 @@ protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - RimEclipseCaseEnsemble* importSingleGridCaseEnsemble( const QStringList& fileNames ); - std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, - const QString& pathCacheName ); + RimEclipseCaseEnsemble* importSingleGridCaseEnsemble( const QStringList& fileNames ); + std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, + const QString& pathCacheName ); private: QString m_pathFilter; diff --git a/ApplicationLibCode/Commands/ExportCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/ExportCommands/CMakeLists_files.cmake index 1359063661..10f2d6ff8c 100644 --- a/ApplicationLibCode/Commands/ExportCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/ExportCommands/CMakeLists_files.cmake @@ -66,11 +66,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\Export" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp index 96b0ef351c..80bc128e7a 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp @@ -77,7 +77,6 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS int viewId /*= -1*/ ) { RimProject* project = RimProject::current(); - if ( project == nullptr ) return; QDir snapshotPath( snapshotFolderName ); @@ -86,61 +85,65 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS if ( !snapshotPath.mkpath( "." ) ) return; } - const QString absSnapshotPath = snapshotPath.absolutePath(); - - RiaLogging::info( QString( "Exporting snapshot of all views to %1" ).arg( snapshotFolderName ) ); - - std::vector projectCases = project->allGridCases(); - for ( size_t i = 0; i < projectCases.size(); i++ ) + std::vector viewsForSnapshot; + if ( caseId == -1 && viewId == -1 ) { - RimCase* cas = projectCases[i]; - if ( !cas ) continue; - - bool matchingCaseId = caseId == -1 || caseId == cas->caseId(); - if ( !matchingCaseId ) continue; - - std::vector views = cas->views(); - - for ( size_t j = 0; j < views.size(); j++ ) + viewsForSnapshot = project->allViews(); + } + else + { + for ( auto gridCase : project->allGridCases() ) { - Rim3dView* riv = views[j]; + if ( !gridCase ) continue; - if ( riv && riv->viewer() && ( viewId == -1 || viewId == riv->id() ) ) + bool matchingCaseId = caseId == -1 || caseId == gridCase->caseId(); + if ( !matchingCaseId ) continue; + + for ( auto view : gridCase->views() ) { - RiaApplication::instance()->setActiveReservoirView( riv ); - - RiuViewer* viewer = riv->viewer(); - Riu3DMainWindowTools::setActiveViewer( viewer->layoutWidget() ); - - RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate(); - RiaPlotWindowRedrawScheduler::instance()->clearAllScheduledUpdates(); - - // riv->updateCurrentTimeStepAndRedraw(); - riv->createDisplayModelAndRedraw(); - viewer->repaint(); - - QString fileName = RicSnapshotFilenameGenerator::generateSnapshotFileName( riv ); - if ( !prefix.isEmpty() ) + if ( view && view->viewer() && ( viewId == -1 || viewId == view->id() ) ) { - fileName = prefix + fileName; - } - - QString absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath, fileName, ".png" ); - - RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, riv ); - - // Statistics dialog - - RimGridView* rigv = dynamic_cast( riv ); - if ( rigv ) - { - QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage(); - absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath, fileName + "_Statistics", ".png" ); - RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, img ); + viewsForSnapshot.push_back( view ); } } } } + + const QString absSnapshotPath = snapshotPath.absolutePath(); + RiaLogging::info( QString( "Exporting snapshot of all views to %1" ).arg( snapshotFolderName ) ); + + for ( auto riv : viewsForSnapshot ) + { + RiuViewer* viewer = riv->viewer(); + if ( !viewer ) continue; + + RiaApplication::instance()->setActiveReservoirView( riv ); + + Riu3DMainWindowTools::setActiveViewer( viewer->layoutWidget() ); + + RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate(); + RiaPlotWindowRedrawScheduler::instance()->clearAllScheduledUpdates(); + + riv->createDisplayModelAndRedraw(); + viewer->repaint(); + + QString fileName = RicSnapshotFilenameGenerator::generateSnapshotFileName( riv ); + if ( !prefix.isEmpty() ) + { + fileName = prefix + fileName; + } + + QString absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath, fileName, ".png" ); + + RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, riv ); + + if ( RimGridView* rigv = dynamic_cast( riv ) ) + { + QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage(); + absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath, fileName + "_Statistics", ".png" ); + RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, img ); + } + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotFilenameGenerator.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotFilenameGenerator.cpp index 358e6b5dc3..37ff774e37 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotFilenameGenerator.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotFilenameGenerator.cpp @@ -62,13 +62,21 @@ QString RicSnapshotFilenameGenerator::generateSnapshotFileName( RimViewWindow* v //-------------------------------------------------------------------------------------------------- QString RicSnapshotFilenameGenerator::generateSnapshotFilenameForRimView( Rim3dView* rimView ) { - QStringList timeSteps = rimView->ownerCase()->timeStepStrings(); + QStringList timeSteps = rimView->timeStepStrings(); int timeStep = rimView->currentTimeStep(); - QString fileName = - QString( "%1_%2_%3" ).arg( rimView->ownerCase()->caseUserDescription() ).arg( rimView->name() ).arg( resultName( rimView ) ); + auto name = rimView->name(); + if ( name.isEmpty() ) name = rimView->autoName(); - if ( !timeSteps.empty() ) fileName += QString( "_%1_%2" ).arg( timeStep, 2, 10, QChar( '0' ) ).arg( timeSteps[timeStep] ); + QString caseName; + if ( rimView && rimView->ownerCase() ) + { + caseName = rimView->ownerCase()->caseUserDescription(); + } + + QString fileName = QString( "%1_%2_%3" ).arg( caseName ).arg( name ).arg( resultName( rimView ) ); + + if ( timeStep < timeSteps.size() ) fileName += QString( "_%1_%2" ).arg( timeStep, 2, 10, QChar( '0' ) ).arg( timeSteps[timeStep] ); fileName = makeValidFileName( fileName ); diff --git a/ApplicationLibCode/Commands/FlowCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/FlowCommands/CMakeLists_files.cmake index 6e352f3780..8dbaeba74b 100644 --- a/ApplicationLibCode/Commands/FlowCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/FlowCommands/CMakeLists_files.cmake @@ -27,11 +27,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\FlowDiagnostics" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp index 49875ef8b4..749ec13cfe 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp @@ -19,8 +19,8 @@ #include "RicPlotProductionRateFeature.h" #include "RiaGuiApplication.h" - -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" +#include "Summary/RiaSummaryTools.h" #include "RifEclipseSummaryAddress.h" #include "RifSummaryReaderInterface.h" @@ -40,7 +40,6 @@ #include "RimSummaryCurveAppearanceCalculator.h" #include "RimSummaryMultiPlot.h" #include "RimSummaryPlot.h" -#include "Summary/RiaSummaryTools.h" #include "RiuPlotMainWindow.h" @@ -101,7 +100,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked ) description += well->name(); RimSummaryPlot* plot = new RimSummaryPlot(); plot->setUiName( description ); - RimSummaryMultiPlot* multiPlot = RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot ); + RimSummaryMultiPlot* multiPlot = RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( plot ); if ( RimSimWellInViewTools::isInjector( well ) ) { @@ -256,11 +255,8 @@ RimSummaryCurve* RicPlotProductionRateFeature::addSummaryCurve( RimSummaryPlot* return nullptr; } - RimSummaryCurve* newCurve = new RimSummaryCurve(); + auto newCurve = RiaSummaryPlotTools::createCurve( summaryCase, addr ); plot->addCurveAndUpdate( newCurve ); - - newCurve->setSummaryCaseY( summaryCase ); - newCurve->setSummaryAddressY( addr ); newCurve->setColor( color ); newCurve->setLeftOrRightAxisY( RiuPlotAxis( plotAxis ) ); newCurve->loadDataAndUpdate( true ); diff --git a/ApplicationLibCode/Commands/FractureCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/FractureCommands/CMakeLists_files.cmake index e9061068e8..7b52181305 100644 --- a/ApplicationLibCode/Commands/FractureCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/FractureCommands/CMakeLists_files.cmake @@ -6,8 +6,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicFractureNameGenerator.h ${CMAKE_CURRENT_LIST_DIR}/RicNewEllipseFractureTemplateFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureAtPosFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewThermalFractureTemplateFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.h @@ -32,8 +30,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicFractureNameGenerator.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewEllipseFractureTemplateFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureAtPosFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicNewSimWellFractureFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewThermalFractureTemplateFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.cpp @@ -51,15 +47,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND COMMAND_QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RicCreateMultipleFracturesFeature.h -) - -source_group( - "CommandFeature\\Fracture" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp deleted file mode 100644 index dd21cf7e95..0000000000 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp +++ /dev/null @@ -1,143 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2016- Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicNewSimWellFractureAtPosFeature.h" - -#include "RiaApplication.h" -#include "RigEclipseCaseData.h" - -#include "Rim3dView.h" -#include "RimCase.h" -#include "RimEclipseResultCase.h" -#include "RimEclipseView.h" -#include "RimEllipseFractureTemplate.h" -#include "RimFractureTemplateCollection.h" -#include "RimOilField.h" -#include "RimProject.h" -#include "RimSimWellFracture.h" -#include "RimSimWellFractureCollection.h" -#include "RimSimWellInView.h" -#include "RimStimPlanColors.h" - -#include "Riu3DMainWindowTools.h" -#include "Riu3dSelectionManager.h" -#include "RivSimWellPipeSourceInfo.h" - -#include "cafSelectionManager.h" - -#include "cvfAssert.h" - -#include - -CAF_CMD_SOURCE_INIT( RicNewSimWellFractureAtPosFeature, "RicNewSimWellFractureAtPosFeature" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicNewSimWellFractureAtPosFeature::onActionTriggered( bool isChecked ) -{ - RimProject* proj = RimProject::current(); - if ( proj->allFractureTemplates().empty() ) return; - - Rim3dView* activeView = RiaApplication::instance()->activeReservoirView(); - if ( !activeView ) return; - - Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance(); - RiuSelectionItem* selItem = riuSelManager->selectedItem( Riu3dSelectionManager::RUI_TEMPORARY ); - - RiuSimWellSelectionItem* simWellItem = static_cast( selItem ); - if ( !simWellItem ) return; - - RimSimWellInView* simWell = simWellItem->m_simWell; - if ( !simWell ) return; - - RimSimWellFractureCollection* fractureCollection = simWell->simwellFractureCollection(); - if ( !fractureCollection ) return; - - RimSimWellFracture* fracture = new RimSimWellFracture(); - if ( fractureCollection->simwellFractures.empty() ) - { - RimEclipseView* eclipseView = dynamic_cast( RiaApplication::instance()->activeReservoirView() ); - if ( eclipseView ) - { - eclipseView->fractureColors()->setDefaultResultName(); - } - } - - fractureCollection->simwellFractures.push_back( fracture ); - - fracture->setClosestWellCoord( simWellItem->m_domainCoord, simWellItem->m_branchIndex ); - - RimOilField* oilfield = RimProject::current()->activeOilField(); - if ( !oilfield ) return; - - std::vector oldFractures = oilfield->descendantsIncludingThisOfType(); - QString fracNum = QString( "%1" ).arg( oldFractures.size(), 2, 10, QChar( '0' ) ); - - fracture->setName( QString( "Fracture_" ) + fracNum ); - - auto unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN; - { - RimEclipseResultCase* eclipseCase = simWell->firstAncestorOrThisOfType(); - if ( eclipseCase ) - { - unitSet = eclipseCase->eclipseCaseData()->unitsType(); - } - - fracture->setFractureUnit( unitSet ); - } - - RimFractureTemplate* fracDef = oilfield->fractureDefinitionCollection()->firstFractureOfUnit( unitSet ); - fracture->setFractureTemplate( fracDef ); - - simWell->updateConnectedEditors(); - - activeView->scheduleCreateDisplayModelAndRedraw(); - - auto eclipseCase = simWell->firstAncestorOrThisOfType(); - if ( eclipseCase ) - { - proj->reloadCompletionTypeResultsForEclipseCase( eclipseCase ); - fractureCollection->updateConnectedEditors(); - } - Riu3DMainWindowTools::selectAsCurrentItem( fracture ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicNewSimWellFractureAtPosFeature::setupActionLook( QAction* actionToSetup ) -{ - actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) ); - actionToSetup->setText( "Create Fracture" ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewSimWellFractureAtPosFeature::isCommandEnabled() const -{ - RimProject* proj = RimProject::current(); - if ( proj->allFractureTemplates().empty() ) return false; - - auto objHandle = caf::SelectionManager::instance()->selectedItemOfType(); - if ( !objHandle ) return false; - - RimSimWellInView* eclipseWell = objHandle->firstAncestorOrThisOfType(); - return eclipseWell != nullptr; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp deleted file mode 100644 index ce7a15c5d3..0000000000 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp +++ /dev/null @@ -1,127 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2016- Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicNewSimWellFractureFeature.h" - -#include "RicFractureNameGenerator.h" - -#include "RiaApplication.h" -#include "RigEclipseCaseData.h" - -#include "RimCase.h" -#include "RimEclipseCase.h" -#include "RimEclipseResultCase.h" -#include "RimEclipseView.h" -#include "RimEllipseFractureTemplate.h" -#include "RimFractureTemplateCollection.h" -#include "RimOilField.h" -#include "RimProject.h" -#include "RimSimWellFracture.h" -#include "RimSimWellFractureCollection.h" -#include "RimSimWellInView.h" -#include "RimStimPlanColors.h" - -#include "Riu3DMainWindowTools.h" - -#include "cafSelectionManager.h" - -#include "cvfAssert.h" - -#include - -CAF_CMD_SOURCE_INIT( RicNewSimWellFractureFeature, "RicNewSimWellFractureFeature" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicNewSimWellFractureFeature::onActionTriggered( bool isChecked ) -{ - RimProject* proj = RimProject::current(); - if ( proj->allFractureTemplates().empty() ) return; - - auto objHandle = caf::SelectionManager::instance()->selectedItemOfType(); - if ( !objHandle ) return; - - auto eclipseWell = objHandle->firstAncestorOrThisOfType(); - - RimSimWellFracture* fracture = new RimSimWellFracture(); - if ( eclipseWell->simwellFractureCollection()->simwellFractures.empty() ) - { - RimEclipseView* activeView = dynamic_cast( RiaApplication::instance()->activeReservoirView() ); - if ( activeView ) - { - activeView->fractureColors()->setDefaultResultName(); - } - } - - eclipseWell->simwellFractureCollection()->simwellFractures.push_back( fracture ); - - auto oilfield = objHandle->firstAncestorOrThisOfType(); - if ( !oilfield ) return; - - fracture->setName( RicFractureNameGenerator::nameForNewFracture() ); - - auto unitSet = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN; - { - auto eclipseCase = objHandle->firstAncestorOrThisOfType(); - if ( eclipseCase ) - { - unitSet = eclipseCase->eclipseCaseData()->unitsType(); - } - fracture->setFractureUnit( unitSet ); - } - - RimFractureTemplate* fracDef = oilfield->fractureDefinitionCollection()->firstFractureOfUnit( unitSet ); - fracture->setFractureTemplate( fracDef ); - - fracture->updateFracturePositionFromLocation(); - - eclipseWell->updateConnectedEditors(); - - auto eclipseCase = objHandle->firstAncestorOrThisOfType(); - if ( eclipseCase ) - { - proj->reloadCompletionTypeResultsForEclipseCase( eclipseCase ); - eclipseWell->simwellFractureCollection()->updateConnectedEditors(); - } - Riu3DMainWindowTools::selectAsCurrentItem( fracture ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicNewSimWellFractureFeature::setupActionLook( QAction* actionToSetup ) -{ - actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) ); - actionToSetup->setText( "New Fracture" ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewSimWellFractureFeature::isCommandEnabled() const -{ - RimProject* proj = RimProject::current(); - if ( proj->allFractureTemplates().empty() ) return false; - - auto objHandle = caf::SelectionManager::instance()->selectedItemOfType(); - if ( !objHandle ) return false; - - auto simWell = objHandle->firstAncestorOrThisOfType(); - return simWell != nullptr; -} diff --git a/ApplicationLibCode/Commands/GeoMechCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/GeoMechCommands/CMakeLists_files.cmake index 556d4f23fe..d2ac8a1da9 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/GeoMechCommands/CMakeLists_files.cmake @@ -33,14 +33,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -# set (COMMAND_QT_MOC_HEADERS ${COMMAND_QT_MOC_HEADERS} -# ${CMAKE_CURRENT_LIST_DIR}/RicTextAnnotation3dEditor.h ) - -source_group( - "CommandFeature\\GeoMechCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterFeatureImpl.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterFeatureImpl.cpp index 337970eb90..9e9abb5e45 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterFeatureImpl.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterFeatureImpl.cpp @@ -124,9 +124,9 @@ void RicGeoMechPropertyFilterFeatureImpl::setDefaults( RimGeoMechPropertyFilter* RimGeoMechView* reservoirView = propertyFilterCollection->reservoirView(); CVF_ASSERT( reservoirView ); - propertyFilter->resultDefinition->setGeoMechCase( reservoirView->geoMechCase() ); - propertyFilter->resultDefinition->setResultAddress( reservoirView->cellResultResultDefinition()->resultAddress() ); - propertyFilter->resultDefinition->loadResult(); + propertyFilter->resultDefinition()->setGeoMechCase( reservoirView->geoMechCase() ); + propertyFilter->resultDefinition()->setResultAddress( reservoirView->cellResultResultDefinition()->resultAddress() ); + propertyFilter->resultDefinition()->loadResult(); propertyFilter->setToDefaultValues(); propertyFilter->updateFilterName(); } diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/GridCrossPlotCommands/CMakeLists_files.cmake index b5cd988aef..f989502def 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/CMakeLists_files.cmake @@ -17,11 +17,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\GridCrossPlot" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/HoloLensCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/HoloLensCommands/CMakeLists_files.cmake index ae9633376e..59c1463b26 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/HoloLensCommands/CMakeLists_files.cmake @@ -48,14 +48,3 @@ set(SOURCE_GROUP_SOURCE_FILES list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(COMMAND_QT_MOC_HEADERS - ${COMMAND_QT_MOC_HEADERS} ${CMAKE_CURRENT_LIST_DIR}/RicHoloLensRestClient.h - ${CMAKE_CURRENT_LIST_DIR}/RicExportToSharingServerScheduler.h -) - -source_group( - "CommandFeature\\HoloLens" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/IntersectionBoxCommands/CMakeLists_files.cmake index 2439f5fa1f..729d8ecb2e 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/CMakeLists_files.cmake @@ -19,16 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(COMMAND_QT_MOC_HEADERS - ${COMMAND_QT_MOC_HEADERS} - ${CMAKE_CURRENT_LIST_DIR}/RicBoxManipulatorEventHandler.h -) - -source_group( - "CommandFeature\\IntersectionBox" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/IntersectionViewCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/IntersectionViewCommands/CMakeLists_files.cmake index 1622024aa3..d43dedc651 100644 --- a/ApplicationLibCode/Commands/IntersectionViewCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/IntersectionViewCommands/CMakeLists_files.cmake @@ -7,11 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\IntersectionView" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/MeasurementCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/MeasurementCommands/CMakeLists_files.cmake index a375b3b2f9..c72c872af4 100644 --- a/ApplicationLibCode/Commands/MeasurementCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/MeasurementCommands/CMakeLists_files.cmake @@ -9,13 +9,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND COMMAND_QT_MOC_HEADERS) - -source_group( - "CommandFeature\\Measurement" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/OctaveScriptCommands/CMakeLists_files.cmake index dcd6da42fe..e451f3ed58 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/CMakeLists_files.cmake @@ -24,17 +24,5 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicRefreshScriptsFeature.cpp ) -set(COMMAND_QT_MOC_HEADERS - ${COMMAND_QT_MOC_HEADERS} - ${CMAKE_CURRENT_LIST_DIR}/RicExecuteScriptForCasesFeature.h -) - list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\Script" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/CMakeLists_files.cmake b/ApplicationLibCode/Commands/OperationsUsingObjReferences/CMakeLists_files.cmake index 26aece0cb1..8a85f4599c 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/CMakeLists_files.cmake @@ -21,11 +21,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\ObjReferences" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp index a91eab7c1d..76288ac307 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp @@ -21,10 +21,10 @@ #include "RicPasteFeatureImpl.h" +#include "ContourMap/RimEclipseContourMapView.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" #include "Rim2dIntersectionViewCollection.h" #include "RimEclipseCase.h" -#include "RimEclipseContourMapView.h" -#include "RimEclipseContourMapViewCollection.h" #include "RimEclipseView.h" #include "RimEclipseViewCollection.h" #include "RimSimWellInViewCollection.h" diff --git a/ApplicationLibCode/Commands/OsduCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/OsduCommands/CMakeLists_files.cmake index 2db99b5f03..b18b28cfbf 100644 --- a/ApplicationLibCode/Commands/OsduCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/OsduCommands/CMakeLists_files.cmake @@ -13,16 +13,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND COMMAND_QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RiuWellImportWizard.h - ${CMAKE_CURRENT_LIST_DIR}/RiuWellLogImportWizard.h -) - -source_group( - "CommandFeature\\Osdu" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/OsduCommands/RiuWellImportWizard.cpp b/ApplicationLibCode/Commands/OsduCommands/RiuWellImportWizard.cpp index c67d7ea910..5d6c244820 100644 --- a/ApplicationLibCode/Commands/OsduCommands/RiuWellImportWizard.cpp +++ b/ApplicationLibCode/Commands/OsduCommands/RiuWellImportWizard.cpp @@ -108,7 +108,11 @@ void RiuWellImportWizard::downloadWellPaths( const QString& wellboreId ) void RiuWellImportWizard::resetAuthenticationCount() { m_firstTimeRequestingAuthentication = true; - m_osduConnector->requestToken(); + + if ( !m_osduConnector->isGranted() ) + { + m_osduConnector->requestTokenWithCancelButton(); + } } //-------------------------------------------------------------------------------------------------- @@ -187,6 +191,8 @@ AuthenticationPage::AuthenticationPage( RiaOsduConnector* osduConnector, QWidget setLayout( layout ); connect( osduConnector, SIGNAL( tokenReady( const QString& ) ), this, SLOT( accessOk() ) ); + + if ( osduConnector->isGranted() ) accessOk(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/PlotBuilderCommands/CMakeLists_files.cmake index b404e37246..f88653a78c 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/CMakeLists_files.cmake @@ -1,6 +1,5 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicNewMultiPlotFeature.h - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryPlotBuilder.h ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryMultiPlotFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryPlotFromDataVectorFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryMultiPlotFromDataVectorFeature.h @@ -17,7 +16,6 @@ set(SOURCE_GROUP_HEADER_FILES set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicNewMultiPlotFeature.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryPlotBuilder.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryMultiPlotFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryPlotFromDataVectorFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryMultiPlotFromDataVectorFeature.cpp @@ -33,13 +31,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND COMMAND_QT_MOC_HEADERS) - -source_group( - "CommandFeature\\PlotBuilder" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp index d789b92ff9..e3ce134ae1 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp @@ -18,7 +18,8 @@ #include "RicAppendSummaryCurvesForObjectsFeature.h" -#include "RiaGuiApplication.h" +#include "Summary/RiaSummaryPlotTools.h" + #include "RicAppendSummaryPlotsForObjectsFeature.h" #include "RimSummaryMultiPlot.h" @@ -48,24 +49,21 @@ void RicAppendSummaryCurvesForObjectsFeature::onActionTriggered( bool isChecked auto sumAddressCollections = RicAppendSummaryPlotsForObjectsFeature::selectedCollections(); if ( sumAddressCollections.empty() ) return; - RiaGuiApplication* app = RiaGuiApplication::instance(); - - auto summaryMultiPlot = dynamic_cast( app->activePlotWindow() ); - if ( !summaryMultiPlot ) return; - - RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot( sumAddressCollections, summaryMultiPlot ); - - auto sourcePlots = summaryMultiPlot->summaryPlots(); - std::vector pdmObjects; for ( auto summaryAdrCollection : sumAddressCollections ) { pdmObjects.push_back( summaryAdrCollection ); } - for ( auto plot : sourcePlots ) + auto selectedMultiPlots = RiaSummaryPlotTools::selectedSummaryMultiPlots(); + for ( auto summaryMultiPlot : selectedMultiPlots ) { - plot->handleDroppedObjects( pdmObjects ); + if ( !RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot( sumAddressCollections, summaryMultiPlot ) ) continue; + + for ( auto plot : summaryMultiPlot->summaryPlots() ) + { + plot->handleDroppedObjects( pdmObjects ); + } } } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp index 68337c648f..b780b148e2 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp @@ -18,13 +18,9 @@ #include "RicAppendSummaryCurvesForSummaryAddressesFeature.h" -#include "RiaGuiApplication.h" - -#include "RicAppendSummaryPlotsForObjectsFeature.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimSummaryAddress.h" -#include "RimSummaryAddressCollection.h" -#include "RimSummaryCase.h" #include "RimSummaryMultiPlot.h" #include "RimSummaryPlot.h" @@ -47,17 +43,16 @@ bool RicAppendSummaryCurvesForSummaryAddressesFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicAppendSummaryCurvesForSummaryAddressesFeature::onActionTriggered( bool isChecked ) { - RiaGuiApplication* app = RiaGuiApplication::instance(); - - auto summaryMultiPlot = dynamic_cast( app->activePlotWindow() ); - if ( !summaryMultiPlot ) return; - auto addresses = selectedAddresses(); if ( addresses.empty() ) return; - for ( auto plot : summaryMultiPlot->summaryPlots() ) + auto selectedMultiPlots = RiaSummaryPlotTools::selectedSummaryMultiPlots(); + for ( auto summaryMultiPlot : selectedMultiPlots ) { - plot->handleDroppedObjects( addresses ); + for ( auto plot : summaryMultiPlot->summaryPlots() ) + { + plot->handleDroppedObjects( addresses ); + } } } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp index 93209a6ab2..f96ba92d0a 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp @@ -18,11 +18,8 @@ #include "RicAppendSummaryCurvesForSummaryCasesFeature.h" -#include "RiaGuiApplication.h" +#include "Summary/RiaSummaryPlotTools.h" -#include "RicAppendSummaryPlotsForObjectsFeature.h" - -#include "RimSummaryAddressCollection.h" #include "RimSummaryCase.h" #include "RimSummaryEnsemble.h" #include "RimSummaryMultiPlot.h" @@ -39,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicAppendSummaryCurvesForSummaryCasesFeature, "RicAppendSum //-------------------------------------------------------------------------------------------------- bool RicAppendSummaryCurvesForSummaryCasesFeature::isCommandEnabled() const { - return !selectedCases().empty(); + return !dragDropObjects().empty(); } //-------------------------------------------------------------------------------------------------- @@ -47,17 +44,16 @@ bool RicAppendSummaryCurvesForSummaryCasesFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicAppendSummaryCurvesForSummaryCasesFeature::onActionTriggered( bool isChecked ) { - RiaGuiApplication* app = RiaGuiApplication::instance(); + auto objectsForDrop = dragDropObjects(); + if ( objectsForDrop.empty() ) return; - auto summaryMultiPlot = dynamic_cast( app->activePlotWindow() ); - if ( !summaryMultiPlot ) return; - - auto cases = selectedCases(); - if ( cases.empty() ) return; - - for ( auto plot : summaryMultiPlot->summaryPlots() ) + auto selectedMultiPlots = RiaSummaryPlotTools::selectedSummaryMultiPlots(); + for ( auto summaryMultiPlot : selectedMultiPlots ) { - plot->handleDroppedObjects( cases ); + for ( auto plot : summaryMultiPlot->summaryPlots() ) + { + plot->handleDroppedObjects( objectsForDrop ); + } } } @@ -76,23 +72,23 @@ void RicAppendSummaryCurvesForSummaryCasesFeature::setupActionLook( QAction* act //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RicAppendSummaryCurvesForSummaryCasesFeature::selectedCases() +std::vector RicAppendSummaryCurvesForSummaryCasesFeature::dragDropObjects() { // Make the object type general to match the expected type for handleDroppedObjects(); - std::vector generalObjects; + std::vector objects; { - std::vector objects; - caf::SelectionManager::instance()->objectsByType( &objects ); + std::vector summaryCases; + caf::SelectionManager::instance()->objectsByType( &summaryCases ); - generalObjects.insert( generalObjects.begin(), objects.begin(), objects.end() ); + objects.insert( objects.begin(), summaryCases.begin(), summaryCases.end() ); } { - std::vector objects; - caf::SelectionManager::instance()->objectsByType( &objects ); + std::vector ensembles; + caf::SelectionManager::instance()->objectsByType( &ensembles ); - generalObjects.insert( generalObjects.begin(), objects.begin(), objects.end() ); + objects.insert( objects.begin(), ensembles.begin(), ensembles.end() ); } - return generalObjects; + return objects; } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h index 2300ace0d6..4580736c6d 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h @@ -40,5 +40,5 @@ protected: void setupActionLook( QAction* actionToSetup ) override; private: - static std::vector selectedCases(); + static std::vector dragDropObjects(); }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp index 09f7e1637e..55b1229342 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp @@ -18,26 +18,21 @@ #include "RicAppendSummaryPlotsForObjectsFeature.h" -#include "RiaGuiApplication.h" #include "RiaLogging.h" #include "RiaPlotWindowRedrawScheduler.h" -#include "RiaStdStringTools.h" #include "Summary/RiaSummaryAddressAnalyzer.h" #include "Summary/RiaSummaryAddressModifier.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" -#include "RicSummaryPlotBuilder.h" - #include "RimEnsembleCurveSet.h" #include "RimSummaryAddressCollection.h" #include "RimSummaryCase.h" #include "RimSummaryCurve.h" #include "RimSummaryEnsemble.h" #include "RimSummaryMultiPlot.h" -#include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" -#include "cafAssert.h" #include "cafProgressInfo.h" #include "cafSelectionManager.h" @@ -74,7 +69,7 @@ void RicAppendSummaryPlotsForObjectsFeature::appendPlots( RimSummaryMultiPlot* for ( auto summaryAdrCollection : sumAddressCollections ) { - auto duplicatedPlots = RicSummaryPlotBuilder::duplicateSummaryPlots( plotsForOneInstance ); + auto duplicatedPlots = RiaSummaryPlotTools::duplicateSummaryPlots( plotsForOneInstance ); for ( auto duplicatedPlot : duplicatedPlots ) { @@ -182,12 +177,11 @@ void RicAppendSummaryPlotsForObjectsFeature::onActionTriggered( bool isChecked ) auto sumAddressCollections = selectedCollections(); if ( sumAddressCollections.empty() ) return; - RiaGuiApplication* app = RiaGuiApplication::instance(); - - auto summaryMultiPlot = dynamic_cast( app->activePlotWindow() ); - if ( !summaryMultiPlot ) return; - - appendPlots( summaryMultiPlot, sumAddressCollections ); + auto selectedMultiPlots = RiaSummaryPlotTools::selectedSummaryMultiPlots(); + for ( auto summaryMultiPlot : selectedMultiPlots ) + { + appendPlots( summaryMultiPlot, sumAddressCollections ); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp index e3d3b30017..2d238b2458 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp @@ -18,13 +18,9 @@ #include "RicAppendSummaryPlotsForSummaryAddressesFeature.h" -#include "RiaGuiApplication.h" - -#include "RicAppendSummaryPlotsForObjectsFeature.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimSummaryAddress.h" -#include "RimSummaryAddressCollection.h" -#include "RimSummaryCase.h" #include "RimSummaryMultiPlot.h" #include "RimSummaryPlot.h" @@ -71,15 +67,14 @@ bool RicAppendSummaryPlotsForSummaryAddressesFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicAppendSummaryPlotsForSummaryAddressesFeature::onActionTriggered( bool isChecked ) { - RiaGuiApplication* app = RiaGuiApplication::instance(); - - auto summaryMultiPlot = dynamic_cast( app->activePlotWindow() ); - if ( !summaryMultiPlot ) return; - auto addresses = selectedAddresses(); if ( addresses.empty() ) return; - appendPlotsForAddresses( summaryMultiPlot, addresses ); + auto selectedMultiPlots = RiaSummaryPlotTools::selectedSummaryMultiPlots(); + for ( auto summaryMultiPlot : selectedMultiPlots ) + { + appendPlotsForAddresses( summaryMultiPlot, addresses ); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp index 179a49eb41..c8665e2435 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp @@ -18,11 +18,10 @@ #include "RicAppendSummaryPlotsForSummaryCasesFeature.h" -#include "RiaGuiApplication.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RicAppendSummaryPlotsForObjectsFeature.h" -#include "RimSummaryAddressCollection.h" #include "RimSummaryCase.h" #include "RimSummaryEnsemble.h" #include "RimSummaryMultiPlot.h" @@ -49,15 +48,14 @@ bool RicAppendSummaryPlotsForSummaryCasesFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicAppendSummaryPlotsForSummaryCasesFeature::onActionTriggered( bool isChecked ) { - RiaGuiApplication* app = RiaGuiApplication::instance(); - - auto summaryMultiPlot = dynamic_cast( app->activePlotWindow() ); - if ( !summaryMultiPlot ) return; - auto cases = selectedCases(); auto ensembles = selectedEnsembles(); - RicAppendSummaryPlotsForObjectsFeature::appendPlots( summaryMultiPlot, cases, ensembles ); + auto selectedMultiPlots = RiaSummaryPlotTools::selectedSummaryMultiPlots(); + for ( auto summaryMultiPlot : selectedMultiPlots ) + { + RicAppendSummaryPlotsForObjectsFeature::appendPlots( summaryMultiPlot, cases, ensembles ); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp index 55fcac0837..d3878c8e66 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp @@ -18,7 +18,7 @@ #include "RicNewEmptySummaryMultiPlotFeature.h" -#include "RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimProject.h" #include "RimSummaryCase.h" @@ -27,8 +27,6 @@ #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" -#include "RicSummaryPlotBuilder.h" - #include "cafSelectionManager.h" #include "cvfAssert.h" @@ -45,9 +43,9 @@ void RicNewEmptySummaryMultiPlotFeature::onActionTriggered( bool isChecked ) std::vector selectedEnsembles; bool skipCreationOfPlotBasedOnPreferences = false; - RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( selectedIndividualSummaryCases, - selectedEnsembles, - skipCreationOfPlotBasedOnPreferences ); + RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( selectedIndividualSummaryCases, + selectedEnsembles, + skipCreationOfPlotBasedOnPreferences ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp index 261c81f12a..e95ab5d6df 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp @@ -19,7 +19,7 @@ #include "RicNewMultiPlotFeature.h" -#include "RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimPlot.h" #include "RimWellLogTrack.h" @@ -54,9 +54,9 @@ caf::PdmScriptResponse RicNewMultiPlotFeature::execute() plots.push_back( reinterpret_cast( ptr ) ); } - auto copyOfPlots = RicSummaryPlotBuilder::duplicatePlots( plots ); + auto copyOfPlots = RiaSummaryPlotTools::duplicatePlots( plots ); - RicSummaryPlotBuilder::createAndAppendMultiPlot( copyOfPlots ); + RiaSummaryPlotTools::createAndAppendMultiPlot( copyOfPlots ); } return caf::PdmScriptResponse(); diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp index 50f11bed74..2e236472e0 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp @@ -18,7 +18,7 @@ #include "RicNewSummaryMultiPlotFeature.h" -#include "RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimProject.h" #include "RimSummaryCase.h" @@ -27,8 +27,6 @@ #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" -#include "RicSummaryPlotBuilder.h" - #include "cafSelectionManager.h" #include "cvfAssert.h" @@ -80,9 +78,9 @@ void RicNewSummaryMultiPlotFeature::onActionTriggered( bool isChecked ) } bool skipCreationOfPlotBasedOnPreferences = false; - RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( selectedIndividualSummaryCases, - selectedEnsembles, - skipCreationOfPlotBasedOnPreferences ); + RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( selectedIndividualSummaryCases, + selectedEnsembles, + skipCreationOfPlotBasedOnPreferences ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp index 9eded29ba4..09ca662de0 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp @@ -19,6 +19,7 @@ #include "RicNewSummaryMultiPlotFromDataVectorFeature.h" #include "RiaPreferencesSummary.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" #include "RimSummaryAddress.h" @@ -26,8 +27,6 @@ #include "RimSummaryEnsemble.h" #include "RimSummaryPlot.h" -#include "RicSummaryPlotBuilder.h" - #include "RifEclipseSummaryAddress.h" #include "RifReaderEclipseSummary.h" @@ -132,11 +131,11 @@ void RicNewSummaryMultiPlotFromDataVectorFeature::onActionTriggered( bool isChec } } - auto newPlot = RicSummaryPlotBuilder::createPlot( eclipseAddresses, selectedCases, selectedEnsembles ); + auto newPlot = RiaSummaryPlotTools::createPlot( eclipseAddresses, selectedCases, selectedEnsembles ); std::vector plots{ newPlot }; - RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( plots ); + RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( plots ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp index 012e9d274f..b1e8510106 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp @@ -18,11 +18,11 @@ #include "RicNewSummaryPlotFromCurveFeature.h" +#include "Summary/RiaSummaryPlotTools.h" + #include "RimSummaryCurve.h" #include "RimSummaryPlot.h" -#include "RicSummaryPlotBuilder.h" - #include #include @@ -41,11 +41,11 @@ void RicNewSummaryPlotFromCurveFeature::onActionTriggered( bool isChecked ) auto curveCopy = curve->copyObject(); curveCopy->setShowInLegend( true ); - RimSummaryPlot* plot = RicSummaryPlotBuilder::createPlot( { curveCopy } ); + RimSummaryPlot* plot = RiaSummaryPlotTools::createPlot( { curveCopy } ); std::vector plots = { plot }; - RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( plots ); + RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( plots ); } } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp index 2fb9719f53..cc8ea6d5e4 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp @@ -18,11 +18,11 @@ #include "RicNewSummaryPlotFromDataVectorFeature.h" -#include "RimSummaryAddress.h" -#include "RimSummaryPlot.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" -#include "RicSummaryPlotBuilder.h" +#include "RimSummaryAddress.h" +#include "RimSummaryPlot.h" #include "RifEclipseSummaryAddress.h" @@ -99,8 +99,8 @@ void RicNewSummaryPlotFromDataVectorFeature::onActionTriggered( bool isChecked ) } } - auto newPlot = RicSummaryPlotBuilder::createPlot( eclipseAddresses, selectedCases, selectedEnsembles ); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + auto newPlot = RiaSummaryPlotTools::createPlot( eclipseAddresses, selectedCases, selectedEnsembles ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp index e00ec82a79..8bcd3bdc55 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp @@ -18,7 +18,7 @@ #include "RicSplitMultiPlotFeature.h" -#include "RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimEnsembleCurveSet.h" #include "RimSummaryAddress.h" @@ -26,8 +26,6 @@ #include "RimSummaryCurve.h" #include "RimSummaryPlot.h" -#include "RicSummaryPlotBuilder.h" - #include "cafSelectionManager.h" #include "cvfAssert.h" @@ -73,7 +71,7 @@ void RicSplitMultiPlotFeature::onActionTriggered( bool isChecked ) objects.push_back( addr ); } - RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( objects ); + RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( objects ); for ( auto object : objects ) delete object; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.h index df2e105b5d..d0b76ae324 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.h @@ -41,7 +41,7 @@ class PdmObjectHandle; //================================================================================================== /// //================================================================================================== -class RicSummaryPlotBuilder +class RiaSummaryPlotBuilder { public: enum class RicGraphCurveGrouping @@ -52,7 +52,7 @@ public: }; public: - RicSummaryPlotBuilder(); + RiaSummaryPlotBuilder(); void setDataSources( const std::vector& summaryCases, const std::vector& ensembles ); diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/PlotTemplateCommands/CMakeLists_files.cmake index 9293f3529a..b46ad59d7f 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/CMakeLists_files.cmake @@ -1,6 +1,5 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicSelectPlotTemplateUi.h - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryPlotTemplateTools.h ${CMAKE_CURRENT_LIST_DIR}/RicReloadPlotTemplatesFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCreatePlotFromTemplateByShortcutFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicSaveMultiPlotTemplateFeature.h @@ -15,7 +14,6 @@ set(SOURCE_GROUP_HEADER_FILES set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicSelectPlotTemplateUi.cpp - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryPlotTemplateTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RicReloadPlotTemplatesFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCreatePlotFromTemplateByShortcutFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicSaveMultiPlotTemplateFeature.cpp @@ -29,13 +27,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND COMMAND_QT_MOC_HEADERS) - -source_group( - "CommandFeature\\PlotTemplate" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp index b2f7c1fe96..2c99f93057 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp @@ -18,8 +18,8 @@ #include "RicCreateMultiPlotFromSelectionFeature.h" -#include "RicSummaryPlotTemplateTools.h" #include "RimSummaryMultiPlot.h" +#include "Summary/RiaSummaryPlotTemplateTools.h" #include "RiuPlotMainWindowTools.h" diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp index fd20ca1d31..15f6b54a79 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp @@ -24,7 +24,7 @@ #include "RiaPreferences.h" #include "RicSelectCaseOrEnsembleUi.h" -#include "RicSummaryPlotTemplateTools.h" +#include "Summary/RiaSummaryPlotTemplateTools.h" #include "RimSummaryCase.h" #include "RimSummaryEnsemble.h" diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp index f1b89657b1..30ed878904 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp @@ -21,7 +21,7 @@ #include "RiaGuiApplication.h" #include "RiaPreferences.h" -#include "RicSummaryPlotTemplateTools.h" +#include "Summary/RiaSummaryPlotTemplateTools.h" #include "RimSummaryMultiPlot.h" diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp index b9e011a3f4..41763ed9ea 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp @@ -20,7 +20,7 @@ #include "RicReloadPlotTemplatesFeature.h" #include "RicSaveMultiPlotTemplateFeatureSettings.h" -#include "RicSummaryPlotTemplateTools.h" +#include "Summary/RiaSummaryPlotTemplateTools.h" #include "RiaGuiApplication.h" #include "RiaLogging.h" diff --git a/ApplicationLibCode/Commands/PolygonCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/PolygonCommands/CMakeLists_files.cmake index f9f047dd19..f4bbb446ac 100644 --- a/ApplicationLibCode/Commands/PolygonCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/PolygonCommands/CMakeLists_files.cmake @@ -7,6 +7,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicExportPolygonPolFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicSimplifyPolygonFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicBasicPolygonFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicDeleteAllPolygonsFeature.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -18,14 +19,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicExportPolygonPolFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicSimplifyPolygonFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicBasicPolygonFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicDeleteAllPolygonsFeature.cpp ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\Polygons" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/PolygonCommands/RicCreatePolygonFeature.cpp b/ApplicationLibCode/Commands/PolygonCommands/RicCreatePolygonFeature.cpp index 1b4770b9ee..6bd9c7987c 100644 --- a/ApplicationLibCode/Commands/PolygonCommands/RicCreatePolygonFeature.cpp +++ b/ApplicationLibCode/Commands/PolygonCommands/RicCreatePolygonFeature.cpp @@ -24,8 +24,7 @@ #include "Polygons/RimPolygonCollection.h" #include "Polygons/RimPolygonTools.h" #include "Rim3dView.h" -#include "RimOilField.h" -#include "RimProject.h" +#include "RimTools.h" #include "Riu3DMainWindowTools.h" @@ -38,8 +37,7 @@ CAF_CMD_SOURCE_INIT( RicCreatePolygonFeature, "RicCreatePolygonFeature" ); //-------------------------------------------------------------------------------------------------- void RicCreatePolygonFeature::onActionTriggered( bool isChecked ) { - auto proj = RimProject::current(); - auto polygonCollection = proj->activeOilField()->polygonCollection(); + auto polygonCollection = RimTools::polygonCollection(); auto newPolygon = polygonCollection->appendUserDefinedPolygon(); polygonCollection->uiCapability()->updateAllRequiredEditors(); diff --git a/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp b/ApplicationLibCode/Commands/PolygonCommands/RicDeleteAllPolygonsFeature.cpp similarity index 56% rename from ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp rename to ApplicationLibCode/Commands/PolygonCommands/RicDeleteAllPolygonsFeature.cpp index 77d0875b5f..a4bb9040ac 100644 --- a/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp +++ b/ApplicationLibCode/Commands/PolygonCommands/RicDeleteAllPolygonsFeature.cpp @@ -1,6 +1,6 @@ -///////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2024 Equinor ASA +// Copyright (C) 2025 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 @@ -16,34 +16,31 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RicNewWellTargetCandidatesGeneratorFeature.h" +#include "RicDeleteAllPolygonsFeature.h" -#include "RimEclipseCaseEnsemble.h" -#include "RimWellTargetCandidatesGenerator.h" - -#include "cafSelectionManagerTools.h" +#include "Polygons/RimPolygonCollection.h" +#include "RimTools.h" #include -CAF_CMD_SOURCE_INIT( RicNewWellTargetCandidatesGeneratorFeature, "RicNewWellTargetCandidatesGeneratorFeature" ); +CAF_CMD_SOURCE_INIT( RicDeleteAllPolygonsFeature, "RicDeleteAllPolygonsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicNewWellTargetCandidatesGeneratorFeature::onActionTriggered( bool isChecked ) +void RicDeleteAllPolygonsFeature::onActionTriggered( bool isChecked ) { - auto ensembles = caf::selectedObjectsByTypeStrict(); - if ( ensembles.empty() ) return; + auto polygonCollection = RimTools::polygonCollection(); - auto ensemble = ensembles.front(); - ensemble->addWellTargetsGenerator( new RimWellTargetCandidatesGenerator() ); - ensemble->updateConnectedEditors(); + polygonCollection->deleteAllPolygons(); + polygonCollection->updateConnectedEditors(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicNewWellTargetCandidatesGeneratorFeature::setupActionLook( QAction* actionToSetup ) +void RicDeleteAllPolygonsFeature::setupActionLook( QAction* actionToSetup ) { - actionToSetup->setText( "Create Well Target Candidates Generator" ); + actionToSetup->setText( "Delete All Polygons" ); + actionToSetup->setIcon( QIcon( ":/Erase.png" ) ); } diff --git a/ApplicationLibCode/Commands/PolygonCommands/RicDeleteAllPolygonsFeature.h b/ApplicationLibCode/Commands/PolygonCommands/RicDeleteAllPolygonsFeature.h new file mode 100644 index 0000000000..855cad4a9d --- /dev/null +++ b/ApplicationLibCode/Commands/PolygonCommands/RicDeleteAllPolygonsFeature.h @@ -0,0 +1,33 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +//================================================================================================== +/// +//================================================================================================== +class RicDeleteAllPolygonsFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; +}; diff --git a/ApplicationLibCode/Commands/PolygonCommands/RicDuplicatePolygonFeature.cpp b/ApplicationLibCode/Commands/PolygonCommands/RicDuplicatePolygonFeature.cpp index 8da3c923f7..6bc6761f26 100644 --- a/ApplicationLibCode/Commands/PolygonCommands/RicDuplicatePolygonFeature.cpp +++ b/ApplicationLibCode/Commands/PolygonCommands/RicDuplicatePolygonFeature.cpp @@ -25,8 +25,7 @@ #include "Polygons/RimPolygonInView.h" #include "Polygons/RimPolygonTools.h" #include "Rim3dView.h" -#include "RimOilField.h" -#include "RimProject.h" +#include "RimTools.h" #include "Riu3DMainWindowTools.h" @@ -55,8 +54,7 @@ void RicDuplicatePolygonFeature::onActionTriggered( bool isChecked ) auto sourcePolygon = selPolygons[0]; - auto proj = RimProject::current(); - auto polygonCollection = proj->activeOilField()->polygonCollection(); + auto polygonCollection = RimTools::polygonCollection(); auto newPolygon = polygonCollection->createUserDefinedPolygon(); newPolygon->setPointsInDomainCoords( sourcePolygon->pointsInDomainCoords() ); diff --git a/ApplicationLibCode/Commands/PolygonCommands/RicImportPolygonFileFeature.cpp b/ApplicationLibCode/Commands/PolygonCommands/RicImportPolygonFileFeature.cpp index f4f1ffc8ed..ca49b3e548 100644 --- a/ApplicationLibCode/Commands/PolygonCommands/RicImportPolygonFileFeature.cpp +++ b/ApplicationLibCode/Commands/PolygonCommands/RicImportPolygonFileFeature.cpp @@ -24,8 +24,7 @@ #include "Polygons/RimPolygonCollection.h" #include "Polygons/RimPolygonFile.h" #include "Polygons/RimPolygonTools.h" -#include "RimOilField.h" -#include "RimProject.h" +#include "RimTools.h" #include "Riu3DMainWindowTools.h" #include "RiuFileDialogTools.h" @@ -56,8 +55,7 @@ void RicImportPolygonFileFeature::onActionTriggered( bool isChecked ) // Remember the path to next time app->setLastUsedDialogDirectory( RimPolygonTools::polygonCacheName(), QFileInfo( fileNames.last() ).absolutePath() ); - auto proj = RimProject::current(); - auto polygonCollection = proj->activeOilField()->polygonCollection(); + auto polygonCollection = RimTools::polygonCollection(); RimPolygon* objectToSelect = nullptr; diff --git a/ApplicationLibCode/Commands/PolygonCommands/RicSimplifyPolygonFeature.cpp b/ApplicationLibCode/Commands/PolygonCommands/RicSimplifyPolygonFeature.cpp index 786afdd797..d71b518031 100644 --- a/ApplicationLibCode/Commands/PolygonCommands/RicSimplifyPolygonFeature.cpp +++ b/ApplicationLibCode/Commands/PolygonCommands/RicSimplifyPolygonFeature.cpp @@ -21,7 +21,7 @@ #include "Polygons/RimPolygon.h" #include "Polygons/RimPolygonInView.h" -#include "RigCellGeometryTools.h" +#include "RigPolygonTools.h" #include "cafSelectionManager.h" @@ -46,21 +46,47 @@ void RicSimplifyPolygonFeature::onActionTriggered( bool isChecked ) auto selPolygons = selectedPolygons(); if ( selPolygons.empty() ) return; - const double defaultEpsilon = 10.0; - - bool ok; - auto epsilon = - QInputDialog::getDouble( nullptr, "Simplify Polygon Threshold", "Threshold:", defaultEpsilon, 1.0, 1000.0, 1, &ok, Qt::WindowFlags(), 1 ); - - if ( !ok ) return; + std::vector> originalCoords; for ( auto sourcePolygon : selPolygons ) { - auto coords = sourcePolygon->pointsInDomainCoords(); - RigCellGeometryTools::simplifyPolygon( &coords, epsilon ); + originalCoords.push_back( sourcePolygon->pointsInDomainCoords() ); + } - sourcePolygon->setPointsInDomainCoords( coords ); - sourcePolygon->coordinatesChanged.send(); + const int defaultEpsilon = 10; + + QInputDialog inputDialog; + inputDialog.setWindowTitle( "Simplify Polygon" ); + inputDialog.setLabelText( "Threshold (larger value removes more points) :" ); + inputDialog.setInputMode( QInputDialog::IntInput ); + inputDialog.setIntRange( 10, 200 ); + inputDialog.setIntValue( defaultEpsilon ); + + connect( &inputDialog, + &QInputDialog::intValueChanged, + [&originalCoords, &selPolygons]( int value ) + { + for ( size_t i = 0; i < originalCoords.size(); i++ ) + { + auto coords = originalCoords[i]; + RigPolygonTools::simplifyPolygon( coords, value ); + + auto sourcePolygon = selPolygons[i]; + sourcePolygon->setPointsInDomainCoords( coords ); + sourcePolygon->coordinatesChanged.send(); + } + } ); + + if ( inputDialog.exec() == QDialog::Rejected ) + { + for ( size_t i = 0; i < originalCoords.size(); i++ ) + { + auto coords = originalCoords[i]; + + auto sourcePolygon = selPolygons[i]; + sourcePolygon->setPointsInDomainCoords( coords ); + sourcePolygon->coordinatesChanged.send(); + } } } diff --git a/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp index 999bd53b30..df87110afc 100644 --- a/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp @@ -23,6 +23,7 @@ #include "RicDeleteItemFeature.h" +#include "RimDepthTrackPlot.h" #include "RimMainPlotCollection.h" #include "RimProject.h" #include "RimSummaryCase.h" @@ -31,10 +32,13 @@ #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" #include "RimWellLogPlot.h" +#include "RimWellPlotTools.h" +#include "RimWellRftPlot.h" #include "RiuPlotMainWindow.h" #include "cafAsyncObjectDeleter.h" +#include "cafPdmObjectHandleTools.h" #include "cafSelectionManager.h" #include "cvfAssert.h" @@ -62,7 +66,8 @@ void RicCloseSummaryCaseFeature::deleteSummaryCases( std::vector plotsToUpdate; - std::set wellLogPlotsToDelete; + + auto depthTrackPlots = caf::PdmObjectHandleTools::referringAncestorOfType( cases ); for ( RimSummaryCase* summaryCase : cases ) { @@ -74,25 +79,12 @@ void RicCloseSummaryCaseFeature::deleteSummaryCases( std::vector referringObjects = summaryCase->objectsWithReferringPtrFields(); - - for ( auto object : referringObjects ) - { - if ( !object ) continue; - - RimWellLogPlot* wellLogPlot = object->firstAncestorOrThisOfType(); - if ( wellLogPlot ) wellLogPlotsToDelete.insert( wellLogPlot ); - } - } - - for ( auto wellLogPlot : wellLogPlotsToDelete ) - { - RicDeleteItemFeature::deleteObject( wellLogPlot ); } summaryCaseMainCollection->removeCases( cases ); + RimWellPlotTools::loadDataAndUpdateDepthTrackPlots( depthTrackPlots ); + for ( auto plot : plotsToUpdate ) { plot->updateConnectedEditors(); diff --git a/ApplicationLibCode/Commands/RicContourMapPickEventHandler.cpp b/ApplicationLibCode/Commands/RicContourMapPickEventHandler.cpp index 3ffb1551b2..55545bcc55 100644 --- a/ApplicationLibCode/Commands/RicContourMapPickEventHandler.cpp +++ b/ApplicationLibCode/Commands/RicContourMapPickEventHandler.cpp @@ -18,11 +18,11 @@ #include "RicContourMapPickEventHandler.h" -#include "RigContourMapProjection.h" +#include "ContourMap/RigContourMapProjection.h" +#include "ContourMap/RimContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" -#include "RimContourMapProjection.h" -#include "RimEclipseContourMapView.h" #include "RimGeoMechContourMapView.h" #include "RiuMainWindow.h" diff --git a/ApplicationLibCode/Commands/RicCreateContourMapPolygonAdvancedFeature.cpp b/ApplicationLibCode/Commands/RicCreateContourMapPolygonAdvancedFeature.cpp new file mode 100644 index 0000000000..424aef6bfb --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateContourMapPolygonAdvancedFeature.cpp @@ -0,0 +1,60 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicCreateContourMapPolygonAdvancedFeature.h" + +#include "RicCreateContourMapPolygonTools.h" +#include "RicPolygonFromImageDialog.h" + +#include + +CAF_CMD_SOURCE_INIT( RicCreateContourMapPolygonAdvancedFeature, "RicCreateContourMapPolygonAdvancedFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonAdvancedFeature::onActionTriggered( bool isChecked ) +{ + auto rigContourMapProjection = RicCreateContourMapPolygonTools::findCurrentContourMapProjection(); + if ( !rigContourMapProjection ) return; + + auto sourceImage = RicCreateContourMapPolygonTools::convertToBinaryImage( rigContourMapProjection ); + + RicPolygonFromImageDialog dlg; + dlg.setSourceImageData( sourceImage ); + dlg.show(); + dlg.updateAndShowImages(); + + if ( dlg.exec() == QDialog::Rejected ) return; + + auto processedImage = dlg.processedImageData(); + if ( processedImage.empty() ) return; + + RicCreateContourMapPolygonTools::createPolygonObjects( processedImage, rigContourMapProjection ); +} + +//-------------------------------------------------------------------------------------------------- + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonAdvancedFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setIcon( QIcon( ":/PolylinesFromFile16x16.png" ) ); + actionToSetup->setText( "Create Polygon From Contour Map (Developers Only)" ); +} diff --git a/ApplicationLibCode/Commands/RicCreateContourMapPolygonAdvancedFeature.h b/ApplicationLibCode/Commands/RicCreateContourMapPolygonAdvancedFeature.h new file mode 100644 index 0000000000..705125e632 --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateContourMapPolygonAdvancedFeature.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +//================================================================================================== +/// +//================================================================================================== +class RicCreateContourMapPolygonAdvancedFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; +}; diff --git a/ApplicationLibCode/Commands/RicCreateContourMapPolygonFeature.cpp b/ApplicationLibCode/Commands/RicCreateContourMapPolygonFeature.cpp new file mode 100644 index 0000000000..1ea7c6997e --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateContourMapPolygonFeature.cpp @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicCreateContourMapPolygonFeature.h" + +#include "RicCreateContourMapPolygonTools.h" + +#include "RigPolygonTools.h" + +#include + +CAF_CMD_SOURCE_INIT( RicCreateContourMapPolygonFeature, "RicCreateContourMapPolygonFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonFeature::onActionTriggered( bool isChecked ) +{ + auto rigContourMapProjection = RicCreateContourMapPolygonTools::findCurrentContourMapProjection(); + if ( !rigContourMapProjection ) return; + + auto sourceImage = RicCreateContourMapPolygonTools::convertToBinaryImage( rigContourMapProjection ); + + const int kernelSize = 3; + auto floodFilled = RigPolygonTools::fillInterior( sourceImage ); + auto eroded = RigPolygonTools::erode( floodFilled, kernelSize ); + auto dilated = RigPolygonTools::dilate( eroded, kernelSize ); + + RicCreateContourMapPolygonTools::createPolygonObjects( dilated, rigContourMapProjection ); +} + +//-------------------------------------------------------------------------------------------------- + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setIcon( QIcon( ":/PolylinesFromFile16x16.png" ) ); + actionToSetup->setText( "Create Polygon From Contour Map" ); +} diff --git a/ApplicationLibCode/Commands/RicCreateContourMapPolygonFeature.h b/ApplicationLibCode/Commands/RicCreateContourMapPolygonFeature.h new file mode 100644 index 0000000000..8560d4f3e6 --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateContourMapPolygonFeature.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +//================================================================================================== +/// +//================================================================================================== +class RicCreateContourMapPolygonFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; +}; diff --git a/ApplicationLibCode/Commands/RicCreateContourMapPolygonTools.cpp b/ApplicationLibCode/Commands/RicCreateContourMapPolygonTools.cpp new file mode 100644 index 0000000000..cadba41331 --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateContourMapPolygonTools.cpp @@ -0,0 +1,361 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicCreateContourMapPolygonTools.h" + +#include "RicExportContourMapToTextFeature.h" + +#include "ContourMap/RigContourMapProjection.h" +#include "RigPolygonTools.h" + +#include "ContourMap/RimContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" +#include "Polygons/RimPolygon.h" +#include "Polygons/RimPolygonCollection.h" +#include "RimGeoMechContourMapView.h" +#include "RimTools.h" + +#include "RiuMainWindow.h" + +#include "cvfBase.h" + +#include + +namespace internal +{ + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector>> findPolygons( std::vector> image, + const RigContourMapProjection* contourMapProjection ) +{ + std::vector>> polygons; + + if ( !contourMapProjection ) return {}; + if ( image.empty() ) return {}; + + auto xVertexPositions = contourMapProjection->xVertexPositions(); + auto yVertexPositions = contourMapProjection->yVertexPositions(); + auto origin3d = contourMapProjection->origin3d(); + auto depth = contourMapProjection->topDepthBoundingBox(); + + auto hasAnyValue = []( const std::vector>& image ) -> bool + { + for ( const auto& row : image ) + { + for ( int val : row ) + { + if ( val != 0 ) return true; + } + } + + return false; + }; + + while ( hasAnyValue( image ) ) + { + std::vector polygonDomainCoords; + auto boundaryPoints = RigPolygonTools::boundary( image ); + + for ( const auto& [i, j] : boundaryPoints ) + { + auto xDomain = xVertexPositions.at( i ) + origin3d.x(); + auto yDomain = yVertexPositions.at( j ) + origin3d.y(); + + polygonDomainCoords.emplace_back( cvf::Vec3d( xDomain, yDomain, depth ) ); + } + + // Epsilon used to simplify polygon. Useful range typical value in [5..50] + const double defaultEpsilon = 40.0; + RigPolygonTools::simplifyPolygon( polygonDomainCoords, defaultEpsilon ); + + if ( polygonDomainCoords.size() >= 3 ) + { + const auto area = RigPolygonTools::area( boundaryPoints ); + + polygons.push_back( { area, polygonDomainCoords } ); + } + + // Subtract all pixels inside the polygon by setting their value to 0 + const int value = 0; + image = RigPolygonTools::assignValueInsidePolygon( image, boundaryPoints, value ); + + /* + // NB: Do not remove, debug code to export images to file + { + QString filename = "boundary_removed"; + filename = QString( "f:/scratch/images/%1%2.png" ).arg( filename ).arg( QString::number( imageCounter ) ); + RicCreateContourMapPolygonTools::exportVectorAsGrayscaleImage( currentImage, filename ); + } + */ + } + + return polygons; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void createPolygonObjects( const std::vector>& polygons ) +{ + auto polygonCollection = RimTools::polygonCollection(); + if ( !polygonCollection ) return; + + for ( const auto& polygonDomainCoords : polygons ) + { + auto newPolygon = polygonCollection->appendUserDefinedPolygon(); + newPolygon->setPointsInDomainCoords( polygonDomainCoords ); + newPolygon->coordinatesChanged.send(); + } + + polygonCollection->updateAllRequiredEditors(); +} + +} // namespace internal + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QImage RicCreateContourMapPolygonTools::convertBinaryToImage( const std::vector>& data, QColor color, int transparency ) +{ + if ( data.empty() || data[0].empty() ) + { + qWarning( "Data is empty. Cannot export an image." ); + return {}; + } + + // Get dimensions + int height = static_cast( data[0].size() ); + int width = static_cast( data.size() ); + + // Create a QImage + QImage image( width, height, QImage::Format_ARGB32 ); + + // Fill QImage with data + for ( int y = 0; y < height; ++y ) + { + for ( int x = 0; x < width; ++x ) + { + int value = std::clamp( data[x][y], 0, 255 ); + if ( value > 0 ) + image.setPixel( x, height - y - 1, qRgba( color.red(), color.green(), color.blue(), transparency ) ); // Grayscale + else + { + image.setPixel( x, height - y - 1, qRgba( 0, 0, 0, transparency ) ); + } + } + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QImage RicCreateContourMapPolygonTools::convertBinaryToGrayscaleImage( const std::vector>& data, int colorValue ) +{ + if ( data.empty() || data[0].empty() ) + { + qWarning( "Data is empty. Cannot export an image." ); + return {}; + } + + // Get dimensions + int height = static_cast( data[0].size() ); + int width = static_cast( data.size() ); + + // Create a QImage + QImage image( width, height, QImage::Format_Grayscale8 ); + + // Fill QImage with data + for ( int y = 0; y < height; ++y ) + { + for ( int x = 0; x < width; ++x ) + { + int value = std::clamp( data[x][y] * colorValue, 0, 255 ); // Ensure value is in [0, 255] + image.setPixel( x, height - y - 1, qRgb( value, value, value ) ); // Grayscale + } + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonTools::exportVectorAsImage( const std::vector>& data, int transparency, const QString& filename ) +{ + if ( data.empty() || data[0].empty() ) + { + qWarning( "Data is empty. Cannot export an image." ); + return; + } + + auto image = convertBinaryToImage( data, QColorConstants::Green, transparency ); + + if ( !image.save( filename, "PNG" ) ) + { + qWarning( "Failed to save image as PNG." ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonTools::exportVectorAsGrayscaleImage( const std::vector>& data, const QString& filename ) +{ + if ( data.empty() || data[0].empty() ) + { + qWarning( "Data is empty. Cannot export an image." ); + return; + } + + auto image = convertBinaryToGrayscaleImage( data, 255 ); + + // Save the QImage as a PNG file + if ( !image.save( filename, "PNG" ) ) + { + qWarning( "Failed to save image as PNG." ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector> RicCreateContourMapPolygonTools::convertImageToBinary( QImage image ) +{ + std::vector> binaryImage( image.width(), std::vector( image.height(), 0 ) ); + for ( int i = 0; i < image.width(); ++i ) + { + for ( int j = 0; j < image.height(); ++j ) + { + auto pixelColor = image.pixel( i, j ); + auto gray = qGray( pixelColor ); + + binaryImage[i][image.height() - j - 1] = gray > 0 ? 1 : 0; + } + } + return binaryImage; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector> RicCreateContourMapPolygonTools::convertToBinaryImage( const RigContourMapProjection* rigContourMapProjection ) +{ + if ( !rigContourMapProjection ) return {}; + + auto vertexSizeIJ = rigContourMapProjection->numberOfVerticesIJ(); + + std::vector> image( vertexSizeIJ.x(), std::vector( vertexSizeIJ.y(), 0 ) ); + + auto filteredValues = rigContourMapProjection->aggregatedVertexResultsFiltered(); + + for ( cvf::uint i = 0; i < vertexSizeIJ.x(); i++ ) + { + for ( cvf::uint j = 0; j < vertexSizeIJ.y(); j++ ) + { + auto vertexIndex = rigContourMapProjection->vertexIndex( i, j ); + double valueAtVertex = vertexIndex < filteredValues.size() ? filteredValues[vertexIndex] : std::numeric_limits::infinity(); + if ( !std::isinf( valueAtVertex ) ) + { + image[i][j] = 1; + } + else + { + image[i][j] = 0; + } + } + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicCreateContourMapPolygonTools::createPolygonObjects( std::vector> image, + const RigContourMapProjection* contourMapProjection ) +{ + auto polygons = internal::findPolygons( image, contourMapProjection ); + if ( polygons.empty() ) return; + + const size_t polygonCountThreshold = 10; + if ( polygons.size() > polygonCountThreshold ) + { + std::sort( polygons.begin(), polygons.end(), []( const auto& a, const auto& b ) { return a.first > b.first; } ); + + int polygonCount = 0; + QStringList polygonInfo; + for ( const auto& polygon : polygons ) + { + polygonInfo + << QString( "Polygon %1: Pixel area %2, vertex count %3 " ).arg( polygonCount++ ).arg( polygon.first ).arg( polygon.second.size() ); + if ( polygonCount > 10 ) + { + polygonInfo << QString( "More polygons found, but only the first 10 are shown." ); + break; + } + } + + QString txt = polygonInfo.join( "\n" ); + txt += "\n\n Create polygons with pixel area above threshold: "; + + bool ok; + int areaThreshold = QInputDialog::getInt( RiuMainWindow::instance(), "Create Polygons", txt, 10, 1, 10000, 1, &ok ); + if ( ok ) + { + std::vector> polygonsToCreate; + for ( const auto& polygon : polygons ) + { + if ( polygon.first >= areaThreshold ) + { + polygonsToCreate.push_back( polygon.second ); + } + } + + internal::createPolygonObjects( polygonsToCreate ); + } + } + else + { + std::vector> polygonsToCreate; + for ( const auto& polygon : polygons ) + { + polygonsToCreate.push_back( polygon.second ); + } + internal::createPolygonObjects( polygonsToCreate ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigContourMapProjection* RicCreateContourMapPolygonTools::findCurrentContourMapProjection() +{ + RimContourMapProjection* contourMapProjection = nullptr; + + auto [existingEclipseContourMap, existingGeoMechContourMap] = RicExportContourMapToTextFeature::findContourMapView(); + if ( existingEclipseContourMap ) contourMapProjection = existingEclipseContourMap->contourMapProjection(); + if ( existingGeoMechContourMap ) contourMapProjection = existingGeoMechContourMap->contourMapProjection(); + + if ( !contourMapProjection ) return nullptr; + + return contourMapProjection->mapProjection(); +} diff --git a/ApplicationLibCode/Commands/RicCreateContourMapPolygonTools.h b/ApplicationLibCode/Commands/RicCreateContourMapPolygonTools.h new file mode 100644 index 0000000000..d9d9db4c45 --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateContourMapPolygonTools.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include + +#include + +class RigContourMapProjection; +class RimPolygon; + +//================================================================================================== +/// +//================================================================================================== +namespace RicCreateContourMapPolygonTools +{ +QImage convertBinaryToImage( const std::vector>& data, QColor color, int transparency ); +QImage convertBinaryToGrayscaleImage( const std::vector>& data, int colorValue ); + +void exportVectorAsImage( const std::vector>& data, int transparency, const QString& filename ); +void exportVectorAsGrayscaleImage( const std::vector>& data, const QString& filename ); + +std::vector> convertImageToBinary( QImage image ); +std::vector> convertToBinaryImage( const RigContourMapProjection* contourMapProjection ); + +void createPolygonObjects( std::vector> image, const RigContourMapProjection* contourMapProjection ); + +const RigContourMapProjection* findCurrentContourMapProjection(); + +}; // namespace RicCreateContourMapPolygonTools diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp b/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp index 883fd839fd..9546076cea 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp @@ -117,7 +117,7 @@ void RicCreateEnsembleSurfaceFeature::executeCommand( const RicCreateEnsembleSur if ( ui.autoCreateEnsembleSurfaces() ) RicImportEnsembleSurfaceFeature::importEnsembleSurfaceFromFiles( allSurfaceFileNames, - RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); + RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp b/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp index d75eccdb7e..85a7f69909 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp @@ -227,7 +227,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel { std::vector ensembleWellLogs = RicImportEnsembleWellLogsFeature::createEnsembleWellLogsFromFiles( allLasFileNames, - RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); + RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); for ( auto ensembleWellLog : ensembleWellLogs ) { diff --git a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp b/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp deleted file mode 100644 index 3d6b9f87d5..0000000000 --- a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp +++ /dev/null @@ -1,104 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2017- Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RicCreateSummaryCaseCollectionFeature.h" - -#include "Summary/RiaSummaryTools.h" - -#include "RimSummaryCase.h" -#include "RimSummaryCaseMainCollection.h" -#include "RimSummaryEnsemble.h" - -#include "RiuPlotMainWindowTools.h" - -#include "cafPdmObject.h" -#include "cafSelectionManager.h" - -#include - -CAF_CMD_SOURCE_INIT( RicCreateSummaryCaseCollectionFeature, "RicCreateSummaryCaseCollectionFeature" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimSummaryEnsemble* - RicCreateSummaryCaseCollectionFeature::groupSummaryCases( std::vector cases, const QString& groupName, bool isEnsemble ) -{ - RimSummaryCaseMainCollection* summaryCaseMainCollection = RiaSummaryTools::summaryCaseMainCollection(); - if ( !cases.empty() ) - { - auto newGroup = summaryCaseMainCollection->addEnsemble( cases, groupName, isEnsemble ); - summaryCaseMainCollection->updateConnectedEditors(); - - RiuPlotMainWindowTools::showPlotMainWindow(); - return newGroup; - } - return nullptr; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateSummaryCaseCollectionFeature::isCommandEnabled() const -{ - std::vector selection; - caf::SelectionManager::instance()->objectsByType( &selection ); - - if ( selection.empty() ) - { - return false; - } - - for ( RimSummaryCase* summaryCase : selection ) - { - if ( summaryCase->isObservedData() ) - { - return false; - } - } - return true; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicCreateSummaryCaseCollectionFeature::onActionTriggered( bool isChecked ) -{ - std::vector selection; - caf::SelectionManager::instance()->objectsByType( &selection ); - if ( selection.empty() ) return; - - std::vector duplicates; - - for ( const auto sumCase : selection ) - { - auto copy = sumCase->copyObject(); - duplicates.push_back( copy ); - } - - groupSummaryCases( duplicates, "" ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicCreateSummaryCaseCollectionFeature::setupActionLook( QAction* actionToSetup ) -{ - actionToSetup->setText( "Create Summary Case Group" ); - actionToSetup->setIcon( QIcon( ":/SummaryGroup16x16.png" ) ); -} diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFractureCollection.cpp b/ApplicationLibCode/Commands/RicCreateSummaryEnsembleFeature.cpp similarity index 58% rename from ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFractureCollection.cpp rename to ApplicationLibCode/Commands/RicCreateSummaryEnsembleFeature.cpp index f3664e4a2a..65c5eaf642 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFractureCollection.cpp +++ b/ApplicationLibCode/Commands/RicCreateSummaryEnsembleFeature.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2016- Statoil ASA +// Copyright (C) 2025 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 @@ -16,40 +16,46 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RimSimWellFractureCollection.h" +#include "RicCreateSummaryEnsembleFeature.h" -#include "RimSimWellFracture.h" -#include "cafPdmObject.h" +#include "RicImportEnsembleFeature.h" -CAF_PDM_SOURCE_INIT( RimSimWellFractureCollection, "SimWellFractureCollection" ); +#include "RimSummaryCase.h" + +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT( RicCreateSummaryEnsembleFeature, "RicCreateSummaryEnsembleFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSimWellFractureCollection::RimSimWellFractureCollection() +bool RicCreateSummaryEnsembleFeature::isCommandEnabled() const { - CAF_PDM_InitObject( "Fractures", ":/FractureLayout16x16.png" ); + std::vector selection; + caf::SelectionManager::instance()->objectsByType( &selection ); - CAF_PDM_InitFieldNoDefault( &simwellFractures, "Fractures", "" ); - - setDeletable( true ); + return !selection.empty(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSimWellFractureCollection::deleteFractures() +void RicCreateSummaryEnsembleFeature::onActionTriggered( bool isChecked ) { - simwellFractures.deleteChildren(); + std::vector selection; + caf::SelectionManager::instance()->objectsByType( &selection ); + if ( selection.empty() ) return; + + RicImportEnsembleFeature::createSummaryEnsemble( selection ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSimWellFractureCollection::recomputeSimWellCenterlines() +void RicCreateSummaryEnsembleFeature::setupActionLook( QAction* actionToSetup ) { - for ( RimSimWellFracture* frac : simwellFractures() ) - { - frac->recomputeWellCenterlineCoordinates(); - } + actionToSetup->setText( "Create Summary Ensemble" ); + actionToSetup->setIcon( QIcon( ":/SummaryGroup16x16.png" ) ); } diff --git a/ApplicationLibCode/Commands/RicCreateSummaryEnsembleFeature.h b/ApplicationLibCode/Commands/RicCreateSummaryEnsembleFeature.h new file mode 100644 index 0000000000..a8f0c26288 --- /dev/null +++ b/ApplicationLibCode/Commands/RicCreateSummaryEnsembleFeature.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +//================================================================================================== +/// +//================================================================================================== +class RicCreateSummaryEnsembleFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +private: + bool isCommandEnabled() const override; + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; +}; diff --git a/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp b/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp index 1686006192..bdafe3224d 100644 --- a/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp @@ -21,6 +21,7 @@ #include "Summary/RiaSummaryTools.h" #include "RimDeltaSummaryEnsemble.h" +#include "RimDepthTrackPlot.h" #include "RimMainPlotCollection.h" #include "RimProject.h" #include "RimSummaryCase.h" @@ -29,8 +30,10 @@ #include "RimSummaryMultiPlot.h" #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" +#include "RimWellPlotTools.h" #include "cafPdmObject.h" +#include "cafPdmObjectHandleTools.h" #include "cafSelectionManager.h" #include "cvfAssert.h" @@ -80,9 +83,9 @@ bool RicDeleteSummaryCaseCollectionFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicDeleteSummaryCaseCollectionFeature::onActionTriggered( bool isChecked ) { - std::vector selection; - caf::SelectionManager::instance()->objectsByType( &selection ); - if ( selection.empty() ) return; + std::vector ensembles; + caf::SelectionManager::instance()->objectsByType( &ensembles ); + if ( ensembles.empty() ) return; QMessageBox msgBox; msgBox.setIcon( QMessageBox::Question ); @@ -100,29 +103,29 @@ void RicDeleteSummaryCaseCollectionFeature::onActionTriggered( bool isChecked ) return; } - if ( ret == QMessageBox::Yes ) + auto depthTrackPlots = caf::PdmObjectHandleTools::referringAncestorOfType( ensembles ); + + for ( RimSummaryEnsemble* ensemble : ensembles ) { - for ( RimSummaryEnsemble* summaryCaseCollection : selection ) + if ( ret == QMessageBox::Yes ) { - RicDeleteSummaryCaseCollectionFeature::deleteSummaryCaseCollection( summaryCaseCollection ); + RicDeleteSummaryCaseCollectionFeature::deleteSummaryCaseCollection( ensemble ); } - } - else if ( ret == QMessageBox::No ) - { - for ( RimSummaryEnsemble* summaryCaseCollection : selection ) + else if ( ret == QMessageBox::No ) { - RicDeleteSummaryCaseCollectionFeature::moveAllCasesToMainSummaryCollection( summaryCaseCollection ); + RicDeleteSummaryCaseCollectionFeature::moveAllCasesToMainSummaryCollection( ensemble ); } } - RimSummaryCaseMainCollection* summaryCaseMainCollection = selection[0]->firstAncestorOrThisOfTypeAsserted(); - - for ( RimSummaryEnsemble* caseCollection : selection ) + RimSummaryCaseMainCollection* summaryCaseMainCollection = ensembles[0]->firstAncestorOrThisOfTypeAsserted(); + for ( RimSummaryEnsemble* ensemble : ensembles ) { - summaryCaseMainCollection->removeCaseCollection( caseCollection ); - delete caseCollection; + summaryCaseMainCollection->removeEnsemble( ensemble ); + delete ensemble; } + RimWellPlotTools::loadDataAndUpdateDepthTrackPlots( depthTrackPlots ); + summaryCaseMainCollection->updateConnectedEditors(); } diff --git a/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp b/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp index 38c12c1dfd..ebcb4782cb 100644 --- a/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp +++ b/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp @@ -26,10 +26,10 @@ #include "RigElasticProperties.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" #include "RigFormationNames.h" #include "RimElasticProperties.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" #include "RimOilField.h" #include "RimProject.h" #include "RimStimPlanModelTemplate.h" diff --git a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp index 5d04bb61cc..834a2030ac 100644 --- a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp +++ b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp @@ -24,12 +24,10 @@ #include "RifTextDataTableFormatter.h" -#include "RigContourMapProjection.h" +#include "ContourMap/RigContourMapProjection.h" -#include "RimContourMapProjection.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseContourMapView.h" -#include "RimGeoMechContourMapProjection.h" +#include "ContourMap/RimContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RimGeoMechContourMapView.h" #include "RimProject.h" #include "RimViewWindow.h" @@ -253,8 +251,8 @@ std::pair RicExportContour if ( !existingEclipseContourMap && !existingGeoMechContourMap ) { - existingEclipseContourMap = caf::SelectionManager::instance()->selectedItemOfType(); - existingGeoMechContourMap = caf::SelectionManager::instance()->selectedItemOfType(); + existingEclipseContourMap = caf::SelectionManager::instance()->selectedItemAncestorOfType(); + existingGeoMechContourMap = caf::SelectionManager::instance()->selectedItemAncestorOfType(); } auto pair = std::make_pair( existingEclipseContourMap, existingGeoMechContourMap ); diff --git a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h index 6e1be2456d..4c46ecbcf6 100644 --- a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h +++ b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h @@ -41,6 +41,8 @@ public: RicExportContourMapToTextFeature(); caf::PdmScriptResponse execute() override; + static std::pair findContourMapView(); + protected: bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; @@ -57,9 +59,6 @@ protected: const QString& undefinedValueLabel, bool excludeUndefinedValues ); -private: - static std::pair findContourMapView(); - private: caf::PdmField m_exportFileName; caf::PdmField m_exportLocalCoordinates; diff --git a/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp b/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp index ede38aff0e..507c1bb8ed 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp @@ -20,43 +20,50 @@ #include "RiaApplication.h" #include "RiaEnsembleNameTools.h" -#include "RiaFilePathTools.h" -#include "RiaPreferences.h" -#include "RiaTextStringTools.h" #include "Summary/RiaSummaryDefines.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" -#include "RicCreateSummaryCaseCollectionFeature.h" #include "RicImportSummaryCasesFeature.h" -#include "RifSummaryCaseRestartSelector.h" - -#include "RimEnsembleCurveSet.h" -#include "RimMainPlotCollection.h" -#include "RimOilField.h" #include "RimProject.h" #include "RimSummaryCase.h" #include "RimSummaryCaseMainCollection.h" #include "RimSummaryEnsemble.h" -#include "RimSummaryPlot.h" #include "RiuMainWindow.h" -#include "RiuPlotMainWindow.h" - -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" -#include "SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h" +#include "RiuPlotMainWindowTools.h" #include -#include -#include #include -#include -#include - -#include CAF_CMD_SOURCE_INIT( RicImportEnsembleFeature, "RicImportEnsembleFeature" ); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryEnsemble* RicImportEnsembleFeature::createSummaryEnsemble( std::vector cases ) +{ + if ( cases.empty() ) return nullptr; + + RiaDefines::EnsembleGroupingMode groupingMode = RiaDefines::EnsembleGroupingMode::NONE; + QString name = "Ensemble"; + if ( cases.front()->ensemble() ) + { + groupingMode = cases.front()->ensemble()->groupingMode(); + name = cases.front()->ensemble()->name(); + } + + QStringList fileNames; + for ( auto summaryCase : cases ) + { + fileNames.append( summaryCase->summaryHeaderFilename() ); + } + + bool useEnsembleNameDialog = false; + return importSingleEnsemble( fileNames, useEnsembleNameDialog, groupingMode, RiaDefines::FileType::SMSPEC, name ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -64,13 +71,13 @@ void RicImportEnsembleFeature::onActionTriggered( bool isChecked ) { QString pathCacheName = "ENSEMBLE_FILES"; auto result = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialogWithGrouping( "Import Ensemble", pathCacheName ); - QStringList fileNames = result.files; - RiaEnsembleNameTools::EnsembleGroupingMode ensembleGroupingMode = result.groupingMode; - RiaDefines::FileType fileType = RicRecursiveFileSearchDialog::mapSummaryFileType( result.fileType ); + QStringList fileNames = result.files; + RiaDefines::EnsembleGroupingMode ensembleGroupingMode = result.groupingMode; + RiaDefines::FileType fileType = RicRecursiveFileSearchDialog::mapSummaryFileType( result.fileType ); if ( fileNames.isEmpty() ) return; - if ( ensembleGroupingMode == RiaEnsembleNameTools::EnsembleGroupingMode::NONE ) + if ( ensembleGroupingMode == RiaDefines::EnsembleGroupingMode::NONE ) { bool useEnsembleNameDialog = true; importSingleEnsemble( fileNames, useEnsembleNameDialog, ensembleGroupingMode, fileType ); @@ -88,12 +95,14 @@ void RicImportEnsembleFeature::onActionTriggered( bool isChecked ) } else { - std::vector groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( fileNames, ensembleGroupingMode ); - for ( const QStringList& groupedFileNames : groupedByEnsemble ) + auto grouping = RiaEnsembleNameTools::groupFilesByEnsembleName( fileNames, ensembleGroupingMode ); + for ( const auto& [groupName, fileNames] : grouping ) { bool useEnsembleNameDialog = false; - importSingleEnsemble( groupedFileNames, useEnsembleNameDialog, ensembleGroupingMode, fileType ); + importSingleEnsemble( fileNames, useEnsembleNameDialog, ensembleGroupingMode, fileType, groupName ); } + + RiaSummaryTools::updateSummaryEnsembleNames(); } } } @@ -101,34 +110,37 @@ void RicImportEnsembleFeature::onActionTriggered( bool isChecked ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicImportEnsembleFeature::importSingleEnsemble( const QStringList& fileNames, - bool useEnsembleNameDialog, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode, - RiaDefines::FileType fileType, - const QString& defaultEnsembleName ) +RimSummaryEnsemble* RicImportEnsembleFeature::importSingleEnsemble( const QStringList& fileNames, + bool useEnsembleNameDialog, + RiaDefines::EnsembleGroupingMode groupingMode, + RiaDefines::FileType fileType, + const QString& defaultEnsembleName ) { QString ensembleName = !defaultEnsembleName.isEmpty() ? defaultEnsembleName : RiaEnsembleNameTools::findSuitableEnsembleName( fileNames, groupingMode ); if ( useEnsembleNameDialog ) ensembleName = askForEnsembleName( ensembleName ); - if ( ensembleName.isEmpty() ) return; + if ( ensembleName.isEmpty() ) return nullptr; RicImportSummaryCasesFeature::CreateConfig createConfig{ .fileType = fileType, .ensembleOrGroup = true, .allowDialogs = true }; auto [isOk, cases] = RicImportSummaryCasesFeature::createSummaryCasesFromFiles( fileNames, createConfig ); - if ( !isOk || cases.empty() ) return; + if ( !isOk || cases.empty() ) return nullptr; - RimSummaryEnsemble* ensemble = RicCreateSummaryCaseCollectionFeature::groupSummaryCases( cases, ensembleName, true ); + RimSummaryEnsemble* ensemble = RicImportEnsembleFeature::groupSummaryCases( cases, ensembleName, groupingMode, true ); if ( ensemble ) { for ( auto summaryCase : ensemble->allSummaryCases() ) { + summaryCase->setDisplayNameOption( RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME ); summaryCase->updateAutoShortName(); } - RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( {}, { ensemble } ); + RiaSummaryTools::updateSummaryEnsembleNames(); + + RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( {}, { ensemble } ); } std::vector allCases = RiaApplication::instance()->project()->allGridCases(); @@ -136,6 +148,29 @@ void RicImportEnsembleFeature::importSingleEnsemble( const QStringList& { RiuMainWindow::closeIfOpen(); } + + return ensemble; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryEnsemble* RicImportEnsembleFeature::groupSummaryCases( std::vector cases, + const QString& groupName, + RiaDefines::EnsembleGroupingMode groupingMode, + bool isEnsemble /*= false */ ) +{ + RimSummaryCaseMainCollection* summaryCaseMainCollection = RiaSummaryTools::summaryCaseMainCollection(); + if ( !cases.empty() ) + { + auto newGroup = summaryCaseMainCollection->addEnsemble( cases, groupName, isEnsemble ); + newGroup->setGroupingMode( groupingMode ); + summaryCaseMainCollection->updateConnectedEditors(); + + RiuPlotMainWindowTools::showPlotMainWindow(); + return newGroup; + } + return nullptr; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportEnsembleFeature.h b/ApplicationLibCode/Commands/RicImportEnsembleFeature.h index 705e7253da..89ab9dbe9e 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleFeature.h +++ b/ApplicationLibCode/Commands/RicImportEnsembleFeature.h @@ -34,14 +34,21 @@ class RicImportEnsembleFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; -protected: +public: + static RimSummaryEnsemble* createSummaryEnsemble( std::vector cases ); + static RimSummaryEnsemble* groupSummaryCases( std::vector cases, + const QString& groupName, + RiaDefines::EnsembleGroupingMode groupingMode, + bool isEnsemble = false ); + +private: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - static QString askForEnsembleName( const QString& suggestion ); - static void importSingleEnsemble( const QStringList& fileNames, - bool useEnsembleNameDialog, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode, - RiaDefines::FileType fileType, - const QString& defaultEnsembleName = QString() ); + static QString askForEnsembleName( const QString& suggestion ); + static RimSummaryEnsemble* importSingleEnsemble( const QStringList& fileNames, + bool useEnsembleNameDialog, + RiaDefines::EnsembleGroupingMode groupingMode, + RiaDefines::FileType fileType, + const QString& defaultEnsembleName = QString() ); }; diff --git a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp index 1809c4e648..ff5532fc2f 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp @@ -62,8 +62,8 @@ void RicImportEnsembleSurfaceFeature::onActionTriggered( bool isChecked ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicImportEnsembleSurfaceFeature::importEnsembleSurfaceFromFiles( const QStringList& fileNames, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ) +void RicImportEnsembleSurfaceFeature::importEnsembleSurfaceFromFiles( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ) { if ( fileNames.isEmpty() ) return; @@ -77,8 +77,8 @@ void RicImportEnsembleSurfaceFeature::importEnsembleSurfaceFromFiles( const QStr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicImportEnsembleSurfaceFeature::importSingleEnsembleSurfaceFromFiles( const QStringList& fileNames, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ) +void RicImportEnsembleSurfaceFeature::importSingleEnsembleSurfaceFromFiles( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ) { // Create a list of file names for each layer std::map fileNamesForEachLayer; @@ -176,7 +176,7 @@ void RicImportEnsembleSurfaceFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair +std::pair RicImportEnsembleSurfaceFeature::runRecursiveFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName ) { RiaApplication* app = RiaApplication::instance(); @@ -194,7 +194,7 @@ std::pair m_pathFilter = result.pathFilter; m_fileNameFilter = result.fileNameFilter; - if ( !result.ok ) return std::pair( QStringList(), RiaEnsembleNameTools::EnsembleGroupingMode::NONE ); + if ( !result.ok ) return std::pair( QStringList(), RiaDefines::EnsembleGroupingMode::NONE ); // Remember the path to next time app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() ); diff --git a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h index 29f4096f3c..2e4c795552 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h +++ b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h @@ -34,16 +34,16 @@ public: RicImportEnsembleSurfaceFeature(); - static void importEnsembleSurfaceFromFiles( const QStringList& fileNames, RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ); + static void importEnsembleSurfaceFromFiles( const QStringList& fileNames, RiaDefines::EnsembleGroupingMode groupingMode ); protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, - const QString& pathCacheName ); + std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, + const QString& pathCacheName ); - static void importSingleEnsembleSurfaceFromFiles( const QStringList& fileNames, RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ); + static void importSingleEnsembleSurfaceFromFiles( const QStringList& fileNames, RiaDefines::EnsembleGroupingMode groupingMode ); private: QString m_pathFilter; diff --git a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp index 5a9ea9af98..c48d928d28 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp @@ -61,8 +61,8 @@ void RicImportEnsembleWellLogsFeature::onActionTriggered( bool isChecked ) /// //-------------------------------------------------------------------------------------------------- std::vector - RicImportEnsembleWellLogsFeature::createEnsembleWellLogsFromFiles( const QStringList& fileNames, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ) + RicImportEnsembleWellLogsFeature::createEnsembleWellLogsFromFiles( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ) { std::vector ensembleWellLogs; @@ -79,9 +79,8 @@ std::vector //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEnsembleWellLogs* - RicImportEnsembleWellLogsFeature::createSingleEnsembleWellLogsFromFiles( const QStringList& fileNames, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ) +RimEnsembleWellLogs* RicImportEnsembleWellLogsFeature::createSingleEnsembleWellLogsFromFiles( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ) { if ( fileNames.isEmpty() ) return nullptr; @@ -124,7 +123,7 @@ void RicImportEnsembleWellLogsFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair +std::pair RicImportEnsembleWellLogsFeature::runRecursiveFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName ) { RiaApplication* app = RiaApplication::instance(); @@ -142,7 +141,7 @@ std::pair m_pathFilter = result.pathFilter; m_fileNameFilter = result.fileNameFilter; - if ( !result.ok ) return std::make_pair( QStringList(), RiaEnsembleNameTools::EnsembleGroupingMode::NONE ); + if ( !result.ok ) return std::make_pair( QStringList(), RiaDefines::EnsembleGroupingMode::NONE ); // Remember the path to next time app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() ); diff --git a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h index 7236d3c903..ab0310358c 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h +++ b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h @@ -35,18 +35,18 @@ class RicImportEnsembleWellLogsFeature : public caf::CmdFeature RicImportEnsembleWellLogsFeature(); - static std::vector createEnsembleWellLogsFromFiles( const QStringList& fileNames, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ); + static std::vector createEnsembleWellLogsFromFiles( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ); private: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, - const QString& pathCacheName ); + std::pair runRecursiveFileSearchDialog( const QString& dialogTitle, + const QString& pathCacheName ); - static RimEnsembleWellLogs* createSingleEnsembleWellLogsFromFiles( const QStringList& fileNames, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ); + static RimEnsembleWellLogs* createSingleEnsembleWellLogsFromFiles( const QStringList& fileNames, + RiaDefines::EnsembleGroupingMode groupingMode ); private: QString m_pathFilter; diff --git a/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp b/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp index fce7e9e20b..3465f96b28 100644 --- a/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp @@ -26,6 +26,9 @@ #include "RigFormationNames.h" #include "RigGeoMechCaseData.h" +#include "ContourMap/RimEclipseContourMapView.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" #include "Rim3dView.h" #include "RimCase.h" #include "RimColorLegend.h" @@ -33,10 +36,7 @@ #include "RimColorLegendItem.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseView.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" #include "RimGeoMechCase.h" #include "RimGeoMechCellColors.h" #include "RimGeoMechContourMapView.h" diff --git a/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp b/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp index 49c964ad9a..93baf65df8 100644 --- a/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp @@ -26,7 +26,7 @@ #include "RifReaderFmuRft.h" -#include "RimFormationNames.h" +#include "Formations/RimFormationNames.h" #include "RimObservedDataCollection.h" #include "RimObservedFmuRftData.h" #include "RimObservedSummaryData.h" diff --git a/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp b/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp index 439e06765a..39f9408b76 100644 --- a/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp @@ -26,7 +26,7 @@ #include "RifReaderFmuRft.h" -#include "RimFormationNames.h" +#include "Formations/RimFormationNames.h" #include "RimObservedDataCollection.h" #include "RimObservedSummaryData.h" #include "RimOilField.h" diff --git a/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp b/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp index c96148522d..ac2d6ff5b2 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp @@ -19,6 +19,7 @@ #include "RicImportSummaryCasesFeature.h" #include "Summary/RiaSummaryDefines.h" +#include "Summary/RiaSummaryPlotTools.h" #include "SummaryPlotCommands/RicNewSummaryCurveFeature.h" #include "RiaGuiApplication.h" @@ -43,7 +44,6 @@ #include "RiuPlotMainWindow.h" #include "RiuPlotMainWindowTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h" #include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" @@ -83,7 +83,7 @@ void RicImportSummaryCasesFeature::onActionTriggered( bool isChecked ) { for ( auto sumcase : cases ) { - RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { sumcase }, {} ); + RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( { sumcase }, {} ); } } @@ -133,7 +133,7 @@ std::pair> RicImportSummaryCasesFeature::crea RimSummaryMultiPlot* plotToSelect = nullptr; for ( auto sumCase : cases ) { - plotToSelect = RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { sumCase }, {} ); + plotToSelect = RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( { sumCase }, {} ); } if ( plotToSelect ) diff --git a/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp b/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp index cc79629f6c..60151ac3c5 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp @@ -19,25 +19,18 @@ #include "RicImportSummaryGroupFeature.h" #include "RiaGuiApplication.h" -#include "RiaPreferences.h" - -#include "RicCreateSummaryCaseCollectionFeature.h" -#include "RicImportSummaryCasesFeature.h" #include "Summary/RiaSummaryDefines.h" -#include "RifSummaryCaseRestartSelector.h" +#include "RicImportEnsembleFeature.h" +#include "RicImportSummaryCasesFeature.h" -#include "RimMainPlotCollection.h" -#include "RimOilField.h" #include "RimProject.h" #include "RimSummaryCase.h" -#include "RimSummaryCaseMainCollection.h" #include "RiuMainWindow.h" #include "RiuPlotMainWindow.h" #include -#include CAF_CMD_SOURCE_INIT( RicImportSummaryGroupFeature, "RicImportSummaryGroupFeature" ); @@ -58,7 +51,7 @@ void RicImportSummaryGroupFeature::onActionTriggered( bool isChecked ) auto [isOk, cases] = RicImportSummaryCasesFeature::createSummaryCasesFromFiles( fileNames, createConfig ); RicImportSummaryCasesFeature::addSummaryCases( cases ); - RicCreateSummaryCaseCollectionFeature::groupSummaryCases( cases, "", false ); + RicImportEnsembleFeature::groupSummaryCases( cases, "", RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE, false ); RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow(); if ( mainPlotWindow && !cases.empty() ) diff --git a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp index ce5ce19330..4eec8fccd5 100644 --- a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp @@ -22,15 +22,16 @@ #include "RigEclipseCaseData.h" #include "RigFemPartCollection.h" +#include "ContourMap/RimEclipseContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" +#include "ContourMap/RimStatisticsContourMapView.h" #include "Polygons/RimPolygonInView.h" #include "Rim3dView.h" #include "RimCellEdgeColors.h" #include "RimCellFilterCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseContourMapView.h" -#include "RimEclipseContourMapViewCollection.h" #include "RimEclipseView.h" #include "RimFaultInViewCollection.h" #include "RimGeoMechCase.h" @@ -59,14 +60,13 @@ CAF_CMD_SOURCE_INIT( RicNewContourMapViewFeature, "RicNewContourMapViewFeature" ); -const size_t mediumSamplingThresholdCellCount = 500000u; -const size_t largeSamplingThresholdCellCount = 5000000u; - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- bool RicNewContourMapViewFeature::isCommandEnabled() const { + if ( caf::SelectionManager::instance()->selectedItemOfType() != nullptr ) return false; + bool selectedView = caf::SelectionManager::instance()->selectedItemOfType() != nullptr; bool selectedCase = caf::SelectionManager::instance()->selectedItemOfType() != nullptr; @@ -242,17 +242,6 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMapFr caf::PdmDefaultObjectFactory::instance() ) ); CVF_ASSERT( contourMap ); - const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ); - size_t activeCellCount = activeCellInfo->reservoirActiveCellCount(); - if ( activeCellCount >= largeSamplingThresholdCellCount ) - { - contourMap->contourMapProjection()->setSampleSpacingFactor( 1.5 ); - } - else if ( activeCellCount >= mediumSamplingThresholdCellCount ) - { - contourMap->contourMapProjection()->setSampleSpacingFactor( 1.2 ); - } - contourMap->setEclipseCase( eclipseCase ); auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" ); @@ -327,17 +316,6 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap( size_t i = eclipseCase->contourMapCollection()->views().size(); contourMap->setName( QString( "Contour Map %1" ).arg( i + 1 ) ); - const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ); - size_t activeCellCount = activeCellInfo->reservoirActiveCellCount(); - if ( activeCellCount >= largeSamplingThresholdCellCount ) - { - contourMap->contourMapProjection()->setSampleSpacingFactor( 1.5 ); - } - else if ( activeCellCount >= mediumSamplingThresholdCellCount ) - { - contourMap->contourMapProjection()->setSampleSpacingFactor( 1.2 ); - } - contourMap->faultCollection()->setActive( false ); contourMap->wellCollection()->isActive = false; diff --git a/ApplicationLibCode/Commands/RicNewStatisticsContourMapFeature.cpp b/ApplicationLibCode/Commands/RicNewStatisticsContourMapFeature.cpp index cdd7d45934..42f43aef3b 100644 --- a/ApplicationLibCode/Commands/RicNewStatisticsContourMapFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewStatisticsContourMapFeature.cpp @@ -18,8 +18,10 @@ #include "RicNewStatisticsContourMapFeature.h" +#include "ContourMap/RimStatisticsContourMap.h" #include "RimEclipseCaseEnsemble.h" -#include "RimStatisticsContourMap.h" + +#include "Riu3DMainWindowTools.h" #include "cafSelectionManager.h" @@ -37,10 +39,12 @@ void RicNewStatisticsContourMapFeature::addStatisticsContourMap( RimEclipseCaseE std::vector cases = eclipseCaseEnsemble->cases(); if ( cases.empty() ) return; - RimStatisticsContourMap* statisticsContourMap = new RimStatisticsContourMap; + auto statisticsContourMap = new RimStatisticsContourMap(); statisticsContourMap->setEclipseCase( cases[0] ); eclipseCaseEnsemble->addStatisticsContourMap( statisticsContourMap ); eclipseCaseEnsemble->updateConnectedEditors(); + + Riu3DMainWindowTools::selectAsCurrentItem( statisticsContourMap ); } //-------------------------------------------------------------------------------------------------- @@ -65,8 +69,8 @@ void RicNewStatisticsContourMapFeature::onActionTriggered( bool isChecked ) //-------------------------------------------------------------------------------------------------- void RicNewStatisticsContourMapFeature::setupActionLook( QAction* actionToSetup ) { - actionToSetup->setText( "New Statistics Contour Map" ); - actionToSetup->setIcon( QIcon( ":/3DView16x16.png" ) ); + actionToSetup->setText( "New Ensemble Contour Map" ); + actionToSetup->setIcon( QIcon( ":/Histogram16x16.png" ) ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicNewStatisticsContourMapViewFeature.cpp b/ApplicationLibCode/Commands/RicNewStatisticsContourMapViewFeature.cpp new file mode 100644 index 0000000000..82a7eab43f --- /dev/null +++ b/ApplicationLibCode/Commands/RicNewStatisticsContourMapViewFeature.cpp @@ -0,0 +1,133 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicNewStatisticsContourMapViewFeature.h" + +#include "ContourMap/RimEclipseContourMapViewCollection.h" +#include "ContourMap/RimStatisticsContourMap.h" +#include "ContourMap/RimStatisticsContourMapView.h" +#include "RimCellFilterCollection.h" +#include "RimEclipseCase.h" +#include "RimFaultInViewCollection.h" +#include "RimOilField.h" +#include "RimProject.h" +#include "RimSimWellInViewCollection.h" +#include "RimSurfaceInViewCollection.h" + +#include "Riu3DMainWindowTools.h" +#include "RiuGuiTheme.h" + +#include "RiaColorTools.h" + +#include "cafPdmDocument.h" +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT( RicNewStatisticsContourMapViewFeature, "RicNewStatisticsContourMapViewFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicNewStatisticsContourMapViewFeature::isCommandEnabled() const +{ + auto contourMap = caf::SelectionManager::instance()->selectedItemOfType(); + return contourMap != nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewStatisticsContourMapViewFeature::onActionTriggered( bool isChecked ) +{ + auto contourMap = caf::SelectionManager::instance()->selectedItemOfType(); + if ( !contourMap ) return; + + contourMap->ensureResultsComputed(); + auto view = createAndAddView( contourMap ); + contourMap->updateConnectedEditors(); + + Riu3DMainWindowTools::selectAsCurrentItem( view ); + Riu3DMainWindowTools::setExpanded( contourMap ); + Riu3DMainWindowTools::setExpanded( view ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewStatisticsContourMapViewFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setText( "Create View" ); + actionToSetup->setIcon( QIcon( ":/2DMap16x16.png" ) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMapView* RicNewStatisticsContourMapViewFeature::createStatisticsContourMapView( RimStatisticsContourMap* statisticsContourMap ) +{ + RimEclipseCase* eclipseCase = statisticsContourMap->eclipseCase(); + if ( !eclipseCase ) return nullptr; + + RimStatisticsContourMapView* contourMapView = new RimStatisticsContourMapView; + contourMapView->setStatisticsContourMap( statisticsContourMap ); + contourMapView->setEclipseCase( eclipseCase ); + + caf::PdmDocument::updateUiIconStateRecursively( contourMapView ); + + contourMapView->faultCollection()->setActive( false ); + contourMapView->wellCollection()->isActive = false; + + statisticsContourMap->addView( contourMapView ); + + auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" ); + contourMapView->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background + contourMapView->initAfterReadRecursively(); + + return contourMapView; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMapView* RicNewStatisticsContourMapViewFeature::createAndAddView( RimStatisticsContourMap* statisticsContourMap ) +{ + if ( auto contourMapView = createStatisticsContourMapView( statisticsContourMap ) ) + { + // Must be run before buildViewItems, as wells are created in this function + contourMapView->loadDataAndUpdate(); + + // make sure no surfaces are shown in the view when the contourmap is generated + if ( contourMapView->surfaceInViewCollection() ) contourMapView->surfaceInViewCollection()->setCheckState( Qt::Unchecked ); + + if ( auto eclipseCase = statisticsContourMap->eclipseCase() ) + { + eclipseCase->updateConnectedEditors(); + contourMapView->cellFilterCollection()->setCase( eclipseCase ); + } + + contourMapView->createDisplayModelAndRedraw(); + contourMapView->zoomAll(); + + statisticsContourMap->updateConnectedEditors(); + + return contourMapView; + } + + return nullptr; +} diff --git a/ApplicationLibCode/Commands/RicNewStatisticsContourMapViewFeature.h b/ApplicationLibCode/Commands/RicNewStatisticsContourMapViewFeature.h new file mode 100644 index 0000000000..c1ab228939 --- /dev/null +++ b/ApplicationLibCode/Commands/RicNewStatisticsContourMapViewFeature.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RimStatisticsContourMapView; +class RimStatisticsContourMap; + +//================================================================================================== +/// +//================================================================================================== +class RicNewStatisticsContourMapViewFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + + static RimStatisticsContourMapView* createAndAddView( RimStatisticsContourMap* statisticsContourMap ); + +protected: + bool isCommandEnabled() const override; + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; + + static RimStatisticsContourMapView* createStatisticsContourMapView( RimStatisticsContourMap* statisticsContourMap ); +}; diff --git a/ApplicationLibCode/Commands/RicNewViewFeature.cpp b/ApplicationLibCode/Commands/RicNewViewFeature.cpp index 866dbbf0ca..76d8d237f1 100644 --- a/ApplicationLibCode/Commands/RicNewViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewViewFeature.cpp @@ -21,11 +21,11 @@ #include "RiaLogging.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" #include "RimEclipseCase.h" #include "RimEclipseCaseEnsemble.h" #include "RimEclipseCaseTools.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseView.h" #include "RimEclipseViewCollection.h" #include "RimGeoMechCase.h" diff --git a/ApplicationLibCode/Commands/RicNewViewForGridEnsembleFeature.cpp b/ApplicationLibCode/Commands/RicNewViewForGridEnsembleFeature.cpp index dc9c9c4eb0..a6c1ac470f 100644 --- a/ApplicationLibCode/Commands/RicNewViewForGridEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewViewForGridEnsembleFeature.cpp @@ -20,10 +20,10 @@ #include "RiaLogging.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" #include "RimEclipseCase.h" #include "RimEclipseCaseEnsemble.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseView.h" #include "RimGeoMechCase.h" #include "RimGeoMechView.h" diff --git a/ApplicationLibCode/Commands/RicNewWellTargetMappingFeature.cpp b/ApplicationLibCode/Commands/RicNewWellTargetMappingFeature.cpp new file mode 100644 index 0000000000..07c0f46db9 --- /dev/null +++ b/ApplicationLibCode/Commands/RicNewWellTargetMappingFeature.cpp @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicNewWellTargetMappingFeature.h" + +#include "RimEclipseCase.h" +#include "RimEclipseCaseEnsemble.h" +#include "RimWellTargetMapping.h" + +#include "RiuMainWindow.h" + +#include "cafSelectionManagerTools.h" + +#include + +CAF_CMD_SOURCE_INIT( RicNewWellTargetMappingFeature, "RicNewWellTargetMappingFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewWellTargetMappingFeature::onActionTriggered( bool isChecked ) +{ + if ( auto ensembles = caf::selectedObjectsByTypeStrict(); !ensembles.empty() ) + { + auto ensemble = ensembles.front(); + auto wellTargetMapping = new RimWellTargetMapping(); + ensemble->addWellTargetMapping( wellTargetMapping ); + wellTargetMapping->setDefaults(); + + ensemble->updateConnectedEditors(); + RiuMainWindow::instance()->selectAsCurrentItem( wellTargetMapping ); + } + else if ( auto eclipseCases = caf::selectedObjectsByTypeStrict(); !eclipseCases.empty() ) + { + auto eclipseCase = eclipseCases.front(); + auto wellTargetMapping = new RimWellTargetMapping(); + eclipseCase->addWellTargetMapping( wellTargetMapping ); + wellTargetMapping->setDefaults(); + + eclipseCase->updateConnectedEditors(); + RiuMainWindow::instance()->selectAsCurrentItem( wellTargetMapping ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicNewWellTargetMappingFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setText( "Create Well Target Mapping" ); + actionToSetup->setIcon( QIcon( ":/WellTargets.png" ) ); +} diff --git a/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.h b/ApplicationLibCode/Commands/RicNewWellTargetMappingFeature.h similarity index 94% rename from ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.h rename to ApplicationLibCode/Commands/RicNewWellTargetMappingFeature.h index 77430ae978..2e98e73f16 100644 --- a/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.h +++ b/ApplicationLibCode/Commands/RicNewWellTargetMappingFeature.h @@ -23,7 +23,7 @@ //================================================================================================== /// //================================================================================================== -class RicNewWellTargetCandidatesGeneratorFeature : public caf::CmdFeature +class RicNewWellTargetMappingFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; diff --git a/ApplicationLibCode/Commands/RicPolygonFromImageDialog.cpp b/ApplicationLibCode/Commands/RicPolygonFromImageDialog.cpp new file mode 100644 index 0000000000..412f66c3be --- /dev/null +++ b/ApplicationLibCode/Commands/RicPolygonFromImageDialog.cpp @@ -0,0 +1,308 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicPolygonFromImageDialog.h" + +#include "RicCreateContourMapPolygonTools.h" + +#include "RigPolygonTools.h" + +#include +#include +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RicPolygonFromImageDialog::RicPolygonFromImageDialog( QWidget* parent /*= nullptr */ ) + : QDialog( parent ) +{ + setWindowTitle( "Image Morphology Tool" ); + + // Layout and widgets + QVBoxLayout* mainLayout = new QVBoxLayout( this ); + + QHBoxLayout* centerLayout = new QHBoxLayout( this ); + mainLayout->addLayout( centerLayout ); + + QVBoxLayout* settingsLayout = new QVBoxLayout( this ); + centerLayout->addLayout( settingsLayout ); + + QLabel* kernelLabel = new QLabel( "Kernel Size:", this ); + settingsLayout->addWidget( kernelLabel ); + + kernelSpinBox = new QSpinBox( this ); + kernelSpinBox->setRange( 1, 31 ); + kernelSpinBox->setValue( 3 ); + settingsLayout->addWidget( kernelSpinBox ); + + QLabel* transparencyLabel = new QLabel( "Transparency (0-100):", this ); + settingsLayout->addWidget( transparencyLabel ); + + transparencySlider = new QSlider( Qt::Horizontal, this ); + transparencySlider->setRange( 0, 100 ); + transparencySlider->setValue( 90 ); + settingsLayout->addWidget( transparencySlider ); + + showInput = new QCheckBox( "Show Input Image", this ); + showInput->setChecked( true ); + settingsLayout->addWidget( showInput ); + + showDilated = new QCheckBox( "Show Dilated Image", this ); + showDilated->setChecked( false ); + settingsLayout->addWidget( showDilated ); + + showEroded = new QCheckBox( "Show Eroded Image", this ); + showEroded->setChecked( false ); + settingsLayout->addWidget( showEroded ); + + showFinal = new QCheckBox( "Show Final Image", this ); + showFinal->setChecked( true ); + settingsLayout->addWidget( showFinal ); + + { + auto* label = new QLabel( "Minimum polygon area", this ); + areaThresholdLineEdit = new QLineEdit( this ); + areaThresholdLineEdit->setText( "10" ); + + auto* layout = new QHBoxLayout(); + layout->addWidget( label ); + layout->addWidget( areaThresholdLineEdit ); + settingsLayout->addLayout( layout ); + } + + settingsLayout->addStretch(); + + graphicsView = new QGraphicsView( this ); + graphicsScene = new QGraphicsScene( this ); + graphicsView->setScene( graphicsScene ); + centerLayout->addWidget( graphicsView ); + + // Give more space to graphics view + centerLayout->setStretch( 0, 3 ); + centerLayout->setStretch( 1, 7 ); + + // Create a button box + QDialogButtonBox* buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this ); + mainLayout->addWidget( buttonBox ); + + // Connect the button box signals + connect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept ); + connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject ); + + // Connect signals and slots + connect( showInput, &QCheckBox::clicked, this, &RicPolygonFromImageDialog::showImages ); + connect( showEroded, &QCheckBox::clicked, this, &RicPolygonFromImageDialog::showImages ); + connect( showDilated, &QCheckBox::clicked, this, &RicPolygonFromImageDialog::showImages ); + connect( showFinal, &QCheckBox::clicked, this, &RicPolygonFromImageDialog::showImages ); + + connect( kernelSpinBox, &QSpinBox::valueChanged, this, &RicPolygonFromImageDialog::updateAndShowImages ); + connect( transparencySlider, &QSlider::valueChanged, this, &RicPolygonFromImageDialog::updateAndShowImages ); + + resizeAndCenterDialog( 0.6 ); // 1.0 means to the full screen size +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::performDilation() +{ + if ( sourceData.empty() ) + { + QMessageBox::warning( this, "Error", "No image loaded." ); + return; + } + + int kernelSize = kernelAdjustedSize(); + dilatedData = RigPolygonTools::dilate( sourceData, kernelSize ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::performErosion() +{ + if ( sourceData.empty() ) + { + QMessageBox::warning( this, "Error", "No image loaded." ); + return; + } + + int kernelSize = kernelAdjustedSize(); + erodedData = RigPolygonTools::erode( sourceData, kernelSize ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::updateAndShowImages() +{ + performErosion(); + performDilation(); + computeFinal(); + showImages(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::showImages() +{ + if ( sourceData.empty() ) + { + QMessageBox::warning( this, "Error", "No image loaded." ); + return; + } + + const auto transparency = 180; + auto original = RicCreateContourMapPolygonTools::convertBinaryToGrayscaleImage( sourceData, transparency ); + auto dilatedImage = RicCreateContourMapPolygonTools::convertBinaryToImage( dilatedData, QColorConstants::Green, transparency ); + auto erodedImage = RicCreateContourMapPolygonTools::convertBinaryToImage( erodedData, QColorConstants::Red, transparency ); + auto finalImage = RicCreateContourMapPolygonTools::convertBinaryToImage( processedData, QColorConstants::Yellow, transparency ); + + graphicsScene->clear(); + + // Add a black background image + if ( !original.isNull() ) + { + QImage blackImage( original.size(), QImage::Format_RGB32 ); + blackImage.fill( Qt::black ); + QPixmap basePixmap = QPixmap::fromImage( blackImage ); + QGraphicsPixmapItem* baseItem = new QGraphicsPixmapItem( basePixmap ); + graphicsScene->addItem( baseItem ); + } + + double alpha = transparencySlider->value() / 100.0; + + if ( showInput->isChecked() ) + { + QPixmap basePixmap = QPixmap::fromImage( original ); + QGraphicsPixmapItem* baseItem = new QGraphicsPixmapItem( basePixmap ); + baseItem->setOpacity( alpha ); + graphicsScene->addItem( baseItem ); + } + + if ( showDilated->isChecked() && !dilatedImage.isNull() ) + { + QPixmap dilatePixmap = QPixmap::fromImage( dilatedImage ); + QGraphicsPixmapItem* dilateItem = new QGraphicsPixmapItem( dilatePixmap ); + dilateItem->setOpacity( alpha ); + graphicsScene->addItem( dilateItem ); + } + + if ( showEroded->isChecked() && !erodedImage.isNull() ) + { + QPixmap erodePixmap = QPixmap::fromImage( erodedImage ); + QGraphicsPixmapItem* erodeItem = new QGraphicsPixmapItem( erodePixmap ); + erodeItem->setOpacity( alpha ); + graphicsScene->addItem( erodeItem ); + } + + if ( showFinal->isChecked() && !finalImage.isNull() ) + { + QPixmap erodePixmap = QPixmap::fromImage( finalImage ); + QGraphicsPixmapItem* erodeItem = new QGraphicsPixmapItem( erodePixmap ); + erodeItem->setOpacity( alpha ); + graphicsScene->addItem( erodeItem ); + } + + graphicsView->fitInView( graphicsScene->sceneRect(), Qt::KeepAspectRatio ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector> RicPolygonFromImageDialog::processedImageData() const +{ + return processedData; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::setSourceImageData( std::vector> imageData ) +{ + sourceData = imageData; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RicPolygonFromImageDialog::areaThreshold() const +{ + return areaThresholdLineEdit->text().toInt(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RicPolygonFromImageDialog::kernelAdjustedSize() const +{ + // The kernel size should be odd and positive + return kernelSpinBox->value() * 2 - 1; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::computeFinal() +{ + if ( sourceData.empty() ) + { + QMessageBox::warning( this, "Error", "No image loaded." ); + return; + } + + auto floodFilled = RigPolygonTools::fillInterior( sourceData ); + + int kernelSize = kernelAdjustedSize(); + auto eroded = RigPolygonTools::erode( floodFilled, kernelSize ); + auto dilated = RigPolygonTools::dilate( eroded, kernelSize ); + processedData = dilated; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::resizeAndCenterDialog( double scale ) +{ + QScreen* screen = QGuiApplication::primaryScreen(); + if ( !screen ) return; + + QRect screenGeometry = screen->geometry(); + + int width = static_cast( screenGeometry.width() * scale ); + int height = static_cast( screenGeometry.height() * scale ); + + resize( width, height ); + + int x = screenGeometry.x() + ( screenGeometry.width() - width ) / 2; + int y = screenGeometry.y() + ( screenGeometry.height() - height ) / 2; + + move( x, y ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicPolygonFromImageDialog::resizeEvent( QResizeEvent* event ) +{ + QDialog::resizeEvent( event ); + showImages(); +} diff --git a/ApplicationLibCode/Commands/RicPolygonFromImageDialog.h b/ApplicationLibCode/Commands/RicPolygonFromImageDialog.h new file mode 100644 index 0000000000..65f704cc60 --- /dev/null +++ b/ApplicationLibCode/Commands/RicPolygonFromImageDialog.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class RicPolygonFromImageDialog : public QDialog +{ + Q_OBJECT + +public: + RicPolygonFromImageDialog( QWidget* parent = nullptr ); + + std::vector> processedImageData() const; + void setSourceImageData( std::vector> imageData ); + + int areaThreshold() const; + +public slots: + void updateAndShowImages(); + +private slots: + void performDilation(); + void performErosion(); + void showImages(); + +private: + int kernelAdjustedSize() const; + void computeFinal(); + void resizeAndCenterDialog( double scale ); + + void resizeEvent( QResizeEvent* event ) override; + +private: + QSpinBox* kernelSpinBox; + QSlider* transparencySlider; + QGraphicsView* graphicsView; + QGraphicsScene* graphicsScene; + + QCheckBox* showInput; + QCheckBox* showDilated; + QCheckBox* showEroded; + QCheckBox* showFinal; + + QLineEdit* areaThresholdLineEdit; + + std::vector> sourceData, dilatedData, erodedData, processedData; +}; diff --git a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp index 62a5db76c0..614aa97e6b 100644 --- a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp +++ b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp @@ -21,11 +21,11 @@ #include "RiaEnsembleNameTools.h" #include "RiaFilePathTools.h" #include "RiaGuiApplication.h" +#include "RiaStdStringTools.h" #include "RiaStringListSerializer.h" #include "RiuFileDialogTools.h" #include "RiuTools.h" -#include "opm/io/eclipse/EclUtil.hpp" #include #include @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -48,19 +47,143 @@ #include #include #include +#include #include #include #include -#define RECURSIVE_FILESEARCH_DEFAULT_DIALOG_HEIGHT 350 -#define FIND_BUTTON_FIND_TEXT "Find" -#define FILES_FOUND_TEXT "Files Found" +// Anonymous namespace for internal functions +namespace +{ + +// Get all first level items, usually the ensemble items +auto firstLevelItems = []( QStandardItem* rootItem ) -> QList +{ + QList firstLevelItems; + + for ( int i = 0; i < rootItem->rowCount(); ++i ) + { + QStandardItem* item = rootItem->child( i ); + if ( item ) + { + firstLevelItems.append( item ); + } + } + + return firstLevelItems; +}; //-------------------------------------------------------------------------------------------------- -/// Internal functions +/// //-------------------------------------------------------------------------------------------------- -static void sortStringsByLength( QStringList& strings, bool ascending = true ); +void setCheckedStateChildItems( QStandardItem* parentItem, Qt::CheckState checkState ) +{ + if ( !parentItem ) return; + + for ( int i = 0; i < parentItem->rowCount(); ++i ) + { + auto childItem = parentItem->child( i ); + if ( childItem && childItem->isCheckable() ) + { + childItem->setCheckState( checkState ); + } + + setCheckedStateChildItems( childItem, checkState ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void findItemsMatching( QStandardItem* parentItem, const QString& substring, QList& matchingItems ) +{ + if ( !parentItem ) return; + + for ( int i = 0; i < parentItem->rowCount(); ++i ) + { + auto searchString = substring + "/"; + + auto childItem = parentItem->child( i ); + if ( childItem ) + { + auto textToMatch = childItem->text(); + textToMatch.replace( '\\', '/' ); + + if ( childItem && textToMatch.contains( searchString, Qt::CaseInsensitive ) ) + { + matchingItems.append( childItem ); + } + } + + findItemsMatching( childItem, substring, matchingItems ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void getTextForCheckedItems( QStandardItem* root, QStandardItem* parentItem, const QString& prefix, QStringList& checkedItems ) +{ + if ( !parentItem ) return; + + for ( int i = 0; i < parentItem->rowCount(); ++i ) + { + auto childItem = parentItem->child( i ); + if ( childItem && childItem->isCheckable() && childItem->checkState() == Qt::Checked ) + { + if ( parentItem != root ) + { + checkedItems.append( prefix + childItem->text() ); + } + + getTextForCheckedItems( root, childItem, prefix, checkedItems ); + } + } +} + +int defaultDialogHeight() +{ + return 550; +} + +QString findButtonText() +{ + return "Search"; +} + +QString filesFoundText() +{ + return "File Selection"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void sortStringsByLength( QStringList& strings, bool ascending ) +{ + QStringList sorted = strings; + int numItems = sorted.size(); + bool swapped; + do + { + swapped = false; + for ( int i = 0; i < numItems - 1; i++ ) + { + int s0 = strings[i].size(); + int s1 = strings[i + 1].size(); + if ( ( ascending && s0 > s1 ) || ( !ascending && s0 < s1 ) ) + { + const QString temp = strings[i]; + strings[i] = strings[i + 1]; + strings[i + 1] = temp; + swapped = true; + } + } + } while ( swapped ); +} + +} // namespace //-------------------------------------------------------------------------------------------------- /// @@ -117,7 +240,7 @@ RicRecursiveFileSearchDialogResult RicRecursiveFileSearchDialog::runRecursiveSea dialog.m_fileType = fileTypes.front(); } - for ( const auto& s : caf::AppEnum::uiTexts() ) + for ( const auto& s : caf::AppEnum::uiTexts() ) { dialog.m_ensembleGroupingMode->addItem( s ); } @@ -145,15 +268,17 @@ RicRecursiveFileSearchDialogResult RicRecursiveFileSearchDialog::runRecursiveSea RiaStringListSerializer stringListSerializer( fileFilterRegistryKey ); stringListSerializer.addString( dialog.m_fileFilterField->currentText(), maxItemsInRegistry ); } + + return { .ok = dialog.result() == QDialog::Accepted, + .files = dialog.m_foundFiles, + .rootDir = dialog.rootDirWithEndSeparator(), + .pathFilter = dialog.pathFilterWithoutStartSeparator(), + .fileNameFilter = dialog.fileNameFilter(), + .fileType = dialog.fileType(), + .groupingMode = dialog.ensembleGroupingMode() }; } - return RicRecursiveFileSearchDialogResult( dialog.result() == QDialog::Accepted, - dialog.m_foundFiles, - dialog.rootDirWithEndSeparator(), - dialog.pathFilterWithoutStartSeparator(), - dialog.fileNameFilter(), - dialog.fileType(), - dialog.ensembleGroupingMode() ); + return {}; } //-------------------------------------------------------------------------------------------------- @@ -162,6 +287,7 @@ RicRecursiveFileSearchDialogResult RicRecursiveFileSearchDialog::runRecursiveSea RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent, const std::vector& fileTypes ) : QDialog( parent, RiuTools::defaultDialogFlags() ) , m_incomingFileTypes( fileTypes ) + , m_blockUpdateOfOtherItems( false ) { // Create widgets m_browseButton = new QPushButton(); @@ -180,10 +306,11 @@ RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent, con m_effectiveFilterLabel = new QLabel(); m_effectiveFilterContentLabel = new QLabel(); m_ensembleGroupingMode = new QComboBox(); - m_searchRootLabel = new QLabel(); - m_searchRootContentLabel = new QLabel(); m_findOrCancelButton = new QPushButton(); - m_fileListWidget = new QListWidget(); + m_fileTreeView = new QTreeView(); + m_treeViewFilterLabel = new QLabel( "Selection Filter" ); + m_treeViewFilterLineEdit = new QLineEdit(); + m_treeViewFilterButton = new QPushButton( "Apply" ); m_buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel ); @@ -198,11 +325,21 @@ RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent, con connect( m_fileExtensionField, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotFileExtensionChanged( const QString& ) ) ); - connect( m_fileListWidget, + connect( m_fileTreeView, SIGNAL( customContextMenuRequested( const QPoint& ) ), this, SLOT( slotFileListCustomMenuRequested( const QPoint& ) ) ); + connect( m_treeViewFilterButton, SIGNAL( clicked() ), this, SLOT( slotFilterTreeViewClicked() ) ); + connect( m_treeViewFilterLineEdit, &QLineEdit::returnPressed, m_treeViewFilterButton, &QPushButton::click ); + connect( m_treeViewFilterLineEdit, &QLineEdit::textEdited, m_treeViewFilterButton, &QPushButton::click ); + + m_treeViewFilterLineEdit->setPlaceholderText( "Select Realizations: 1, 5-7, 9-18:3" ); + + m_treeViewFilterLabel->setVisible( false ); + m_treeViewFilterButton->setVisible( false ); + m_treeViewFilterLineEdit->setVisible( false ); + connect( m_browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowseButtonClicked() ) ); connect( m_findOrCancelButton, SIGNAL( clicked() ), this, SLOT( slotFindOrCancelButtonClicked() ) ); @@ -210,35 +347,57 @@ RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent, con connect( m_buttons, SIGNAL( accepted() ), this, SLOT( slotDialogOkClicked() ) ); connect( m_buttons, SIGNAL( rejected() ), this, SLOT( slotDialogCancelClicked() ) ); + m_buttons->button( QDialogButtonBox::Ok )->setDefault( true ); + // Set widget properties m_pathFilterLabel->setText( "Path pattern" ); m_fileFilterLabel->setText( "File pattern" ); m_fileTypeLabel->setText( "File type" ); m_fileExtensionLabel->setText( "File extension" ); m_effectiveFilterLabel->setText( "Effective filter" ); - m_searchRootLabel->setText( "Root" ); - m_searchRootLabel->setVisible( false ); m_effectiveFilterContentLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); - m_searchRootContentLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); - m_searchRootContentLabel->setVisible( false ); - m_fileListWidget->setSelectionMode( QAbstractItemView::ExtendedSelection ); - m_fileListWidget->setVisible( false ); - m_fileListWidget->setContextMenuPolicy( Qt::CustomContextMenu ); - m_fileListWidget->setMinimumHeight( 350 ); + QObject::connect( &m_filePathModel, + &QStandardItemModel::itemChanged, + [this]( QStandardItem* item ) + { + if ( m_blockUpdateOfOtherItems ) return; + + if ( item->isCheckable() ) + { + setCheckedStateChildItems( item, item->checkState() ); + } + + if ( item->checkState() == Qt::Checked ) + { + auto parent = item->parent(); + if ( parent ) + { + m_blockUpdateOfOtherItems = true; + parent->setCheckState( Qt::Checked ); + m_blockUpdateOfOtherItems = false; + } + } + } ); + + m_fileTreeView->setModel( &m_filePathModel ); + m_fileTreeView->setHeaderHidden( true ); + m_fileTreeView->setSelectionMode( QAbstractItemView::ExtendedSelection ); + m_fileTreeView->setContextMenuPolicy( Qt::CustomContextMenu ); + m_fileTreeView->setVisible( false ); + m_fileTreeView->setMinimumHeight( 350 ); m_browseButton->setText( "..." ); m_browseButton->setFixedWidth( 25 ); - m_findOrCancelButton->setText( FIND_BUTTON_FIND_TEXT ); + m_findOrCancelButton->setText( findButtonText() ); m_findOrCancelButton->setFixedWidth( 75 ); - m_findOrCancelButton->setDefault( true ); // Define layout QVBoxLayout* dialogLayout = new QVBoxLayout(); - QGroupBox* inputGroup = new QGroupBox( "Filter" ); + QGroupBox* inputGroup = new QGroupBox( "Search" ); QGridLayout* inputGridLayout = new QGridLayout(); int row = 0; inputGridLayout->addWidget( m_pathFilterLabel, row, 0 ); @@ -277,11 +436,13 @@ RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent, con m_outputGroup = new QGroupBox( "Files Found" ); QGridLayout* outputGridLayout = new QGridLayout(); - outputGridLayout->addWidget( m_searchRootLabel, 1, 0 ); - outputGridLayout->addWidget( m_searchRootContentLabel, 1, 1 ); - // outputGridLayout->addWidget(m_fileListLabel, 2, 0); - outputGridLayout->addWidget( m_fileListWidget, 2, 0, 1, 3 ); + outputGridLayout->addWidget( m_treeViewFilterLabel, 1, 0 ); + outputGridLayout->addWidget( m_treeViewFilterLineEdit, 1, 1 ); + outputGridLayout->addWidget( m_treeViewFilterButton, 1, 2 ); + + outputGridLayout->addWidget( m_fileTreeView, 2, 0, 1, 3 ); + m_outputGroup->setLayout( outputGridLayout ); dialogLayout->addWidget( inputGroup ); @@ -397,7 +558,7 @@ QStringList RicRecursiveFileSearchDialog::fileExtensions() const } QStringList exts = m_fileExtensions; - sortStringsByLength( exts ); + sortStringsByLength( exts, true ); return exts; } @@ -429,10 +590,10 @@ QString RicRecursiveFileSearchDialog::extensionFromFileNameFilter() const //-------------------------------------------------------------------------------------------------- void RicRecursiveFileSearchDialog::updateFileListWidget() { - m_fileListWidget->clear(); - - if ( ensembleGroupingMode() != RiaEnsembleNameTools::EnsembleGroupingMode::NONE ) + if ( ensembleGroupingMode() != RiaDefines::EnsembleGroupingMode::NONE ) { + m_filePathModel.clear(); + if ( m_fileType == RicRecursiveFileSearchDialog::FileType::STIMPLAN_SUMMARY || m_fileType == RicRecursiveFileSearchDialog::FileType::REVEAL_SUMMARY ) { @@ -440,41 +601,47 @@ void RicRecursiveFileSearchDialog::updateFileListWidget() std::map groupedByEnsemble = RiaEnsembleNameTools::groupFilesByCustomEnsemble( m_foundFiles, fileType ); for ( auto [ensembleName, groupedFileNames] : groupedByEnsemble ) { - new QListWidgetItem( QDir::toNativeSeparators( ensembleName ), m_fileListWidget ); - addToFileListWidget( groupedFileNames ); + addToTreeView( ensembleName, groupedFileNames ); } } else { - std::vector groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( m_foundFiles, ensembleGroupingMode() ); - for ( const QStringList& groupedFileNames : groupedByEnsemble ) + auto grouping = RiaEnsembleNameTools::groupFilesByEnsembleName( m_foundFiles, ensembleGroupingMode() ); + for ( const auto& [groupName, fileNames] : grouping ) { - QString ensembleName = RiaEnsembleNameTools::findSuitableEnsembleName( groupedFileNames, ensembleGroupingMode() ); - new QListWidgetItem( QDir::toNativeSeparators( ensembleName ), m_fileListWidget ); - addToFileListWidget( groupedFileNames ); + addToTreeView( groupName, fileNames ); } } } - else - { - addToFileListWidget( m_foundFiles ); - } + + QModelIndex index = m_filePathModel.index( 0, 0 ); + m_fileTreeView->expand( index ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicRecursiveFileSearchDialog::addToFileListWidget( const QStringList& fileNames ) +void RicRecursiveFileSearchDialog::addToTreeView( const QString& ensembleName, const QStringList& fileNames ) { - int rootSearchPathLength = rootDirWithEndSeparator().size(); + auto rootItem = m_filePathModel.invisibleRootItem(); + int rootSearchPathLength = rootDirWithEndSeparator().size(); + + bool isEmpty = m_filePathModel.rowCount() == 0; + + auto ensembleItem = new QStandardItem( QDir::toNativeSeparators( ensembleName ) ); + ensembleItem->setCheckable( true ); + if ( isEmpty ) ensembleItem->setCheckState( Qt::Checked ); + rootItem->appendRow( ensembleItem ); for ( const auto& fileName : fileNames ) { - QString itemText = fileName; + auto itemText = fileName; itemText.remove( 0, rootSearchPathLength ); - QListWidgetItem* item = new QListWidgetItem( QDir::toNativeSeparators( itemText ), m_fileListWidget ); - item->setFlags( item->flags() | Qt::ItemIsUserCheckable ); - item->setCheckState( Qt::Checked ); + + auto fileItem = new QStandardItem( QDir::toNativeSeparators( itemText ) ); + fileItem->setCheckable( true ); + if ( isEmpty ) fileItem->setCheckState( Qt::Checked ); + ensembleItem->appendRow( fileItem ); } } @@ -484,8 +651,8 @@ void RicRecursiveFileSearchDialog::addToFileListWidget( const QStringList& fileN void RicRecursiveFileSearchDialog::clearFileList() { m_foundFiles.clear(); - m_fileListWidget->clear(); - m_outputGroup->setTitle( FILES_FOUND_TEXT ); + m_filePathModel.clear(); + m_outputGroup->setTitle( filesFoundText() ); setOkButtonEnabled( false ); } @@ -530,8 +697,12 @@ void RicRecursiveFileSearchDialog::updateStatus( Status status, const QString& e lastStatusUpdate = now; - m_fileListWidget->clear(); - new QListWidgetItem( newStatus, m_fileListWidget ); + m_filePathModel.clear(); + + // Show status message in the tree view + auto rootItem = m_filePathModel.invisibleRootItem(); + auto ensembleItem = new QStandardItem( newStatus ); + rootItem->appendRow( ensembleItem ); } //-------------------------------------------------------------------------------------------------- @@ -708,7 +879,6 @@ void RicRecursiveFileSearchDialog::updateEffectiveFilter() // Present native separators to the user m_effectiveFilterContentLabel->setText( QDir::toNativeSeparators( effFilterText ) ); - m_searchRootContentLabel->setText( QDir::toNativeSeparators( rootDirWithEndSeparator() ) ); } //-------------------------------------------------------------------------------------------------- @@ -728,7 +898,6 @@ void RicRecursiveFileSearchDialog::warningIfInvalidCharacters() { QToolTip::showText( m_fileFilterField->mapToGlobal( QPoint( 0, 0 ) ), "File pattern contains invalid characters" ); m_effectiveFilterContentLabel->setText( "(Invalid filter)" ); - m_searchRootContentLabel->setText( "" ); } else { @@ -743,7 +912,7 @@ void RicRecursiveFileSearchDialog::slotPathFilterChanged( const QString& text ) { updateEffectiveFilter(); warningIfInvalidCharacters(); - m_findOrCancelButton->setDefault( true ); + m_findOrCancelButton->setFocus(); } //-------------------------------------------------------------------------------------------------- @@ -754,7 +923,7 @@ void RicRecursiveFileSearchDialog::slotFileFilterChanged( const QString& text ) clearFileList(); updateEffectiveFilter(); warningIfInvalidCharacters(); - m_findOrCancelButton->setDefault( true ); + m_findOrCancelButton->setFocus(); } //-------------------------------------------------------------------------------------------------- @@ -806,7 +975,7 @@ void RicRecursiveFileSearchDialog::slotFileListCustomMenuRequested( const QPoint connect( action, SIGNAL( triggered() ), SLOT( slotToggleFileListItems() ) ); menu.addAction( action ); - QPoint globalPoint = m_fileListWidget->mapToGlobal( point ); + QPoint globalPoint = m_fileTreeView->mapToGlobal( point ); menu.exec( globalPoint ); } @@ -815,11 +984,17 @@ void RicRecursiveFileSearchDialog::slotFileListCustomMenuRequested( const QPoint //-------------------------------------------------------------------------------------------------- void RicRecursiveFileSearchDialog::slotToggleFileListItems() { - for ( auto& item : m_fileListWidget->selectedItems() ) + auto selectionModel = m_fileTreeView->selectionModel(); + auto indices = selectionModel->selectedIndexes(); + for ( auto& index : indices ) { - if ( ( item->flags() & Qt::ItemIsUserCheckable ) != 0 ) + if ( index.isValid() ) { - item->setCheckState( item->checkState() == Qt::Checked ? Qt::Unchecked : Qt::Checked ); + auto item = m_filePathModel.itemFromIndex( index ); + if ( item && item->isCheckable() ) + { + item->setCheckState( item->checkState() == Qt::Checked ? Qt::Unchecked : Qt::Checked ); + } } } } @@ -829,11 +1004,17 @@ void RicRecursiveFileSearchDialog::slotToggleFileListItems() //-------------------------------------------------------------------------------------------------- void RicRecursiveFileSearchDialog::slotTurnOffFileListItems() { - for ( auto& item : m_fileListWidget->selectedItems() ) + auto selectionModel = m_fileTreeView->selectionModel(); + auto indices = selectionModel->selectedIndexes(); + for ( auto& index : indices ) { - if ( ( item->flags() & Qt::ItemIsUserCheckable ) != 0 ) + if ( index.isValid() ) { - item->setCheckState( Qt::Unchecked ); + auto item = m_filePathModel.itemFromIndex( index ); + if ( item && item->isCheckable() ) + { + item->setCheckState( Qt::Unchecked ); + } } } } @@ -843,11 +1024,17 @@ void RicRecursiveFileSearchDialog::slotTurnOffFileListItems() //-------------------------------------------------------------------------------------------------- void RicRecursiveFileSearchDialog::slotTurnOnFileListItems() { - for ( auto& item : m_fileListWidget->selectedItems() ) + auto selectionModel = m_fileTreeView->selectionModel(); + auto indices = selectionModel->selectedIndexes(); + for ( auto& index : indices ) { - if ( ( item->flags() & Qt::ItemIsUserCheckable ) != 0 ) + if ( index.isValid() ) { - item->setCheckState( Qt::Checked ); + auto item = m_filePathModel.itemFromIndex( index ); + if ( item && item->isCheckable() ) + { + item->setCheckState( Qt::Checked ); + } } } } @@ -857,10 +1044,17 @@ void RicRecursiveFileSearchDialog::slotTurnOnFileListItems() //-------------------------------------------------------------------------------------------------- void RicRecursiveFileSearchDialog::slotCopyFileItemText() { - if ( m_fileListWidget->currentItem() ) + auto index = m_fileTreeView->currentIndex(); { - QString relativePathText = m_fileListWidget->currentItem()->text(); - QApplication::clipboard()->setText( relativePathText ); + if ( index.isValid() ) + { + auto item = m_filePathModel.itemFromIndex( index ); + if ( item ) + { + QString relativePathText = item->text(); + QApplication::clipboard()->setText( relativePathText ); + } + } } } @@ -869,17 +1063,19 @@ void RicRecursiveFileSearchDialog::slotCopyFileItemText() //-------------------------------------------------------------------------------------------------- void RicRecursiveFileSearchDialog::slotFindOrCancelButtonClicked() { - if ( m_findOrCancelButton->text() == FIND_BUTTON_FIND_TEXT ) + if ( m_findOrCancelButton->text() == findButtonText() ) { clearFileList(); - if ( !m_fileListWidget->isVisible() ) - { - m_fileListWidget->setVisible( true ); - m_searchRootLabel->setVisible( true ); - m_searchRootContentLabel->setVisible( true ); + m_treeViewFilterLabel->setVisible( true ); + m_treeViewFilterButton->setVisible( true ); + m_treeViewFilterLineEdit->setVisible( true ); - if ( height() < RECURSIVE_FILESEARCH_DEFAULT_DIALOG_HEIGHT ) resize( width(), RECURSIVE_FILESEARCH_DEFAULT_DIALOG_HEIGHT ); + if ( !m_fileTreeView->isVisible() ) + { + m_fileTreeView->setVisible( true ); + + if ( height() < defaultDialogHeight() ) resize( width(), defaultDialogHeight() ); } m_findOrCancelButton->setText( "Cancel" ); @@ -897,7 +1093,7 @@ void RicRecursiveFileSearchDialog::slotFindOrCancelButtonClicked() updateFileListWidget(); - m_findOrCancelButton->setText( FIND_BUTTON_FIND_TEXT ); + m_findOrCancelButton->setText( findButtonText() ); if ( m_isCancelPressed ) { @@ -909,11 +1105,14 @@ void RicRecursiveFileSearchDialog::slotFindOrCancelButtonClicked() } else { - m_outputGroup->setTitle( QString( "%1 (%2)" ).arg( FILES_FOUND_TEXT ).arg( m_foundFiles.size() ) ); + m_outputGroup->setTitle( QString( "%1 (%2)" ).arg( filesFoundText() ).arg( m_foundFiles.size() ) ); } setOkButtonEnabled( !m_foundFiles.isEmpty() ); - m_buttons->button( QDialogButtonBox::Ok )->setDefault( true ); + + m_buttons->button( QDialogButtonBox::Ok )->setFocus(); + + slotFilterTreeViewClicked(); } else { @@ -924,19 +1123,49 @@ void RicRecursiveFileSearchDialog::slotFindOrCancelButtonClicked() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicRecursiveFileSearchDialog::slotDialogOkClicked() +void RicRecursiveFileSearchDialog::slotFilterTreeViewClicked() { - m_foundFiles.clear(); + QString filterText = m_treeViewFilterLineEdit->text(); - int itemCount = m_fileListWidget->count(); - for ( int i = 0; i < itemCount; i++ ) + auto values = RiaStdStringTools::valuesFromRangeSelection( filterText.toStdString() ); + + auto items = firstLevelItems( m_filePathModel.invisibleRootItem() ); + for ( auto item : items ) { - const QListWidgetItem* item = m_fileListWidget->item( i ); - if ( ( item->flags() & Qt::ItemIsUserCheckable ) != 0 && item->checkState() ) + if ( item->checkState() == Qt::Unchecked ) continue; + + if ( filterText.isEmpty() ) { - m_foundFiles.push_back( rootDirWithEndSeparator() + RiaFilePathTools::toInternalSeparator( item->text() ) ); + setCheckedStateChildItems( item, Qt::Checked ); + } + else + { + setCheckedStateChildItems( item, Qt::Unchecked ); + + for ( auto val : values ) + { + QString searchString = "realization-" + QString::number( val ); + + QList matchingItems; + findItemsMatching( item, searchString, matchingItems ); + for ( auto item : matchingItems ) + { + item->setCheckState( Qt::Checked ); + } + } } } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicRecursiveFileSearchDialog::slotDialogOkClicked() +{ + QStringList checkedItems; + getTextForCheckedItems( m_filePathModel.invisibleRootItem(), m_filePathModel.invisibleRootItem(), rootDirWithEndSeparator(), checkedItems ); + + m_foundFiles = checkedItems; accept(); } @@ -950,6 +1179,15 @@ void RicRecursiveFileSearchDialog::slotDialogCancelClicked() reject(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicRecursiveFileSearchDialog::showEvent( QShowEvent* event ) +{ + m_findOrCancelButton->setFocus(); + QDialog::showEvent( event ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -976,13 +1214,13 @@ void RicRecursiveFileSearchDialog::slotUseRealizationStarClicked() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiaEnsembleNameTools::EnsembleGroupingMode RicRecursiveFileSearchDialog::ensembleGroupingMode() const +RiaDefines::EnsembleGroupingMode RicRecursiveFileSearchDialog::ensembleGroupingMode() const { - if ( m_ensembleGroupingMode->currentIndex() == 0 ) return RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE; - if ( m_ensembleGroupingMode->currentIndex() == 1 ) return RiaEnsembleNameTools::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE; - if ( m_ensembleGroupingMode->currentIndex() == 2 ) return RiaEnsembleNameTools::EnsembleGroupingMode::NONE; + if ( m_ensembleGroupingMode->currentIndex() == 0 ) return RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE; + if ( m_ensembleGroupingMode->currentIndex() == 1 ) return RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE; + if ( m_ensembleGroupingMode->currentIndex() == 2 ) return RiaDefines::EnsembleGroupingMode::NONE; - return RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE; + return RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE; } //-------------------------------------------------------------------------------------------------- @@ -998,100 +1236,6 @@ QStringList RicRecursiveFileSearchDialog::fileTypeToExtensionStrings( const std: return extensions; } -//-------------------------------------------------------------------------------------------------- -/// Internal functions -//-------------------------------------------------------------------------------------------------- - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void sortStringsByLength( QStringList& strings, bool ascending /*= true*/ ) -{ - QStringList sorted = strings; - int numItems = sorted.size(); - bool swapped; - do - { - swapped = false; - for ( int i = 0; i < numItems - 1; i++ ) - { - int s0 = strings[i].size(); - int s1 = strings[i + 1].size(); - if ( ( ascending && s0 > s1 ) || ( !ascending && s0 < s1 ) ) - { - const QString temp = strings[i]; - strings[i] = strings[i + 1]; - strings[i + 1] = temp; - swapped = true; - } - } - } while ( swapped ); -} - -//-------------------------------------------------------------------------------------------------- -/// Obsolete -//-------------------------------------------------------------------------------------------------- -QStringList RicRecursiveFileSearchDialog::buildDirectoryListRecursive( const QString& currentDir, int level ) -{ - QStringList allDirs; - - if ( m_isCancelPressed ) return allDirs; - - QString currPathFilter = pathFilterWithoutStartSeparator(); - bool subStringFilter = false; - - // Optimizing for speed by a refined match at first directory level - if ( level == 1 ) - { - QString pathFilter = pathFilterWithoutStartSeparator(); - if ( !pathFilter.startsWith( "*" ) ) - { - int wildcardIndex = pathFilter.indexOf( QRegularExpression( QString( "[*%1]" ).arg( RiaFilePathTools::separator() ) ) ); - if ( wildcardIndex >= 0 ) - { - currPathFilter = pathFilter.left( wildcardIndex + 1 ); - subStringFilter = true; - } - } - } - - QString currRelPath = RiaFilePathTools::relativePath( rootDirWithEndSeparator(), currentDir ); - if ( pathFilterMatch( currPathFilter, currRelPath ) ) - { - allDirs.push_back( currentDir ); - } - else if ( level == 1 && subStringFilter ) - { - return QStringList(); - } - - QDir qdir( currentDir ); - QStringList subDirs = qdir.entryList( QDir::Dirs | QDir::NoDotAndDotDot ); - for ( QString subDir : subDirs ) - { - QString subDirFullPath = qdir.absoluteFilePath( subDir ); - updateStatus( SEARCHING_FOR_DIRS, subDirFullPath ); - QApplication::processEvents(); - allDirs += buildDirectoryListRecursive( subDirFullPath, level + 1 ); - } - return m_isCancelPressed ? QStringList() : allDirs; -} - -//-------------------------------------------------------------------------------------------------- -/// Obsolete -//-------------------------------------------------------------------------------------------------- -bool RicRecursiveFileSearchDialog::pathFilterMatch( const QString& pathFilter, const QString& relPath ) -{ - QString pattern = pathFilter; - if ( relPath.endsWith( RiaFilePathTools::separator() ) && !pathFilter.endsWith( RiaFilePathTools::separator() ) ) - pattern += RiaFilePathTools::separator(); - - QRegularExpression regexp( pattern, QRegularExpression::CaseInsensitiveOption ); - auto match = regexp.match( relPath ); - - return match.hasMatch(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1167,7 +1311,6 @@ RiaDefines::FileType RicRecursiveFileSearchDialog::mapSummaryFileType( RicRecurs return RiaDefines::FileType::STIMPLAN_SUMMARY; default: { - CAF_ASSERT( false && "Unsupported file type" ); return RiaDefines::FileType::SMSPEC; } } diff --git a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h index 98ead09e78..1483371372 100644 --- a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h +++ b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h @@ -26,6 +26,7 @@ #include "Summary/RiaSummaryDefines.h" #include +#include class QLabel; class QLineEdit; @@ -33,12 +34,12 @@ class QTextEdit; class QDialogButtonBox; class QPushButton; class QMainWindow; -class QListWidget; class QGroupBox; class QComboBox; class QCheckBox; +class QTreeView; -class RicRecursiveFileSearchDialogResult; +struct RicRecursiveFileSearchDialogResult; //================================================================================================== /// @@ -92,7 +93,7 @@ private: QStringList fileExtensions() const; QString extensionFromFileNameFilter() const; - RiaEnsembleNameTools::EnsembleGroupingMode ensembleGroupingMode() const; + RiaDefines::EnsembleGroupingMode ensembleGroupingMode() const; void setOkButtonEnabled( bool enabled ); void warningIfInvalidCharacters(); @@ -101,7 +102,7 @@ private: void updateFileListWidget(); void clearFileList(); - void addToFileListWidget( const QStringList& fileNames ); + void addToTreeView( const QString& ensembleName, const QStringList& fileNames ); // File search methods @@ -123,6 +124,7 @@ private slots: void slotBrowseButtonClicked(); void slotUseRealizationStarClicked(); void slotFindOrCancelButtonClicked(); + void slotFilterTreeViewClicked(); void slotFileListCustomMenuRequested( const QPoint& point ); void slotCopyFileItemText(); @@ -133,6 +135,8 @@ private slots: void slotDialogOkClicked(); void slotDialogCancelClicked(); + void showEvent( QShowEvent* event ) override; + private: QLabel* m_pathFilterLabel; QComboBox* m_pathFilterField; @@ -154,10 +158,14 @@ private: QComboBox* m_ensembleGroupingMode; - QGroupBox* m_outputGroup; - QLabel* m_searchRootLabel; - QLabel* m_searchRootContentLabel; - QListWidget* m_fileListWidget; + QGroupBox* m_outputGroup; + + QLabel* m_treeViewFilterLabel; + QLineEdit* m_treeViewFilterLineEdit; + QPushButton* m_treeViewFilterButton; + + QTreeView* m_fileTreeView; + QStandardItemModel m_filePathModel; QDialogButtonBox* m_buttons; @@ -167,35 +175,14 @@ private: FileType m_fileType; bool m_isCancelPressed; - - // Obsolete. Here for reference if this search mode is needed later - QStringList buildDirectoryListRecursive( const QString& currentDir, int level = 0 ); - bool pathFilterMatch( const QString& pathFilter, const QString& relPath ); + bool m_blockUpdateOfOtherItems; }; //================================================================================================== /// //================================================================================================== -class RicRecursiveFileSearchDialogResult +struct RicRecursiveFileSearchDialogResult { -public: - RicRecursiveFileSearchDialogResult( bool ok, - const QStringList& files, - const QString& rootDir, - const QString& pathFilter, - const QString& fileNameFilter, - RicRecursiveFileSearchDialog::FileType fileType, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ) - : ok( ok ) - , files( files ) - , rootDir( rootDir ) - , pathFilter( pathFilter ) - , fileNameFilter( fileNameFilter ) - , fileType( fileType ) - , groupingMode( groupingMode ) - { - } - bool ok; QStringList files; QString rootDir; @@ -203,5 +190,5 @@ public: QString fileNameFilter; RicRecursiveFileSearchDialog::FileType fileType; - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode; + RiaDefines::EnsembleGroupingMode groupingMode; }; diff --git a/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp b/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp index 9937fb2115..d2c48377b2 100644 --- a/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp @@ -20,8 +20,8 @@ #include "RiaLogging.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" #include "cafSelectionManager.h" diff --git a/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp index ea8a7405f1..f6781b6dba 100644 --- a/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp @@ -52,7 +52,7 @@ void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked ) std::vector caseSelection = selectedSummaryCases(); for ( RimSummaryCase* summaryCase : caseSelection ) { - RiaSummaryTools::reloadSummaryCase( summaryCase ); + RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( summaryCase ); RiaLogging::info( QString( "Reloaded data for %1" ).arg( summaryCase->summaryHeaderFilename() ) ); } diff --git a/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp b/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp index 9305474ea6..79ee7812f3 100644 --- a/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp @@ -116,7 +116,7 @@ void RicReplaceCaseFeature::onActionTriggered( bool isChecked ) { summaryCase->setSummaryHeaderFileName( summaryFileNames.front() ); - RiaSummaryTools::reloadSummaryCase( summaryCase ); + RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( summaryCase ); } } } diff --git a/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp b/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp index 4ecaca30dc..50fe38fa9a 100644 --- a/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp @@ -19,9 +19,9 @@ #include "RicTogglePerspectiveViewFeature.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RiaApplication.h" #include "Rim3dView.h" -#include "RimEclipseContourMapView.h" #include "RimGridView.h" #include "RiuMainWindow.h" #include "RiuViewer.h" diff --git a/ApplicationLibCode/Commands/SeismicCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/SeismicCommands/CMakeLists_files.cmake index 7ded139c80..0818ce8ae9 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/SeismicCommands/CMakeLists_files.cmake @@ -25,11 +25,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\SeismicCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/StreamlineCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/StreamlineCommands/CMakeLists_files.cmake index 09205b8636..36552c1776 100644 --- a/ApplicationLibCode/Commands/StreamlineCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/StreamlineCommands/CMakeLists_files.cmake @@ -7,11 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\StreamlineCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake index e5cd1750b7..97fade50b6 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake @@ -48,6 +48,8 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCreateDeclineCurvesFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCreateRegressionAnalysisCurveFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicCreateCrossPlotFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicReplaceSummaryEnsembleFeature.h + ${CMAKE_CURRENT_LIST_DIR}/RicReplaceSummaryCaseFeature.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -100,22 +102,9 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RicCreateDeclineCurvesFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCreateRegressionAnalysisCurveFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicCreateCrossPlotFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicReplaceSummaryEnsembleFeature.cpp + ${CMAKE_CURRENT_LIST_DIR}/RicReplaceSummaryCaseFeature.cpp ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list( - APPEND - COMMAND_QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryPlotEditorWidgetCreator.h - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryPlotEditorDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RicSummaryCurveCalculatorDialog.h -) - -source_group( - "CommandFeature\\SummaryPlot" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateCrossPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateCrossPlotFeature.cpp index a19dd39b3c..4428c0aac4 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateCrossPlotFeature.cpp @@ -18,10 +18,9 @@ #include "RicCreateCrossPlotFeature.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" - #include "RiaPreferencesSummary.h" #include "Summary/RiaSummaryCurveAddress.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RifEclipseSummaryAddress.h" @@ -112,9 +111,9 @@ void RicCreateCrossPlotFeature::onSubMenuActionTriggered( bool isChecked ) auto selectedCases = caf::firstAncestorOfTypeFromSelectedObject(); auto selectedEnsembles = caf::firstAncestorOfTypeFromSelectedObject(); - auto newPlot = RicSummaryPlotBuilder::createCrossPlot( { curveAddress }, { selectedCases }, { selectedEnsembles } ); + auto newPlot = RiaSummaryPlotTools::createCrossPlot( { curveAddress }, { selectedCases }, { selectedEnsembles } ); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp index 6117722c16..5a2af9a933 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp @@ -18,9 +18,9 @@ #include "RicNewDefaultSummaryPlotFeature.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "RicEditSummaryPlotFeature.h" #include "RicNewSummaryCurveFeature.h" #include "RicNewSummaryEnsembleCurveSetFeature.h" @@ -85,7 +85,7 @@ RimSummaryPlot* RicNewDefaultSummaryPlotFeature::createFromSummaryCases( const s newPlot->applyDefaultCurveAppearances(); newPlot->loadDataAndUpdate(); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); return newPlot; } @@ -131,7 +131,7 @@ void RicNewDefaultSummaryPlotFeature::onActionTriggered( bool isChecked ) { RimSummaryPlot* plot = new RimSummaryPlot(); plot->enableAutoPlotTitle( true ); - RicSummaryPlotBuilder::appendPlotsToSummaryMultiPlot( multiPlot, { plot } ); + RiaSummaryPlotTools::appendPlotsToSummaryMultiPlot( multiPlot, { plot } ); return; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp index a4b9959d4b..bc79ef48e7 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp @@ -94,7 +94,7 @@ void RicNewDerivedEnsembleFeature::onActionTriggered( bool isChecked ) { if ( !showWarningDialogWithQuestion() ) { - mainColl->removeCaseCollection( newEnsemble ); + mainColl->removeEnsemble( newEnsemble ); } } } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp index baba91dfb7..3e4d335cd8 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp @@ -51,8 +51,9 @@ void RicNewEnsembleCurveFilterFeature::onActionTriggered( bool isChecked ) if ( filterCollection ) { - RimEnsembleCurveFilter* newFilter = filterCollection->addFilter(); - if ( !filterCollection->filters().empty() ) + bool firstFilter = filterCollection->filters().empty(); + RimEnsembleCurveFilter* newFilter = filterCollection->addFilter(); + if ( !firstFilter ) { auto existingFilter = filterCollection->filters().front(); newFilter->setSummaryAddresses( existingFilter->summaryAddresses() ); @@ -61,11 +62,15 @@ void RicNewEnsembleCurveFilterFeature::onActionTriggered( bool isChecked ) { std::vector addresses; - auto candidateAdr = newFilter->parentCurveSet()->summaryAddressY(); + auto curveSet = newFilter->parentCurveSet(); + auto candidateAdr = curveSet->summaryAddressY(); auto nativeQuantityName = RimObjectiveFunctionTools::nativeQuantityName( candidateAdr.vectorName() ); candidateAdr.setVectorName( nativeQuantityName ); addresses.push_back( candidateAdr ); newFilter->setSummaryAddresses( addresses ); + + curveSet->setDefaultTimeRange(); + curveSet->loadDataAndUpdate( true ); } newFilter->loadDataAndUpdate(); filterCollection->updateConnectedEditors(); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp index 8fef4758e8..69d437e69f 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp @@ -19,11 +19,11 @@ #include "RicNewGridTimeHistoryCurveFeature.h" #include "RiaGuiApplication.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" #include "RigFemResultAddress.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "RicNewSummaryCurveFeature.h" #include "RicSelectSummaryPlotUI.h" #include "RicWellLogTools.h" @@ -39,6 +39,8 @@ #include "RimSummaryMultiPlot.h" #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" +#include "RimTools.h" +#include "Tools/RimAutomationSettings.h" #include "Riu3dSelectionManager.h" #include "RiuPlotMainWindowTools.h" @@ -53,31 +55,6 @@ CAF_CMD_SOURCE_INIT( RicNewGridTimeHistoryCurveFeature, "RicNewGridTimeHistoryCurveFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicNewGridTimeHistoryCurveFeature::createCurveFromSelectionItem( const RiuSelectionItem* selectionItem, RimSummaryPlot* plot ) -{ - CVF_ASSERT( selectionItem ); - CVF_ASSERT( plot ); - - RimGridTimeHistoryCurve* newCurve = new RimGridTimeHistoryCurve(); - newCurve->setFromSelectionItem( selectionItem ); - newCurve->setLineThickness( 2 ); - - cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable( plot->curveCount() ); - newCurve->setColor( curveColor ); - - plot->addGridTimeHistoryCurve( newCurve ); - - newCurve->loadDataAndUpdate( true ); - - plot->updateConnectedEditors(); - - RiuPlotMainWindowTools::showPlotMainWindow(); - RiuPlotMainWindowTools::selectAsCurrentItem( newCurve ); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -92,10 +69,28 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot() QString lastUsedPlotRef = app->cacheDataObject( lastUsedSummaryPlotKey ).toString(); RimSummaryPlot* lastUsedPlot = dynamic_cast( caf::PdmReferenceHelper::objectFromReference( app->project(), lastUsedPlotRef ) ); + if ( lastUsedPlot ) { defaultSelectedPlot = lastUsedPlot; } + else + { + auto getFirstSummaryPlot = []() -> RimSummaryPlot* + { + auto summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection(); + for ( auto multiPlot : summaryPlotColl->multiPlots() ) + { + for ( auto summaryPlot : multiPlot->summaryPlots() ) + { + return summaryPlot; + } + } + return nullptr; + }; + + defaultSelectedPlot = getFirstSummaryPlot(); + } } RicSelectSummaryPlotUI featureUi; @@ -117,7 +112,7 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot() { RimSummaryPlot* plot = new RimSummaryPlot(); plot->setUiName( featureUi.newPlotName() ); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( plot ); plot->loadDataAndUpdate(); summaryPlot = plot; @@ -130,6 +125,9 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot() QString refFromProjectToView = caf::PdmReferenceHelper::referenceFromRootToObject( app->project(), summaryPlot ); app->setCacheDataObject( lastUsedSummaryPlotKey, refFromProjectToView ); + auto automationSettings = RimTools::automationSettings(); + automationSettings->setDestinationPlot( summaryPlot ); + return summaryPlot; } @@ -250,7 +248,7 @@ void RicNewGridTimeHistoryCurveFeature::onActionTriggered( bool isChecked ) for ( auto item : items ) { - RicNewGridTimeHistoryCurveFeature::createCurveFromSelectionItem( item, summaryPlot ); + RimGridTimeHistoryCurve::createCurveFromSelectionItem( item, summaryPlot ); } } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h index f674f1d153..f4763067cb 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h @@ -36,7 +36,6 @@ protected: void setupActionLook( QAction* actionToSetup ) override; private: - static void createCurveFromSelectionItem( const RiuSelectionItem* selectionItem, RimSummaryPlot* plot ); static RimSummaryPlot* userSelectedSummaryPlot(); static QString suggestedNewPlotName(); }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp index 338265fd48..2b1314a43e 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp @@ -19,6 +19,7 @@ #include "RicNewSummaryCrossPlotCurveFeature.h" #include "RiaGuiApplication.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" #include "RimMainPlotCollection.h" @@ -32,7 +33,6 @@ #include "RiuPlotMainWindow.h" #include "RiuPlotMainWindowTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" #include "cafSelectionManager.h" @@ -68,7 +68,7 @@ void RicNewSummaryCrossPlotCurveFeature::onActionTriggered( bool isChecked ) } RiaSummaryCurveAddress addr( RifEclipseSummaryAddress::fieldAddress( "FOPT" ), RifEclipseSummaryAddress::fieldAddress( "FGOR" ) ); - auto newCurve = RicSummaryPlotBuilder::addNewSummaryCurve( plot, addr, defaultCase ); + auto newCurve = RiaSummaryPlotTools::addNewSummaryCurve( plot, addr, defaultCase ); newCurve->setColor( curveColor ); newCurve->loadDataAndUpdate( true ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp index a40db01370..10f45d1d57 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp @@ -22,6 +22,7 @@ #include "RiaGuiApplication.h" #include "RiaPreferencesSummary.h" #include "RiaTextStringTools.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" #include "RimEnsembleCurveFilter.h" @@ -42,7 +43,6 @@ #include "RiuPlotMainWindow.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" #include "cafSelectionManager.h" @@ -77,23 +77,7 @@ std::vector RicNewSummaryEnsembleCurveSetFeature::addDefau { if ( addr.isUiTextMatchingFilterText( filter ) ) { - RimEnsembleCurveSet* curveSet = new RimEnsembleCurveSet(); - - // Use same counting as RicNewSummaryCurveFeature::onActionTriggered - auto colorIndex = plot->singleColorCurveCount(); - - curveSet->setColor( - RimSummaryCurveAppearanceCalculator::computeTintedCurveColorForAddress( addr, static_cast( colorIndex ) ) ); - curveSet->legendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( - RimEnsembleCurveSetColorManager::cycledEnsembleColorRange( static_cast( colorIndex ) ) ) ); - - curveSet->setSummaryEnsemble( ensemble ); - curveSet->setSummaryAddressYAndStatisticsFlag( addr ); - auto filter = curveSet->filterCollection()->addFilter(); - filter->setActive( false ); - - plot->ensembleCurveSetCollection()->addCurveSet( curveSet ); - curveSets.push_back( curveSet ); + curveSets.push_back( addCurveSet( plot, ensemble, addr ) ); } } } @@ -101,6 +85,36 @@ std::vector RicNewSummaryEnsembleCurveSetFeature::addDefau return curveSets; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEnsembleCurveSet* RicNewSummaryEnsembleCurveSetFeature::addCurveSet( RimSummaryPlot* plot, + RimSummaryEnsemble* ensemble, + const RifEclipseSummaryAddress& address ) +{ + if ( !plot || !ensemble ) return nullptr; + + RimEnsembleCurveSet* curveSet = new RimEnsembleCurveSet(); + + // Use same counting as RicNewSummaryCurveFeature::onActionTriggered + auto colorIndex = plot->singleColorCurveCount(); + + curveSet->setColor( RimSummaryCurveAppearanceCalculator::computeTintedCurveColorForAddress( address, static_cast( colorIndex ) ) ); + curveSet->legendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( + RimEnsembleCurveSetColorManager::cycledEnsembleColorRange( static_cast( colorIndex ) ) ) ); + + curveSet->setSummaryEnsemble( ensemble ); + curveSet->setSummaryAddressYAndStatisticsFlag( address ); + curveSet->setDefaultTimeRange(); + + auto filter = curveSet->filterCollection()->addFilter(); + filter->setSummaryAddresses( { address } ); + filter->setActive( false ); + + plot->ensembleCurveSetCollection()->addCurveSet( curveSet ); + return curveSet; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -114,7 +128,7 @@ RimSummaryPlot* RicNewSummaryEnsembleCurveSetFeature::createPlotForCurveSetsAndU RimSummaryPlot* plot = new RimSummaryPlot(); plot->enableAutoPlotTitle( true ); - RimSummaryMultiPlot* multiPlot = RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot ); + RimSummaryMultiPlot* multiPlot = RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( plot ); RimEnsembleCurveSet* firstCurveSetCreated = nullptr; for ( RimSummaryEnsemble* ensemble : ensembles ) @@ -175,6 +189,11 @@ void RicNewSummaryEnsembleCurveSetFeature::onActionTriggered( bool isChecked ) auto curveSets = RicNewSummaryEnsembleCurveSetFeature::addDefaultCurveSets( plot, ensemble ); if ( !curveSets.empty() ) firstCurveSet = curveSets.front(); } + else + { + auto address = RifEclipseSummaryAddress::fromEclipseTextAddress( "FOPT" ); + firstCurveSet = RicNewSummaryEnsembleCurveSetFeature::addCurveSet( plot, ensemble, address ); + } plot->loadDataAndUpdate(); plot->updateAllRequiredEditors(); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h index 3fc2a692ce..79921d68bf 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h @@ -25,6 +25,7 @@ class RimSummaryPlot; class RimEnsembleCurveSet; class RimSummaryEnsemble; +class RifEclipseSummaryAddress; //================================================================================================== /// @@ -36,6 +37,7 @@ class RicNewSummaryEnsembleCurveSetFeature : public caf::CmdFeature public: static RimSummaryPlot* createPlotForCurveSetsAndUpdate( std::vector ensembles ); static std::vector addDefaultCurveSets( RimSummaryPlot* plot, RimSummaryEnsemble* ensemble ); + static RimEnsembleCurveSet* addCurveSet( RimSummaryPlot* plot, RimSummaryEnsemble* ensemble, const RifEclipseSummaryAddress& address ); protected: bool isCommandEnabled() const override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp index 07771cb6ec..5bf1b003d2 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp @@ -19,8 +19,8 @@ #include "RicPasteAsciiDataToSummaryPlotFeature.h" #include "OperationsUsingObjReferences/RicPasteFeatureImpl.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "RicPasteAsciiDataToSummaryPlotFeatureUi.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RiaLogging.h" @@ -91,7 +91,7 @@ void RicPasteAsciiDataToSummaryPlotFeature::onActionTriggered( bool isChecked ) summaryPlot = new RimSummaryPlot(); summaryPlot->enableAutoPlotTitle( true ); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( summaryPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( summaryPlot ); } caf::PdmSettings::writeFieldsToApplicationStore( &pasteOptions, pasteOptions.contextString() ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp index 0a255f28c7..15d366279f 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp @@ -18,12 +18,12 @@ #include "RicPasteSummaryMultiPlotFeature.h" +#include "Summary/RiaSummaryTools.h" + #include "OperationsUsingObjReferences/RicPasteFeatureImpl.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "RimSummaryMultiPlot.h" #include "RimSummaryMultiPlotCollection.h" -#include "Summary/RiaSummaryTools.h" #include "cafPdmDefaultObjectFactory.h" #include "cafPdmObjectGroup.h" @@ -40,8 +40,9 @@ CAF_CMD_SOURCE_INIT( RicPasteSummaryMultiPlotFeature, "RicPasteSummaryMultiPlotF //-------------------------------------------------------------------------------------------------- bool RicPasteSummaryMultiPlotFeature::isCommandEnabled() const { - auto multiPlots = caf::selectedObjectsByTypeStrict(); - return !multiPlots.empty(); + if ( !caf::selectedObjectsByType().empty() ) return true; + + return !caf::selectedObjectsByTypeStrict().empty(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp index 55ca58a95d..1d16fc45b3 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp @@ -19,7 +19,7 @@ #include "RicPasteSummaryPlotFeature.h" #include "OperationsUsingObjReferences/RicPasteFeatureImpl.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimMultiPlot.h" #include "RimSummaryPlot.h" @@ -45,8 +45,8 @@ void RicPasteSummaryPlotFeature::copyPlotAndAddToCollection( RimSummaryPlot* sou auto multiPlot = caf::firstAncestorOfTypeFromSelectedObject(); if ( multiPlot ) { - auto plots = RicSummaryPlotBuilder::duplicatePlots( { sourcePlot } ); - RicSummaryPlotBuilder::appendPlotsToMultiPlot( multiPlot, plots ); + auto plots = RiaSummaryPlotTools::duplicatePlots( { sourcePlot } ); + RiaSummaryPlotTools::appendPlotsToMultiPlot( multiPlot, plots ); multiPlot->loadDataAndUpdate(); diff --git a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryCaseFeature.cpp similarity index 98% rename from ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp rename to ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryCaseFeature.cpp index 5e43fb80a5..5fd03867e8 100644 --- a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryCaseFeature.cpp @@ -64,7 +64,7 @@ void RicReplaceSummaryCaseFeature::onActionTriggered( bool isChecked ) const auto& newFileName = fileNames.front(); summaryCase->setSummaryHeaderFileName( newFileName ); - RiaSummaryTools::reloadSummaryCase( summaryCase ); + RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( summaryCase ); RiaLogging::info( QString( "Replaced summary data for %1" ).arg( oldSummaryHeaderFilename ) ); diff --git a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryCaseFeature.h similarity index 100% rename from ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.h rename to ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryCaseFeature.h diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryEnsembleFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryEnsembleFeature.cpp new file mode 100644 index 0000000000..6ca055d16e --- /dev/null +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryEnsembleFeature.cpp @@ -0,0 +1,99 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicReplaceSummaryEnsembleFeature.h" + +#include "RiaLogging.h" +#include "Summary/RiaSummaryTools.h" + +#include "RicImportSummaryCasesFeature.h" + +#include "RimSummaryCase.h" +#include "RimSummaryCaseMainCollection.h" +#include "RimSummaryEnsemble.h" + +#include "cafPdmObject.h" +#include "cafSelectionManager.h" + +#include + +CAF_CMD_SOURCE_INIT( RicReplaceSummaryEnsembleFeature, "RicReplaceSummaryEnsembleFeature" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicReplaceSummaryEnsembleFeature::isCommandEnabled() const +{ + auto summaryEnsemble = caf::SelectionManager::instance()->selectedItemOfType(); + return summaryEnsemble != nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicReplaceSummaryEnsembleFeature::onActionTriggered( bool isChecked ) +{ + auto summaryEnsemble = caf::SelectionManager::instance()->selectedItemOfType(); + if ( !summaryEnsemble ) return; + + RiaLogging::info( QString( "Starting replace ensemble for '" ) + summaryEnsemble->name() + "'" ); + + QString pathCacheName = "ENSEMBLE_FILES"; + auto result = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialogWithGrouping( "Import Ensemble", pathCacheName ); + QStringList fileNames = result.files; + RiaDefines::FileType fileType = RicRecursiveFileSearchDialog::mapSummaryFileType( result.fileType ); + + if ( fileNames.isEmpty() ) return; + if ( fileType != RiaDefines::FileType::SMSPEC ) return; + + RicImportSummaryCasesFeature::CreateConfig createConfig{ .fileType = fileType, .ensembleOrGroup = false, .allowDialogs = false }; + auto [isOk, newCases] = RicImportSummaryCasesFeature::createSummaryCasesFromFiles( fileNames, createConfig ); + if ( !isOk || newCases.empty() ) + { + RiaLogging::warning( "No new cases are created." ); + return; + } + + summaryEnsemble->replaceCases( newCases ); + + // Update name of cases and ensemble after all cases are added + for ( auto summaryCase : newCases ) + { + summaryCase->setDisplayNameOption( RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME ); + summaryCase->updateAutoShortName(); + } + + if ( auto sumCaseMainColl = RiaSummaryTools::summaryCaseMainCollection() ) + { + sumCaseMainColl->updateEnsembleNames(); + sumCaseMainColl->updateAllRequiredEditors(); + } + + RiaSummaryTools::updateConnectedPlots( summaryEnsemble ); + + RiaLogging::info( QString( "Completed replace ensemble, new name is '" ) + summaryEnsemble->name() + "'" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicReplaceSummaryEnsembleFeature::setupActionLook( QAction* actionToSetup ) +{ + actionToSetup->setText( "Replace" ); + actionToSetup->setIcon( QIcon( ":/ReplaceCase16x16.png" ) ); +} diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryEnsembleFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryEnsembleFeature.h new file mode 100644 index 0000000000..4cf5b0d02d --- /dev/null +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicReplaceSummaryEnsembleFeature.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafCmdFeature.h" + +class RicReplaceSummaryEnsembleFeature : public caf::CmdFeature +{ + CAF_CMD_HEADER_INIT; + +protected: + bool isCommandEnabled() const override; + void onActionTriggered( bool isChecked ) override; + void setupActionLook( QAction* actionToSetup ) override; +}; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp index b19ed085e4..2270c91507 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp @@ -22,6 +22,7 @@ #include "RiaCurveSetDefinition.h" #include "RiaGuiApplication.h" #include "Summary/RiaSummaryCurveDefinition.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RiuSummaryCurveDefinitionKeywords.h" @@ -38,7 +39,7 @@ #include "RimSummaryCase.h" #include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" -#include "RimSummaryCurveAutoName.h" +#include "RimSummaryCurveAppearanceCalculator.h" #include "RimSummaryCurveCollection.h" #include "RimSummaryEnsemble.h" #include "RimSummaryMultiPlot.h" @@ -50,8 +51,6 @@ #include "RiuSummaryVectorSelectionUi.h" #include "RiuTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" - #include "cafPdmUiComboBoxEditor.h" #include "cafPdmUiPushButtonEditor.h" @@ -88,14 +87,6 @@ RicSummaryPlotEditorUi::RicSummaryPlotEditorUi() { CAF_PDM_InitFieldNoDefault( &m_targetPlot, "TargetPlot", "Target Plot" ); - CAF_PDM_InitField( &m_useAutoAppearanceAssignment, "UseAutoAppearanceAssignment", true, "Auto" ); - CAF_PDM_InitField( &m_appearanceApplyButton, "AppearanceApplyButton", false, "" ); - CAF_PDM_InitFieldNoDefault( &m_caseAppearanceType, "CaseAppearanceType", "Case" ); - CAF_PDM_InitFieldNoDefault( &m_variableAppearanceType, "VariableAppearanceType", "Vector" ); - CAF_PDM_InitFieldNoDefault( &m_wellAppearanceType, "WellAppearanceType", "Well" ); - CAF_PDM_InitFieldNoDefault( &m_groupAppearanceType, "GroupAppearanceType", "Group" ); - CAF_PDM_InitFieldNoDefault( &m_regionAppearanceType, "RegionAppearanceType", "Region" ); - m_previewPlot = std::make_unique(); m_previewPlot->setLegendPosition( RiuPlotWidget::Legend::TOP ); @@ -114,14 +105,6 @@ RicSummaryPlotEditorUi::RicSummaryPlotEditorUi() m_okButtonField.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() ); m_okButtonField.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); - m_appearanceApplyButton = false; - m_appearanceApplyButton.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() ); - m_appearanceApplyButton.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LEFT ); - - CAF_PDM_InitFieldNoDefault( &m_curveNameConfig, "SummaryCurveNameConfig", "SummaryCurveNameConfig" ); - m_curveNameConfig = new RimSummaryCurveAutoName(); - m_curveNameConfig.uiCapability()->setUiTreeChildrenHidden( true ); - m_summaryCurveSelectionEditor = std::make_unique(); m_summaryCurveSelectionEditor->summaryAddressSelection()->setFieldChangedHandler( [this]() { selectionEditorFieldChanged(); } ); @@ -153,8 +136,7 @@ void RicSummaryPlotEditorUi::updateFromSummaryPlot( RimSummaryPlot* targetPlot, resetAllFields(); } - m_targetPlot = targetPlot; - m_useAutoAppearanceAssignment = true; + m_targetPlot = targetPlot; if ( m_targetPlot ) { @@ -185,8 +167,6 @@ void RicSummaryPlotEditorUi::updateFromSummaryMultiPlot( RimSummaryMultiPlot* { resetAllFields(); - m_useAutoAppearanceAssignment = true; - m_plotContainer = summaryMultiPlot; setDefaultCurveSelection( defaultSources ); @@ -250,16 +230,6 @@ void RicSummaryPlotEditorUi::fieldChangedByUi( const caf::PdmFieldHandle* change RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow(); mainPlotWindow->updateMultiPlotToolBar(); } - else if ( changedField == &m_useAutoAppearanceAssignment && m_useAutoAppearanceAssignment ) - { - updateAppearanceEditor(); - } - else if ( changedField == &m_appearanceApplyButton ) - { - applyAppearanceToAllPreviewCurves(); - m_previewPlot->loadDataAndUpdate(); - m_appearanceApplyButton = false; - } } //-------------------------------------------------------------------------------------------------- @@ -289,39 +259,6 @@ QList RicSummaryPlotEditorUi::calculateValueOptions( con //-------------------------------------------------------------------------------------------------- void RicSummaryPlotEditorUi::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { - // Appearance settings - caf::PdmUiGroup* appearanceGroup = - uiOrdering.addNewGroupWithKeyword( "Curve Appearance Assignment", RiuSummaryCurveDefinitionKeywords::appearance() ); - - caf::PdmUiGroup* appearanceSubGroup = appearanceGroup->addNewGroup( "Appearance Type Assignment" ); - appearanceSubGroup->setCollapsedByDefault(); - - appearanceSubGroup->add( &m_useAutoAppearanceAssignment ); - appearanceSubGroup->add( &m_caseAppearanceType ); - appearanceSubGroup->add( &m_variableAppearanceType ); - appearanceSubGroup->add( &m_wellAppearanceType ); - appearanceSubGroup->add( &m_groupAppearanceType ); - appearanceSubGroup->add( &m_regionAppearanceType ); - - appearanceGroup->add( &m_appearanceApplyButton ); - - // Appearance option sensitivity - { - m_caseAppearanceType.uiCapability()->setUiReadOnly( m_useAutoAppearanceAssignment ); - m_variableAppearanceType.uiCapability()->setUiReadOnly( m_useAutoAppearanceAssignment ); - m_wellAppearanceType.uiCapability()->setUiReadOnly( m_useAutoAppearanceAssignment ); - m_groupAppearanceType.uiCapability()->setUiReadOnly( m_useAutoAppearanceAssignment ); - m_regionAppearanceType.uiCapability()->setUiReadOnly( m_useAutoAppearanceAssignment ); - } - - // Name config - caf::PdmUiGroup* autoNameGroup = - uiOrdering.addNewGroupWithKeyword( "Plot and Curve Name Configuration", RiuSummaryCurveDefinitionKeywords::nameConfig() ); - autoNameGroup->setCollapsedByDefault(); - - m_curveNameConfig->uiOrdering( uiConfigName, *autoNameGroup ); - - // Fields to be displayed directly in UI uiOrdering.add( &m_targetPlot ); uiOrdering.add( &m_okButtonField ); uiOrdering.add( &m_applyButtonField ); @@ -446,7 +383,6 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std: } RimSummaryCurveAppearanceCalculator curveLookCalc( summaryCurveDefsToDisplay ); - initCurveAppearanceCalculator( curveLookCalc ); // Delete curves if ( !curveSetsToDelete.empty() ) @@ -524,16 +460,14 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std: } else { - RimSummaryCurve* curve = new RimSummaryCurve(); + auto curve = RiaSummaryPlotTools::createCurve( currentCase, curveDef.summaryAddressY() ); + if ( speedCheatsRequired ) { stashedErrorBarsAndLegendVisibility[curve] = std::make_pair( curve->errorBarsVisible(), curve->showInLegend() ); curve->setErrorBarsVisible( false ); curve->setShowInLegend( false ); } - curve->setSummaryCaseY( currentCase ); - curve->setSummaryAddressY( curveDef.summaryAddressY() ); - curve->applyCurveAutoNameSettings( *m_curveNameConfig() ); if ( currentCase && currentCase->isObservedData() ) curve->setSymbolSkipDistance( 0 ); m_previewPlot->addCurveNoUpdate( curve ); @@ -589,14 +523,6 @@ void RicSummaryPlotEditorUi::defineEditorAttribute( const caf::PdmFieldHandle* f attrib->m_buttonText = "OK"; } } - else if ( &m_appearanceApplyButton == field ) - { - caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast( attribute ); - if ( attrib ) - { - attrib->m_buttonText = "Apply"; - } - } else if ( &m_targetPlot == field ) { caf::PdmUiComboBoxEditorAttribute* attrib = dynamic_cast( attribute ); @@ -653,8 +579,6 @@ void RicSummaryPlotEditorUi::populateCurveCreator( const RimSummaryPlot& sourceS } m_summaryCurveSelectionEditor->summaryAddressSelection()->setSelectedCurveDefinitions( curveDefs ); - - updateAppearanceEditor(); } //-------------------------------------------------------------------------------------------------- @@ -763,37 +687,6 @@ void RicSummaryPlotEditorUi::resetAllFields() m_targetPlot = nullptr; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicSummaryPlotEditorUi::initCurveAppearanceCalculator( RimSummaryCurveAppearanceCalculator& curveAppearanceCalc ) -{ - if ( !m_useAutoAppearanceAssignment() ) - { - curveAppearanceCalc.assignDimensions( m_caseAppearanceType(), - m_variableAppearanceType(), - m_wellAppearanceType(), - m_groupAppearanceType(), - m_regionAppearanceType() ); - } - else - { - RimSummaryCurveAppearanceCalculator::CurveAppearanceType caseAppearance; - RimSummaryCurveAppearanceCalculator::CurveAppearanceType variAppearance; - RimSummaryCurveAppearanceCalculator::CurveAppearanceType wellAppearance; - RimSummaryCurveAppearanceCalculator::CurveAppearanceType gropAppearance; - RimSummaryCurveAppearanceCalculator::CurveAppearanceType regiAppearance; - - curveAppearanceCalc.getDimensions( &caseAppearance, &variAppearance, &wellAppearance, &gropAppearance, ®iAppearance ); - - m_caseAppearanceType = caseAppearance; - m_variableAppearanceType = variAppearance; - m_wellAppearanceType = wellAppearance; - m_groupAppearanceType = gropAppearance; - m_regionAppearanceType = regiAppearance; - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -802,7 +695,6 @@ void RicSummaryPlotEditorUi::applyAppearanceToAllPreviewCurves() std::set allCurveDefs = m_previewPlot->summaryAndEnsembleCurveDefinitions(); RimSummaryCurveAppearanceCalculator curveLookCalc( allCurveDefs ); - initCurveAppearanceCalculator( curveLookCalc ); // Summary curves for ( auto& curve : m_previewPlot->summaryCurves() ) @@ -822,17 +714,6 @@ void RicSummaryPlotEditorUi::applyAppearanceToAllPreviewCurves() } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RicSummaryPlotEditorUi::updateAppearanceEditor() -{ - std::set allCurveDefs = m_previewPlot->summaryAndEnsembleCurveDefinitions(); - - RimSummaryCurveAppearanceCalculator curveLookCalc( allCurveDefs ); - initCurveAppearanceCalculator( curveLookCalc ); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -843,7 +724,7 @@ void RicSummaryPlotEditorUi::createNewPlot() if ( !m_plotContainer ) { std::vector plots; - m_plotContainer = RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( plots ); + m_plotContainer = RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( plots ); } if ( m_plotContainer ) @@ -877,7 +758,6 @@ void RicSummaryPlotEditorUi::updateCurveNames() { for ( RimSummaryCurve* curve : m_previewPlot->summaryCurves() ) { - curve->applyCurveAutoNameSettings( *m_curveNameConfig() ); curve->updateCurveNameNoLegendUpdate(); } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.h index 893815274e..dd270d221a 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.h @@ -18,7 +18,6 @@ #pragma once -#include "RimSummaryCurveAppearanceCalculator.h" #include "RiuSummaryVectorSelectionWidgetCreator.h" #include "cafPdmChildArrayField.h" @@ -39,8 +38,8 @@ class PdmObject; }; class RimSummaryCase; +class RimSummaryCurve; class RimSummaryMultiPlot; -class RimSummaryCurveAutoName; class RimSummaryPlot; class RiaSummaryCurveDefinition; class RimEnsembleCurveSet; @@ -57,9 +56,6 @@ class RicSummaryPlotEditorUi : public caf::PdmObject public: static const QString CONFIGURATION_NAME; -private: - using AppearanceTypeAppEnum = caf::AppEnum; - public: RicSummaryPlotEditorUi(); ~RicSummaryPlotEditorUi() override; @@ -96,9 +92,7 @@ private: void setDefaultCurveSelection( const std::vector& defaultCases ); void resetAllFields(); - void initCurveAppearanceCalculator( RimSummaryCurveAppearanceCalculator& curveAppearanceCalc ); void applyAppearanceToAllPreviewCurves(); - void updateAppearanceEditor(); void createNewPlot(); bool isObservedData( RimSummaryCase* sumCase ) const; @@ -110,16 +104,6 @@ private: std::unique_ptr m_previewPlot; - caf::PdmField m_useAutoAppearanceAssignment; - caf::PdmField m_appearanceApplyButton; - caf::PdmField m_caseAppearanceType; - caf::PdmField m_variableAppearanceType; - caf::PdmField m_wellAppearanceType; - caf::PdmField m_groupAppearanceType; - caf::PdmField m_regionAppearanceType; - - caf::PdmChildField m_curveNameConfig; - caf::PdmField m_okButtonField; caf::PdmField m_applyButtonField; caf::PdmField m_closeButtonField; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp index 09ef5657e4..53041a54d8 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp @@ -103,14 +103,6 @@ void RicSummaryPlotEditorWidgetCreator::recursivelyConfigureAndUpdateTopLevelUiO m_firstRowLayout->addWidget( addrWidget ); - caf::PdmUiGroup* appearanceGroup = findGroupByKeyword( topLevelUiItems, RiuSummaryCurveDefinitionKeywords::appearance(), uiConfigName ); - auto appearanceGroupBox = createGroupBoxWithContent( appearanceGroup, uiConfigName ); - m_lowerLeftLayout->addWidget( appearanceGroupBox ); - - caf::PdmUiGroup* nameConfigGroup = findGroupByKeyword( topLevelUiItems, RiuSummaryCurveDefinitionKeywords::nameConfig(), uiConfigName ); - auto nameConfigGroupBox = createGroupBoxWithContent( nameConfigGroup, uiConfigName ); - m_lowerLeftLayout->addWidget( nameConfigGroupBox ); - QMinimizePanel* curveGroup = getOrCreateCurveTreeGroup(); m_lowerLeftLayout->addWidget( curveGroup, 1 ); m_lowerLeftLayout->addStretch( 0 ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp index e907dffc8e..96fb9bd2ae 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp @@ -27,10 +27,10 @@ #include "RiaLogging.h" #include "RiaPreferencesSummary.h" #include "RiaTextStringTools.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryStringTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" -#include "RicCreateSummaryCaseCollectionFeature.h" +#include "RicImportEnsembleFeature.h" #include "RicImportGeneralDataFeature.h" #include "RicImportSummaryCasesFeature.h" #include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" @@ -87,7 +87,7 @@ RimSummaryCurve* RicSummaryPlotFeatureImpl::createHistoryCurve( const RifEclipse historyAddr.setVectorName( historyAddr.vectorName() + "H" ); if ( summaryCasesToUse->summaryReader()->allResultAddresses().count( historyAddr ) ) { - return createCurve( summaryCasesToUse, historyAddr ); + return RiaSummaryPlotTools::createCurve( summaryCasesToUse, historyAddr ); } return nullptr; @@ -154,7 +154,7 @@ std::vector openEclipseCasesForCellPlotting( QStringList gridFi analysisModels->cases.push_back( rimResultReservoir ); - if ( !rimResultReservoir->openReserviorCase() ) + if ( !rimResultReservoir->openReservoirCase() ) { analysisModels->removeCaseFromAllGroups( rimResultReservoir ); @@ -316,7 +316,10 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin if ( isEnsembleMode ) { - ensemble = RicCreateSummaryCaseCollectionFeature::groupSummaryCases( summaryCasesToUse, "Ensemble", true ); + ensemble = RicImportEnsembleFeature::groupSummaryCases( summaryCasesToUse, + "Ensemble", + RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE, + true ); } if ( isSinglePlot ) @@ -342,7 +345,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin newPlot->setNormalizationEnabled( isNormalizedY ); newPlot->loadDataAndUpdate(); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); } else // Multiple plots, one for each separate summary address, put them all in a summary multiplot { @@ -362,7 +365,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin summaryPlot->loadDataAndUpdate(); } - RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( summaryPlots ); + RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( summaryPlots ); } } @@ -430,7 +433,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin newPlot->loadDataAndUpdate(); lastPlotCreated = newPlot; - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); } } else // Multiplot @@ -484,7 +487,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin newPlot->loadDataAndUpdate(); lastPlotCreated = newPlot; - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); } } } @@ -621,7 +624,7 @@ std::vector RicSummaryPlotFeatureImpl::createMultipleSummaryPlo const std::set& allAddrsInCase = sumCase->summaryReader()->allResultAddresses(); if ( allAddrsInCase.count( addr ) ) { - auto* newCurve = createCurve( sumCase, addr ); + auto newCurve = RiaSummaryPlotTools::createCurve( sumCase, addr ); createdCurves.push_back( newCurve ); } } @@ -682,18 +685,6 @@ std::set return filteredAdressesFromCases; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimSummaryCurve* RicSummaryPlotFeatureImpl::createCurve( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& address ) -{ - auto curve = new RimSummaryCurve(); - curve->setSummaryCaseY( summaryCase ); - curve->setSummaryAddressY( address ); - - return curve; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -746,8 +737,7 @@ std::vector RicSummaryPlotFeatureImpl::addCurvesFromAddressFil for ( const auto& addr : curveAddressesToUse ) { - auto* newCurve = createCurve( summaryCase, addr ); - + auto newCurve = RiaSummaryPlotTools::createCurve( summaryCase, addr ); createdCurves.push_back( newCurve ); plot->addCurveNoUpdate( newCurve ); } @@ -788,32 +778,30 @@ void RicSummaryPlotFeatureImpl::insertFilteredAddressesInSet( const QStringList& //-------------------------------------------------------------------------------------------------- QString RicSummaryPlotFeatureImpl::summaryPlotCommandLineHelpText() { - // clang-format off QString txt = - "The --summaryplot option has the following syntax:\n" - "\n" - "[] \n" - "\n" - "It creates one summary plot for each of the the summary vectors matched by the " - " using all the in each plot.\n" - "The has the syntax [:[:[:i,j,k]]] and can be repeated.\n" - "Wildcards can also be used, eg. \"WOPT:*\" to select the total oil production from all the wells.\n" - "3D Grid properties from restart files can also be requested in the form :i,j,k.\n" - "The can be written with or without extension.\n" - "As long as only summary vectors are requested, only the corresponding SMSPEC file will be opened for each case.\n" - "If a grid property is requested, however (eg. SOIL:20,21,1) the corresponding EGRID and restart data will be loaded as well.\n" - "\n" - "The summary plot options are: \n" - " -help\t Show this help text and ignore the rest of the options.\n" - " -h\t Include history vectors. Will be read from the summary file if the vectors exist.\n" - " \t Only history vectors from the first summary case in the project will be included.\n" - " -nl\t Omit legend in plot.\n" - " -s\t Create only one plot including all the defined vectors and cases.\n" - " -n\t Scale all curves into the range 0.0-1.0. Useful when using -s.\n" - " -e\t Import all the cases as an ensemble, and create ensemble curves sets instead of single curves.\n" - " -c \t Same as -e, but colors the curves by the ensemble parameter . \n" - " -cl \t Same as -c, but uses logarithmic legend.\n"; - // clang-format on + "The --summaryplot option has the following syntax:\n" + "\n" + "[] \n" + "\n" + "It creates one summary plot for each of the the summary vectors matched by the " + " using all the in each plot.\n" + "The has the syntax [:[:[:i,j,k]]] and can be repeated.\n" + "Wildcards can also be used, eg. \"WOPT:*\" to select the total oil production from all the wells.\n" + "3D Grid properties from restart files can also be requested in the form :i,j,k.\n" + "The can be written with or without extension.\n" + "As long as only summary vectors are requested, only the corresponding SMSPEC file will be opened for each case.\n" + "If a grid property is requested, however (eg. SOIL:20,21,1) the corresponding EGRID and restart data will be loaded as well.\n" + "\n" + "The summary plot options are: \n" + " -help\t Show this help text and ignore the rest of the options.\n" + " -h\t Include history vectors. Will be read from the summary file if the vectors exist.\n" + " \t Only history vectors from the first summary case in the project will be included.\n" + " -nl\t Omit legend in plot.\n" + " -s\t Create only one plot including all the defined vectors and cases.\n" + " -n\t Scale all curves into the range 0.0-1.0. Useful when using -s.\n" + " -e\t Import all the cases as an ensemble, and create ensemble curves sets instead of single curves.\n" + " -c \t Same as -e, but colors the curves by the ensemble parameter . \n" + " -cl \t Same as -c, but uses logarithmic legend.\n"; return txt; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.h index 4207cc33a1..c3d92d1cfa 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.h @@ -83,8 +83,6 @@ private: EnsembleColoringType ensembleColoringStyle, QString ensembleColoringParameter ); - static RimSummaryCurve* createCurve( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& address ); - static RimSummaryCurve* createHistoryCurve( const RifEclipseSummaryAddress& addr, RimSummaryCase* summaryCasesToUse ); static std::vector addCurvesFromAddressFiltersToPlot( const QStringList& curveFilters, diff --git a/ApplicationLibCode/Commands/Sumo/RicCreateSumoEnsembleFeature.cpp b/ApplicationLibCode/Commands/Sumo/RicCreateSumoEnsembleFeature.cpp index 97d31d2921..84559f09a4 100644 --- a/ApplicationLibCode/Commands/Sumo/RicCreateSumoEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/Sumo/RicCreateSumoEnsembleFeature.cpp @@ -20,8 +20,6 @@ #include "RiaDefines.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" - #include "Cloud/RimCloudDataSourceCollection.h" #include "Sumo/RimSummarySumoDataSource.h" diff --git a/ApplicationLibCode/Commands/SurfaceCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/SurfaceCommands/CMakeLists_files.cmake index 72da9fcc1f..16d4d830ee 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/SurfaceCommands/CMakeLists_files.cmake @@ -21,14 +21,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -# set (COMMAND_QT_MOC_HEADERS ${COMMAND_QT_MOC_HEADERS} -# ${CMAKE_CURRENT_LIST_DIR}/RicTextAnnotation3dEditor.h ) - -source_group( - "CommandFeature\\SurfaceCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp index 01e932a15a..21be79899a 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp @@ -45,7 +45,7 @@ void RicImportSurfacesFeature::onActionTriggered( bool isChecked ) QStringList fileNames = RiuFileDialogTools::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(), "Import Surfaces", defaultDir, - "Surface files (*.ptl *.ts *.dat *.xyz);;All Files (*.*)" ); + "Surface files (*.ptl *.ts *.dat *.vtu *.pvd *.xyz);;All Files (*.*)" ); if ( fileNames.isEmpty() ) return; diff --git a/ApplicationLibCode/Commands/ToggleCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/ToggleCommands/CMakeLists_files.cmake index 2aa14ec6de..3aa56fc5e8 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/ToggleCommands/CMakeLists_files.cmake @@ -19,11 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\ToggleItems" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/ViewLink/CMakeLists_files.cmake b/ApplicationLibCode/Commands/ViewLink/CMakeLists_files.cmake index ad5911aa3e..273df490ff 100644 --- a/ApplicationLibCode/Commands/ViewLink/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/ViewLink/CMakeLists_files.cmake @@ -25,11 +25,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\ViewLink" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp index f2a4227561..ca9482d293 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp @@ -19,7 +19,7 @@ #include "RicDeleteAllLinkedViewsFeature.h" -#include "RimEclipseContourMapView.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RimGridView.h" #include "RimProject.h" #include "RimViewLinker.h" diff --git a/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp index 9031b1fe3e..e8f93cd6a4 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp @@ -21,7 +21,7 @@ #include "RiaApplication.h" -#include "RimEclipseContourMapView.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RimGridView.h" #include "RimProject.h" #include "RimViewController.h" diff --git a/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp index d7b4806aba..a972ee6ec0 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp @@ -21,8 +21,8 @@ #include "RiaApplication.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" -#include "RimEclipseContourMapView.h" #include "RimGridView.h" #include "RimProject.h" #include "RimViewController.h" diff --git a/ApplicationLibCode/Commands/WellLogCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/WellLogCommands/CMakeLists_files.cmake index 069574882e..a19c90c788 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/WellLogCommands/CMakeLists_files.cmake @@ -73,11 +73,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "CommandFeature\\WellLog" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp index 548876df9d..1fcceaf06b 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp @@ -98,7 +98,7 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createRftSegmentPlot() plot->setLegendItemsClickable( false ); plot->enableDepthMarkerLine( true ); plot->setLegendPosition( RimPlotWindow::LegendPosition::INSIDE_UPPER_RIGHT ); - plot->setLegendFontSize( caf::FontTools::RelativeSize::XSmall ); + plot->setLegendFontSize( caf::FontTools::RelativeSize::Small ); plot->setLegendsHorizontal( false ); plot->setAutoZoomMaximumDepthFactor( 0.1 ); diff --git a/ApplicationLibCode/Commands/WellPathCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/WellPathCommands/CMakeLists_files.cmake index 05d2b44324..04960d2e14 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/Commands/WellPathCommands/CMakeLists_files.cmake @@ -71,22 +71,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list( - APPEND - COMMAND_QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.h - ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellTarget3dEditor.h - ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicWellPathGeometry3dEditor.h - ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPolyline3dEditor.h - ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPolylineTarget3dEditor.h - ${CMAKE_CURRENT_LIST_DIR}/RicCreateMultipleWellPathLaterals.h -) - -source_group( - "CommandFeature\\WellPath" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp b/ApplicationLibCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp index 5ac922ab30..c28b8f678f 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp @@ -197,8 +197,7 @@ void RicPointTangentManipulatorPartMgr::updateManipulatorFromRay( const cvf::Ray const auto& p1 = m_polyline[i]; const auto& p2 = m_polyline[i - 1]; - double normalizedIntersection; - const auto pointOnLine = cvf::GeometryTools::projectPointOnLine( p1, p2, newOrigin, &normalizedIntersection ); + const auto pointOnLine = cvf::GeometryTools::projectPointOnLine( p1, p2, newOrigin ); const double candidateDistance = pointOnLine.pointDistanceSquared( newOrigin ); if ( candidateDistance < closestDistance ) diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp index 4d200bb220..b9826622f3 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp @@ -28,6 +28,7 @@ #include "RimTools.h" #include "RimWellPathCollection.h" #include "RimWellPathGeometryDef.h" +#include "RimWellPathTarget.h" #include "Riu3DMainWindowTools.h" @@ -43,8 +44,7 @@ CAF_CMD_SOURCE_INIT( RicDuplicateWellPathFeature, "RicDuplicateWellPathFeature" //-------------------------------------------------------------------------------------------------- bool RicDuplicateWellPathFeature::isCommandEnabled() const { - auto wellPath = caf::firstAncestorOfTypeFromSelectedObject(); - + auto wellPath = caf::firstAncestorOfTypeFromSelectedObject(); return wellPath != nullptr; } @@ -53,7 +53,7 @@ bool RicDuplicateWellPathFeature::isCommandEnabled() const //-------------------------------------------------------------------------------------------------- void RicDuplicateWellPathFeature::onActionTriggered( bool isChecked ) { - auto sourceWellPath = caf::firstAncestorOfTypeFromSelectedObject(); + auto sourceWellPath = caf::firstAncestorOfTypeFromSelectedObject(); if ( !sourceWellPath ) return; RimProject* project = RimProject::current(); @@ -78,17 +78,11 @@ void RicDuplicateWellPathFeature::onActionTriggered( bool isChecked ) { auto destinationGeometryDef = newModeledWellPath->geometryDefinition(); - const int targetCount = 8; - const auto sourceMDs = sourceWellPath->wellPathGeometry()->measuredDepths(); - const double distanceBetweenTargets = ( sourceMDs.back() - sourceMDs.front() ) / targetCount; - std::vector targetCoordinates; - for ( int targetIdx = 0; targetIdx <= targetCount; targetIdx++ ) + for ( auto target : sourceWellPath->geometryDefinition()->activeWellTargets( false ) ) { - double measuredDepth = sourceMDs.front() + targetIdx * distanceBetweenTargets; - auto sourceCoord = sourceWellPath->wellPathGeometry()->interpolatedPointAlongWellPath( measuredDepth ); - targetCoordinates.push_back( sourceCoord ); + targetCoordinates.push_back( target->targetPointXYZ() ); } destinationGeometryDef->createAndInsertTargets( targetCoordinates ); newModeledWellPath->createWellPathGeometry(); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp index d33380e3c4..a497d1c130 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp @@ -19,6 +19,11 @@ #include "RiaColorTables.h" +#include "RigEclipseCaseData.h" +#include "Well/RigWellPath.h" + +#include "RimEclipseCase.h" +#include "RimFileWellPath.h" #include "RimModeledWellPath.h" #include "RimOilField.h" #include "RimProject.h" @@ -26,6 +31,7 @@ #include "RimWellPath.h" #include "RimWellPathCollection.h" #include "RimWellPathGeometryDef.h" + #include "Riu3DMainWindowTools.h" #include "cafSelectionManager.h" @@ -78,6 +84,9 @@ void RicNewEditableWellPathFeature::onActionTriggered( bool isChecked ) newModeledWellPath->setUnitSystem( project->commonUnitSystemForAllCases() ); + RimFileWellPath* sourceWellPath = caf::SelectionManager::instance()->selectedItemOfType(); + bool enableTargetPointPicking = !copyWellPathGeometry( sourceWellPath, newModeledWellPath ); + size_t modelledWellpathCount = wellPathCollection->modelledWellPathCount(); newWellPaths.back()->setName( "Well-" + QString::number( modelledWellpathCount + 1 ) ); @@ -86,7 +95,7 @@ void RicNewEditableWellPathFeature::onActionTriggered( bool isChecked ) wellPathCollection->addWellPaths( newWellPaths ); wellPathCollection->uiCapability()->updateConnectedEditors(); - newModeledWellPath->geometryDefinition()->enableTargetPointPicking( true ); + newModeledWellPath->geometryDefinition()->enableTargetPointPicking( enableTargetPointPicking ); project->scheduleCreateDisplayModelAndRedrawAllViews(); @@ -95,11 +104,90 @@ void RicNewEditableWellPathFeature::onActionTriggered( bool isChecked ) } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RicNewEditableWellPathFeature::copyWellPathGeometry( RimFileWellPath* sourceWellPath, RimModeledWellPath* newModeledWellPath ) +{ + if ( sourceWellPath && sourceWellPath->wellPathGeometry() && sourceWellPath->wellPathGeometry()->measuredDepths().size() > 2 ) + { + auto destinationGeometryDef = newModeledWellPath->geometryDefinition(); + + const int targetCount = 8; + + const auto wellPathPoints = sourceWellPath->wellPathGeometry()->wellPathPoints(); + const auto sourceMDs = sourceWellPath->wellPathGeometry()->measuredDepths(); + + auto findCaseContainingAnyPoint = []( const std::vector& points ) -> RimCase* + { + std::vector cases = RimProject::current()->allGridCases(); + for ( RimCase* c : cases ) + { + for ( const cvf::Vec3d& p : points ) + { + if ( c->activeCellsBoundingBox().contains( p ) ) + { + return c; + } + } + } + return nullptr; + }; + + const RimCase* theCase = findCaseContainingAnyPoint( wellPathPoints ); + const double depth = theCase ? theCase->activeCellsBoundingBox().max().z() : 0.0; + + auto filterAwayPointsAboveMinimumDepth = []( const std::vector& wellPathPoints, + const std::vector& md, + double minimumDepth ) -> std::pair, std::vector> + { + // Loop from the top and exclude until the minimum depth has been reached + std::vector filteredPoints; + std::vector filteredMds; + + bool minimumDepthReached = false; + for ( size_t i = 0; i < wellPathPoints.size(); i++ ) + { + if ( wellPathPoints[i].z() < minimumDepth || minimumDepthReached ) + { + filteredPoints.push_back( wellPathPoints[i] ); + filteredMds.push_back( md[i] ); + minimumDepthReached = true; + } + } + + return { filteredPoints, filteredMds }; + }; + + const auto& [filteredWellPathPoints, filteredMDs] = filterAwayPointsAboveMinimumDepth( wellPathPoints, sourceMDs, depth ); + CAF_ASSERT( filteredWellPathPoints.size() == filteredMDs.size() ); + if ( filteredWellPathPoints.size() < 2 ) return false; + + std::vector targetCoordinates; + + const double distanceBetweenTargets = ( filteredMDs.back() - filteredMDs.front() ) / targetCount; + + RigWellPath wellPath( filteredWellPathPoints, filteredMDs ); + + for ( int targetIdx = 0; targetIdx <= targetCount; targetIdx++ ) + { + double measuredDepth = filteredMDs.front() + targetIdx * distanceBetweenTargets; + auto sourceCoord = wellPath.interpolatedPointAlongWellPath( measuredDepth ); + targetCoordinates.push_back( sourceCoord ); + } + destinationGeometryDef->createAndInsertTargets( targetCoordinates ); + newModeledWellPath->createWellPathGeometry(); + return true; + } + + return false; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RicNewEditableWellPathFeature::setupActionLook( QAction* actionToSetup ) { - actionToSetup->setText( "Create Well Path" ); - actionToSetup->setIcon( QIcon( ":/Well.svg" ) ); + actionToSetup->setText( "Create Editable Well Path" ); + actionToSetup->setIcon( QIcon( ":/EditableWell.png" ) ); } diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h index 666fb25fc6..7cd1cc514d 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h @@ -20,6 +20,9 @@ #include "cafCmdFeature.h" +class RimFileWellPath; +class RimModeledWellPath; + //================================================================================================== /// //================================================================================================== @@ -31,4 +34,6 @@ protected: bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; + + bool copyWellPathGeometry( RimFileWellPath* sourceWellPath, RimModeledWellPath* newModeledWellPath ); }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicPolylineTargetsPickEventHandler.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicPolylineTargetsPickEventHandler.cpp index 2b8622d8da..33954430ef 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicPolylineTargetsPickEventHandler.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicPolylineTargetsPickEventHandler.cpp @@ -22,8 +22,11 @@ #include "Well/RigWellPath.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" +#include "RimGeoMechContourMapView.h" #include "RimModeledWellPath.h" +#include "RimPolylinePickerInterface.h" #include "RimPolylineTarget.h" #include "RimUserDefinedPolylinesAnnotation.h" @@ -32,11 +35,11 @@ #include "RivPolylinesAnnotationSourceInfo.h" -#include "RimPolylinePickerInterface.h" - #include "cafDisplayCoordTransform.h" #include "cafSelectionManager.h" +#include "cvfBoundingBox.h" + #include //-------------------------------------------------------------------------------------------------- @@ -84,6 +87,13 @@ bool RicPolylineTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEvent const auto& firstPickItem = eventObject.m_pickItemInfos.front(); auto targetPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalPickedPoint() ); + if ( dynamic_cast( rimView ) || dynamic_cast( rimView ) ) + { + // In a contour map view, the contour map is located below the domain. This means that the picked z-value is below the domain. + // Use the z-value of the domain bounding box instead. + targetPointInDomain.z() = rimView->domainBoundingBox().max().z(); + } + auto* newTarget = new RimPolylineTarget(); newTarget->setAsPointTargetXYD( cvf::Vec3d( targetPointInDomain.x(), targetPointInDomain.y(), -targetPointInDomain.z() ) ); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.cpp index 88819896d9..28d54041e6 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.cpp @@ -27,23 +27,8 @@ RicWellPathsUnitSystemSettingsUi::RicWellPathsUnitSystemSettingsUi() { CAF_PDM_InitObject( "RimWellPathsUnitSystemSettings" ); - CAF_PDM_InitFieldNoDefault( &unitSystem, "UnitSystem", "Unit System" ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RicWellPathsUnitSystemSettingsUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) -{ - QList options; - if ( fieldNeedingOptions == &unitSystem ) - { - options.push_back( - caf::PdmOptionItemInfo( caf::AppEnum::uiText( RiaDefines::EclipseUnitSystem::UNITS_METRIC ), - RiaDefines::EclipseUnitSystem::UNITS_METRIC ) ); - options.push_back( - caf::PdmOptionItemInfo( caf::AppEnum::uiText( RiaDefines::EclipseUnitSystem::UNITS_FIELD ), - RiaDefines::EclipseUnitSystem::UNITS_FIELD ) ); - } - return options; + CAF_PDM_InitField( &unitSystem, "UnitSystem", RiaDefines::EclipseUnitSystem::UNITS_METRIC, "Unit System" ); + caf::AppEnum::setEnumSubset( &unitSystem, + { RiaDefines::EclipseUnitSystem::UNITS_METRIC, + RiaDefines::EclipseUnitSystem::UNITS_FIELD } ); } diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.h b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.h index a90d6039c8..08131c123f 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathsUnitSystemSettingsUi.h @@ -35,7 +35,4 @@ public: RicWellPathsUnitSystemSettingsUi(); caf::PdmField> unitSystem; - -protected: - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; }; diff --git a/ApplicationLibCode/FileInterface/CMakeLists_files.cmake b/ApplicationLibCode/FileInterface/CMakeLists_files.cmake index 234e9ec5ab..93fa7de074 100644 --- a/ApplicationLibCode/FileInterface/CMakeLists_files.cmake +++ b/ApplicationLibCode/FileInterface/CMakeLists_files.cmake @@ -102,6 +102,8 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RifAsciiDataParseOptions.h ${CMAKE_CURRENT_LIST_DIR}/RifByteArrayArrowRandomAccessFile.h ${CMAKE_CURRENT_LIST_DIR}/RifArrowTools.h + ${CMAKE_CURRENT_LIST_DIR}/RifReaderRegularGridModel.h + ${CMAKE_CURRENT_LIST_DIR}/RifVtkSurfaceImporter.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -201,14 +203,9 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RifOsduWellLogReader.cpp ${CMAKE_CURRENT_LIST_DIR}/RifByteArrayArrowRandomAccessFile.cpp ${CMAKE_CURRENT_LIST_DIR}/RifArrowTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RifReaderRegularGridModel.cpp + ${CMAKE_CURRENT_LIST_DIR}/RifVtkSurfaceImporter.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "FileInterface" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/FileInterface/RifEclEclipseSummary.cpp b/ApplicationLibCode/FileInterface/RifEclEclipseSummary.cpp index f104705933..4cacc25930 100644 --- a/ApplicationLibCode/FileInterface/RifEclEclipseSummary.cpp +++ b/ApplicationLibCode/FileInterface/RifEclEclipseSummary.cpp @@ -28,6 +28,7 @@ #include "RifReaderEclipseOutput.h" #include +#include #include #include @@ -120,6 +121,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu int cellJ( -1 ); int cellK( -1 ); int aquiferNumber( -1 ); + int wellCompletionNumber( -1 ); bool isErrorResult( false ); int id( -1 ); @@ -168,7 +170,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu break; case ECL_SMSPEC_COMPLETION_VAR: { - sumCategory = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION; + sumCategory = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION; wellName = stringFromPointer( ertSumVarNode.get_wgname() ); auto ijk = ertSumVarNode.get_ijk(); @@ -190,7 +192,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu break; case ECL_SMSPEC_LOCAL_COMPLETION_VAR: { - sumCategory = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR; + sumCategory = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR; wellName = stringFromPointer( ertSumVarNode.get_wgname() ); lgrName = stringFromPointer( ertSumVarNode.get_lgr_name() ); @@ -249,6 +251,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu cellJ, cellK, aquiferNumber, + wellCompletionNumber, isErrorResult, id ); } @@ -317,11 +320,59 @@ void RifEclEclipseSummary::buildMetaData() if ( m_ecl_SmSpec ) { + auto transformString = []( const std::string& input ) -> std::string + { + // Pattern 1: Handle "WGPRL__2:MY-WELL1-A5" format + // Matches text followed by __, number, colon, alphanumeric text, hyphen, alphanumeric + std::regex pattern1( "([A-Za-z]+)__([0-9]+):([A-Za-z0-9]+)-([A-Za-z0-9]+)" ); + std::smatch matches; + + if ( std::regex_search( input, matches, pattern1 ) ) + { + return matches[1].str() + ":" + matches[3].str() + "-" + matches[4].str() + ":" + matches[2].str(); + } + + return input; // Return original string if pattern doesn't match + }; + int varCount = ecl_smspec_num_nodes( m_ecl_SmSpec ); for ( int i = 0; i < varCount; i++ ) { - const ecl::smspec_node& ertSumVarNode = ecl_smspec_iget_node_w_node_index( m_ecl_SmSpec, i ); - RifEclipseSummaryAddress addr = addressFromErtSmSpecNode( ertSumVarNode ); + const ecl::smspec_node& ertSumVarNode = ecl_smspec_iget_node_w_node_index( m_ecl_SmSpec, i ); + + RifEclipseSummaryAddress addr = addressFromErtSmSpecNode( ertSumVarNode ); + + if ( ertSumVarNode.get_gen_key1() ) + { + std::string completeVectorName = std::string( ertSumVarNode.get_gen_key1() ); + completeVectorName = transformString( completeVectorName ); + + auto adrFromTextParsing = RifEclipseSummaryAddress::fromEclipseTextAddress( completeVectorName ); + + bool debugOutput = false; + if ( debugOutput ) + { + if ( addr != adrFromTextParsing ) + { + auto ertAdrText = addr.toEclipseTextAddress(); + auto adrFromText = adrFromTextParsing.toEclipseTextAddress(); + + QString detectedInconsiteny = + QString( "Full text from ERT: %1, Address from ERT: %2, Address from text parsing: %3 " ) + .arg( QString::fromStdString( completeVectorName ) ) + .arg( QString::fromStdString( ertAdrText ) ) + .arg( QString::fromStdString( adrFromText ) ); + + RiaLogging::debug( detectedInconsiteny ); + } + } + + if ( adrFromTextParsing.isValid() ) + { + addr = adrFromTextParsing; + } + } + m_allResultAddresses.insert( addr ); m_resultAddressToErtNodeIdx[addr] = i; } diff --git a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp index f82e128f97..d38fc61828 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp +++ b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp @@ -61,6 +61,10 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryCategory category, st m_name = identifiers[SummaryIdentifierType::INPUT_WELL_NAME]; break; case SummaryCategory::SUMMARY_WELL_COMPLETION: + m_name = identifiers[SummaryIdentifierType::INPUT_WELL_NAME]; + m_number0 = RiaStdStringTools::toInt( identifiers[SummaryIdentifierType::INPUT_WELL_COMPLETION_NUMBER] ); + break; + case SummaryCategory::SUMMARY_WELL_CONNECTION: m_name = identifiers[SummaryIdentifierType::INPUT_WELL_NAME]; setCellIjk( ijkTupleFromUiText( identifiers[SummaryIdentifierType::INPUT_CELL_IJK] ) ); break; @@ -68,7 +72,7 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryCategory category, st m_lgrName = identifiers[SummaryIdentifierType::INPUT_LGR_NAME]; m_name = identifiers[SummaryIdentifierType::INPUT_WELL_NAME]; break; - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: m_lgrName = identifiers[SummaryIdentifierType::INPUT_LGR_NAME]; m_name = identifiers[SummaryIdentifierType::INPUT_WELL_NAME]; setCellIjk( ijkTupleFromUiText( identifiers[SummaryIdentifierType::INPUT_CELL_IJK] ) ); @@ -109,6 +113,7 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryCategory category, int cellJ, int cellK, int aquiferNumber, + int completionNumber, bool isErrorResult, int id ) : m_category( category ) @@ -139,13 +144,17 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryCategory category, m_name = wellName; break; case SummaryCategory::SUMMARY_WELL_COMPLETION: + m_name = wellName; + m_number0 = completionNumber; + break; + case SummaryCategory::SUMMARY_WELL_CONNECTION: m_name = wellName; setCellIjk( cellI, cellJ, cellK ); break; case SummaryCategory::SUMMARY_WELL_LGR: m_name = wellName; break; - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: m_name = wellName; setCellIjk( cellI, cellJ, cellK ); break; @@ -329,13 +338,30 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::wellAddress( const std::strin //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifEclipseSummaryAddress - RifEclipseSummaryAddress::wellCompletionAddress( const std::string& vectorName, const std::string& wellName, int i, int j, int k, int calculationId ) +RifEclipseSummaryAddress RifEclipseSummaryAddress::wellCompletionAddress( const std::string& vectorName, + const std::string& wellName, + int completionNumber, + int calculationId /*= -1 */ ) { RifEclipseSummaryAddress addr; addr.m_category = SummaryCategory::SUMMARY_WELL_COMPLETION; addr.m_vectorName = vectorName; addr.m_name = wellName; + addr.m_number0 = completionNumber; + addr.m_id = calculationId; + return addr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RifEclipseSummaryAddress + RifEclipseSummaryAddress::wellConnectionAddress( const std::string& vectorName, const std::string& wellName, int i, int j, int k, int calculationId ) +{ + RifEclipseSummaryAddress addr; + addr.m_category = SummaryCategory::SUMMARY_WELL_CONNECTION; + addr.m_vectorName = vectorName; + addr.m_name = wellName; addr.setCellIjk( i, j, k ); addr.m_id = calculationId; return addr; @@ -370,7 +396,7 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::wellCompletionLgrAddress( con int calculationId ) { RifEclipseSummaryAddress addr; - addr.m_category = SummaryCategory::SUMMARY_WELL_COMPLETION_LGR; + addr.m_category = SummaryCategory::SUMMARY_WELL_CONNECTION_LGR; addr.m_vectorName = vectorName; addr.m_lgrName = lgrName; addr.m_name = wellName; @@ -483,9 +509,9 @@ std::string RifEclipseSummaryAddress::generateStringFromAddresses( const std::ve //-------------------------------------------------------------------------------------------------- bool RifEclipseSummaryAddress::isDependentOnWellName( SummaryCategory category ) { - return ( category == SummaryCategory::SUMMARY_WELL || category == SummaryCategory::SUMMARY_WELL_COMPLETION || - category == SummaryCategory::SUMMARY_WELL_COMPLETION_LGR || category == SummaryCategory::SUMMARY_WELL_LGR || - category == SummaryCategory::SUMMARY_WELL_SEGMENT ); + return ( category == SummaryCategory::SUMMARY_WELL || category == SummaryCategory::SUMMARY_WELL_CONNECTION || + category == SummaryCategory::SUMMARY_WELL_CONNECTION_LGR || category == SummaryCategory::SUMMARY_WELL_LGR || + category == SummaryCategory::SUMMARY_WELL_SEGMENT || category == SummaryCategory::SUMMARY_WELL_COMPLETION ); } //-------------------------------------------------------------------------------------------------- @@ -554,6 +580,14 @@ std::string RifEclipseSummaryAddress::wellName() const return isDependentOnWellName( m_category ) ? m_name : std::string(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +int RifEclipseSummaryAddress::wellCompletionNumber() const +{ + return m_number0; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -679,7 +713,14 @@ std::string RifEclipseSummaryAddress::itemUiText() const case SummaryCategory::SUMMARY_WELL_COMPLETION: { text += wellName(); - text += ":" + blockAsString(); + text += ":"; + text += std::to_string( wellCompletionNumber() ); + } + break; + case SummaryCategory::SUMMARY_WELL_CONNECTION: + { + text += wellName(); + text += ":" + connectionAsString(); } break; case SummaryCategory::SUMMARY_WELL_LGR: @@ -689,13 +730,13 @@ std::string RifEclipseSummaryAddress::itemUiText() const text += wellName(); } break; - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: { text += lgrName(); text += ":"; text += wellName(); text += ":"; - text += blockAsString(); + text += connectionAsString(); } break; case SummaryCategory::SUMMARY_WELL_SEGMENT: @@ -762,6 +803,8 @@ std::string RifEclipseSummaryAddress::addressComponentUiText( RifEclipseSummaryA return m_lgrName; case SummaryIdentifierType::INPUT_SEGMENT_NUMBER: return std::to_string( wellSegmentNumber() ); + case SummaryIdentifierType::INPUT_WELL_COMPLETION_NUMBER: + return std::to_string( wellCompletionNumber() ); case SummaryIdentifierType::INPUT_AQUIFER_NUMBER: return std::to_string( aquiferNumber() ); case SummaryIdentifierType::INPUT_VECTOR_NAME: @@ -813,6 +856,10 @@ bool RifEclipseSummaryAddress::isValid() const return !m_name.empty(); case SummaryCategory::SUMMARY_WELL_COMPLETION: + if ( m_name.empty() ) return false; + return m_number0 != -1; + + case SummaryCategory::SUMMARY_WELL_CONNECTION: if ( m_name.empty() ) return false; if ( m_number0 == -1 ) return false; if ( m_number1 == -1 ) return false; @@ -823,7 +870,7 @@ bool RifEclipseSummaryAddress::isValid() const if ( m_lgrName.empty() ) return false; return !m_name.empty(); - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: if ( m_lgrName.empty() ) return false; if ( m_name.empty() ) return false; if ( m_number0 == -1 ) return false; @@ -948,6 +995,14 @@ void RifEclipseSummaryAddress::setWellSegmentNumber( int segment ) m_number0 = segment; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RifEclipseSummaryAddress::setWellCompletionNumber( int completionNumber ) +{ + m_number0 = completionNumber; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1011,16 +1066,24 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromTokens( const std::vector std::string token1; std::string token2; - int intValue0 = 0; - int intValue1 = 0; - int intValue2 = 0; + int intValue0 = -1; + int intValue1 = -1; + int intValue2 = -1; vectorName = tokens[0]; if ( tokens.size() > 1 ) token1 = tokens[1]; if ( tokens.size() > 2 ) token2 = tokens[2]; - SummaryCategory category = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( vectorName ); + SummaryCategory category = SummaryCategory::SUMMARY_INVALID; + if ( ( tokens.size() == 3 ) && ( vectorName.starts_with( 'W' ) ) ) + { + category = SummaryCategory::SUMMARY_WELL_COMPLETION; + } + else + { + category = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( vectorName ); + } switch ( category ) { @@ -1081,10 +1144,21 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromTokens( const std::vector break; case SummaryCategory::SUMMARY_WELL: - if ( !token1.empty() ) return wellAddress( vectorName, token1 ); + { + auto wellName = token1; + if ( !wellName.empty() ) return wellAddress( vectorName, wellName ); break; + } case SummaryCategory::SUMMARY_WELL_COMPLETION: + { + RiaStdStringTools::toInt( token2, intValue0 ); + + if ( !token1.empty() ) return wellCompletionAddress( vectorName, token1, intValue0 ); + break; + } + + case SummaryCategory::SUMMARY_WELL_CONNECTION: if ( !token2.empty() ) { auto ijk = RiaStdStringTools::splitString( token2, ',' ); @@ -1094,7 +1168,7 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromTokens( const std::vector RiaStdStringTools::toInt( ijk[1], intValue1 ); RiaStdStringTools::toInt( ijk[2], intValue2 ); - return wellCompletionAddress( vectorName, token1, intValue0, intValue1, intValue2 ); + return wellConnectionAddress( vectorName, token1, intValue0, intValue1, intValue2 ); } } break; @@ -1103,7 +1177,7 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromTokens( const std::vector if ( !token1.empty() && !token2.empty() ) return wellLgrAddress( vectorName, token1, token2 ); break; - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: if ( tokens.size() > 2 ) { const auto& token3 = tokens[3]; @@ -1184,8 +1258,9 @@ bool RifEclipseSummaryAddress::isValidEclipseCategory() const case SummaryCategory::SUMMARY_GROUP: case SummaryCategory::SUMMARY_WELL: case SummaryCategory::SUMMARY_WELL_COMPLETION: + case SummaryCategory::SUMMARY_WELL_CONNECTION: case SummaryCategory::SUMMARY_WELL_LGR: - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: case SummaryCategory::SUMMARY_WELL_SEGMENT: case SummaryCategory::SUMMARY_BLOCK: case SummaryCategory::SUMMARY_BLOCK_LGR: @@ -1223,6 +1298,14 @@ std::string RifEclipseSummaryAddress::blockAsString() const return std::to_string( cellI() ) + "," + std::to_string( cellJ() ) + "," + std::to_string( cellK() ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RifEclipseSummaryAddress::connectionAsString() const +{ + return blockAsString(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.h b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.h index 5a1af9875f..50561bef61 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.h +++ b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.h @@ -50,6 +50,7 @@ public: int cellJ, int cellK, int aquiferNumber, + int completionNumber, bool isErrorResult, int id ); @@ -69,9 +70,11 @@ public: regionToRegionAddress( const std::string& vectorName, int regionNumber, int region2Number, int calculationId = -1 ); static RifEclipseSummaryAddress groupAddress( const std::string& vectorName, const std::string& groupName, int calculationId = -1 ); static RifEclipseSummaryAddress wellAddress( const std::string& vectorName, const std::string& wellName, int calculationId = -1 ); + static RifEclipseSummaryAddress + wellCompletionAddress( const std::string& vectorName, const std::string& wellName, int completionNumber, int calculationId = -1 ); static RifEclipseSummaryAddress - wellCompletionAddress( const std::string& vectorName, const std::string& wellName, int i, int j, int k, int calculationId = -1 ); + wellConnectionAddress( const std::string& vectorName, const std::string& wellName, int i, int j, int k, int calculationId = -1 ); static RifEclipseSummaryAddress wellLgrAddress( const std::string& vectorName, const std::string& lgrName, const std::string& wellName, int calculationId = -1 ); static RifEclipseSummaryAddress wellCompletionLgrAddress( const std::string& vectorName, @@ -109,6 +112,7 @@ public: std::string groupName() const; std::string networkName() const; std::string wellName() const; + int wellCompletionNumber() const; int wellSegmentNumber() const; std::string lgrName() const; int cellI() const; @@ -117,6 +121,7 @@ public: int aquiferNumber() const; int id() const; std::string blockAsString() const; + std::string connectionAsString() const; std::string ensembleStatisticsVectorName() const; @@ -139,6 +144,7 @@ public: void setAquiferNumber( int aquiferNumber ); void setCellIjk( const std::string& uiText ); void setWellSegmentNumber( int segment ); + void setWellCompletionNumber( int completionNumber ); void setAsErrorResult(); bool isErrorResult() const; diff --git a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddressDefines.h b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddressDefines.h index c79ddcb240..516d6d9c50 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddressDefines.h +++ b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddressDefines.h @@ -39,8 +39,9 @@ enum class SummaryCategory SUMMARY_GROUP, SUMMARY_WELL, SUMMARY_WELL_COMPLETION, + SUMMARY_WELL_CONNECTION, SUMMARY_WELL_LGR, - SUMMARY_WELL_COMPLETION_LGR, + SUMMARY_WELL_CONNECTION_LGR, SUMMARY_WELL_SEGMENT, SUMMARY_BLOCK, SUMMARY_BLOCK_LGR, @@ -54,6 +55,7 @@ enum class SummaryIdentifierType INPUT_REGION_NUMBER, INPUT_REGION_2_REGION, INPUT_WELL_NAME, + INPUT_WELL_COMPLETION_NUMBER, INPUT_GROUP_NAME, INPUT_NETWORK_NAME, INPUT_CELL_IJK, diff --git a/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.cpp b/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.cpp index 5f90142392..f7d62f1f69 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.cpp +++ b/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.cpp @@ -19,10 +19,12 @@ #include "RifEclipseSummaryTools.h" #include "RiaFilePathTools.h" +#include "RiaStdStringTools.h" #include "RiaStringEncodingTools.h" -#include "RifSummaryReaderInterface.h" #include "Summary/RiaSummaryAddressAnalyzer.h" +#include "RifSummaryReaderInterface.h" + #include "cafAppEnum.h" #include "ert/ecl/ecl_file.h" @@ -376,6 +378,45 @@ std::vector RifEclipseSummaryTools::getTimeSteps( ecl_sum_type* ecl_sum return timeSteps; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RifEclipseSummaryTools::splitVectorNameAndSuffix( const std::string& vectorName ) +{ + std::string vectorNameToUse = vectorName; + std::string suffix; + if ( RiaStdStringTools::endsWith( vectorNameToUse, RifEclipseSummaryAddressDefines::differenceIdentifier() ) ) + { + suffix = RifEclipseSummaryAddressDefines::differenceIdentifier(); + vectorNameToUse = vectorNameToUse.substr( 0, vectorNameToUse.size() - RifEclipseSummaryAddressDefines::differenceIdentifier().size() ); + } + else if ( RiaStdStringTools::endsWith( vectorNameToUse, RifEclipseSummaryAddressDefines::historyIdentifier() ) ) + { + suffix = RifEclipseSummaryAddressDefines::historyIdentifier(); + vectorNameToUse = vectorNameToUse.substr( 0, vectorNameToUse.size() - RifEclipseSummaryAddressDefines::historyIdentifier().size() ); + } + return { vectorNameToUse, suffix }; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RifEclipseSummaryTools::nativeVectorNames( const std::vector& vectorNames ) +{ + std::vector nativeNames; + + for ( const auto& s : vectorNames ) + { + const auto [vectorName, suffix] = RifEclipseSummaryTools::splitVectorNameAndSuffix( s ); + if ( std::find( nativeNames.begin(), nativeNames.end(), vectorName ) == nativeNames.end() ) + { + nativeNames.push_back( vectorName ); + } + } + + return nativeNames; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.h b/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.h index c3e5e601d8..5c8e30d227 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.h +++ b/ApplicationLibCode/FileInterface/RifEclipseSummaryTools.h @@ -78,6 +78,9 @@ public: static RiaDefines::EclipseUnitSystem readUnitSystem( ecl_sum_type* ecl_sum ); static std::vector getTimeSteps( ecl_sum_type* ecl_sum ); + static std::pair splitVectorNameAndSuffix( const std::string& vectorName ); + static std::vector nativeVectorNames( const std::vector& vectorNames ); + private: static void findSummaryFiles( const QString& inputFile, QString* headerFile, QStringList* dataFiles ); static QString getRestartFileName( const QString& headerFileName ); diff --git a/ApplicationLibCode/FileInterface/RifEclipseUserDataKeywordTools.cpp b/ApplicationLibCode/FileInterface/RifEclipseUserDataKeywordTools.cpp index 9f2ea1a74f..22aea6251d 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseUserDataKeywordTools.cpp +++ b/ApplicationLibCode/FileInterface/RifEclipseUserDataKeywordTools.cpp @@ -179,7 +179,8 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con std::string groupName; std::string networkName; std::string wellName; - int wellSegmentNumber = -1; + int wellSegmentNumber = -1; + int wellCompletionNumber = -1; std::string lgrName; int cellI = -1; int cellJ = -1; @@ -230,7 +231,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con } break; } - case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION: + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION: { if ( columnHeaderText.size() > 1 ) { @@ -248,7 +249,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con lgrName = columnHeaderText[1]; } break; - case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: if ( columnHeaderText.size() > 2 ) { wellName = columnHeaderText[0]; @@ -257,6 +258,13 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con RifEclipseUserDataKeywordTools::extractThreeInts( &cellI, &cellJ, &cellK, columnHeaderText[2] ); } break; + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION: + if ( columnHeaderText.size() > 1 ) + { + wellName = columnHeaderText[0]; + wellCompletionNumber = RiaStdStringTools::toInt( columnHeaderText[1] ); + } + break; case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT: if ( columnHeaderText.size() > 1 ) { @@ -295,6 +303,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con cellJ, cellK, aquiferNumber, + wellCompletionNumber, isErrorResult, id ); } diff --git a/ApplicationLibCode/FileInterface/RifOpmCommonSummary.cpp b/ApplicationLibCode/FileInterface/RifOpmCommonSummary.cpp index 93d9b9cf20..d1aa0d35dc 100644 --- a/ApplicationLibCode/FileInterface/RifOpmCommonSummary.cpp +++ b/ApplicationLibCode/FileInterface/RifOpmCommonSummary.cpp @@ -465,3 +465,28 @@ std::pair, std::map, std::map, std::map> - buildAddressesSmspecAndKeywordMap( const Opm::EclIO::ESmry* summaryFile ); +std::tuple, std::map, std::map> + buildAddressesSmspecAndKeywordMap( const Opm::EclIO::ESmry* summaryFile ); - static std::pair, std::map> - buildAddressesAndKeywordMap( const std::vector& keywords ); -}; +std::pair, std::map> + buildAddressesAndKeywordMap( const std::vector& keywords ); + +SummaryCategory categoryFromKeyword( const std::string& keyword ); + +}; // namespace RifOpmCommonSummaryTools //================================================================================================== // diff --git a/ApplicationLibCode/FileInterface/RifOpmRadialGridTools.cpp b/ApplicationLibCode/FileInterface/RifOpmRadialGridTools.cpp index 58d80ae807..22df5836a4 100644 --- a/ApplicationLibCode/FileInterface/RifOpmRadialGridTools.cpp +++ b/ApplicationLibCode/FileInterface/RifOpmRadialGridTools.cpp @@ -212,7 +212,8 @@ void RifOpmRadialGridTools::lockToHostPillars( cvf::Vec3d& riNode, std::array cellRadius{}; std::array cellTheta{}; std::array cellZ{}; - opmGrid.getRadialCellCorners( ijkCell, cellRadius, cellTheta, cellZ ); + bool convertToRadialCoords = false; + opmGrid.getCellCorners( ijkCell, cellRadius, cellTheta, cellZ, convertToRadialCoords ); double maxRadius = *std::max_element( cellRadius.begin(), cellRadius.end() ); diff --git a/ApplicationLibCode/FileInterface/RifReaderEclipseWell.cpp b/ApplicationLibCode/FileInterface/RifReaderEclipseWell.cpp index 18e2850b62..6c39032823 100644 --- a/ApplicationLibCode/FileInterface/RifReaderEclipseWell.cpp +++ b/ApplicationLibCode/FileInterface/RifReaderEclipseWell.cpp @@ -204,10 +204,9 @@ RigWellResultPoint RifReaderEclipseWell::createWellResultPoint( const RigEclipse resultPoint.setConnectionFactor( connectionFactor ); - auto ijkOneBased = grid->ijkFromCellIndexOneBased( gridCellIndex ); - if ( ijkOneBased ) + if ( auto ijk = grid->ijkFromCellIndex( gridCellIndex ) ) { - resultPoint.setIjk( *ijkOneBased ); + resultPoint.setIjk( ijk->toOneBased() ); } } diff --git a/ApplicationLibCode/FileInterface/RifReaderObservedData.cpp b/ApplicationLibCode/FileInterface/RifReaderObservedData.cpp index 1c87784566..ddaae74af2 100644 --- a/ApplicationLibCode/FileInterface/RifReaderObservedData.cpp +++ b/ApplicationLibCode/FileInterface/RifReaderObservedData.cpp @@ -171,6 +171,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString& int cellJ( -1 ); int cellK( -1 ); int aquiferNumber( -1 ); + int wellCompletionNumber( -1 ); bool isErrorResult( false ); int id( -1 ); @@ -202,6 +203,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString& cellJ, cellK, aquiferNumber, + wellCompletionNumber, isErrorResult, id ); } diff --git a/ApplicationLibCode/FileInterface/RifReaderOpmCommon.cpp b/ApplicationLibCode/FileInterface/RifReaderOpmCommon.cpp index fe9a91387a..d5f13c46cd 100644 --- a/ApplicationLibCode/FileInterface/RifReaderOpmCommon.cpp +++ b/ApplicationLibCode/FileInterface/RifReaderOpmCommon.cpp @@ -20,7 +20,9 @@ #include "RiaEclipseFileNameTools.h" #include "RiaLogging.h" +#include "RiaPreferencesSystem.h" #include "RiaQDateTimeTools.h" +#include "RiaResultNames.h" #include "RiaStdStringTools.h" #include "RifEclipseOutputFileTools.h" @@ -48,6 +50,8 @@ #include +#include + using namespace Opm; //-------------------------------------------------------------------------------------------------- @@ -741,9 +745,14 @@ void RifReaderOpmCommon::setupInitAndRestartAccess() { try { - RiaLogging::resetTimer( "Starting import of meta data from " + QString::fromStdString( m_restartFileName ) ); + const bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RifReaderOpmCommon" ); + + if ( isLoggingEnabled ) + RiaLogging::resetTimer( "Starting import of meta data from " + QString::fromStdString( m_restartFileName ) ); + m_restartFile = std::make_unique( m_restartFileName ); - RiaLogging::logTimeElapsed( "Completed import of meta data" ); + + if ( isLoggingEnabled ) RiaLogging::logTimeElapsed( "Completed import of meta data" ); } catch ( ... ) { @@ -1065,7 +1074,7 @@ std::vector> RifReaderOpmCommon::readActiveCellInfoFromPorv( Ri for ( int gridIdx = 0; gridIdx < nGrids; gridIdx++ ) { - auto porvValues = m_initFile->getInitData( "PORV", m_gridNames[gridIdx] ); + auto porvValues = m_initFile->getInitData( RiaResultNames::porv().toStdString(), m_gridNames[gridIdx] ); int activeCellCount = (int)porvValues.size(); if ( divideCellCountByTwo ) diff --git a/ApplicationLibCode/FileInterface/RifReaderOpmCommonActive.cpp b/ApplicationLibCode/FileInterface/RifReaderOpmCommonActive.cpp index 6ee54d0227..bfce5ede20 100644 --- a/ApplicationLibCode/FileInterface/RifReaderOpmCommonActive.cpp +++ b/ApplicationLibCode/FileInterface/RifReaderOpmCommonActive.cpp @@ -19,6 +19,7 @@ #include "RifReaderOpmCommonActive.h" #include "RiaLogging.h" +#include "RiaPreferencesSystem.h" #include "RiaStdStringTools.h" #include "RifOpmRadialGridTools.h" @@ -58,7 +59,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips RigActiveCellGrid* activeGrid = new RigActiveCellGrid(); eclipseCaseData->setMainGrid( activeGrid ); - caf::ProgressInfo progInfo( 5, "Importing Eclipse Grid" ); + caf::ProgressInfo progInfo( 4, "Importing Eclipse Grid" ); Opm::EclIO::EGrid opmGrid( m_gridFileName ); @@ -119,7 +120,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips activeCellInfo->setGridCount( 1 + numLGRs ); fractureActiveCellInfo->setGridCount( 1 + numLGRs ); - auto task = progInfo.task( "Getting Active Cell Information", 1 ); + auto task = progInfo.task( "Getting Active Cell Information" ); for ( int lgrIdx = 0; lgrIdx < numLGRs; lgrIdx++ ) { @@ -159,24 +160,32 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips // grid geometry { - RiaLogging::info( QString( "Loading %0 active of %1 total cells in main grid." ) - .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( opmGrid.totalActiveCells() ) ) ) - .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( opmGrid.totalNumberOfCells() ) ) ) ); + const bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RifReaderOpmCommonActive" ); - auto task = progInfo.task( "Loading Active Cell Main Grid Geometry", 1 ); + if ( isLoggingEnabled ) + { + RiaLogging::info( QString( "Loading %0 active of %1 total cells in main grid." ) + .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( opmGrid.totalActiveCells() ) ) ) + .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( opmGrid.totalNumberOfCells() ) ) ) ); + } + + auto task = progInfo.task( "Loading Active Cell Main Grid Geometry" ); transferActiveGeometry( opmGrid, opmGrid, activeGrid, activeGrid, eclipseCaseData ); bool hasParentInfo = ( lgr_parent_names.size() >= (size_t)numLGRs ); - auto task2 = progInfo.task( "Loading Active Cell LGR Grid Geometry ", 1 ); + auto task2 = progInfo.task( "Loading Active Cell LGR Grid Geometry" ); for ( int lgrIdx = 0; lgrIdx < numLGRs; lgrIdx++ ) { - RiaLogging::info( - QString( "Loading %0 active of %1 total cells in LGR grid %2." ) - .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( lgrGrids[lgrIdx].totalActiveCells() ) ) ) - .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( lgrGrids[lgrIdx].totalNumberOfCells() ) ) ) - .arg( lgrIdx + 1 ) ); + if ( isLoggingEnabled ) + { + RiaLogging::info( + QString( "Loading %0 active of %1 total cells in LGR grid %2." ) + .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( lgrGrids[lgrIdx].totalActiveCells() ) ) ) + .arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( lgrGrids[lgrIdx].totalNumberOfCells() ) ) ) + .arg( lgrIdx + 1 ) ); + } RigGridBase* parentGrid = hasParentInfo ? activeGrid->gridByName( lgr_parent_names[lgrIdx] ) : activeGrid; @@ -193,7 +202,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips if ( isNNCsEnabled() ) { - auto task = progInfo.task( "Loading NNC data", 1 ); + auto task = progInfo.task( "Loading NNC data" ); transferStaticNNCData( opmGrid, lgrGrids, activeGrid ); } diff --git a/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.cpp b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.cpp new file mode 100644 index 0000000000..97f6c67859 --- /dev/null +++ b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.cpp @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RifReaderRegularGridModel.h" + +#include "RiaDefines.h" +#include "RiaLogging.h" + +#include "RifEclipseInputFileTools.h" +#include "RifEclipseInputPropertyLoader.h" +#include "RifEclipseKeywordContent.h" +#include "RifEclipseTextFileReader.h" + +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigEclipseResultAddress.h" + +#include "RimEclipseCase.h" + +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RifReaderRegularGridModel::writeCache( const QString& fileName, RimEclipseCase* eclipseCase ) +{ + if ( !eclipseCase ) return; + + QFileInfo storageFileInfo( fileName ); + if ( storageFileInfo.exists() ) + { + QDir storageDir = storageFileInfo.dir(); + storageDir.remove( storageFileInfo.fileName() ); + } + + QDir::root().mkpath( storageFileInfo.absolutePath() ); + + QFile cacheFile( fileName ); + if ( !cacheFile.open( QIODevice::WriteOnly ) ) + { + RiaLogging::error( "Saving project: Can't open the cache file : " + fileName ); + return; + } + + auto rigCellResults = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !rigCellResults ) return; + + auto resultNames = rigCellResults->resultNames( RiaDefines::ResultCatType::GENERATED ); + + std::vector keywords; + for ( const auto& resultName : resultNames ) + { + keywords.push_back( resultName ); + } + + const bool writeEchoKeywords = false; + if ( !RifEclipseInputFileTools::exportKeywords( fileName, eclipseCase->eclipseCaseData(), keywords, writeEchoKeywords ) ) + { + RiaLogging::error( "Error detected when writing the cache file : " + fileName ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RifReaderRegularGridModel::ensureDataIsReadFromCache( const QString& fileName, RimEclipseCase* eclipseCase ) +{ + if ( !eclipseCase ) return; + + auto rigCellResults = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !rigCellResults ) return; + + // Early return if we have already read the data from the cache + auto existingResultNames = rigCellResults->resultNames( RiaDefines::ResultCatType::GENERATED ); + if ( !existingResultNames.empty() ) return; + + auto keywordsAndData = RifEclipseTextFileReader::readKeywordAndValues( fileName.toStdString() ); + for ( const auto& content : keywordsAndData ) + { + const auto resultName = QString::fromStdString( content.keyword ); + + RigEclipseResultAddress resAddr( RiaDefines::ResultCatType::GENERATED, RiaDefines::ResultDataType::FLOAT, resultName ); + rigCellResults->createResultEntry( resAddr, false ); + + auto newPropertyData = rigCellResults->modifiableCellScalarResultTimesteps( resAddr ); + + std::vector doubleVals; + doubleVals.insert( doubleVals.begin(), content.values.begin(), content.values.end() ); + + newPropertyData->push_back( doubleVals ); + } +} diff --git a/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.h b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.h new file mode 100644 index 0000000000..08b5067afd --- /dev/null +++ b/ApplicationLibCode/FileInterface/RifReaderRegularGridModel.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include + +class RimEclipseCase; + +namespace RifReaderRegularGridModel +{ +void writeCache( const QString& fileName, RimEclipseCase* eclipseCase ); +void ensureDataIsReadFromCache( const QString& fileName, RimEclipseCase* eclipseCase ); + +}; // namespace RifReaderRegularGridModel diff --git a/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp b/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp index 6e107645e8..5d850f2064 100644 --- a/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp +++ b/ApplicationLibCode/FileInterface/RifSurfaceImporter.cpp @@ -18,7 +18,7 @@ #include "RifSurfaceImporter.h" #include "RiaStdStringTools.h" -#include "RigGocadData.h" +#include "RigTriangleMeshData.h" #include "cafProgressInfo.h" @@ -43,9 +43,9 @@ /// Returns vertices with z-value as depth, z is increasing downwards /// //-------------------------------------------------------------------------------------------------- -void RifSurfaceImporter::readGocadFile( const QString& filename, RigGocadData* gocadData ) +void RifSurfaceImporter::readGocadFile( const QString& filename, RigTriangleMeshData* triangleMeshData ) { - CVF_ASSERT( gocadData ); + CVF_ASSERT( triangleMeshData ); enum class GocadZPositive { @@ -204,10 +204,10 @@ void RifSurfaceImporter::readGocadFile( const QString& filename, RigGocadData* g } } - if ( gocadData ) + if ( triangleMeshData ) { - gocadData->setGeometryData( vertices, triangleIndices ); - gocadData->addPropertyData( propertyNames, propertyValues ); + triangleMeshData->setGeometryData( vertices, triangleIndices ); + triangleMeshData->setPropertyData( propertyNames, propertyValues ); } } @@ -279,16 +279,11 @@ std::pair, std::vector> RifSurfaceImporter::re } } - // clang-format off - if ( surfaceDataPoints.empty() - || minI == std::numeric_limits::max() - || minJ == std::numeric_limits::max() - || maxI == std::numeric_limits::min() - || maxJ == std::numeric_limits::min() ) + if ( surfaceDataPoints.empty() || minI == std::numeric_limits::max() || minJ == std::numeric_limits::max() || + maxI == std::numeric_limits::min() || maxJ == std::numeric_limits::min() ) { return {}; } - // clang-format on // Create full size grid matrix @@ -492,9 +487,7 @@ std::pair, std::vector> RifSurfaceImporter::re const cvf::Vec2d linePoint2, const cvf::Vec2d point ) -> int { - double normalizedIntersection = 0.0; - cvf::Vec2d projectedPoint = - to2d( cvf::GeometryTools::projectPointOnLine( to3d( linePoint1 ), to3d( linePoint2 ), to3d( point ), &normalizedIntersection ) ); + cvf::Vec2d projectedPoint = to2d( cvf::GeometryTools::projectPointOnLine( to3d( linePoint1 ), to3d( linePoint2 ), to3d( point ) ) ); if ( vectorFuzzyCompare( ( projectedPoint - to2d( surfacePoints[0] ) ).getNormalized(), primaryAxisVector.getNormalized(), epsilon ) ) return static_cast( ( projectedPoint - to2d( surfacePoints[0] ) ).length() / primaryAxisVector.length() ); else diff --git a/ApplicationLibCode/FileInterface/RifSurfaceImporter.h b/ApplicationLibCode/FileInterface/RifSurfaceImporter.h index cbfe26fcd4..3e85ae3846 100644 --- a/ApplicationLibCode/FileInterface/RifSurfaceImporter.h +++ b/ApplicationLibCode/FileInterface/RifSurfaceImporter.h @@ -26,12 +26,12 @@ #include -class RigGocadData; +class RigTriangleMeshData; class RifSurfaceImporter { public: - static void readGocadFile( const QString& filename, RigGocadData* gocadData ); + static void readGocadFile( const QString& filename, RigTriangleMeshData* triangleMeshData ); static std::pair, std::vector> readPetrelFile( const QString& filename ); static std::pair, std::vector> readOpenWorksXyzFile( const QString& filename, double preferredPointDistance ); diff --git a/ApplicationLibCode/FileInterface/RifVtkSurfaceImporter.cpp b/ApplicationLibCode/FileInterface/RifVtkSurfaceImporter.cpp new file mode 100644 index 0000000000..3364a3ce1a --- /dev/null +++ b/ApplicationLibCode/FileInterface/RifVtkSurfaceImporter.cpp @@ -0,0 +1,227 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RifVtkSurfaceImporter.h" + +#include "RigTriangleMeshData.h" + +#include +#include +#include +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RifVtkSurfaceImporter::importFromFile( const std::filesystem::path& filepath ) +{ + pugi::xml_document doc; + pugi::xml_parse_result result = doc.load_file( filepath.string().c_str() ); + if ( !result ) return nullptr; + + return importFromXmlDoc( doc ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RifVtkSurfaceImporter::importFromXmlDoc( const pugi::xml_document& doc ) +{ + auto root = doc.child( "VTKFile" ); + if ( !root ) return nullptr; + + auto grid = root.child( "UnstructuredGrid" ); + if ( !grid ) return nullptr; + + auto piece = grid.child( "Piece" ); + if ( !piece ) return nullptr; + + // Read points + std::vector vertices = readPoints( piece ); + if ( vertices.empty() ) return nullptr; + + // Read connectivity + std::vector connectivity = readConnectivity( piece ); + if ( connectivity.empty() ) return nullptr; + + // Avoid shared nodes + std::vector nonSharedVertices; + std::vector nonSharedConnectivity; + + const auto numTriangles = connectivity.size() / 3; + for ( size_t triangleIdx = 0; triangleIdx < numTriangles; triangleIdx++ ) + { + nonSharedVertices.push_back( vertices[connectivity[3 * triangleIdx + 0]] ); + nonSharedVertices.push_back( vertices[connectivity[3 * triangleIdx + 1]] ); + nonSharedVertices.push_back( vertices[connectivity[3 * triangleIdx + 2]] ); + + nonSharedConnectivity.push_back( static_cast( 3 * triangleIdx + 0 ) ); + nonSharedConnectivity.push_back( static_cast( 3 * triangleIdx + 1 ) ); + nonSharedConnectivity.push_back( static_cast( 3 * triangleIdx + 2 ) ); + } + + // Set geometry data + auto triangleMeshData = std::make_unique(); + triangleMeshData->setGeometryData( nonSharedVertices, nonSharedConnectivity ); + + // Read properties + const std::map> properties = readProperties( piece ); + for ( const auto& [name, values] : properties ) + { + // These values are per element, so we need to duplicate them for each node + if ( values.size() * 3 == nonSharedVertices.size() ) + { + std::vector valuesForEachNode; + for ( auto value : values ) + { + valuesForEachNode.push_back( value ); + valuesForEachNode.push_back( value ); + valuesForEachNode.push_back( value ); + } + + triangleMeshData->addPropertyData( QString::fromStdString( name ), valuesForEachNode ); + } + } + + return triangleMeshData; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RifVtkSurfaceImporter::readPoints( const pugi::xml_node& piece ) +{ + auto points = piece.child( "Points" ); + if ( !points ) return {}; + + auto coords = points.child( "DataArray" ); + if ( !coords || std::string( coords.attribute( "Name" ).value() ) != "Coordinates" ) return {}; + + std::vector vertices; + std::istringstream iss( coords.text().get() ); + + double x, y, z; + while ( iss >> x >> y >> z ) + { + vertices.emplace_back( x, y, -z ); + } + + return vertices; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RifVtkSurfaceImporter::readConnectivity( const pugi::xml_node& piece ) +{ + auto cells = piece.child( "Cells" ); + if ( !cells ) return {}; + + std::vector connectivity; + auto connectivityArray = cells.child( "DataArray" ); + + while ( connectivityArray ) + { + if ( std::string( connectivityArray.attribute( "Name" ).value() ) == "connectivity" ) + { + std::string connectivityText = connectivityArray.text().get(); + std::istringstream iss( connectivityText ); + + unsigned index; + while ( iss >> index ) + { + connectivity.push_back( index ); + } + break; + } + connectivityArray = connectivityArray.next_sibling( "DataArray" ); + } + + return connectivity; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::map> RifVtkSurfaceImporter::readProperties( const pugi::xml_node& piece ) +{ + auto cellData = piece.child( "CellData" ); + if ( !cellData ) return {}; + + std::map> properties; + + for ( const auto& dataArray : cellData.children( "DataArray" ) ) + { + const char* name = dataArray.attribute( "Name" ).value(); + if ( name && *name ) + { + std::vector values; + std::istringstream iss( dataArray.text().get() ); + + float value; + while ( iss >> value ) + { + values.push_back( value ); + } + + if ( !values.empty() ) + { + properties[name] = std::move( values ); + } + } + } + + return properties; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RifVtkSurfaceImporter::parsePvdDatasets( const std::filesystem::path& filepath ) +{ + pugi::xml_document doc; + pugi::xml_parse_result result = doc.load_file( filepath.string().c_str() ); + if ( !result ) return {}; + + auto root = doc.child( "VTKFile" ); + if ( !root ) return {}; + + auto collection = root.child( "Collection" ); + if ( !collection ) return {}; + + std::filesystem::path baseDir = filepath.parent_path(); + + std::vector datasets; + + for ( const auto& datasetElem : collection.children( "DataSet" ) ) + { + const char* file = datasetElem.attribute( "file" ).value(); + const char* timestepStr = datasetElem.attribute( "timestep" ).value(); + + if ( file && timestepStr ) + { + double timestep = std::stod( timestepStr ); + std::filesystem::path fullPath = std::filesystem::absolute( baseDir / file ); + + datasets.push_back( { timestep, fullPath } ); + } + } + + return datasets; +} diff --git a/ApplicationLibCode/FileInterface/RifVtkSurfaceImporter.h b/ApplicationLibCode/FileInterface/RifVtkSurfaceImporter.h new file mode 100644 index 0000000000..3e93e2ad88 --- /dev/null +++ b/ApplicationLibCode/FileInterface/RifVtkSurfaceImporter.h @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include +#include +#include + +#include "cvfVector3.h" + +#include "pugixml.hpp" + +class RigTriangleMeshData; + +//================================================================================================== +/// +//================================================================================================== +class RifVtkSurfaceImporter +{ +public: + struct PvdDataset + { + double timestep; + std::filesystem::path filepath; + }; + + static std::unique_ptr importFromFile( const std::filesystem::path& filepath ); + + static std::vector parsePvdDatasets( const std::filesystem::path& filepath ); + +private: + static std::unique_ptr importFromXmlDoc( const pugi::xml_document& doc ); + static std::vector readPoints( const pugi::xml_node& piece ); + static std::vector readConnectivity( const pugi::xml_node& piece ); + static std::map> readProperties( const pugi::xml_node& piece ); +}; diff --git a/ApplicationLibCode/FileInterface/RifWellPathImporter.cpp b/ApplicationLibCode/FileInterface/RifWellPathImporter.cpp index c18ccf9fef..acbe27e032 100644 --- a/ApplicationLibCode/FileInterface/RifWellPathImporter.cpp +++ b/ApplicationLibCode/FileInterface/RifWellPathImporter.cpp @@ -169,9 +169,7 @@ RifWellPathImporter::WellData RifWellPathImporter::readJsonWellData( const QStri -( coordinateMap["tvd"].toDouble() - datumElevation ) ); double measuredDepth = coordinateMap["md"].toDouble(); - - wellData.m_wellPathGeometry->addWellPathPoint( vec3d ); - wellData.m_wellPathGeometry->addMeasuredDepth( measuredDepth ); + wellData.m_wellPathGeometry->addWellPathPoint( vec3d, measuredDepth ); } return wellData; } @@ -215,8 +213,7 @@ void RifWellPathImporter::readAllAsciiWellData( const QString& filePath ) } cvf::Vec3d wellPoint( x, y, -tvd ); - fileWellDataArray.back().m_wellPathGeometry->addWellPathPoint( wellPoint ); - fileWellDataArray.back().m_wellPathGeometry->addMeasuredDepth( md ); + fileWellDataArray.back().m_wellPathGeometry->addWellPathPoint( wellPoint, md ); hasReadWellPointInCurrentWell = true; } diff --git a/ApplicationLibCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationLibCode/GeoMech/GeoMechDataModel/CMakeLists.txt index c2a1ea3b2e..ca4771955e 100644 --- a/ApplicationLibCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationLibCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -117,5 +117,3 @@ set(LINK_LIBRARIES LibCore cafPdmCvf cafTensor cafUserInterface CommonCode ) target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARIES}) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp b/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp index e51c9d9a32..838295bf64 100644 --- a/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp +++ b/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp @@ -70,32 +70,28 @@ void RimGeoMechGeometrySelectionItem::setFromSelectionItem( const RiuGeoMechSele m_localIntersectionPoint = selectionItem->m_localIntersectionPointInDisplay; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGeoMechGeometrySelectionItem::setFromSelectionItem( const RimGeoMechGeometrySelectionItem* selectionItem ) +{ + m_geoMechCase = selectionItem->geoMechCase(); + m_gridIndex = selectionItem->m_gridIndex(); + m_cellIndex = selectionItem->m_cellIndex(); + m_elementFace = selectionItem->m_elementFace(); + m_hasIntersectionTriangle = selectionItem->m_hasIntersectionTriangle(); + m_intersectionTriangle_0 = selectionItem->m_intersectionTriangle_0(); + m_intersectionTriangle_1 = selectionItem->m_intersectionTriangle_1(); + m_intersectionTriangle_2 = selectionItem->m_intersectionTriangle_2(); + m_localIntersectionPoint = selectionItem->m_localIntersectionPoint(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QString RimGeoMechGeometrySelectionItem::geometrySelectionText() const { - QString text; - - /* - if (m_geoMechCase) - { - text += m_geoMechCase->caseUserDescription(); - } - else - { - text = "No case"; - } - - - text += ", "; - text += QString("Grid index %1").arg(m_gridIndex); - text += ", "; - text += RigTimeHistoryResultAccessor::geometrySelectionText(m_geoMechCase->eclipseCaseData(), m_gridIndex, - m_cellIndex); - */ - - return text; + return {}; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h b/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h index 979ab10306..33f46ed5c7 100644 --- a/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h +++ b/ApplicationLibCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.h @@ -22,16 +22,17 @@ #include "cafPdmField.h" #include "cafPdmFieldCvfVec3d.h" +#include "cafPdmObject.h" #include "cafPdmPtrField.h" -class RiuGeoMechSelectionItem; class RimGeoMechCase; +class RiuGeoMechSelectionItem; //================================================================================================== /// /// //================================================================================================== -class RimGeoMechGeometrySelectionItem : public RimGeometrySelectionItem +class RimGeoMechGeometrySelectionItem : public RimGeometrySelectionItem_OBSOLETE { CAF_PDM_HEADER_INIT; @@ -40,8 +41,9 @@ public: ~RimGeoMechGeometrySelectionItem() override; void setFromSelectionItem( const RiuGeoMechSelectionItem* selectionItem ); + void setFromSelectionItem( const RimGeoMechGeometrySelectionItem* selectionItem ); - QString geometrySelectionText() const override; + QString geometrySelectionText() const; RimGeoMechCase* geoMechCase() const; public: diff --git a/ApplicationLibCode/GeoMech/GeoMechFileInterface/CMakeLists.txt b/ApplicationLibCode/GeoMech/GeoMechFileInterface/CMakeLists.txt index 2832dab452..32ebb11740 100644 --- a/ApplicationLibCode/GeoMech/GeoMechFileInterface/CMakeLists.txt +++ b/ApplicationLibCode/GeoMech/GeoMechFileInterface/CMakeLists.txt @@ -17,5 +17,3 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) set(LINK_LIBRARIES RigGeoMechDataModel LibCore) target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARIES}) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/ApplicationLibCode/GeoMech/GeoMechVisualization/CMakeLists_files.cmake b/ApplicationLibCode/GeoMech/GeoMechVisualization/CMakeLists_files.cmake index 7f765b58ef..efba6104d6 100644 --- a/ApplicationLibCode/GeoMech/GeoMechVisualization/CMakeLists_files.cmake +++ b/ApplicationLibCode/GeoMech/GeoMechVisualization/CMakeLists_files.cmake @@ -19,10 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "GeoMechViz" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp b/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp index 02791790cc..2271e733b6 100644 --- a/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp +++ b/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemElmVisibilityCalculator.cpp @@ -157,19 +157,19 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility( cvf::UByteArray* RigGeoMechCaseData* caseData = propFilterColl->reservoirView()->geoMechCase()->geoMechData(); - RigFemResultAddress resVarAddress = RigFemAddressDefines::getResultLookupAddress( propertyFilter->resultDefinition->resultAddress() ); + RigFemResultAddress resVarAddress = RigFemAddressDefines::getResultLookupAddress( propertyFilter->resultDefinition()->resultAddress() ); const std::vector& resVals = caseData->femPartResults()->resultValues( resVarAddress, part->elementPartId(), timeStepIndex, frameIndex ); if ( !propertyFilter->isActive() ) continue; - if ( !propertyFilter->resultDefinition->hasResult() ) continue; + if ( !propertyFilter->resultDefinition()->hasResult() ) continue; if ( resVals.empty() ) continue; const double lowerBound = propertyFilter->lowerBound(); const double upperBound = propertyFilter->upperBound(); - if ( propertyFilter->resultDefinition->resultAddress().resultPosType == RIG_FORMATION_NAMES ) + if ( propertyFilter->resultDefinition()->resultAddress().resultPosType == RIG_FORMATION_NAMES ) { std::vector integerVector = propertyFilter->selectedCategoryValues(); std::set integerSet; diff --git a/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp b/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp index 45053a4c3c..4e9e40fbfb 100644 --- a/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp +++ b/ApplicationLibCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp @@ -115,6 +115,8 @@ void RivFemPartPartMgr::setDisplacements( bool useDisplacements, double scalingF m_displacedNodeCoordinates.resize( nodeCount ); const auto coords = m_part->nodes().coordinates; + useDisplacements = useDisplacements && ( displacements.size() == coords.size() ); + if ( useDisplacements ) { for ( size_t i = 0; i < nodeCount; i++ ) diff --git a/ApplicationLibCode/GeoMech/OdbReader/CMakeLists.txt b/ApplicationLibCode/GeoMech/OdbReader/CMakeLists.txt index 80568a52ad..8eda4b2bdb 100644 --- a/ApplicationLibCode/GeoMech/OdbReader/CMakeLists.txt +++ b/ApplicationLibCode/GeoMech/OdbReader/CMakeLists.txt @@ -80,5 +80,3 @@ target_link_libraries( ${PROJECT_NAME} ${RI_ODB_LIBS} RigGeoMechDataModel RifGeoMechFileInterface LibCore ) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/ApplicationLibCode/ModelVisualization/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/CMakeLists_files.cmake index 83fa8fa67f..75fd7514b2 100644 --- a/ApplicationLibCode/ModelVisualization/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/CMakeLists_files.cmake @@ -118,11 +118,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/Faults/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/Faults/CMakeLists_files.cmake index 64541ad6fb..a7714d0025 100644 --- a/ApplicationLibCode/ModelVisualization/Faults/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/Faults/CMakeLists_files.cmake @@ -13,11 +13,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\Faults" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/GridBox/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/GridBox/CMakeLists_files.cmake index 2dc3aa8249..5161799293 100644 --- a/ApplicationLibCode/ModelVisualization/GridBox/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/GridBox/CMakeLists_files.cmake @@ -7,11 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RivPatchGenerator.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\GridBox" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/Intersections/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/Intersections/CMakeLists_files.cmake index b5c295808d..ca269dd5da 100644 --- a/ApplicationLibCode/ModelVisualization/Intersections/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/Intersections/CMakeLists_files.cmake @@ -27,11 +27,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\Intersections" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp b/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp index 9a3558ea1b..77ceca1018 100644 --- a/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp @@ -21,8 +21,8 @@ #include "RiaColorTools.h" #include "RiaFontCache.h" -#include "RigContourMapGrid.h" -#include "RigContourPolygonsTools.h" +#include "ContourMap/RigContourMapGrid.h" +#include "ContourMap/RigContourPolygonsTools.h" #include "RivMeshLinesSourceInfo.h" #include "RivPartPriority.h" diff --git a/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.h b/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.h index 237bd3d410..8812cbf6b1 100644 --- a/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.h +++ b/ApplicationLibCode/ModelVisualization/RivContourMapProjectionPartMgr.h @@ -18,7 +18,7 @@ #pragma once -#include "RigContourPolygonsTools.h" +#include "ContourMap/RigContourPolygonsTools.h" #include "RiaNumberFormat.h" diff --git a/ApplicationLibCode/ModelVisualization/RivPipeGeometryGenerator.cpp b/ApplicationLibCode/ModelVisualization/RivPipeGeometryGenerator.cpp index 46c8f33a4a..aa729e9a0e 100644 --- a/ApplicationLibCode/ModelVisualization/RivPipeGeometryGenerator.cpp +++ b/ApplicationLibCode/ModelVisualization/RivPipeGeometryGenerator.cpp @@ -334,8 +334,6 @@ cvf::ref RivPipeGeometryGenerator::generateExtrudedCylinder( d if ( intersectionPlaneNormal.lengthSquared() < 1e-10 ) // candidateDir == -nextDir => 180 deg turn { - CVF_ASSERT( false ); // This is never supposed to happen due to what's done in - // updateFilteredPipeCenterCoords(). So look there for the bug... intersectionPlaneNormal = nextDir; } diff --git a/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp b/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp index 1a96249ca6..cb9b65e766 100644 --- a/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/RivReservoirViewPartMgr.cpp @@ -601,6 +601,7 @@ void RivReservoirViewPartMgr::computeNativeVisibility( cvf::UByteArray* CVF_ASSERT( cellIsInWellStatuses->size() >= grid->cellCount() ); cellVisibility->resize( grid->cellCount() ); + cellVisibility->setAll( 0 ); if ( auto activeGrid = dynamic_cast( grid ) ) { diff --git a/ApplicationLibCode/ModelVisualization/Seismic/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/Seismic/CMakeLists_files.cmake index b72ed9d24f..bcd8b1c668 100644 --- a/ApplicationLibCode/ModelVisualization/Seismic/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/Seismic/CMakeLists_files.cmake @@ -11,11 +11,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\Seismic" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/Streamlines/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/Streamlines/CMakeLists_files.cmake index 1d2ba62e08..76a1bf6a22 100644 --- a/ApplicationLibCode/ModelVisualization/Streamlines/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/Streamlines/CMakeLists_files.cmake @@ -5,11 +5,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\Streamlines" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/Surfaces/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/Surfaces/CMakeLists_files.cmake index 398c6d58a3..00a1d70a61 100644 --- a/ApplicationLibCode/ModelVisualization/Surfaces/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/Surfaces/CMakeLists_files.cmake @@ -11,11 +11,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\Surfaces" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.cpp b/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.cpp index c614c7ef90..0faa6f5081 100644 --- a/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.cpp @@ -44,6 +44,7 @@ #include "cvfPart.h" #include "cvfPrimitiveSetIndexedUInt.h" #include "cvfRenderStateBlending.h" +#include "cvfVector3.h" #include @@ -79,7 +80,8 @@ bool RivSurfacePartMgr::isNativePartMgr() const //-------------------------------------------------------------------------------------------------- void RivSurfacePartMgr::appendNativeGeometryPartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform ) { - if ( m_nativeTrianglesPart.isNull() || m_surfaceInView->surface()->surfaceData() != m_usedSurfaceData.p() ) + bool surfaceDataChanged = m_surfaceInView->surface()->surfaceData() != m_usedSurfaceData.p(); + if ( m_nativeTrianglesPart.isNull() || surfaceDataChanged ) { generateNativePartGeometry(); } @@ -91,6 +93,11 @@ void RivSurfacePartMgr::appendNativeGeometryPartsToModel( cvf::ModelBasicList* m model->addPart( m_nativeTrianglesPart.p() ); + if ( ( m_nativeMeshLinesPart.isNull() || surfaceDataChanged ) && m_surfaceInView->isMeshLinesEnabled() ) + { + generateNativeLinesPartGeometry(); + } + if ( m_nativeMeshLinesPart.notNull() ) { m_nativeMeshLinesPart->setTransform( scaleTransform ); @@ -400,7 +407,7 @@ void RivSurfacePartMgr::generatePartGeometry() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivSurfacePartMgr::generateNativePartGeometry() +cvf::ref RivSurfacePartMgr::convertToDisplayOffsetVertices( const std::vector& vertices ) const { cvf::Vec3d displayModOffset( 0, 0, 0 ); @@ -411,18 +418,32 @@ void RivSurfacePartMgr::generateNativePartGeometry() if ( ownerCase ) displayModOffset = ownerCase->displayModelOffset(); } - m_usedSurfaceData = m_surfaceInView->surface()->surfaceData(); - if ( m_usedSurfaceData.isNull() ) return; - - const std::vector& vertices = m_usedSurfaceData->vertices(); - if ( vertices.empty() ) return; - cvf::ref cvfVertices = new cvf::Vec3fArray( vertices.size() ); for ( size_t i = 0; i < vertices.size(); ++i ) { ( *cvfVertices )[i] = cvf::Vec3f( vertices[i] - displayModOffset ); } + return cvfVertices; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivSurfacePartMgr::generateNativePartGeometry() +{ + m_usedSurfaceData = m_surfaceInView->surface()->surfaceData(); + if ( m_usedSurfaceData.isNull() ) + { + m_nativeTrianglesPart = nullptr; + return; + } + + const std::vector& vertices = m_usedSurfaceData->vertices(); + if ( vertices.empty() ) return; + + cvf::ref cvfVertices = convertToDisplayOffsetVertices( vertices ); + const std::vector& triangleIndices = m_usedSurfaceData->triangleIndices(); cvf::ref cvfIndices = new cvf::UIntArray( triangleIndices ); cvf::ref indexSet = new cvf::PrimitiveSetIndexedUInt( cvf::PT_TRIANGLES ); @@ -440,3 +461,46 @@ void RivSurfacePartMgr::generateNativePartGeometry() m_nativeTrianglesPart->setDrawable( drawGeo.p() ); m_nativeTrianglesPart->setSourceInfo( objectSourceInfo.p() ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RivSurfacePartMgr::generateNativeLinesPartGeometry() +{ + m_usedSurfaceData = m_surfaceInView->surface()->surfaceData(); + if ( m_usedSurfaceData.isNull() ) + { + m_nativeMeshLinesPart = nullptr; + return; + } + const std::vector& vertices = m_usedSurfaceData->vertices(); + if ( vertices.empty() ) return; + + cvf::ref cvfVertices = convertToDisplayOffsetVertices( vertices ); + + const std::vector& triangleIndices = m_usedSurfaceData->triangleIndices(); + cvf::ref cvfIndices = new cvf::UIntArray( triangleIndices ); + + cvf::ref indexSet = new cvf::PrimitiveSetIndexedUInt( cvf::PT_LINE_STRIP ); + indexSet->setIndices( cvfIndices.p() ); + + cvf::ref drawGeo = new cvf::DrawableGeo; + drawGeo->addPrimitiveSet( indexSet.p() ); + drawGeo->setVertexArray( cvfVertices.p() ); + drawGeo->computeNormals(); + + m_nativeMeshLinesPart = new cvf::Part; + m_nativeMeshLinesPart->setName( "Mesh" ); + m_nativeMeshLinesPart->setDrawable( drawGeo.p() ); + + m_nativeMeshLinesPart->updateBoundingBox(); + m_nativeMeshLinesPart->setEnableMask( meshFaultBit ); + m_nativeMeshLinesPart->setPriority( RivPartPriority::PartType::MeshLines ); + + m_nativeMeshLinesPart->setSourceInfo( new RivMeshLinesSourceInfo( m_surfaceInView ) ); + + caf::MeshEffectGenerator lineEffGen( cvf::Color3::BLACK ); + lineEffGen.setLineWidth( 1.0f ); + cvf::ref eff = lineEffGen.generateCachedEffect(); + m_nativeMeshLinesPart->setEffect( eff.p() ); +} diff --git a/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.h b/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.h index 34ed50d3bd..05c6d148ab 100644 --- a/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.h +++ b/ApplicationLibCode/ModelVisualization/Surfaces/RivSurfacePartMgr.h @@ -59,6 +59,9 @@ private: void generatePartGeometry(); void generateNativePartGeometry(); + void generateNativeLinesPartGeometry(); + + cvf::ref convertToDisplayOffsetVertices( const std::vector& vertices ) const; bool m_useNativePartsOnly; diff --git a/ApplicationLibCode/ModelVisualization/WindowEdgeAxesOverlayItem/CMakeLists_files.cmake b/ApplicationLibCode/ModelVisualization/WindowEdgeAxesOverlayItem/CMakeLists_files.cmake index ae8ad88b0f..ca188b7a81 100644 --- a/ApplicationLibCode/ModelVisualization/WindowEdgeAxesOverlayItem/CMakeLists_files.cmake +++ b/ApplicationLibCode/ModelVisualization/WindowEdgeAxesOverlayItem/CMakeLists_files.cmake @@ -7,11 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ModelVisualization\\WindowEdgeAxesOverlayItem" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/CMakeLists_files.cmake index 6a1a92f627..0ef0cab3a3 100644 --- a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/CMakeLists_files.cmake @@ -15,13 +15,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS) - -source_group( - "ProjectDataModel\\AnalysisPlots" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp index 2362ac131d..30d19b47c2 100644 --- a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp @@ -41,6 +41,7 @@ #include "RiuGroupedBarChartBuilder.h" #include "RiuPlotMainWindowTools.h" #include "RiuQwtPlotTools.h" +#include "RiuQwtPlotWidget.h" #include "RiuSummaryQwtPlot.h" #include "RiuSummaryVectorSelectionDialog.h" @@ -1172,9 +1173,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, RimSummaryCase* sumCaseInEvaluation = nullptr; - // clang-format off - std::function evaluateFilterForAllCases = - [&]( RifEclipseSummaryAddress addrToFilterValue ) // clang-format on + std::function evaluateFilterForAllCases = [&]( RifEclipseSummaryAddress addrToFilterValue ) { for ( auto sumCase : *filteredSumCases ) { @@ -1261,8 +1260,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, { std::pair minMax = filter->filterRangeMinMax(); - // clang-format off - storeResultCoreLambda = [&]( double value ) // clang-format on + storeResultCoreLambda = [&]( double value ) { if ( minMax.first <= value && value <= minMax.second ) { @@ -1272,8 +1270,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, } else if ( filter->filterOperation() == RimPlotDataFilterItem::TOP_N || filter->filterOperation() == RimPlotDataFilterItem::BOTTOM_N ) { - // clang-format off - storeResultCoreLambda = [&]( double value ) // clang-format on + storeResultCoreLambda = [&]( double value ) { bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N; @@ -1311,8 +1308,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, { std::pair minMax = filter->filterRangeMinMax(); - // clang-format off - storeResultCoreLambda = [&]( double value ) // clang-format on + storeResultCoreLambda = [&]( double value ) { if ( minMax.first <= value && value <= minMax.second ) { @@ -1323,8 +1319,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, else if ( filter->filterOperation() == RimPlotDataFilterItem::TOP_N || filter->filterOperation() == RimPlotDataFilterItem::BOTTOM_N ) { - // clang-format off - storeResultCoreLambda = [&]( double value ) // clang-format on + storeResultCoreLambda = [&]( double value ) { bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N; diff --git a/ApplicationLibCode/ProjectDataModel/Annotations/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Annotations/CMakeLists_files.cmake index 5e9991a981..c53dc65bb2 100644 --- a/ApplicationLibCode/ProjectDataModel/Annotations/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Annotations/CMakeLists_files.cmake @@ -13,6 +13,10 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimTextAnnotationInView.h ${CMAKE_CURRENT_LIST_DIR}/RimAnnotationGroupCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimPolylineTarget.h + ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisAnnotation.h + ${CMAKE_CURRENT_LIST_DIR}/RimTimeAxisAnnotation.h + ${CMAKE_CURRENT_LIST_DIR}/RimEquilibriumAxisAnnotation.h + ${CMAKE_CURRENT_LIST_DIR}/RimPlotRectAnnotation.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -30,16 +34,11 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimTextAnnotationInView.cpp ${CMAKE_CURRENT_LIST_DIR}/RimAnnotationGroupCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPolylineTarget.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisAnnotation.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimTimeAxisAnnotation.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimEquilibriumAxisAnnotation.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimPlotRectAnnotation.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(QT_MOC_HEADERS ${QT_MOC_HEADERS}) - -source_group( - "ProjectDataModel\\Annotations" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationCollection.cpp b/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationCollection.cpp index 008d27940a..091b81c3d2 100644 --- a/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationCollection.cpp @@ -25,12 +25,11 @@ #include "RimAnnotationInViewCollection.h" #include "RimAnnotationLineAppearance.h" #include "RimGridView.h" -#include "RimOilField.h" #include "RimPolylineTarget.h" #include "RimPolylinesFromFileAnnotation.h" -#include "RimProject.h" #include "RimReachCircleAnnotation.h" #include "RimTextAnnotation.h" +#include "RimTools.h" #include "RimUserDefinedPolylinesAnnotation.h" #include "Polygons/RimPolygon.h" @@ -79,7 +78,7 @@ RimAnnotationCollection::~RimAnnotationCollection() //-------------------------------------------------------------------------------------------------- void RimAnnotationCollection::initAfterRead() { - auto polycoll = RimProject::current()->activeOilField()->polygonCollection(); + auto polycoll = RimTools::polygonCollection(); for ( auto oldPolyObj : m_userDefinedPolylineAnnotations_OBSOLETE->annotations() ) { diff --git a/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.cpp b/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.cpp index 79379e0164..6fcadc7d41 100644 --- a/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.cpp +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.cpp @@ -66,7 +66,7 @@ RimAnnotationLineAppearance::RimAnnotationLineAppearance() CAF_PDM_InitObject( "AnnotationLineAppearance", ":/WellCollection.png" ); CAF_PDM_InitField( &m_lineFieldsHidden, "LineFieldsHidden", false, "Line Fields Hidden" ); - CAF_PDM_InitField( &m_color, "Color", cvf::Color3f( cvf::Color3f::BLACK ), "Line Color" ); + CAF_PDM_InitField( &m_color, "Color", cvf::Color3f( cvf::Color3f::DARK_GRAY ), "Line Color" ); CAF_PDM_InitField( &m_thickness, "Thickness", 2, "Line Thickness" ); // Stippling not yet supported. Needs new stuff in VizFwk @@ -85,6 +85,20 @@ void RimAnnotationLineAppearance::setLineFieldsHidden( bool hidden ) m_lineFieldsHidden = hidden; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimAnnotationLineAppearance::configureForSummaryAnnotations() +{ + m_style.uiCapability()->setUiHidden( false ); + m_style.xmlCapability()->setIOReadable( true ); + m_style.xmlCapability()->setIOWritable( true ); + + m_thickness.uiCapability()->setUiHidden( true ); + + m_style = STYLE_DASH; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.h b/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.h index 172f3d3e5a..44b297d240 100644 --- a/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.h +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimAnnotationLineAppearance.h @@ -48,6 +48,7 @@ public: RimAnnotationLineAppearance(); void setLineFieldsHidden( bool hidden ); + void configureForSummaryAnnotations(); void setColor( const cvf::Color3f& newColor ); cvf::Color3f color() const; diff --git a/ApplicationLibCode/ProjectDataModel/RimEquilibriumAxisAnnotation.cpp b/ApplicationLibCode/ProjectDataModel/Annotations/RimEquilibriumAxisAnnotation.cpp similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimEquilibriumAxisAnnotation.cpp rename to ApplicationLibCode/ProjectDataModel/Annotations/RimEquilibriumAxisAnnotation.cpp diff --git a/ApplicationLibCode/ProjectDataModel/RimEquilibriumAxisAnnotation.h b/ApplicationLibCode/ProjectDataModel/Annotations/RimEquilibriumAxisAnnotation.h similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimEquilibriumAxisAnnotation.h rename to ApplicationLibCode/ProjectDataModel/Annotations/RimEquilibriumAxisAnnotation.h diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotAxisAnnotation.cpp b/ApplicationLibCode/ProjectDataModel/Annotations/RimPlotAxisAnnotation.cpp similarity index 86% rename from ApplicationLibCode/ProjectDataModel/RimPlotAxisAnnotation.cpp rename to ApplicationLibCode/ProjectDataModel/Annotations/RimPlotAxisAnnotation.cpp index 331ffdc547..24c8982a44 100644 --- a/ApplicationLibCode/ProjectDataModel/RimPlotAxisAnnotation.cpp +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimPlotAxisAnnotation.cpp @@ -26,6 +26,10 @@ #include "RimTools.h" #include "RimViewWindow.h" +#include "RiaColorTools.h" + +#include "cafPdmFieldCvfColor.h" + #include CAF_PDM_SOURCE_INIT( RimPlotAxisAnnotation, "RimPlotAxisAnnotation" ); @@ -49,16 +53,12 @@ RimPlotAxisAnnotation::RimPlotAxisAnnotation() caf::AppEnum defaultStyle = Qt::PenStyle::SolidLine; CAF_PDM_InitField( &m_penStyle, "PenStyle", defaultStyle, "Pen Style" ); -} -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimPlotAxisAnnotation* RimPlotAxisAnnotation::createLineAnnotation() -{ - auto annotation = new RimPlotAxisAnnotation(); - annotation->setAnnotationType( RimPlotAxisAnnotation::AnnotationType::LINE ); - return annotation; + CAF_PDM_InitFieldNoDefault( &m_textAlignment, "TextAlignment", "Text Alignment" ); + m_textAlignment = RiaDefines::TextAlignment::RIGHT; + + CAF_PDM_InitFieldNoDefault( &m_color, "Color", "Color" ); + m_color = cvf::Color3f( cvf::Color3f::BLACK ); } //-------------------------------------------------------------------------------------------------- @@ -122,7 +122,15 @@ double RimPlotAxisAnnotation::rangeEnd() const //-------------------------------------------------------------------------------------------------- QColor RimPlotAxisAnnotation::color() const { - return QColor( 0, 0, 100 ); + return RiaColorTools::toQColor( m_color ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlotAxisAnnotation::setAlignment( RiaDefines::TextAlignment alignment ) +{ + m_textAlignment = alignment; } //-------------------------------------------------------------------------------------------------- @@ -141,6 +149,22 @@ Qt::PenStyle RimPlotAxisAnnotation::penStyle() const return m_penStyle(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlotAxisAnnotation::setColor( const cvf::Color3f& color ) +{ + m_color = color; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefines::TextAlignment RimPlotAxisAnnotation::textAlignment() const +{ + return m_textAlignment(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotAxisAnnotation.h b/ApplicationLibCode/ProjectDataModel/Annotations/RimPlotAxisAnnotation.h similarity index 60% rename from ApplicationLibCode/ProjectDataModel/RimPlotAxisAnnotation.h rename to ApplicationLibCode/ProjectDataModel/Annotations/RimPlotAxisAnnotation.h index 9a1613687f..51fc1163e0 100644 --- a/ApplicationLibCode/ProjectDataModel/RimPlotAxisAnnotation.h +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimPlotAxisAnnotation.h @@ -18,10 +18,14 @@ #pragma once +#include "RiaPlotDefines.h" + #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPtrField.h" +#include "cvfColor3.h" + #include //================================================================================================== @@ -40,21 +44,27 @@ public: }; RimPlotAxisAnnotation(); - static RimPlotAxisAnnotation* createLineAnnotation(); + void setName( const QString& name ); + QString name() const; - void setName( const QString& name ); - void setValue( double value ); + void setValue( double value ); + virtual double value() const; - AnnotationType annotationType() const; - virtual QString name() const; - virtual double value() const; - virtual double rangeStart() const; - virtual double rangeEnd() const; - virtual QColor color() const; + AnnotationType annotationType() const; + void setAnnotationType( AnnotationType annotationType ); void setPenStyle( Qt::PenStyle penStyle ); Qt::PenStyle penStyle() const; + void setColor( const cvf::Color3f& color ); + virtual QColor color() const; + + void setAlignment( RiaDefines::TextAlignment alignment ); + RiaDefines::TextAlignment textAlignment() const; + + double rangeStart() const; + double rangeEnd() const; + caf::PdmFieldHandle* userDescriptionField() override; caf::PdmFieldHandle* objectToggleField() override; @@ -64,16 +74,14 @@ protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; protected: - caf::PdmField m_isActive; - caf::PdmField m_name; - caf::PdmField m_value; - caf::PdmField m_rangeStart; - caf::PdmField m_rangeEnd; - caf::PdmField> m_penStyle; + caf::PdmField m_isActive; + caf::PdmField m_name; + caf::PdmField m_value; + caf::PdmField m_rangeStart; + caf::PdmField m_rangeEnd; + caf::PdmField> m_penStyle; + caf::PdmField> m_textAlignment; + caf::PdmField m_color; -protected: - void setAnnotationType( AnnotationType annotationType ); - -private: AnnotationType m_annotationType; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotRectAnnotation.cpp b/ApplicationLibCode/ProjectDataModel/Annotations/RimPlotRectAnnotation.cpp similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimPlotRectAnnotation.cpp rename to ApplicationLibCode/ProjectDataModel/Annotations/RimPlotRectAnnotation.cpp diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotRectAnnotation.h b/ApplicationLibCode/ProjectDataModel/Annotations/RimPlotRectAnnotation.h similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimPlotRectAnnotation.h rename to ApplicationLibCode/ProjectDataModel/Annotations/RimPlotRectAnnotation.h diff --git a/ApplicationLibCode/ProjectDataModel/RimTimeAxisAnnotation.cpp b/ApplicationLibCode/ProjectDataModel/Annotations/RimTimeAxisAnnotation.cpp similarity index 79% rename from ApplicationLibCode/ProjectDataModel/RimTimeAxisAnnotation.cpp rename to ApplicationLibCode/ProjectDataModel/Annotations/RimTimeAxisAnnotation.cpp index 945aa337c2..e0c4382b08 100644 --- a/ApplicationLibCode/ProjectDataModel/RimTimeAxisAnnotation.cpp +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimTimeAxisAnnotation.cpp @@ -42,26 +42,29 @@ RimTimeAxisAnnotation::RimTimeAxisAnnotation() CAF_PDM_InitObject( "Time Axis Annotation", ":/LeftAxis16x16.png" ); m_value.uiCapability()->setUiHidden( true ); - - CAF_PDM_InitField( &m_color, "Color", RiaColorTools::fromQColorTo3f( defaultColor( AnnotationType::LINE ) ), "Color" ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimTimeAxisAnnotation::setTime( time_t time ) +void RimTimeAxisAnnotation::setTime( time_t time, const QString& dateTimeFormatString ) { m_value = RiaTimeTTools::toDouble( time ); - QString dateFormatString = RiaQDateTimeTools::dateFormatString( RiaPreferences::current()->dateFormat(), - RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY ); + QString formatString = dateTimeFormatString; - QString timeFormatString = RiaQDateTimeTools::timeFormatString( RiaPreferences::current()->timeFormat(), - RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE ); + if ( formatString.isEmpty() ) + { + QString dateFormatString = RiaQDateTimeTools::dateFormatString( RiaPreferences::current()->dateFormat(), + RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY ); - QString dateTimeFormatString = QString( "%1 %2" ).arg( dateFormatString ).arg( timeFormatString ); + QString timeFormatString = RiaQDateTimeTools::timeFormatString( RiaPreferences::current()->timeFormat(), + RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE ); - m_name = RiaQDateTimeTools::toStringUsingApplicationLocale( RiaQDateTimeTools::fromTime_t( time ), dateTimeFormatString ); + QString dateTimeFormatString = QString( "%1 %2" ).arg( dateFormatString ).arg( timeFormatString ); + } + + m_name = RiaQDateTimeTools::toStringUsingApplicationLocale( RiaQDateTimeTools::fromTime_t( time ), formatString ); setAnnotationType( AnnotationType::LINE ); } @@ -110,23 +113,7 @@ QColor RimTimeAxisAnnotation::defaultColor( AnnotationType annotationType ) //-------------------------------------------------------------------------------------------------- void RimTimeAxisAnnotation::setDefaultColor() { - m_color = RiaColorTools::fromQColorTo3f( defaultColor( annotationType() ) ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimTimeAxisAnnotation::setColor( const cvf::Color3f& color ) -{ - m_color = color; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QColor RimTimeAxisAnnotation::color() const -{ - return RiaColorTools::toQColor( m_color ); + setColor( RiaColorTools::fromQColorTo3f( defaultColor( annotationType() ) ) ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimTimeAxisAnnotation.h b/ApplicationLibCode/ProjectDataModel/Annotations/RimTimeAxisAnnotation.h similarity index 87% rename from ApplicationLibCode/ProjectDataModel/RimTimeAxisAnnotation.h rename to ApplicationLibCode/ProjectDataModel/Annotations/RimTimeAxisAnnotation.h index 87d67951b4..7073dac5dc 100644 --- a/ApplicationLibCode/ProjectDataModel/RimTimeAxisAnnotation.h +++ b/ApplicationLibCode/ProjectDataModel/Annotations/RimTimeAxisAnnotation.h @@ -38,11 +38,9 @@ class RimTimeAxisAnnotation : public RimPlotAxisAnnotation public: RimTimeAxisAnnotation(); - void setTime( time_t time ); - void setTimeRange( time_t startTime, time_t endTime ); - QColor color() const override; + void setTime( time_t time, const QString& dateTimeFormatString ); + void setTimeRange( time_t startTime, time_t endTime ); - void setColor( const cvf::Color3f& color ); void setDefaultColor(); protected: @@ -50,6 +48,4 @@ protected: void initAfterRead() override; static QColor defaultColor( AnnotationType annotationType ); - - caf::PdmField m_color; }; diff --git a/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake index 11f9257dc5..69f5c0b9d4 100644 --- a/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake @@ -31,8 +31,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimEclipseStatisticsCaseEvaluator.h ${CMAKE_CURRENT_LIST_DIR}/RimMimeData.h ${CMAKE_CURRENT_LIST_DIR}/RimTools.h - ${CMAKE_CURRENT_LIST_DIR}/RimFormationNames.h - ${CMAKE_CURRENT_LIST_DIR}/RimFormationNamesCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimMockModelSettings.h ${CMAKE_CURRENT_LIST_DIR}/RimTernaryLegendConfig.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipseFaultColors.h @@ -66,7 +64,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimCheckableNamedObject.h ${CMAKE_CURRENT_LIST_DIR}/RimCheckableObject.h ${CMAKE_CURRENT_LIST_DIR}/RimGridTimeHistoryCurve.h - ${CMAKE_CURRENT_LIST_DIR}/RimGeometrySelectionItem.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipseGeometrySelectionItem.h ${CMAKE_CURRENT_LIST_DIR}/RimDialogData.h ${CMAKE_CURRENT_LIST_DIR}/RimTimeStepFilter.h @@ -85,16 +82,11 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimLegendConfig.h ${CMAKE_CURRENT_LIST_DIR}/RimNameConfig.h ${CMAKE_CURRENT_LIST_DIR}/RimDataSourceSteppingTools.h - ${CMAKE_CURRENT_LIST_DIR}/RimContourMapProjection.h - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapProjection.h - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapView.h - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapViewCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimMudWeightWindowParameters.h ${CMAKE_CURRENT_LIST_DIR}/RimViewNameConfig.h ${CMAKE_CURRENT_LIST_DIR}/RimReloadCaseTools.h ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisPropertiesInterface.h ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisProperties.h - ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisAnnotation.h ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisLogRangeCalculator.h ${CMAKE_CURRENT_LIST_DIR}/RimObservedDataCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimObservedFmuRftData.h @@ -111,8 +103,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimCustomObjectiveFunctionCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimCustomObjectiveFunction.h ${CMAKE_CURRENT_LIST_DIR}/RimCustomObjectiveFunctionWeight.h - ${CMAKE_CURRENT_LIST_DIR}/RimEquilibriumAxisAnnotation.h - ${CMAKE_CURRENT_LIST_DIR}/RimTimeAxisAnnotation.h ${CMAKE_CURRENT_LIST_DIR}/RimPolylinesDataInterface.h ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleCurveSetInterface.h ${CMAKE_CURRENT_LIST_DIR}/cafTreeNode.h @@ -128,13 +118,13 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimPressureDepthData.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipseResultDefinitionTools.h ${CMAKE_CURRENT_LIST_DIR}/RimResultSelectionUi.h - ${CMAKE_CURRENT_LIST_DIR}/RimPlotRectAnnotation.h ${CMAKE_CURRENT_LIST_DIR}/RimEmCase.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipseViewCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipseCaseEnsemble.h ${CMAKE_CURRENT_LIST_DIR}/RimCameraPosition.h - ${CMAKE_CURRENT_LIST_DIR}/RimWellTargetCandidatesGenerator.h - ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMap.h + ${CMAKE_CURRENT_LIST_DIR}/RimWellTargetMapping.h + ${CMAKE_CURRENT_LIST_DIR}/RimRegularGridCase.h + ${CMAKE_CURRENT_LIST_DIR}/RimGeometrySelectionItem.cpp ) set(SOURCE_GROUP_SOURCE_FILES @@ -169,8 +159,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimEclipseStatisticsCaseEvaluator.cpp ${CMAKE_CURRENT_LIST_DIR}/RimMimeData.cpp ${CMAKE_CURRENT_LIST_DIR}/RimTools.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimFormationNames.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimFormationNamesCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimMockModelSettings.cpp ${CMAKE_CURRENT_LIST_DIR}/RimTernaryLegendConfig.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipseFaultColors.cpp @@ -205,7 +193,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimCheckableNamedObject.cpp ${CMAKE_CURRENT_LIST_DIR}/RimCheckableObject.cpp ${CMAKE_CURRENT_LIST_DIR}/RimGridTimeHistoryCurve.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimGeometrySelectionItem.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipseGeometrySelectionItem.cpp ${CMAKE_CURRENT_LIST_DIR}/RimDialogData.cpp ${CMAKE_CURRENT_LIST_DIR}/RimTimeStepFilter.cpp @@ -224,15 +211,10 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimLegendConfig.cpp ${CMAKE_CURRENT_LIST_DIR}/RimNameConfig.cpp ${CMAKE_CURRENT_LIST_DIR}/RimDataSourceSteppingTools.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimContourMapProjection.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapProjection.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapView.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapViewCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimViewNameConfig.cpp ${CMAKE_CURRENT_LIST_DIR}/RimReloadCaseTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisPropertiesInterface.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisProperties.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisAnnotation.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisLogRangeCalculator.cpp ${CMAKE_CURRENT_LIST_DIR}/RimObservedDataCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimObservedFmuRftData.cpp @@ -247,8 +229,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimCustomObjectiveFunctionCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimCustomObjectiveFunction.cpp ${CMAKE_CURRENT_LIST_DIR}/RimCustomObjectiveFunctionWeight.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimEquilibriumAxisAnnotation.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimTimeAxisAnnotation.cpp ${CMAKE_CURRENT_LIST_DIR}/cafTreeNode.cpp ${CMAKE_CURRENT_LIST_DIR}/RimMultipleLocations.cpp ${CMAKE_CURRENT_LIST_DIR}/RimSurfaceIntersectionBand.cpp @@ -262,14 +242,14 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimPressureDepthData.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipseResultDefinitionTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RimResultSelectionUi.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimPlotRectAnnotation.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEmCase.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPolylinePickerInterface.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipseViewCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipseCaseEnsemble.cpp ${CMAKE_CURRENT_LIST_DIR}/RimCameraPosition.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimWellTargetCandidatesGenerator.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMap.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimWellTargetMapping.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimRegularGridCase.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimGeometrySelectionItem.cpp ) if(RESINSIGHT_USE_QT_CHARTS) @@ -295,13 +275,4 @@ if(RESINSIGHT_USE_QT_CHARTS) endif() list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RimPlot.h) - -source_group( - "ProjectDataModel" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/CellFilters/CMakeLists_files.cmake index 66b8323df9..d9d799f5b4 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/CMakeLists_files.cmake @@ -33,11 +33,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\CellFilters" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp index 693a0dd220..ce97676812 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterCollection.cpp @@ -24,9 +24,9 @@ #include "RimCellFilter.h" #include "RimCellIndexFilter.h" #include "RimCellRangeFilter.h" -#include "RimOilField.h" #include "RimPolygonFilter.h" #include "RimProject.h" +#include "RimTools.h" #include "RimUserDefinedFilter.h" #include "RimUserDefinedIndexFilter.h" #include "RimViewController.h" @@ -130,6 +130,7 @@ void RimCellFilterCollection::setCase( RimCase* theCase ) for ( RimCellFilter* filter : m_cellFilters ) { filter->setCase( theCase ); + filter->filterChanged.connect( this, &RimCellFilterCollection::onFilterUpdated ); } } @@ -143,8 +144,7 @@ void RimCellFilterCollection::appendMenuItems( caf::CmdFeatureMenuBuilder& menuB menuBuilder.subMenuStart( "Polygon Filter", QIcon( ":/CellFilter_Polygon.png" ) ); { - auto project = RimProject::current(); - auto polygonCollection = project->activeOilField()->polygonCollection(); + auto polygonCollection = RimTools::polygonCollection(); for ( auto p : polygonCollection->allPolygons() ) { if ( !p ) continue; diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterIntervalTool.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterIntervalTool.cpp index f82ed7f8ad..3920ec368a 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterIntervalTool.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimCellFilterIntervalTool.cpp @@ -107,6 +107,9 @@ size_t RimCellFilterIntervalTool::numberFromPart( std::string strVal ) const // Define a range with the comma separated format A,B,C-D, etc., i.e. 1,4,5-8 // Only numbers > 0 are supported. // For a range with increment > 1, use i.e. 4-8:2 +// +// Related code in RiaStdStringTools::valuesFromRangeSelection( const std::string& s ) +// //-------------------------------------------------------------------------------------------------- void RimCellFilterIntervalTool::setInterval( bool enabled, std::string intervalText ) { diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.cpp index a3e9a49774..87f9095a5a 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.cpp @@ -40,6 +40,7 @@ #include "RiuMainWindow.h" +#include "cafPdmUiCheckBoxEditor.h" #include "cafPdmUiDoubleSliderEditor.h" #include "cafPdmUiSliderEditor.h" #include "cafPdmUiTreeAttributes.h" @@ -65,6 +66,13 @@ RimEclipsePropertyFilter::RimEclipsePropertyFilter() // Fields in this object are displayed using defineUiOrdering() m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); + CAF_PDM_InitFieldNoDefault( &m_linkedWithCellResult, + "LinkedWithCellResult", + "Linked With Cell Result", + "", + "The selected cell result is automatically used to update the property filter." ); + caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_linkedWithCellResult ); + CAF_PDM_InitField( &m_rangeLabelText, "Dummy_keyword", QString( "Range Type" ), "Range Type" ); m_rangeLabelText.xmlCapability()->disableIO(); m_rangeLabelText.uiCapability()->setUiReadOnly( true ); @@ -119,6 +127,22 @@ RimEclipseResultDefinition* RimEclipsePropertyFilter::resultDefinition() const return m_resultDefinition; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimEclipsePropertyFilter::isLinkedWithCellResult() const +{ + return m_linkedWithCellResult(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilter::setLinkedWithCellResult( bool linkedWithCellResult ) +{ + m_linkedWithCellResult = linkedWithCellResult; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -161,7 +185,7 @@ void RimEclipsePropertyFilter::fieldChangedByUi( const caf::PdmFieldHandle* chan if ( &m_lowerBound == changedField || &m_upperBound == changedField || &m_isActive == changedField || &m_filterMode == changedField || &m_selectedCategoryValues == changedField || &m_useCategorySelection == changedField || &m_integerUpperBound == changedField || - &m_integerLowerBound == changedField ) + &m_integerLowerBound == changedField || &m_linkedWithCellResult == changedField ) { m_isDuplicatedFromLinkedView = false; @@ -207,6 +231,13 @@ void RimEclipsePropertyFilter::defineUiOrdering( QString uiConfigName, caf::PdmU // Fields declared in RimCellFilter uiOrdering.add( &m_name ); + uiOrdering.add( &m_linkedWithCellResult ); + if ( m_linkedWithCellResult ) + { + uiOrdering.skipRemainingFields( true ); + return; + } + // Fields declared in Rimm_resultDefinition caf::PdmUiGroup* group1 = uiOrdering.addNewGroup( "Result" ); m_resultDefinition->uiOrdering( uiConfigName, *group1 ); diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.h b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.h index 18e88bb3f1..f542d1fc34 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.h +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilter.h @@ -41,6 +41,8 @@ public: ~RimEclipsePropertyFilter() override; RimEclipseResultDefinition* resultDefinition() const; + bool isLinkedWithCellResult() const; + void setLinkedWithCellResult( bool linkedWithCellResult ); void rangeValues( double* lower, double* upper ) const; bool isCategorySelectionActive() const; @@ -84,10 +86,12 @@ private: private: caf::PdmChildField m_resultDefinition; - caf::PdmField m_rangeLabelText; - caf::PdmField m_lowerBound; - caf::PdmField m_upperBound; + caf::PdmField m_linkedWithCellResult; + + caf::PdmField m_rangeLabelText; + caf::PdmField m_lowerBound; + caf::PdmField m_upperBound; caf::PdmProxyValueField m_integerLowerBound; caf::PdmProxyValueField m_integerUpperBound; diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.cpp index 3774fedfa0..ebfc12f989 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.cpp @@ -29,6 +29,7 @@ #include "RimViewController.h" #include "RimViewLinker.h" +#include "cafCmdFeatureMenuBuilder.h" #include "cafPdmUiEditorHandle.h" CAF_PDM_SOURCE_INIT( RimEclipsePropertyFilterCollection, "CellPropertyFilters" ); @@ -191,3 +192,55 @@ void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep() cellFilter->updateFromCurrentTimeStep(); } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilterCollection::updateDefaultResult( const RimEclipseCellColors* result ) +{ + if ( !result ) return; + if ( m_propertyFilters.empty() ) return; + + auto view = reservoirView(); + for ( auto filter : m_propertyFilters ) + { + if ( !filter->isLinkedWithCellResult() ) continue; + + if ( view && view->eclipseCase() ) + { + filter->resultDefinition()->setEclipseCase( view->eclipseCase() ); + } + + filter->resultDefinition()->simpleCopy( result ); + filter->resultDefinition()->loadResult(); + filter->setToDefaultValues(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipsePropertyFilter* RimEclipsePropertyFilterCollection::addFilterLinkedToCellResult() +{ + RimEclipsePropertyFilter* propertyFilter = new RimEclipsePropertyFilter(); + propertyFilter->setLinkedWithCellResult( true ); + m_propertyFilters.push_back( propertyFilter ); + + auto view = reservoirView(); + if ( view && view->eclipseCase() ) + { + propertyFilter->resultDefinition()->setEclipseCase( view->eclipseCase() ); + updateDefaultResult( view->cellResult() ); + } + + return propertyFilter; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipsePropertyFilterCollection::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const +{ + menuBuilder << "RicEclipsePropertyFilterNewFeature"; + menuBuilder << "RicAddLinkedEclipsePropertyFilterFeature"; +} diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.h b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.h index 594c070c13..66e9d47b1d 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.h +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimEclipsePropertyFilterCollection.h @@ -26,6 +26,7 @@ class RimEclipsePropertyFilter; class RimEclipseView; +class RimEclipseCellColors; //================================================================================================== /// @@ -53,8 +54,12 @@ public: void updateIconState() override; void updateFromCurrentTimeStep(); + void updateDefaultResult( const RimEclipseCellColors* result ); + RimEclipsePropertyFilter* addFilterLinkedToCellResult(); + protected: void initAfterRead() override; + void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override; private: caf::PdmChildArrayField m_propertyFilters; diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.cpp index 3d9b8cee90..cefba8d9c0 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.cpp @@ -30,6 +30,7 @@ #include "RiuMainWindow.h" +#include "cafPdmUiCheckBoxEditor.h" #include "cafPdmUiDoubleSliderEditor.h" #include "cvfAssert.h" @@ -44,18 +45,25 @@ RimGeoMechPropertyFilter::RimGeoMechPropertyFilter() { CAF_PDM_InitObject( "Property Filter", ":/CellFilter_Values.png" ); - CAF_PDM_InitFieldNoDefault( &resultDefinition, "ResultDefinition", "Result Definition" ); - resultDefinition = new RimGeoMechResultDefinition(); + CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "Result Definition" ); + m_resultDefinition = new RimGeoMechResultDefinition(); // Set to hidden to avoid this item to been displayed as a child item // Fields in this object are displayed using defineUiOrdering() - resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); + m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); - CAF_PDM_InitField( &lowerBound, "LowerBound", 0.0, "Min" ); - lowerBound.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + CAF_PDM_InitFieldNoDefault( &m_linkedWithCellResult, + "LinkedWithCellResult", + "Linked With Cell Result", + "", + "The selected cell result is automatically used to update the property filter." ); + caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_linkedWithCellResult ); - CAF_PDM_InitField( &upperBound, "UpperBound", 0.0, "Max" ); - upperBound.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + CAF_PDM_InitField( &m_lowerBound, "LowerBound", 0.0, "Min" ); + m_lowerBound.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_upperBound, "UpperBound", 0.0, "Max" ); + m_upperBound.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); updateIconState(); @@ -68,7 +76,47 @@ RimGeoMechPropertyFilter::RimGeoMechPropertyFilter() //-------------------------------------------------------------------------------------------------- RimGeoMechPropertyFilter::~RimGeoMechPropertyFilter() { - delete resultDefinition; + delete m_resultDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeoMechResultDefinition* RimGeoMechPropertyFilter::resultDefinition() const +{ + return m_resultDefinition; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimGeoMechPropertyFilter::isLinkedWithCellResult() const +{ + return m_linkedWithCellResult; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGeoMechPropertyFilter::setLinkedWithCellResult( bool linkedWithCellResult ) +{ + m_linkedWithCellResult = linkedWithCellResult; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimGeoMechPropertyFilter::lowerBound() const +{ + return m_lowerBound; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimGeoMechPropertyFilter::upperBound() const +{ + return m_upperBound; } //-------------------------------------------------------------------------------------------------- @@ -76,8 +124,8 @@ RimGeoMechPropertyFilter::~RimGeoMechPropertyFilter() //-------------------------------------------------------------------------------------------------- void RimGeoMechPropertyFilter::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) { - if ( &lowerBound == changedField || &upperBound == changedField || &m_isActive == changedField || &m_filterMode == changedField || - &m_selectedCategoryValues == changedField ) + if ( &m_lowerBound == changedField || &m_upperBound == changedField || &m_isActive == changedField || &m_filterMode == changedField || + &m_selectedCategoryValues == changedField || &m_linkedWithCellResult == changedField ) { updateIconState(); updateFilterName(); @@ -112,8 +160,8 @@ void RimGeoMechPropertyFilter::setToDefaultValues() computeResultValueRange(); - lowerBound = m_minimumResultValue; - upperBound = m_maximumResultValue; + m_lowerBound = m_minimumResultValue; + m_upperBound = m_maximumResultValue; m_selectedCategoryValues = m_categoryValues; @@ -126,22 +174,28 @@ void RimGeoMechPropertyFilter::setToDefaultValues() void RimGeoMechPropertyFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { uiOrdering.add( &m_name ); + uiOrdering.add( &m_linkedWithCellResult ); + if ( m_linkedWithCellResult() ) + { + uiOrdering.skipRemainingFields( true ); + return; + } caf::PdmUiGroup* group1 = uiOrdering.addNewGroup( "Result" ); - resultDefinition->uiOrdering( uiConfigName, *group1 ); + m_resultDefinition->uiOrdering( uiConfigName, *group1 ); caf::PdmUiGroup& group2 = *( uiOrdering.addNewGroup( "Filter Settings" ) ); group2.add( &m_filterMode ); - if ( resultDefinition->hasCategoryResult() ) + if ( m_resultDefinition->hasCategoryResult() ) { group2.add( &m_selectedCategoryValues ); } else { - group2.add( &lowerBound ); - group2.add( &upperBound ); + group2.add( &m_lowerBound ); + group2.add( &m_upperBound ); } updateReadOnlyStateOfAllFields(); @@ -169,9 +223,9 @@ void RimGeoMechPropertyFilter::updateReadOnlyStateOfAllFields() std::vector objFields = fields(); // Include fields declared in RimResultDefinition - objFields.push_back( &( resultDefinition->m_resultPositionTypeUiField ) ); - objFields.push_back( &( resultDefinition->m_resultVariableUiField ) ); - objFields.push_back( &( resultDefinition->m_timeLapseBaseTimestep ) ); + objFields.push_back( &( m_resultDefinition->m_resultPositionTypeUiField ) ); + objFields.push_back( &( m_resultDefinition->m_resultVariableUiField ) ); + objFields.push_back( &( m_resultDefinition->m_timeLapseBaseTimestep ) ); for ( size_t i = 0; i < objFields.size(); i++ ) { @@ -212,7 +266,7 @@ void RimGeoMechPropertyFilter::updateActiveState() //-------------------------------------------------------------------------------------------------- bool RimGeoMechPropertyFilter::isActiveAndHasResult() { - return isActive() && resultDefinition->hasResult(); + return isActive() && m_resultDefinition->hasResult(); } //-------------------------------------------------------------------------------------------------- @@ -225,7 +279,7 @@ void RimGeoMechPropertyFilter::defineEditorAttribute( const caf::PdmFieldHandle* return; } - if ( field == &lowerBound || field == &upperBound ) + if ( field == &m_lowerBound || field == &m_upperBound ) { caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast( attribute ); if ( !myAttr ) @@ -250,25 +304,25 @@ void RimGeoMechPropertyFilter::computeResultValueRange() clearCategories(); - RigFemResultAddress resultAddress = resultDefinition->resultAddress(); - if ( resultAddress.isValid() && resultDefinition->ownerCaseData() ) + RigFemResultAddress resultAddress = m_resultDefinition->resultAddress(); + if ( resultAddress.isValid() && m_resultDefinition->ownerCaseData() ) { - if ( resultDefinition->hasCategoryResult() ) + if ( m_resultDefinition->hasCategoryResult() ) { - std::vector fnVector = resultDefinition->ownerCaseData()->femPartResults()->formationNames(); + std::vector fnVector = m_resultDefinition->ownerCaseData()->femPartResults()->formationNames(); setCategoryNames( fnVector ); } else { - resultDefinition->ownerCaseData()->femPartResults()->minMaxScalarValues( resultAddress, &min, &max ); + m_resultDefinition->ownerCaseData()->femPartResults()->minMaxScalarValues( resultAddress, &min, &max ); } } m_maximumResultValue = max; m_minimumResultValue = min; - lowerBound.uiCapability()->setUiName( QString( "Min (%1)" ).arg( min ) ); - upperBound.uiCapability()->setUiName( QString( "Max (%1)" ).arg( max ) ); + m_lowerBound.uiCapability()->setUiName( QString( "Min (%1)" ).arg( min ) ); + m_upperBound.uiCapability()->setUiName( QString( "Max (%1)" ).arg( max ) ); } //-------------------------------------------------------------------------------------------------- @@ -276,12 +330,12 @@ void RimGeoMechPropertyFilter::computeResultValueRange() //-------------------------------------------------------------------------------------------------- void RimGeoMechPropertyFilter::updateFilterName() { - RigFemResultAddress resultAddress = resultDefinition->resultAddress(); + RigFemResultAddress resultAddress = m_resultDefinition->resultAddress(); QString newFiltername; if ( resultAddress.resultPosType == RIG_FORMATION_NAMES ) { - newFiltername = resultDefinition->resultFieldName(); + newFiltername = m_resultDefinition->resultFieldName(); } else { @@ -303,11 +357,11 @@ void RimGeoMechPropertyFilter::updateFilterName() break; } - QString fieldUiName = resultDefinition->resultFieldUiName(); - QString compoUiName = resultDefinition->resultComponentUiName(); + QString fieldUiName = m_resultDefinition->resultFieldUiName(); + QString compoUiName = m_resultDefinition->resultComponentUiName(); - newFiltername = posName + ", " + fieldUiName + ", " + compoUiName + " (" + QString::number( lowerBound() ) + " .. " + - QString::number( upperBound ) + ")"; + newFiltername = posName + ", " + fieldUiName + ", " + compoUiName + " (" + QString::number( m_lowerBound() ) + " .. " + + QString::number( m_upperBound ) + ")"; } m_name = newFiltername; diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.h b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.h index e4fcfd165c..71af1e1da1 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.h +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilter.h @@ -38,10 +38,13 @@ public: RimGeoMechPropertyFilter(); ~RimGeoMechPropertyFilter() override; - caf::PdmChildField resultDefinition; + RimGeoMechResultDefinition* resultDefinition() const; - caf::PdmField lowerBound; - caf::PdmField upperBound; + bool isLinkedWithCellResult() const; + void setLinkedWithCellResult( bool linkedWithCellResult ); + + double lowerBound() const; + double upperBound() const; void setParentContainer( RimGeoMechPropertyFilterCollection* parentContainer ); RimGeoMechPropertyFilterCollection* parentContainer(); @@ -63,6 +66,12 @@ private: bool isPropertyFilterControlled(); private: + caf::PdmChildField m_resultDefinition; + caf::PdmField m_linkedWithCellResult; + + caf::PdmField m_lowerBound; + caf::PdmField m_upperBound; + RimGeoMechPropertyFilterCollection* m_parentContainer; double m_minimumResultValue; double m_maximumResultValue; diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.cpp index 7b24077c07..0ed8cc4d8a 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.cpp @@ -25,6 +25,8 @@ #include "RimViewController.h" #include "RimViewLinker.h" +#include "RigFemResultAddress.h" + #include "cvfAssert.h" CAF_PDM_SOURCE_INIT( RimGeoMechPropertyFilterCollection, "GeoMechPropertyFilters" ); @@ -55,8 +57,8 @@ void RimGeoMechPropertyFilterCollection::loadAndInitializePropertyFilters() for ( size_t i = 0; i < propertyFilters.size(); i++ ) { RimGeoMechPropertyFilter* propertyFilter = propertyFilters[i]; - propertyFilter->resultDefinition->setGeoMechCase( reservoirView()->geoMechCase() ); - propertyFilter->resultDefinition->loadResult(); + propertyFilter->resultDefinition()->setGeoMechCase( reservoirView()->geoMechCase() ); + propertyFilter->resultDefinition()->loadResult(); propertyFilter->computeResultValueRange(); } } @@ -71,7 +73,7 @@ void RimGeoMechPropertyFilterCollection::initAfterRead() RimGeoMechPropertyFilter* propertyFilter = propertyFilters[i]; propertyFilter->setParentContainer( this ); - propertyFilter->resultDefinition->setGeoMechCase( reservoirView()->geoMechCase() ); + propertyFilter->resultDefinition()->setGeoMechCase( reservoirView()->geoMechCase() ); propertyFilter->updateIconState(); } @@ -88,7 +90,7 @@ bool RimGeoMechPropertyFilterCollection::hasActiveFilters() const for ( size_t i = 0; i < propertyFilters.size(); i++ ) { RimGeoMechPropertyFilter* propertyFilter = propertyFilters[i]; - if ( propertyFilter->isActive() && propertyFilter->resultDefinition->hasResult() ) return true; + if ( propertyFilter->isActive() && propertyFilter->resultDefinition()->hasResult() ) return true; } return false; @@ -112,8 +114,8 @@ bool RimGeoMechPropertyFilterCollection::isUsingFormationNames() const for ( size_t i = 0; i < propertyFilters.size(); i++ ) { RimGeoMechPropertyFilter* propertyFilter = propertyFilters[i]; - if ( propertyFilter->isActive() && propertyFilter->resultDefinition->resultPositionType() == RIG_FORMATION_NAMES && - propertyFilter->resultDefinition->resultFieldName() != "" ) + if ( propertyFilter->isActive() && propertyFilter->resultDefinition()->resultPositionType() == RIG_FORMATION_NAMES && + propertyFilter->resultDefinition()->resultFieldName() != "" ) return true; } @@ -150,3 +152,23 @@ void RimGeoMechPropertyFilterCollection::updateIconState() propFilter->updateIconState(); } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGeoMechPropertyFilterCollection::updateFromResult( const RimGeoMechResultDefinition* resultDefinition ) +{ + if ( !resultDefinition ) return; + + for ( auto filter : propertyFilters ) + { + if ( filter->isLinkedWithCellResult() ) + { + filter->resultDefinition()->setResultAddress( resultDefinition->resultAddress() ); + filter->setToDefaultValues(); + filter->updateFilterName(); + + updateDisplayModelNotifyManagedViews( filter ); + } + } +} diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.h b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.h index 5b9bf413fb..1a4dd61626 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.h +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimGeoMechPropertyFilterCollection.h @@ -27,6 +27,7 @@ class RimGeoMechPropertyFilter; class RimGeoMechView; +class RimGeoMechResultDefinition; //================================================================================================== /// @@ -52,6 +53,8 @@ public: void loadAndInitializePropertyFilters() override; void updateIconState() override; + void updateFromResult( const RimGeoMechResultDefinition* resultDefinition ); + protected: // Overridden methods void initAfterRead() override; diff --git a/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.cpp b/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.cpp index a1f311021a..c5a99e6f81 100644 --- a/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.cpp @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2024 Equinor ASA // @@ -19,10 +19,9 @@ #include "RimCloudDataSourceCollection.h" #include "RiaApplication.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" - #include "RimOilField.h" #include "RimProject.h" #include "RimSummaryCaseMainCollection.h" @@ -42,6 +41,9 @@ RimCloudDataSourceCollection::RimCloudDataSourceCollection() { CAF_PDM_InitObject( "Cloud Data" + RiaDefines::betaFeaturePostfix(), ":/Cloud.svg" ); + CAF_PDM_InitFieldNoDefault( &m_authenticate, "Authenticate", "" ); + caf::PdmUiPushButtonEditor::configureEditorLabelLeft( &m_authenticate ); + CAF_PDM_InitFieldNoDefault( &m_sumoFieldName, "SumoFieldId", "Field Id" ); CAF_PDM_InitFieldNoDefault( &m_sumoCaseId, "SumoCaseId", "Case Id" ); m_sumoCaseId.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() ); @@ -84,14 +86,15 @@ void RimCloudDataSourceCollection::createEnsemblesFromSelectedDataSources( const for ( auto dataSource : dataSources ) { RimSummaryEnsembleSumo* ensemble = new RimSummaryEnsembleSumo(); + ensemble->setUsePathKey1( true ); ensemble->setSumoDataSource( dataSource ); - ensemble->updateName(); RiaSummaryTools::summaryCaseMainCollection()->addEnsemble( ensemble ); ensemble->loadDataAndUpdate(); - RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( {}, { ensemble } ); + RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( {}, { ensemble } ); } + RiaSummaryTools::updateSummaryEnsembleNames(); RiaSummaryTools::summaryCaseMainCollection()->updateAllRequiredEditors(); } @@ -102,6 +105,13 @@ void RimCloudDataSourceCollection::fieldChangedByUi( const caf::PdmFieldHandle* { if ( !m_sumoConnector ) return; + if ( changedField == &m_authenticate ) + { + m_sumoConnector->requestTokenWithCancelButton(); + + m_authenticate = false; + } + if ( changedField == &m_sumoFieldName ) { m_sumoCaseId = ""; @@ -132,7 +142,7 @@ void RimCloudDataSourceCollection::fieldChangedByUi( const caf::PdmFieldHandle* //-------------------------------------------------------------------------------------------------- QList RimCloudDataSourceCollection::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) { - if ( !m_sumoConnector ) return {}; + if ( !m_sumoConnector || !m_sumoConnector->isGranted() ) return {}; QList options; if ( fieldNeedingOptions == &m_sumoFieldName ) @@ -185,13 +195,27 @@ QList RimCloudDataSourceCollection::calculateValueOption //-------------------------------------------------------------------------------------------------- void RimCloudDataSourceCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { - caf::PdmUiOrdering::LayoutOptions layout = { .newRow = true, .totalColumnSpan = 3, .leftLabelColumnSpan = 1 }; - uiOrdering.add( &m_sumoFieldName, layout ); - uiOrdering.add( &m_sumoCaseId, layout ); - uiOrdering.add( &m_sumoEnsembleNames, layout ); + auto authGroup = uiOrdering.addNewGroup( "Authentication" ); + authGroup->add( &m_authenticate ); - uiOrdering.add( &m_addDataSources, layout ); - uiOrdering.add( &m_addEnsembles, layout ); + bool isGranted = m_sumoConnector && m_sumoConnector->isGranted(); + QString text = "Authentication Status: "; + text += isGranted ? "✔ Granted" : "â�Œ Not Granted"; + + m_authenticate.uiCapability()->setUiName( text ); + m_authenticate.uiCapability()->setUiReadOnly( isGranted ); + + if ( isGranted ) + { + caf::PdmUiOrdering::LayoutOptions layout = { .newRow = true, .totalColumnSpan = 3, .leftLabelColumnSpan = 1 }; + uiOrdering.add( &m_sumoFieldName, layout ); + uiOrdering.add( &m_sumoCaseId, layout ); + uiOrdering.add( &m_sumoEnsembleNames, layout ); + + uiOrdering.add( &m_addDataSources, layout ); + uiOrdering.add( &m_addEnsembles, layout ); + } + uiOrdering.skipRemainingFields(); } //-------------------------------------------------------------------------------------------------- @@ -201,14 +225,21 @@ void RimCloudDataSourceCollection::defineEditorAttribute( const caf::PdmFieldHan QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) { - if ( field == &m_addDataSources ) + if ( field == &m_authenticate ) + { + if ( auto attrib = dynamic_cast( attribute ) ) + { + attrib->m_buttonText = "Authenticate"; + } + } + else if ( field == &m_addDataSources ) { if ( auto attrib = dynamic_cast( attribute ) ) { attrib->m_buttonText = "Add Data Sources(s)"; } } - if ( field == &m_addEnsembles ) + else if ( field == &m_addEnsembles ) { if ( auto attrib = dynamic_cast( attribute ) ) { diff --git a/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.h b/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.h index 6458431b1e..a311c3c71c 100644 --- a/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Cloud/RimCloudDataSourceCollection.h @@ -57,6 +57,7 @@ private: void addEnsembles(); private: + caf::PdmField m_authenticate; caf::PdmField m_sumoFieldName; caf::PdmField m_sumoCaseId; caf::PdmField> m_sumoEnsembleNames; diff --git a/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake index 5d7c8edb1c..5a5d4b8226 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Completions/CMakeLists_files.cmake @@ -3,6 +3,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimFishbonesCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimFishbones.h ${CMAKE_CURRENT_LIST_DIR}/RimFishbonesPipeProperties.h + ${CMAKE_CURRENT_LIST_DIR}/RimFishbonesDefines.h ${CMAKE_CURRENT_LIST_DIR}/RimFishboneWellPath.h ${CMAKE_CURRENT_LIST_DIR}/RimFishboneWellPathCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimPerforationCollection.h @@ -19,8 +20,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplateCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplate.h - ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.h - ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimMeshFractureTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimThermalFractureTemplate.h ${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h @@ -42,6 +41,7 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimFishbonesCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimFishbones.cpp ${CMAKE_CURRENT_LIST_DIR}/RimFishbonesPipeProperties.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimFishbonesDefines.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPerforationCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimPerforationInterval.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellPathCompletions.cpp @@ -56,8 +56,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplateCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimValveTemplate.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimMeshFractureTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimThermalFractureTemplate.cpp ${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp @@ -74,11 +72,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Completions" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimEllipseFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimEllipseFractureTemplate.cpp index 5b9d87b491..6cc2b32990 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimEllipseFractureTemplate.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimEllipseFractureTemplate.cpp @@ -259,12 +259,6 @@ QList RimEllipseFractureTemplate::calculateValueOptions( { QList options; - if ( fieldNeedingOptions == &m_fractureWidthType ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( USER_DEFINED_WIDTH ), USER_DEFINED_WIDTH ) ); - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( WIDTH_FROM_FRACTURE ), WIDTH_FROM_FRACTURE ) ); - } - if ( fieldNeedingOptions == &m_betaFactorType ) { options.push_back( diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.cpp index a056075c6a..240a0611dd 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.cpp @@ -31,6 +31,8 @@ #include "RimWellPath.h" #include "RimWellPathValve.h" +#include "cafPdmFieldScriptingCapability.h" +#include "cafPdmObjectScriptingCapability.h" #include "cafPdmUiDoubleValueEditor.h" #include "cafPdmUiListEditor.h" @@ -46,32 +48,18 @@ CAF_PDM_SOURCE_INIT( RimFishbones, "FishbonesMultipleSubs" ); -namespace caf -{ -template <> -void AppEnum::setUp() -{ - addItem( RimFishbones::FB_SUB_COUNT_END, "FB_SUB_COUNT", "Start/End/Number of Subs" ); - addItem( RimFishbones::FB_SUB_SPACING_END, "FB_SUB_SPACING", "Start/End/Spacing" ); - addItem( RimFishbones::FB_SUB_USER_DEFINED, "FB_SUB_CUSTOM", "User Specification" ); - setDefault( RimFishbones::FB_SUB_COUNT_END ); -} - -template <> -void AppEnum::setUp() -{ - addItem( RimFishbones::FB_LATERAL_ORIENTATION_FIXED, "FB_LATERAL_ORIENTATION_FIXED", "Fixed Angle" ); - addItem( RimFishbones::FB_LATERAL_ORIENTATION_RANDOM, "FB_LATERAL_ORIENTATION_RANDOM", "Random Angle" ); - setDefault( RimFishbones::FB_LATERAL_ORIENTATION_RANDOM ); -} -} // namespace caf - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RimFishbones::RimFishbones() { - CAF_PDM_InitObject( "FishbonesMultipleSubs", ":/FishBoneGroup16x16.png" ); + CAF_PDM_InitScriptableObjectWithNameAndComment( "FishbonesMultipleSubs", + ":/FishBoneGroup16x16.png", + "", + "", + "Fishbones", + "Fishbones is a completion type used to add multiple short laterals to the main well " + "bore." ); CAF_PDM_InitField( &m_isActive, "Active", true, "Active" ); m_isActive.uiCapability()->setUiHidden( true ); @@ -84,28 +72,28 @@ RimFishbones::RimFishbones() cvf::Color3f defaultColor = RiaColorTables::wellPathComponentColors()[RiaDefines::WellPathComponentType::FISHBONES]; CAF_PDM_InitField( &fishbonesColor, "Color", defaultColor, "Fishbones Color" ); - CAF_PDM_InitField( &m_lateralCountPerSub, "LateralCountPerSub", 3, "Laterals Per Sub" ); - CAF_PDM_InitField( &m_lateralLength, - "LateralLength", - QString( "11.0" ), - "Length(s) [m]", - "", - "Specify multiple length values if the sub lengths differ", - "" ); + CAF_PDM_InitScriptableField( &m_lateralCountPerSub, "LateralCountPerSub", 3, "Laterals Per Sub" ); + CAF_PDM_InitScriptableField( &m_lateralLength, + "LateralLength", + QString( "11.0" ), + "Length(s) [m]", + "", + "Specify multiple length values if the sub lengths differ", + "" ); - CAF_PDM_InitField( &m_lateralExitAngle, "LateralExitAngle", 35.0, "Exit Angle [deg]" ); - CAF_PDM_InitField( &m_lateralBuildAngle, "LateralBuildAngle", 6.0, "Build Angle [deg/m]" ); + CAF_PDM_InitScriptableField( &m_lateralExitAngle, "LateralExitAngle", 35.0, "Exit Angle [deg]" ); + CAF_PDM_InitScriptableField( &m_lateralBuildAngle, "LateralBuildAngle", 6.0, "Build Angle [deg/m]" ); - CAF_PDM_InitField( &m_lateralTubingDiameter, "LateralTubingDiameter", 8.0, "Tubing Diameter [mm]" ); + CAF_PDM_InitScriptableField( &m_lateralTubingDiameter, "LateralTubingDiameter", 8.0, "Tubing Diameter [mm]" ); - CAF_PDM_InitField( &m_lateralOpenHoleRoghnessFactor, "LateralOpenHoleRoghnessFactor", 0.001, "Open Hole Roghness Factor [m]" ); - CAF_PDM_InitField( &m_lateralTubingRoghnessFactor, "LateralTubingRoghnessFactor", 1e-5, "Tubing Roghness Factor [m]" ); + CAF_PDM_InitScriptableField( &m_lateralOpenHoleRoghnessFactor, "LateralOpenHoleRoghnessFactor", 0.001, "Open Hole Roghness Factor [m]" ); + CAF_PDM_InitScriptableField( &m_lateralTubingRoghnessFactor, "LateralTubingRoghnessFactor", 1e-5, "Tubing Roghness Factor [m]" ); - CAF_PDM_InitField( &m_lateralInstallSuccessFraction, "LateralInstallSuccessFraction", 1.0, "Install Success Rate [0..1]" ); + CAF_PDM_InitScriptableField( &m_lateralInstallSuccessFraction, "LateralInstallSuccessFraction", 1.0, "Install Success Rate [0..1]" ); - CAF_PDM_InitField( &m_icdCount, "IcdCount", 2, "ICDs per Sub" ); - CAF_PDM_InitField( &m_icdOrificeDiameter, "IcdOrificeDiameter", 7.0, "ICD Orifice Diameter [mm]" ); - CAF_PDM_InitField( &m_icdFlowCoefficient, "IcdFlowCoefficient", 1.5, "ICD Flow Coefficient" ); + CAF_PDM_InitScriptableField( &m_icdCount, "IcdCount", 2, "ICDs per Sub" ); + CAF_PDM_InitScriptableField( &m_icdOrificeDiameter, "IcdOrificeDiameter", 7.0, "ICD Orifice Diameter [mm]" ); + CAF_PDM_InitScriptableField( &m_icdFlowCoefficient, "IcdFlowCoefficient", 1.5, "ICD Flow Coefficient" ); initialiseObsoleteFields(); CAF_PDM_InitFieldNoDefault( &m_valveLocations, "ValveLocations", "Valve Locations" ); @@ -113,20 +101,28 @@ RimFishbones::RimFishbones() m_valveLocations->findField( "RangeValveCount" )->uiCapability()->setUiName( "Number of Subs" ); m_valveLocations.uiCapability()->setUiTreeChildrenHidden( true ); - CAF_PDM_InitField( &m_subsOrientationMode, - "SubsOrientationMode", - caf::AppEnum( FB_LATERAL_ORIENTATION_RANDOM ), - "Orientation" ); + CAF_PDM_InitScriptableField( &m_subsOrientationMode, "SubsOrientationMode", RimFishbonesDefines::LateralsOrientationType::RANDOM, "Orientation" ); CAF_PDM_InitFieldNoDefault( &m_installationRotationAngles, "InstallationRotationAngles", "Installation Rotation Angles [deg]" ); m_installationRotationAngles.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() ); m_installationRotationAngles.uiCapability()->setUiHidden( true ); CAF_PDM_InitField( &m_fixedInstallationRotationAngle, "FixedInstallationRotationAngle", 0.0, " Fixed Angle [deg]" ); + auto pipeProperties = new RimFishbonesPipeProperties; + + // These proxy fields are created to allow the use from scripting API to work on the pipe properties directly on the fishbones object + // Note that the set/get methods for the proxy fields are connected to the pipe properties object, which is a bit unusual + CAF_PDM_InitScriptableFieldNoDefault( &m_lateralDiameter, "LateralDiameter", "Lateral Diameter" ); + m_lateralDiameter.registerSetMethod( pipeProperties, &RimFishbonesPipeProperties::setHoleDiameter ); + m_lateralDiameter.registerGetMethod( pipeProperties, &RimFishbonesPipeProperties::holeDiameter ); + + CAF_PDM_InitScriptableFieldNoDefault( &m_lateralSkinFactor, "LateralSkinFactor", "Lateral Skin Factor" ); + m_lateralSkinFactor.registerSetMethod( pipeProperties, &RimFishbonesPipeProperties::setSkinFactor ); + m_lateralSkinFactor.registerGetMethod( pipeProperties, &RimFishbonesPipeProperties::skinFactor ); + CAF_PDM_InitFieldNoDefault( &m_pipeProperties, "PipeProperties", "Pipe Properties" ); m_pipeProperties.uiCapability()->setUiTreeChildrenHidden( true ); - - m_pipeProperties = new RimFishbonesPipeProperties; + m_pipeProperties = pipeProperties; m_rigFishbonesGeometry = std::make_unique( this ); setDeletable( true ); @@ -171,6 +167,15 @@ void RimFishbones::setMeasuredDepthAndCount( double startMD, double spacing, int computeRotationAngles(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFishbones::setValveLocations( const std::vector& measuredDepths ) +{ + m_valveLocations->setLocationType( RimMultipleValveLocations::VALVE_CUSTOM ); + m_valveLocations->setValveLocations( measuredDepths ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -196,7 +201,7 @@ double RimFishbones::measuredDepth( size_t subIndex ) const //-------------------------------------------------------------------------------------------------- double RimFishbones::rotationAngle( size_t index ) const { - if ( m_subsOrientationMode == FB_LATERAL_ORIENTATION_FIXED ) + if ( m_subsOrientationMode == RimFishbonesDefines::LateralsOrientationType::FIXED ) { return m_fixedInstallationRotationAngle; } @@ -368,9 +373,6 @@ void RimFishbones::geometryUpdated() computeRotationAngles(); computeSubLateralIndices(); - auto collection = firstAncestorOrThisOfTypeAsserted(); - collection->recalculateStartMD(); - RimProject* proj = RimProject::current(); proj->reloadCompletionTypeResultsInAllViews(); } @@ -610,7 +612,7 @@ void RimFishbones::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& u lateralConfigGroup->add( &m_lateralBuildAngle ); lateralConfigGroup->add( &m_subsOrientationMode ); - if ( m_subsOrientationMode == FB_LATERAL_ORIENTATION_FIXED ) + if ( m_subsOrientationMode == RimFishbonesDefines::LateralsOrientationType::FIXED ) { lateralConfigGroup->add( &m_fixedInstallationRotationAngle ); } @@ -621,7 +623,8 @@ void RimFishbones::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& u { caf::PdmUiGroup* wellGroup = uiOrdering.addNewGroup( "Lateral Properties" ); - m_pipeProperties->uiOrdering( uiConfigName, *wellGroup ); + wellGroup->add( &m_lateralDiameter ); + wellGroup->add( &m_lateralSkinFactor ); } { @@ -722,7 +725,10 @@ void RimFishbones::computeSubLateralIndices() //-------------------------------------------------------------------------------------------------- void RimFishbones::initialiseObsoleteFields() { - CAF_PDM_InitField( &m_subsLocationMode_OBSOLETE, "SubsLocationMode", caf::AppEnum( FB_SUB_UNDEFINED ), "Location Defined By" ); + CAF_PDM_InitField( &m_subsLocationMode_OBSOLETE, + "SubsLocationMode", + caf::AppEnum( RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_UNDEFINED ), + "Location Defined By" ); m_subsLocationMode_OBSOLETE.xmlCapability()->setIOWritable( false ); CAF_PDM_InitField( &m_rangeStart_OBSOLETE, "RangeStart", std::numeric_limits::infinity(), "Start MD [m]" ); @@ -747,15 +753,15 @@ void RimFishbones::initialiseObsoleteFields() void RimFishbones::initValveLocationFromLegacyData() { RimMultipleValveLocations::LocationType locationType = RimMultipleValveLocations::VALVE_UNDEFINED; - if ( m_subsLocationMode_OBSOLETE() == FB_SUB_COUNT_END ) + if ( m_subsLocationMode_OBSOLETE() == RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_COUNT_END ) { locationType = RimMultipleValveLocations::VALVE_COUNT; } - else if ( m_subsLocationMode_OBSOLETE() == FB_SUB_SPACING_END ) + else if ( m_subsLocationMode_OBSOLETE() == RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_SPACING_END ) { locationType = RimMultipleValveLocations::VALVE_SPACING; } - else if ( m_subsLocationMode_OBSOLETE() == FB_SUB_USER_DEFINED ) + else if ( m_subsLocationMode_OBSOLETE() == RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_USER_DEFINED ) { locationType = RimMultipleValveLocations::VALVE_CUSTOM; } diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.h b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.h index 914be4cc72..3e4f9e77ce 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.h +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbones.h @@ -22,6 +22,7 @@ #include "Rim3dPropertiesInterface.h" #include "RimCheckableNamedObject.h" +#include "RimFishbonesDefines.h" #include "RimWellPathComponentInterface.h" #include "cvfColor3.h" @@ -50,20 +51,6 @@ class RimFishbones : public caf::PdmObject, public Rim3dPropertiesInterface, pub public: using SubAndLateralIndex = std::pair; - enum LocationType - { - FB_SUB_COUNT_END, - FB_SUB_SPACING_END, - FB_SUB_USER_DEFINED, - FB_SUB_UNDEFINED - }; - - enum LateralsOrientationType - { - FB_LATERAL_ORIENTATION_FIXED, - FB_LATERAL_ORIENTATION_RANDOM - }; - public: RimFishbones(); ~RimFishbones() override; @@ -72,6 +59,7 @@ public: QString generatedName() const; void setMeasuredDepthAndCount( double startMD, double spacing, int subCount ); + void setValveLocations( const std::vector& measuredDepths ); void setSystemParameters( int lateralsPerSub, double lateralLength, double holeDiameter, double buildAngle, int icdsPerSub ); @@ -153,24 +141,27 @@ private: caf::PdmField m_icdOrificeDiameter; caf::PdmField m_icdFlowCoefficient; - caf::PdmChildField m_valveLocations; - caf::PdmField> m_subsOrientationMode; + caf::PdmChildField m_valveLocations; + caf::PdmField> m_subsOrientationMode; caf::PdmField> m_installationRotationAngles; caf::PdmField m_fixedInstallationRotationAngle; caf::PdmChildField m_pipeProperties; + caf::PdmProxyValueField m_lateralDiameter; + caf::PdmProxyValueField m_lateralSkinFactor; + caf::PdmField m_randomSeed; std::unique_ptr m_rigFishbonesGeometry; std::vector m_subLateralIndices; // Moved to RimMultipleValveLocations - caf::PdmField> m_subsLocationMode_OBSOLETE; - caf::PdmField m_rangeStart_OBSOLETE; - caf::PdmField m_rangeEnd_OBSOLETE; - caf::PdmField m_rangeSubSpacing_OBSOLETE; - caf::PdmField m_rangeSubCount_OBSOLETE; - caf::PdmField> m_locationOfSubs_OBSOLETE; // Given in measured depth + caf::PdmField> m_subsLocationMode_OBSOLETE; + caf::PdmField m_rangeStart_OBSOLETE; + caf::PdmField m_rangeEnd_OBSOLETE; + caf::PdmField m_rangeSubSpacing_OBSOLETE; + caf::PdmField m_rangeSubCount_OBSOLETE; + caf::PdmField> m_locationOfSubs_OBSOLETE; // Given in measured depth }; diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp index cb3782aff9..b57c96f282 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.cpp @@ -28,6 +28,9 @@ #include "RimProject.h" #include "RimWellPath.h" +#include "cafPdmFieldScriptingCapability.h" +#include "cafPdmObjectScriptingCapability.h" + #include #include @@ -40,17 +43,22 @@ CAF_PDM_SOURCE_INIT( RimFishbonesCollection, "FishbonesCollection" ); //-------------------------------------------------------------------------------------------------- RimFishbonesCollection::RimFishbonesCollection() { - CAF_PDM_InitObject( "Fishbones", ":/FishBones16x16.png" ); + CAF_PDM_InitScriptableObjectWithNameAndComment( "Fishbones", ":/FishBones16x16.png", "", "", "FishbonesCollection", "" ); nameField()->uiCapability()->setUiHidden( true ); setName( "Fishbones" ); - CAF_PDM_InitFieldNoDefault( &m_fishbones, "FishbonesSubs", "fishbonesSubs" ); + CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_fishbones, "FishbonesSubs", "fishbones", "fishbonesSubs" ); - CAF_PDM_InitField( &m_startMD, "StartMD", HUGE_VAL, "Start MD" ); - CAF_PDM_InitField( &m_mainBoreDiameter, "MainBoreDiameter", 0.216, "Main Bore Diameter" ); - CAF_PDM_InitField( &m_skinFactor, "MainBoreSkinFactor", 0., "Main Bore Skin Factor [0..1]" ); - manuallyModifiedStartMD = false; + // The following non-scriptable fields can be modified from scripting functions in RimcFishbonesCollection.cpp + CAF_PDM_InitField( &m_startMDAuto, "StartMDAuto", RimFishbonesDefines::ValueSource::AUTOMATIC, "Start MD Mode" ); + CAF_PDM_InitField( &m_startMD, "StartMD", 0.0, "Start [MD]" ); + + CAF_PDM_InitField( &m_endMDAuto, "EndMDAuto", RimFishbonesDefines::ValueSource::AUTOMATIC, "End MD Mode" ); + CAF_PDM_InitField( &m_endMD, "EndMD", 0.0, "End [MD]" ); + + CAF_PDM_InitScriptableField( &m_mainBoreDiameter, "MainBoreDiameter", 0.216, "Main Bore Diameter" ); + CAF_PDM_InitScriptableField( &m_skinFactor, "MainBoreSkinFactor", 0., "Main Bore Skin Factor" ); } //-------------------------------------------------------------------------------------------------- @@ -58,11 +66,6 @@ RimFishbonesCollection::RimFishbonesCollection() //-------------------------------------------------------------------------------------------------- void RimFishbonesCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) { - if ( changedField == &m_startMD ) - { - manuallyModifiedStartMD = true; - } - RimProject* proj = RimProject::current(); if ( changedField == &m_isChecked ) { @@ -79,31 +82,61 @@ void RimFishbonesCollection::fieldChangedByUi( const caf::PdmFieldHandle* change //-------------------------------------------------------------------------------------------------- void RimFishbonesCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { + computeStartAndEndLocation(); + + if ( auto wellPath = firstAncestorOrThisOfType() ) { - auto wellPath = firstAncestorOrThisOfType(); - if ( wellPath ) + if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC ) { - if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_METRIC ) - { - m_startMD.uiCapability()->setUiName( "Start MD [m]" ); - m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [m]" ); - } - else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD ) - { - m_startMD.uiCapability()->setUiName( "Start MD [ft]" ); - m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [ft]" ); - } + m_startMD.uiCapability()->setUiName( " Start [MD m]" ); + m_endMD.uiCapability()->setUiName( " End [MD m]" ); + m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [m]" ); + } + else if ( wellPath->unitSystem() == RiaDefines::EclipseUnitSystem::UNITS_FIELD ) + { + m_startMD.uiCapability()->setUiName( " Start [MD ft]" ); + m_endMD.uiCapability()->setUiName( " End [MD ft]" ); + m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [ft]" ); } } - caf::PdmUiGroup* wellGroup = uiOrdering.addNewGroup( "Fishbone Well Properties" ); + caf::PdmUiGroup* wellGroup = uiOrdering.addNewGroup( "Mainbore Well Properties" ); + wellGroup->add( &m_startMDAuto ); wellGroup->add( &m_startMD ); + m_startMD.uiCapability()->setUiReadOnly( m_startMDAuto == RimFishbonesDefines::ValueSource::AUTOMATIC ); + + wellGroup->add( &m_endMDAuto ); + wellGroup->add( &m_endMD ); + m_endMD.uiCapability()->setUiReadOnly( m_endMDAuto == RimFishbonesDefines::ValueSource::AUTOMATIC ); + wellGroup->add( &m_mainBoreDiameter ); wellGroup->add( &m_skinFactor ); uiOrdering.skipRemainingFields( true ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFishbonesCollection::initAfterRead() +{ + if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2024.12.2" ) ) + { + double epsilon = 1.0; + if ( std::fabs( calculateStartMD() - m_startMD() ) > epsilon ) + { + m_startMDAuto = RimFishbonesDefines::ValueSource::FIXED; + } + + if ( std::fabs( calculateEndMD() - m_endMD() ) > epsilon ) + { + m_endMDAuto = RimFishbonesDefines::ValueSource::FIXED; + } + } + + computeStartAndEndLocation(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -114,6 +147,39 @@ void RimFishbonesCollection::appendFishbonesSubs( RimFishbones* subs ) subs->setUnitSystemSpecificDefaults(); subs->recomputeLateralLocations(); + + computeStartAndEndLocation(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFishbones* RimFishbonesCollection::appendFishbonesSubsAtLocations( const std::vector& subLocations, + RimFishbonesDefines::DrillingType drillingType ) +{ + auto* obj = new RimFishbones; + obj->setValveLocations( subLocations ); + + RimFishbonesDefines::RicFishbonesSystemParameters customParameters = RimFishbonesDefines::drillingStandardParameters(); + + if ( drillingType == RimFishbonesDefines::DrillingType::EXTENDED ) + { + customParameters = RimFishbonesDefines::drillingExtendedParameters(); + } + else if ( drillingType == RimFishbonesDefines::DrillingType::ACID_JETTING ) + { + customParameters = RimFishbonesDefines::acidJettingParameters(); + } + + obj->setSystemParameters( customParameters.lateralsPerSub, + customParameters.lateralLength, + customParameters.holeDiameter, + customParameters.buildAngle, + customParameters.icdsPerSub ); + + appendFishbonesSubs( obj ); + + return obj; } //-------------------------------------------------------------------------------------------------- @@ -153,6 +219,24 @@ std::vector RimFishbonesCollection::allFishbonesSubs() const return m_fishbones.childrenByType(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFishbonesCollection::setFixedStartMD( double startMD ) +{ + m_startMD = startMD; + m_startMDAuto = RimFishbonesDefines::ValueSource::FIXED; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFishbonesCollection::setFixedEndMD( double endMD ) +{ + m_endMD = endMD; + m_endMDAuto = RimFishbonesDefines::ValueSource::FIXED; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -188,7 +272,7 @@ cvf::Color3f RimFishbonesCollection::nextFishbonesColor() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimFishbonesCollection::recalculateStartMD() +double RimFishbonesCollection::calculateStartMD() const { double minStartMD = HUGE_VAL; @@ -200,10 +284,22 @@ void RimFishbonesCollection::recalculateStartMD() } } - if ( !manuallyModifiedStartMD || minStartMD < m_startMD() ) + return minStartMD; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimFishbonesCollection::calculateEndMD() const +{ + double value = -HUGE_VAL; + + for ( const RimFishbones* sub : m_fishbones() ) { - m_startMD = minStartMD; + value = std::max( value, sub->endMD() ); } + + return value; } //-------------------------------------------------------------------------------------------------- @@ -219,14 +315,15 @@ double RimFishbonesCollection::startMD() const //-------------------------------------------------------------------------------------------------- double RimFishbonesCollection::endMD() const { - double endMD = m_startMD; - if ( !m_fishbones.empty() ) - { - auto lastFishbone = m_fishbones.childrenByType().back(); - CVF_ASSERT( lastFishbone ); - endMD = lastFishbone->endMD(); - } - return endMD; + return m_endMD; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimFishbonesCollection::mainBoreSkinFactor() const +{ + return m_skinFactor; } //-------------------------------------------------------------------------------------------------- @@ -264,3 +361,19 @@ void RimFishbonesCollection::setUnitSystemSpecificDefaults() } } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFishbonesCollection::computeStartAndEndLocation() +{ + if ( m_startMDAuto() == RimFishbonesDefines::ValueSource::AUTOMATIC ) + { + m_startMD = calculateStartMD(); + } + + if ( m_endMDAuto() == RimFishbonesDefines::ValueSource::AUTOMATIC ) + { + m_endMD = calculateEndMD(); + } +} diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.h b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.h index dc093f8e2b..925fdbd3aa 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesCollection.h @@ -22,6 +22,9 @@ #include "RiaDefines.h" +#include "RimFishbonesDefines.h" + +#include "cafAppEnum.h" #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" #include "cafPdmFieldCvfColor.h" @@ -42,31 +45,43 @@ class RimFishbonesCollection : public RimCheckableNamedObject public: RimFishbonesCollection(); - void appendFishbonesSubs( RimFishbones* subs ); + void appendFishbonesSubs( RimFishbones* subs ); + RimFishbones* appendFishbonesSubsAtLocations( const std::vector& subLocations, RimFishbonesDefines::DrillingType drillingType ); + void setFixedStartMD( double startMD ); + void setFixedEndMD( double endMD ); + + void setUnitSystemSpecificDefaults(); + void computeStartAndEndLocation(); bool hasFishbones() const; std::vector activeFishbonesSubs() const; std::vector allFishbonesSubs() const; - void recalculateStartMD(); double startMD() const; double endMD() const; - double mainBoreSkinFactor() const { return m_skinFactor; } + + double mainBoreSkinFactor() const; double mainBoreDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const; - void setUnitSystemSpecificDefaults(); protected: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void initAfterRead() override; private: cvf::Color3f nextFishbonesColor() const; + double calculateStartMD() const; + double calculateEndMD() const; private: caf::PdmChildArrayField m_fishbones; + caf::PdmField> m_startMDAuto; + caf::PdmField> m_endMDAuto; + caf::PdmField m_startMD; + caf::PdmField m_endMD; + caf::PdmField m_skinFactor; caf::PdmField m_mainBoreDiameter; - bool manuallyModifiedStartMD; }; diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesDefines.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesDefines.cpp new file mode 100644 index 0000000000..8f26df57cb --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesDefines.cpp @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimFishbonesDefines.h" + +#include "cafAppEnum.h" + +namespace caf +{ +template <> +void AppEnum::setUp() +{ + addItem( RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_COUNT_END, "FB_SUB_COUNT", "Start/End/Number of Subs" ); + addItem( RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_SPACING_END, "FB_SUB_SPACING", "Start/End/Spacing" ); + addItem( RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_USER_DEFINED, "FB_SUB_CUSTOM", "User Specification" ); + setDefault( RimFishbonesDefines::LocationType_OBSOLETE::FB_SUB_COUNT_END ); +} + +template <> +void AppEnum::setUp() +{ + addItem( RimFishbonesDefines::LateralsOrientationType::FIXED, "FIXED", "Fixed Angle", { "FB_LATERAL_ORIENTATION_FIXED" } ); + addItem( RimFishbonesDefines::LateralsOrientationType::RANDOM, "RANDOM", "Random Angle", { "FB_LATERAL_ORIENTATION_RANDOM" } ); + setDefault( RimFishbonesDefines::LateralsOrientationType::RANDOM ); +} + +template <> +void AppEnum::setUp() +{ + addItem( RimFishbonesDefines::DrillingType::STANDARD, "STANDARD", "Standard Drilling" ); + addItem( RimFishbonesDefines::DrillingType::EXTENDED, "EXTENDED", "Extended Drilling" ); + addItem( RimFishbonesDefines::DrillingType::ACID_JETTING, "ACID_JETTING", "Acid Jetting" ); + setDefault( RimFishbonesDefines::DrillingType::STANDARD ); +} + +template <> +void caf::AppEnum::setUp() +{ + addItem( RimFishbonesDefines::ValueSource::AUTOMATIC, "AUTOMATIC", "Automatic" ); + addItem( RimFishbonesDefines::ValueSource::FIXED, "FIXED", "Fixed" ); + + setDefault( RimFishbonesDefines::ValueSource::AUTOMATIC ); +} + +} // namespace caf + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFishbonesDefines::RicFishbonesSystemParameters RimFishbonesDefines::drillingStandardParameters() +{ + return { .lateralsPerSub = 3, .lateralLength = 11.0, .holeDiameter = 12.5, .buildAngle = 6.0, .icdsPerSub = 3 }; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFishbonesDefines::RicFishbonesSystemParameters RimFishbonesDefines::drillingExtendedParameters() +{ + return { .lateralsPerSub = 3, .lateralLength = 18.0, .holeDiameter = 12.5, .buildAngle = 4.0, .icdsPerSub = 3 }; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFishbonesDefines::RicFishbonesSystemParameters RimFishbonesDefines::acidJettingParameters() +{ + return { .lateralsPerSub = 4, .lateralLength = 12.0, .holeDiameter = 15.0, .buildAngle = 6.0, .icdsPerSub = 4 }; +} diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesDefines.h b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesDefines.h new file mode 100644 index 0000000000..519b71173f --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesDefines.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 Statoil 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +namespace RimFishbonesDefines +{ +enum class LocationType_OBSOLETE +{ + FB_SUB_COUNT_END, + FB_SUB_SPACING_END, + FB_SUB_USER_DEFINED, + FB_SUB_UNDEFINED +}; + +enum class LateralsOrientationType +{ + FIXED, + RANDOM +}; + +enum class DrillingType +{ + STANDARD, + EXTENDED, + ACID_JETTING +}; + +enum class ValueSource +{ + AUTOMATIC, + FIXED +}; + +struct RicFishbonesSystemParameters +{ + int lateralsPerSub; + double lateralLength; + double holeDiameter; + double buildAngle; + int icdsPerSub; +}; + +RicFishbonesSystemParameters drillingStandardParameters(); +RicFishbonesSystemParameters drillingExtendedParameters(); +RicFishbonesSystemParameters acidJettingParameters(); + +} // namespace RimFishbonesDefines diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.cpp index d75c0e8b45..e9d784f512 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.cpp @@ -34,24 +34,33 @@ RimFishbonesPipeProperties::RimFishbonesPipeProperties() CAF_PDM_InitObject( "FishbonesPipeProperties" ); CAF_PDM_InitField( &m_lateralHoleDiameter, "LateralHoleDiameter", 12.5, "Hole Diameter [mm]" ); - CAF_PDM_InitField( &m_skinFactor, "SkinFactor", 0.0, "Skin Factor [0..1]" ); + CAF_PDM_InitField( &m_skinFactor, "SkinFactor", 0.0, "Skin Factor" ); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimFishbonesPipeProperties::~RimFishbonesPipeProperties() -{ -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimFishbonesPipeProperties::setHoleDiameter( double diameter ) +void RimFishbonesPipeProperties::setHoleDiameter( const double& diameter ) { m_lateralHoleDiameter = diameter; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimFishbonesPipeProperties::skinFactor() const +{ + return m_skinFactor(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFishbonesPipeProperties::setSkinFactor( const double& skinFactor ) +{ + m_skinFactor = skinFactor; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -84,6 +93,14 @@ double RimFishbonesPipeProperties::holeDiameter( RiaDefines::EclipseUnitSystem u return 0.0; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimFishbonesPipeProperties::holeDiameter() const +{ + return m_lateralHoleDiameter(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.h b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.h index 2e5e78c1ab..5e031d3b2b 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.h +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFishbonesPipeProperties.h @@ -39,11 +39,12 @@ class RimFishbonesPipeProperties : public caf::PdmObject public: RimFishbonesPipeProperties(); - ~RimFishbonesPipeProperties() override; - void setHoleDiameter( double diameter ); + double skinFactor() const; + void setSkinFactor( const double& skinFactor ); - double skinFactor() const { return m_skinFactor(); } + void setHoleDiameter( const double& diameter ); + double holeDiameter() const; double holeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const; void setUnitSystemSpecificDefaults(); diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.cpp index f6105c9a28..e03fa1ef93 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.cpp @@ -113,11 +113,19 @@ double RimMultipleValveLocations::rangeEnd() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const std::vector& RimMultipleValveLocations::valveLocations() const +std::vector RimMultipleValveLocations::valveLocations() const { return m_locationOfValves(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimMultipleValveLocations::setValveLocations( const std::vector& locations ) +{ + m_locationOfValves = locations; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.h b/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.h index c91ec00225..4ec0c000f3 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.h +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimMultipleValveLocations.h @@ -38,11 +38,13 @@ public: public: RimMultipleValveLocations(); - void perforationIntervalUpdated(); - double measuredDepth( size_t valveIndex ) const; - double rangeStart() const; - double rangeEnd() const; - const std::vector& valveLocations() const; + void perforationIntervalUpdated(); + double measuredDepth( size_t valveIndex ) const; + double rangeStart() const; + double rangeEnd() const; + + std::vector valveLocations() const; + void setValveLocations( const std::vector& locations ); void setLocationType( LocationType locationType ); void computeRangesAndLocations(); diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFracture.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFracture.cpp deleted file mode 100644 index c027cac759..0000000000 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFracture.cpp +++ /dev/null @@ -1,368 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2016- Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RimSimWellFracture.h" - -#include "RigCell.h" -#include "RigMainGrid.h" -#include "Well/RigSimWellData.h" -#include "Well/RigSimulationWellCenterLineCalculator.h" -#include "Well/RigWellPath.h" -#include "Well/RigWellResultPoint.h" - -#include "RimEclipseView.h" -#include "RimEllipseFractureTemplate.h" -#include "RimFracture.h" -#include "RimFractureTemplate.h" -#include "RimProject.h" -#include "RimSimWellInView.h" - -#include "cafPdmUiDoubleSliderEditor.h" - -CAF_PDM_SOURCE_INIT( RimSimWellFracture, "SimWellFracture" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimSimWellFracture::RimSimWellFracture() -{ - CAF_PDM_InitObject( "SimWellFracture", ":/FractureSymbol16x16.png" ); - - CAF_PDM_InitField( &m_location, "MeasuredDepth", 0.0f, "Pseudo Length Location" ); - m_location.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); - - CAF_PDM_InitFieldNoDefault( &m_displayIJK, "Cell_IJK", "Cell IJK" ); - m_displayIJK.registerGetMethod( this, &RimSimWellFracture::createOneBasedIJKText ); - m_displayIJK.uiCapability()->setUiReadOnly( true ); - m_displayIJK.xmlCapability()->disableIO(); - - CAF_PDM_InitField( &m_branchIndex, "Branch", 0, "Branch" ); - - setDeletable( true ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimSimWellFracture::~RimSimWellFracture() -{ -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::setClosestWellCoord( cvf::Vec3d& position, size_t branchIndex ) -{ - computeSimWellBranchesIfRequired(); - - double location = m_branchCenterLines[branchIndex].locationAlongWellCoords( position ); - - m_branchIndex = static_cast( branchIndex ); - - m_location = location; - updateFracturePositionFromLocation(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle() -{ - computeSimWellBranchesIfRequired(); - - if ( !fractureTemplate() ) return; - - if ( fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH || - fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH ) - { - double simWellAzimuth = wellAzimuthAtFracturePosition(); - - if ( fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH ) - { - m_azimuth = simWellAzimuth; - } - else if ( fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH ) - { - if ( simWellAzimuth + 90 < 360 ) - m_azimuth = simWellAzimuth + 90; - else - m_azimuth = simWellAzimuth - 90; - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -double RimSimWellFracture::wellAzimuthAtFracturePosition() const -{ - double simWellAzimuth = m_branchCenterLines[m_branchIndex].simWellAzimuthAngle( fracturePosition() ); - if ( simWellAzimuth < 0 ) simWellAzimuth += 360; - - return simWellAzimuth; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::loadDataAndUpdate() -{ - computeSimWellBranchCenterLines(); - updateFracturePositionFromLocation(); - updateAzimuthBasedOnWellAzimuthAngle(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RimSimWellFracture::perforationLengthCenterLineCoords() const -{ - std::vector coords; - - if ( !m_branchCenterLines.empty() && m_branchIndex < static_cast( m_branchCenterLines.size() ) ) - { - RigWellPath wellPathGeometry( m_branchCenterLines[m_branchIndex].wellPathPoints(), - m_branchCenterLines[m_branchIndex].measuredDepths() ); - - double startMd = m_location - perforationLength() / 2.0; - double endMd = m_location + perforationLength() / 2.0; - - coords = wellPathGeometry.clippedPointSubset( startMd, endMd ).first; - } - - return coords; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RimSimWellFracture::isEnabled() const -{ - return isChecked(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::applyOffset( double offsetMD ) -{ - m_location = m_location + offsetMD; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) -{ - RimFracture::fieldChangedByUi( changedField, oldValue, newValue ); - - if ( changedField == &m_location || changedField == &m_branchIndex ) - { - updateFracturePositionFromLocation(); - - RimFractureTemplate::FracOrientationEnum orientation; - if ( fractureTemplate() ) - orientation = fractureTemplate()->orientationType(); - else - orientation = RimFractureTemplate::AZIMUTH; - - if ( orientation != RimFractureTemplate::AZIMUTH ) - { - updateAzimuthBasedOnWellAzimuthAngle(); - } - - RimProject* proj = RimProject::current(); - if ( proj ) proj->reloadCompletionTypeResultsInAllViews(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::recomputeWellCenterlineCoordinates() -{ - m_branchCenterLines.clear(); - - computeSimWellBranchesIfRequired(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::updateFracturePositionFromLocation() -{ - computeSimWellBranchesIfRequired(); - - if ( !m_branchCenterLines.empty() ) - { - cvf::Vec3d interpolated = m_branchCenterLines[m_branchIndex()].interpolatedPointAlongWellPath( m_location() ); - - setAnchorPosition( interpolated ); - - RimProject* proj = RimProject::current(); - if ( proj ) proj->scheduleCreateDisplayModelAndRedrawAllViews(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) -{ - RimFracture::defineUiOrdering( uiConfigName, uiOrdering ); - - uiOrdering.add( nameField() ); - uiOrdering.add( &m_fractureTemplate ); - - caf::PdmUiGroup* locationGroup = uiOrdering.addNewGroup( "Location / Orientation" ); - locationGroup->add( &m_location ); - locationGroup->add( &m_branchIndex ); - locationGroup->add( &m_azimuth ); - locationGroup->add( &m_uiWellPathAzimuth ); - locationGroup->add( &m_uiWellFractureAzimuthDiff ); - locationGroup->add( &m_wellFractureAzimuthAngleWarning ); - locationGroup->add( &m_dip ); - locationGroup->add( &m_tilt ); - - caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup( "Properties" ); - propertyGroup->add( &m_fractureUnit ); - propertyGroup->add( &m_stimPlanTimeIndexToPlot ); - propertyGroup->add( &m_perforationLength ); - propertyGroup->add( &m_perforationEfficiency ); - propertyGroup->add( &m_wellDiameter ); - - caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup( "Fracture Center Info" ); - fractureCenterGroup->add( &m_uiAnchorPosition ); - fractureCenterGroup->add( &m_displayIJK ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) -{ - RimFracture::defineEditorAttribute( field, uiConfigName, attribute ); - - if ( field == &m_location ) - { - caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast( attribute ); - - if ( myAttr ) - { - computeSimWellBranchesIfRequired(); - - if ( !m_branchCenterLines.empty() ) - { - const RigSimulationWellCoordsAndMD& pointAndMd = m_branchCenterLines[m_branchIndex]; - - myAttr->m_minimum = pointAndMd.measuredDepths().front(); - myAttr->m_maximum = pointAndMd.measuredDepths().back(); - myAttr->m_sliderTickCount = pointAndMd.measuredDepths().back(); - } - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RimSimWellFracture::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) -{ - QList options = RimFracture::calculateValueOptions( fieldNeedingOptions ); - - if ( fieldNeedingOptions == &m_branchIndex ) - { - if ( m_branchCenterLines.empty() ) - { - computeSimWellBranchesIfRequired(); - } - - if ( !m_branchCenterLines.empty() ) - { - size_t branchCount = m_branchCenterLines.size(); - - for ( size_t bIdx = 0; bIdx < branchCount; ++bIdx ) - { - // Use 1-based index in UI - options.push_back( caf::PdmOptionItemInfo( QString::number( bIdx + 1 ), QVariant::fromValue( bIdx ) ) ); - } - } - } - - return options; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigMainGrid* RimSimWellFracture::ownerCaseMainGrid() const -{ - auto ownerEclView = firstAncestorOrThisOfType(); - if ( ownerEclView ) - return ownerEclView->mainGrid(); - else - return nullptr; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::computeSimWellBranchesIfRequired() -{ - if ( m_branchCenterLines.empty() ) - { - computeSimWellBranchCenterLines(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSimWellFracture::computeSimWellBranchCenterLines() -{ - m_branchCenterLines.clear(); - - auto rimWell = firstAncestorOrThisOfTypeAsserted(); - const auto simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( rimWell ); - for ( const auto& [coords, wellCells] : simWellBranches ) - { - RigSimulationWellCoordsAndMD wellPathWithMD( coords ); - - m_branchCenterLines.push_back( wellPathWithMD ); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QString RimSimWellFracture::createOneBasedIJKText() const -{ - RigMainGrid* mainGrid = ownerCaseMainGrid(); - size_t i, j, k; - size_t anchorCellIdx = mainGrid->findReservoirCellIndexFromPoint( anchorPosition() ); - - if ( anchorCellIdx == cvf::UNDEFINED_SIZE_T ) return ""; - - size_t gridLocalCellIdx; - const RigGridBase* hostGrid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( anchorCellIdx, &gridLocalCellIdx ); - - bool ok = hostGrid->ijkFromCellIndex( gridLocalCellIdx, &i, &j, &k ); - if ( !ok ) return ""; - - return QString( "Grid %1: [%2, %3, %4]" ).arg( QString::fromStdString( hostGrid->gridName() ) ).arg( i + 1 ).arg( j + 1 ).arg( k + 1 ); -} diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFracture.h b/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFracture.h deleted file mode 100644 index 15ce4e70c7..0000000000 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFracture.h +++ /dev/null @@ -1,76 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2016- Statoil 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "RimFracture.h" - -#include "Well/RigSimulationWellCoordsAndMD.h" - -#include "RimEllipseFractureTemplate.h" - -//================================================================================================== -/// -/// -//================================================================================================== -class RimSimWellFracture : public RimFracture -{ - CAF_PDM_HEADER_INIT; - -public: - RimSimWellFracture(); - ~RimSimWellFracture() override; - - void setClosestWellCoord( cvf::Vec3d& position, size_t branchIndex ); - - void recomputeWellCenterlineCoordinates(); - void updateFracturePositionFromLocation(); - void updateAzimuthBasedOnWellAzimuthAngle() override; - - double wellAzimuthAtFracturePosition() const override; - double fractureMD() const override { return m_location; } - - int branchIndex() const { return m_branchIndex(); } - - void loadDataAndUpdate() override; - - std::vector perforationLengthCenterLineCoords() const override; - - bool isEnabled() const override; // RimWellPathCompletionsInterface override - - void applyOffset( double offsetMD ) override; - -protected: - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; - -private: - RigMainGrid* ownerCaseMainGrid() const; - void computeSimWellBranchesIfRequired(); - void computeSimWellBranchCenterLines(); - QString createOneBasedIJKText() const; - -private: - caf::PdmField m_location; - caf::PdmField m_branchIndex; - std::vector m_branchCenterLines; - - caf::PdmProxyValueField m_displayIJK; -}; diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp index d0adb6a1eb..48e518ce0f 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimWellPathCompletions.cpp @@ -56,7 +56,7 @@ RimWellPathCompletions::RimWellPathCompletions() CAF_PDM_InitScriptableFieldNoDefault( &m_perforationCollection, "Perforations", "Perforations" ); m_perforationCollection = new RimPerforationCollection; - CAF_PDM_InitFieldNoDefault( &m_fishbonesCollection, "Fishbones", "Fishbones" ); + CAF_PDM_InitScriptableFieldNoDefault( &m_fishbonesCollection, "Fishbones", "Fishbones" ); m_fishbonesCollection = new RimFishbonesCollection; CAF_PDM_InitFieldNoDefault( &m_fractureCollection, "Fractures", "Fractures" ); diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/ContourMap/CMakeLists_files.cmake new file mode 100644 index 0000000000..fd4ce48d60 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/CMakeLists_files.cmake @@ -0,0 +1,25 @@ +set(SOURCE_GROUP_HEADER_FILES + ${CMAKE_CURRENT_LIST_DIR}/RimContourMapResolutionTools.h + ${CMAKE_CURRENT_LIST_DIR}/RimContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapView.h + ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapViewCollection.h + ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMap.h + ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapView.h +) + +set(SOURCE_GROUP_SOURCE_FILES + ${CMAKE_CURRENT_LIST_DIR}/RimContourMapResolutionTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapView.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimEclipseContourMapViewCollection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMap.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimStatisticsContourMapView.cpp +) + +list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) + +list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) diff --git a/ApplicationLibCode/ProjectDataModel/RimContourMapProjection.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.cpp similarity index 72% rename from ApplicationLibCode/ProjectDataModel/RimContourMapProjection.cpp rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.cpp index 45d86a5cd8..a078e47b19 100644 --- a/ApplicationLibCode/ProjectDataModel/RimContourMapProjection.cpp +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.cpp @@ -18,10 +18,11 @@ #include "RimContourMapProjection.h" -#include "RigContourMapCalculator.h" -#include "RigContourMapGrid.h" -#include "RigContourMapProjection.h" -#include "RigContourMapTrianglesGenerator.h" +#include "ContourMap/RigContourMapCalculator.h" +#include "ContourMap/RigContourMapGrid.h" +#include "ContourMap/RigContourMapProjection.h" +#include "ContourMap/RigContourMapTrianglesGenerator.h" +#include "RigFloodingSettings.h" #include "RimCase.h" #include "RimGridView.h" @@ -47,10 +48,13 @@ void RimContourMapProjection::ResultAggregation::setUp() addItem( RigContourMapCalculator::GAS_COLUMN, "GAS_COLUMN", "Gas Column" ); addItem( RigContourMapCalculator::HYDROCARBON_COLUMN, "HC_COLUMN", "Hydrocarbon Column" ); + addItem( RigContourMapCalculator::MOBILE_OIL_COLUMN, "MOBILE_OIL_COLUMN", "Mobile Oil Column" ); + addItem( RigContourMapCalculator::MOBILE_GAS_COLUMN, "MOBILE_GAS_COLUMN", "Mobile Gas Column" ); + addItem( RigContourMapCalculator::MOBILE_HYDROCARBON_COLUMN, "MOBILE_HC_COLUMN", "Mobile Hydrocarbon Column" ); + addItem( RigContourMapCalculator::MEAN, "MEAN_VALUE", "Arithmetic Mean" ); addItem( RigContourMapCalculator::HARMONIC_MEAN, "HARM_VALUE", "Harmonic Mean" ); addItem( RigContourMapCalculator::GEOMETRIC_MEAN, "GEOM_VALUE", "Geometric Mean" ); - addItem( RigContourMapCalculator::VOLUME_SUM, "VOLUME_SUM", "Volume Weighted Sum" ); addItem( RigContourMapCalculator::SUM, "SUM", "Sum" ); addItem( RigContourMapCalculator::TOP_VALUE, "TOP_VALUE", "Top Value" ); @@ -59,6 +63,15 @@ void RimContourMapProjection::ResultAggregation::setUp() setDefault( RigContourMapCalculator::MEAN ); } + +template <> +void RimContourMapProjection::FloodingType::setUp() +{ + addItem( RigFloodingSettings::FloodingType::WATER_FLOODING, "WATER_FLOODING", "Water Flooding" ); + addItem( RigFloodingSettings::FloodingType::GAS_FLOODING, "GAS_FLOODING", "Gas Flooding" ); + addItem( RigFloodingSettings::FloodingType::USER_DEFINED, "USER_DEFINED", "User Defined Value" ); +} + } // namespace caf CAF_PDM_ABSTRACT_SOURCE_INIT( RimContourMapProjection, "RimContourMapProjection" ); @@ -73,17 +86,37 @@ RimContourMapProjection::RimContourMapProjection() , m_maxResultAllTimeSteps( -std::numeric_limits::infinity() ) { - CAF_PDM_InitObject( "RimContourMapProjection", ":/2DMapProjection16x16.png" ); + CAF_PDM_InitObject( "Map Projection", ":/2DMapProjection16x16.png" ); - CAF_PDM_InitField( &m_relativeSampleSpacing, "SampleSpacing", 0.9, "Sample Spacing Factor" ); - m_relativeSampleSpacing.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + CAF_PDM_InitFieldNoDefault( &m_resolution, "Resolution", "Sampling Resolution" ); + m_resolution.setValue( RimContourMapResolutionTools::SamplingResolution::NORMAL ); CAF_PDM_InitFieldNoDefault( &m_resultAggregation, "ResultAggregation", "Result Aggregation" ); + CAF_PDM_InitFieldNoDefault( &m_oilFloodingType, "OilFloodingType", "Residual Oil Given By" ); + m_oilFloodingType.setValue( RigFloodingSettings::FloodingType::WATER_FLOODING ); + CAF_PDM_InitField( &m_userDefinedFloodingOil, "UserDefinedFloodingOil", 0.0, "" ); + m_userDefinedFloodingOil.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_gasFloodingType, "GasFloodingType", RigFloodingSettings::FloodingType::GAS_FLOODING, "Residual Oil-in-Gas Given By" ); + caf::AppEnum::setEnumSubset( &m_gasFloodingType, + { RigFloodingSettings::FloodingType::GAS_FLOODING, + RigFloodingSettings::FloodingType::USER_DEFINED } ); + + CAF_PDM_InitField( &m_userDefinedFloodingGas, "UserDefinedFloodingGas", 0.0, "" ); + m_userDefinedFloodingGas.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + CAF_PDM_InitField( &m_showContourLines, "ContourLines", true, "Show Contour Lines" ); CAF_PDM_InitField( &m_showContourLabels, "ContourLabels", true, "Show Contour Labels" ); CAF_PDM_InitField( &m_smoothContourLines, "SmoothContourLines", true, "Smooth Contour Lines" ); + auto defaultValue = caf::AppEnum( RimIntersectionFilterEnum::INTERSECT_FILTER_NONE ); + CAF_PDM_InitField( &m_valueFilterType, "ValueFilterType", defaultValue, "Value Filter" ); + CAF_PDM_InitField( &m_upperThreshold, "UpperThreshold", 0.0, "Upper Threshold" ); + m_upperThreshold.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + CAF_PDM_InitField( &m_lowerThreshold, "LowerThreshold", 0.0, "Lower Threshold" ); + m_lowerThreshold.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + setName( "Map Projection" ); nameField()->uiCapability()->setUiReadOnly( true ); } @@ -109,12 +142,12 @@ void RimContourMapProjection::generateResultsIfNecessary( int timeStep ) if ( gridMappingNeedsUpdating() || mapCellVisibilityNeedsUpdating( timeStep ) || resultVariableChanged() ) { clearResults(); - clearTimeStepRange(); + clearMinMaxValueRange(); if ( gridMappingNeedsUpdating() ) { m_contourMapProjection->setCellVisibility( getCellVisibility() ); - m_contourMapProjection->generateGridMapping( m_resultAggregation(), retrieveParameterWeights() ); + m_contourMapProjection->generateGridMapping( m_resultAggregation(), retrieveParameterWeights(), m_selectedKLayers, {} ); } progress.setProgress( 20 ); m_mapCellVisibility = m_contourMapProjection->getMapCellVisibility( timeStep, m_resultAggregation() ); @@ -146,6 +179,8 @@ void RimContourMapProjection::generateGeometryIfNecessary() if ( geometryNeedsUpdating() ) { + m_contourMapProjection->setValueFilter( valueFilterMinMax() ); + std::vector contourLevels; bool discrete = false; @@ -213,15 +248,7 @@ const std::vector& RimContourMapProjection::trianglesWithVertexValue //-------------------------------------------------------------------------------------------------- double RimContourMapProjection::sampleSpacingFactor() const { - return m_relativeSampleSpacing(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimContourMapProjection::setSampleSpacingFactor( double spacingFactor ) -{ - m_relativeSampleSpacing = spacingFactor; + return RimContourMapResolutionTools::resolutionFromEnumValue( m_resolution() ); } //-------------------------------------------------------------------------------------------------- @@ -286,6 +313,31 @@ const RigContourMapGrid* RimContourMapProjection::mapGrid() const return m_contourMapGrid.get(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::optional> RimContourMapProjection::valueFilterMinMax() const +{ + if ( m_valueFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_NONE ) return std::nullopt; + + double minimum = m_minResultAllTimeSteps; + double maximum = m_maxResultAllTimeSteps; + + if ( m_valueFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW || + m_valueFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN ) + { + maximum = m_upperThreshold; + } + + if ( m_valueFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE || + m_valueFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN ) + { + minimum = m_lowerThreshold; + } + + return std::pair( minimum, maximum ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -348,8 +400,8 @@ bool RimContourMapProjection::gridMappingNeedsUpdating() const if ( cellGridIdxVisibility.isNull() ) return true; cvf::ref currentVisibility = getCellVisibility(); + if ( currentVisibility->size() != cellGridIdxVisibility->size() ) return true; - CVF_ASSERT( currentVisibility->size() == cellGridIdxVisibility->size() ); for ( size_t i = 0; i < currentVisibility->size(); ++i ) { if ( ( *currentVisibility )[i] != ( *cellGridIdxVisibility )[i] ) return true; @@ -366,7 +418,7 @@ bool RimContourMapProjection::resultsNeedsUpdating( int timeStep ) const if ( !m_contourMapProjection ) return true; return ( m_contourMapProjection->aggregatedResults().size() != m_contourMapProjection->numberOfCells() || - m_contourMapProjection->aggregatedVertexResults().size() != m_contourMapProjection->numberOfVertices() || + m_contourMapProjection->aggregatedVertexResultsFiltered().size() != m_contourMapProjection->numberOfVertices() || timeStep != m_currentResultTimestep ); } @@ -384,7 +436,7 @@ bool RimContourMapProjection::geometryNeedsUpdating() const void RimContourMapProjection::clearGridMapping() { clearResults(); - clearTimeStepRange(); + clearMinMaxValueRange(); m_contourMapProjection.reset(); m_contourMapGrid.reset(); @@ -403,6 +455,8 @@ void RimContourMapProjection::clearResults() m_currentResultTimestep = -1; clearResultVariable(); + + clearMinMaxValueRange(); } //-------------------------------------------------------------------------------------------------- @@ -413,6 +467,21 @@ cvf::ref RimContourMapProjection::getCellVisibility() const return baseView()->currentTotalCellVisibility(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RimContourMapProjection::minmaxValuesAllTimeSteps() +{ + if ( !resultRangeIsValid() ) + { + const auto [minVal, maxVal] = computeMinMaxValuesAllTimeSteps(); + m_minResultAllTimeSteps = minVal; + m_maxResultAllTimeSteps = maxVal; + } + + return std::pair( m_minResultAllTimeSteps, m_maxResultAllTimeSteps ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -461,7 +530,8 @@ double RimContourMapProjection::gridEdgeOffset() const //-------------------------------------------------------------------------------------------------- void RimContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) { - if ( changedField == &m_resultAggregation ) + if ( ( changedField == &m_resultAggregation ) || ( changedField == &m_oilFloodingType ) || ( changedField == &m_gasFloodingType ) || + ( changedField == &m_userDefinedFloodingOil ) || ( changedField == &m_userDefinedFloodingGas ) ) { ResultAggregation previousAggregation = static_cast( oldValue.toInt() ); if ( RigContourMapCalculator::isStraightSummationResult( previousAggregation ) != isStraightSummationResult() ) @@ -472,23 +542,21 @@ void RimContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* chang { clearResults(); } - clearTimeStepRange(); + clearMinMaxValueRange(); } else if ( changedField == &m_smoothContourLines ) { clearGeometry(); } - else if ( changedField == &m_relativeSampleSpacing ) + else if ( changedField == &m_resolution ) { clearGridMapping(); clearResults(); - clearTimeStepRange(); + clearMinMaxValueRange(); } baseView()->updateConnectedEditors(); - - RimProject* proj = RimProject::current(); - proj->scheduleCreateDisplayModelAndRedrawAllViews(); + baseView()->scheduleCreateDisplayModelAndRedraw(); } //-------------------------------------------------------------------------------------------------- @@ -496,15 +564,22 @@ void RimContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* chang //-------------------------------------------------------------------------------------------------- void RimContourMapProjection::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) { - if ( &m_relativeSampleSpacing == field ) + if ( &m_lowerThreshold == field || &m_upperThreshold == field ) { - caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast( attribute ); - if ( myAttr ) + if ( auto myAttr = dynamic_cast( attribute ) ) { - myAttr->m_minimum = 0.2; - myAttr->m_maximum = 2.0; - myAttr->m_sliderTickCount = 9; - myAttr->m_delaySliderUpdateUntilRelease = true; + myAttr->m_minimum = m_minResultAllTimeSteps; + myAttr->m_maximum = m_maxResultAllTimeSteps; + myAttr->m_sliderTickCount = 20; + } + } + else if ( ( &m_userDefinedFloodingOil == field ) || ( &m_userDefinedFloodingGas == field ) ) + { + if ( auto myAttr = dynamic_cast( attribute ) ) + { + myAttr->m_minimum = 0.0; + myAttr->m_maximum = 1.0; + myAttr->m_sliderTickCount = 20; } } } @@ -516,13 +591,37 @@ void RimContourMapProjection::defineUiOrdering( QString uiConfigName, caf::PdmUi { caf::PdmUiGroup* mainGroup = uiOrdering.addNewGroup( "Projection Settings" ); mainGroup->add( &m_resultAggregation ); + + if ( RigContourMapCalculator::isMobileColumnResult( m_resultAggregation() ) ) + { + if ( m_resultAggregation() != RigContourMapCalculator::MOBILE_GAS_COLUMN ) + { + mainGroup->add( &m_oilFloodingType ); + if ( m_oilFloodingType() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + mainGroup->add( &m_userDefinedFloodingOil ); + } + } + if ( m_resultAggregation() != RigContourMapCalculator::MOBILE_OIL_COLUMN ) + { + mainGroup->add( &m_gasFloodingType ); + if ( m_gasFloodingType() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + mainGroup->add( &m_userDefinedFloodingGas ); + } + } + } + legendConfig()->uiOrdering( "NumLevelsOnly", *mainGroup ); - mainGroup->add( &m_relativeSampleSpacing ); + mainGroup->add( &m_resolution ); mainGroup->add( &m_showContourLines ); mainGroup->add( &m_showContourLabels ); m_showContourLabels.uiCapability()->setUiReadOnly( !m_showContourLines() ); mainGroup->add( &m_smoothContourLines ); m_smoothContourLines.uiCapability()->setUiReadOnly( !m_showContourLines() ); + + appendValueFilterGroup( uiOrdering ); + uiOrdering.skipRemainingFields( true ); } @@ -537,8 +636,34 @@ void RimContourMapProjection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimContourMapProjection::initAfterRead() +void RimContourMapProjection::appendValueFilterGroup( caf::PdmUiOrdering& uiOrdering ) { + auto valueFilterGroup = uiOrdering.addNewGroup( "Value Filter" ); + valueFilterGroup->add( &m_valueFilterType ); + + switch ( m_valueFilterType() ) + { + case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW: + m_upperThreshold.uiCapability()->setUiName( "Threshold" ); + valueFilterGroup->add( &m_upperThreshold ); + break; + + case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN: + m_lowerThreshold.uiCapability()->setUiName( "Lower Threshold" ); + valueFilterGroup->add( &m_lowerThreshold ); + m_upperThreshold.uiCapability()->setUiName( "Upper Threshold" ); + valueFilterGroup->add( &m_upperThreshold ); + break; + + case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE: + m_lowerThreshold.uiCapability()->setUiName( "Threshold" ); + valueFilterGroup->add( &m_lowerThreshold ); + break; + + case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE: + default: + break; + } } //-------------------------------------------------------------------------------------------------- @@ -553,8 +678,16 @@ bool RimContourMapProjection::resultRangeIsValid() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimContourMapProjection::clearTimeStepRange() +void RimContourMapProjection::clearMinMaxValueRange() { m_minResultAllTimeSteps = std::numeric_limits::infinity(); m_maxResultAllTimeSteps = -std::numeric_limits::infinity(); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimContourMapProjection::useKLayers( std::set kLayers ) +{ + m_selectedKLayers = kLayers; +} diff --git a/ApplicationLibCode/ProjectDataModel/RimContourMapProjection.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.h similarity index 70% rename from ApplicationLibCode/ProjectDataModel/RimContourMapProjection.h rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.h index 551983515f..5a1aa7d5c5 100644 --- a/ApplicationLibCode/ProjectDataModel/RimContourMapProjection.h +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapProjection.h @@ -18,10 +18,13 @@ #pragma once +#include "ContourMap/RimContourMapResolutionTools.h" #include "RimCheckableNamedObject.h" +#include "RimIntersectionEnums.h" -#include "RigContourMapCalculator.h" -#include "RigContourPolygonsTools.h" +#include "ContourMap/RigContourMapCalculator.h" +#include "ContourMap/RigContourPolygonsTools.h" +#include "RigFloodingSettings.h" #include "cafPdmField.h" #include "cafPdmObject.h" @@ -29,6 +32,8 @@ #include "cvfArray.h" #include "cvfVector2.h" +#include + class RigContourMapGrid; class RimGridView; class RimRegularLegendConfig; @@ -45,6 +50,7 @@ class RimContourMapProjection : public RimCheckableNamedObject public: using ResultAggregation = caf::AppEnum; using ContourPolygons = std::vector; + using FloodingType = caf::AppEnum; RimContourMapProjection(); ~RimContourMapProjection() override; @@ -59,18 +65,21 @@ public: virtual double sampleSpacing() const = 0; double sampleSpacingFactor() const; - void setSampleSpacingFactor( double spacingFactor ); - bool showContourLines() const; - bool showContourLabels() const; - QString resultAggregationText() const; + bool showContourLines() const; + bool showContourLabels() const; + + // k layer filter, only consider kLayers in the given set (0-based index) + void useKLayers( std::set kLayers ); + + virtual QString resultAggregationText() const; QString caseName() const; QString currentTimeStepName() const; - bool isColumnResult() const; - bool isMeanResult() const; - bool isStraightSummationResult() const; + virtual bool isColumnResult() const; + bool isMeanResult() const; + bool isStraightSummationResult() const; void setPickPoint( cvf::Vec2d globalPickPoint ); cvf::Vec2d pickPoint() const; @@ -78,6 +87,7 @@ public: cvf::Vec3d origin3d() const; // Pure-virtual public methods which should be overridden by Eclipse and Geo-mechanical contour map implementations + virtual QString resultVariableName() const = 0; virtual QString resultDescriptionText() const = 0; virtual RimRegularLegendConfig* legendConfig() const = 0; virtual void updateLegend() = 0; @@ -103,16 +113,10 @@ protected: double calculateValueInMapCell( uint i, uint j, const std::vector& gridCellValues ) const; - // Keep track of whether cached data needs updating - bool gridMappingNeedsUpdating() const; - bool resultsNeedsUpdating( int timeStep ) const; - bool geometryNeedsUpdating() const; - bool resultRangeIsValid() const; void clearGridMapping(); - void clearResults(); - void clearTimeStepRange(); - virtual std::pair minmaxValuesAllTimeSteps() = 0; + virtual std::pair computeMinMaxValuesAllTimeSteps() = 0; + std::pair minmaxValuesAllTimeSteps(); bool mapCellVisibilityNeedsUpdating( int timeStep ); @@ -122,21 +126,36 @@ protected: virtual void updateAfterResultGeneration( int timeStep ) = 0; protected: - // Framework overrides void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; - void initAfterRead() override; + + void appendValueFilterGroup( caf::PdmUiOrdering& uiOrdering ); + + virtual bool gridMappingNeedsUpdating() const; + +private: + bool resultsNeedsUpdating( int timeStep ) const; + bool geometryNeedsUpdating() const; + void clearResults(); + void clearMinMaxValueRange(); + bool resultRangeIsValid() const; + std::optional> valueFilterMinMax() const; protected: - caf::PdmField m_relativeSampleSpacing; + caf::PdmField> m_resolution; caf::PdmField m_resultAggregation; caf::PdmField m_showContourLines; caf::PdmField m_showContourLabels; caf::PdmField m_smoothContourLines; + caf::PdmField m_oilFloodingType; + caf::PdmField m_gasFloodingType; + caf::PdmField m_userDefinedFloodingGas; + caf::PdmField m_userDefinedFloodingOil; + cvf::Vec2d m_pickPoint; std::vector m_contourPolygons; std::vector m_contourLevelCumulativeAreas; @@ -144,9 +163,16 @@ protected: int m_currentResultTimestep; std::vector m_mapCellVisibility; - double m_minResultAllTimeSteps; - double m_maxResultAllTimeSteps; + caf::PdmField> m_valueFilterType; + caf::PdmField m_upperThreshold; + caf::PdmField m_lowerThreshold; + + std::set m_selectedKLayers; std::unique_ptr m_contourMapGrid; std::unique_ptr m_contourMapProjection; + +private: + double m_minResultAllTimeSteps; + double m_maxResultAllTimeSteps; }; diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapResolutionTools.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapResolutionTools.cpp new file mode 100644 index 0000000000..415c6dbc2e --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapResolutionTools.cpp @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimContourMapResolutionTools.h" + +#include "cafAppEnum.h" + +namespace caf +{ +template <> +void caf::AppEnum::setUp() +{ + addItem( RimContourMapResolutionTools::SamplingResolution::EXTRA_FINE, "Extra Fine", "Extra Fine" ); + addItem( RimContourMapResolutionTools::SamplingResolution::FINE, "Fine", "Fine" ); + addItem( RimContourMapResolutionTools::SamplingResolution::NORMAL, "Normal", "Normal" ); + addItem( RimContourMapResolutionTools::SamplingResolution::COARSE, "Coarse", "Coarse" ); + addItem( RimContourMapResolutionTools::SamplingResolution::EXTRA_COARSE, "Extra Coarse", "Extra Coarse" ); + setDefault( RimContourMapResolutionTools::SamplingResolution::NORMAL ); +} +}; // namespace caf + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimContourMapResolutionTools::resolutionFromEnumValue( SamplingResolution resEnumVal ) +{ + switch ( resEnumVal ) + { + case RimContourMapResolutionTools::SamplingResolution::EXTRA_FINE: + return 0.5; + case RimContourMapResolutionTools::SamplingResolution::FINE: + return 0.7; + case RimContourMapResolutionTools::SamplingResolution::NORMAL: + default: + return 0.9; + case RimContourMapResolutionTools::SamplingResolution::COARSE: + return 2.0; + case RimContourMapResolutionTools::SamplingResolution::EXTRA_COARSE: + return 5.0; + } +} diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapResolutionTools.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapResolutionTools.h new file mode 100644 index 0000000000..214260331b --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimContourMapResolutionTools.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +class RimContourMapResolutionTools +{ +public: + enum class SamplingResolution + { + EXTRA_FINE, + FINE, + NORMAL, + COARSE, + EXTRA_COARSE + }; + + static double resolutionFromEnumValue( RimContourMapResolutionTools::SamplingResolution resEnumVal ); + +private: + RimContourMapResolutionTools(){}; +}; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapProjection.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapProjection.cpp similarity index 88% rename from ApplicationLibCode/ProjectDataModel/RimEclipseContourMapProjection.cpp rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapProjection.cpp index a18e45e2eb..689b7da346 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapProjection.cpp +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapProjection.cpp @@ -18,12 +18,12 @@ #include "RimEclipseContourMapProjection.h" +#include "ContourMap/RigContourMapCalculator.h" +#include "ContourMap/RigContourMapGrid.h" +#include "ContourMap/RigEclipseContourMapProjection.h" #include "RiaPorosityModel.h" #include "RigCaseCellResultsData.h" -#include "RigContourMapCalculator.h" -#include "RigContourMapGrid.h" #include "RigEclipseCaseData.h" -#include "RigEclipseContourMapProjection.h" #include "RigEclipseResultAddress.h" #include "RigMainGrid.h" @@ -35,6 +35,8 @@ #include "RimEclipseView.h" #include "RimRegularLegendConfig.h" +#include + CAF_PDM_SOURCE_INIT( RimEclipseContourMapProjection, "RimEclipseContourMapProjection" ); //-------------------------------------------------------------------------------------------------- @@ -43,7 +45,7 @@ CAF_PDM_SOURCE_INIT( RimEclipseContourMapProjection, "RimEclipseContourMapProjec RimEclipseContourMapProjection::RimEclipseContourMapProjection() : RimContourMapProjection() { - CAF_PDM_InitObject( "RimEclipseContourMapProjection", ":/2DMapProjection16x16.png" ); + CAF_PDM_InitObject( "Map Projection", ":/2DMapProjection16x16.png" ); CAF_PDM_InitField( &m_weightByParameter, "WeightByParameter", false, "Weight by Result Parameter" ); CAF_PDM_InitFieldNoDefault( &m_weightingResult, "WeightingResult", "" ); @@ -75,6 +77,15 @@ QString RimEclipseContourMapProjection::resultDescriptionText() const return resultText; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimEclipseContourMapProjection::resultVariableName() const +{ + if ( !isColumnResult() ) return view()->cellResult()->resultVariable(); + return resultAggregationText(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -103,11 +114,11 @@ void RimEclipseContourMapProjection::updateLegend() { RimEclipseCellColors* cellColors = view()->cellResult(); + auto [minValAllTimeSteps, maxValAllTimeSteps] = minmaxValuesAllTimeSteps(); + double minVal = m_contourMapProjection ? m_contourMapProjection->minValue() : std::numeric_limits::infinity(); double maxVal = m_contourMapProjection ? m_contourMapProjection->maxValue() : -std::numeric_limits::infinity(); - auto [minValAllTimeSteps, maxValAllTimeSteps] = minmaxValuesAllTimeSteps(); - legendConfig()->setAutomaticRanges( minValAllTimeSteps, maxValAllTimeSteps, minVal, maxVal ); if ( isColumnResult() ) @@ -136,7 +147,7 @@ double RimEclipseContourMapProjection::sampleSpacing() const { if ( auto mainGrid = ec->mainGrid() ) { - return m_relativeSampleSpacing * mainGrid->characteristicIJCellSize(); + return sampleSpacingFactor() * mainGrid->characteristicIJCellSize(); } } @@ -172,8 +183,10 @@ std::vector RimEclipseContourMapProjection::generateResults( int timeSte cellColors->timeLapseBaseTimeStep(), cellColors->caseDiffIndex() ); + RigFloodingSettings fl( m_oilFloodingType(), m_userDefinedFloodingOil(), m_gasFloodingType(), m_userDefinedFloodingGas() ); + return dynamic_cast( m_contourMapProjection.get() ) - ->generateResults( resAddr, m_resultAggregation(), timeStep ); + ->generateResults( resAddr, m_resultAggregation(), timeStep, fl ); } return {}; @@ -194,8 +207,10 @@ void RimEclipseContourMapProjection::generateAndSaveResults( int timeStep ) cellColors->timeLapseBaseTimeStep(), cellColors->caseDiffIndex() ); + RigFloodingSettings fl( m_oilFloodingType(), m_userDefinedFloodingOil(), m_gasFloodingType(), m_userDefinedFloodingGas() ); + dynamic_cast( m_contourMapProjection.get() ) - ->generateAndSaveResults( resAddr, m_resultAggregation(), timeStep ); + ->generateAndSaveResults( resAddr, m_resultAggregation(), timeStep, fl ); } } @@ -350,19 +365,17 @@ void RimEclipseContourMapProjection::initAfterRead() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair RimEclipseContourMapProjection::minmaxValuesAllTimeSteps() +std::pair RimEclipseContourMapProjection::computeMinMaxValuesAllTimeSteps() { - if ( !resultRangeIsValid() ) - { - clearTimeStepRange(); + double minimum = std::numeric_limits::infinity(); + double maximum = -std::numeric_limits::infinity(); - int timeStepCount = static_cast( eclipseCase()->timeStepStrings().size() ); - for ( int i = 0; i < (int)timeStepCount; ++i ) - { - std::vector aggregatedResults = generateResults( i ); - m_minResultAllTimeSteps = std::min( m_minResultAllTimeSteps, RigContourMapProjection::minValue( aggregatedResults ) ); - m_maxResultAllTimeSteps = std::max( m_maxResultAllTimeSteps, RigContourMapProjection::maxValue( aggregatedResults ) ); - } + int timeStepCount = std::max( static_cast( eclipseCase()->timeStepStrings().size() ), 1 ); + for ( int i = 0; i < (int)timeStepCount; ++i ) + { + std::vector aggregatedResults = generateResults( i ); + minimum = std::min( minimum, RigContourMapProjection::minValue( aggregatedResults ) ); + maximum = std::max( maximum, RigContourMapProjection::maxValue( aggregatedResults ) ); } - return std::make_pair( m_minResultAllTimeSteps, m_maxResultAllTimeSteps ); + return std::make_pair( minimum, maximum ); } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapProjection.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapProjection.h similarity index 95% rename from ApplicationLibCode/ProjectDataModel/RimEclipseContourMapProjection.h rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapProjection.h index 6129329231..3a1ac3c11d 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapProjection.h +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapProjection.h @@ -48,6 +48,7 @@ public: void clearGridMappingAndRedraw(); // Eclipse case overrides for contour map methods + QString resultVariableName() const override; QString resultDescriptionText() const override; RimRegularLegendConfig* legendConfig() const override; void updateLegend() override; @@ -66,7 +67,7 @@ protected: RimEclipseCase* eclipseCase() const; RimEclipseContourMapView* view() const; - std::pair minmaxValuesAllTimeSteps() override; + std::pair computeMinMaxValuesAllTimeSteps() override; void updateAfterResultGeneration( int timeStep ) override; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp similarity index 99% rename from ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp index e1dfa286ae..1427da563a 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp @@ -88,7 +88,7 @@ RimEclipseContourMapView::RimEclipseContourMapView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseContourMapProjection* RimEclipseContourMapView::contourMapProjection() const +RimContourMapProjection* RimEclipseContourMapView::contourMapProjection() const { return m_contourMapProjection().p(); } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.h similarity index 93% rename from ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.h index 80ee753c13..e26a1a0503 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.h @@ -28,6 +28,7 @@ class RimRegularLegendConfig; class RimViewNameConfig; class RimScaleLegendConfig; class RivContourMapProjectionPartMgr; +class RimContourMapProjection; class RimEclipseContourMapView : public RimEclipseView { @@ -35,7 +36,7 @@ class RimEclipseContourMapView : public RimEclipseView public: RimEclipseContourMapView(); - RimEclipseContourMapProjection* contourMapProjection() const; + RimContourMapProjection* contourMapProjection() const; RiaDefines::View3dContent viewContent() const override; @@ -83,14 +84,12 @@ protected: void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType ); -private: + cvf::ref m_contourMapProjectionPartMgr; + caf::PdmChildField m_contourMapProjection; + bool isFaultLinesVisible() const; void setFaultLinesVisible( const bool& visible ); -private: - cvf::ref m_contourMapProjectionPartMgr; - caf::PdmChildField m_contourMapProjection; - caf::PdmProxyValueField m_showFaultLines; caf::PdmField m_showAxisLines; caf::PdmField m_showScaleLegend; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapViewCollection.cpp similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimEclipseContourMapViewCollection.cpp rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapViewCollection.cpp diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapViewCollection.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapViewCollection.h similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimEclipseContourMapViewCollection.h rename to ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapViewCollection.h diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMap.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMap.cpp new file mode 100644 index 0000000000..459fd561e7 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMap.cpp @@ -0,0 +1,817 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimStatisticsContourMap.h" + +#include "RiaLogging.h" +#include "RiaPreferencesGrid.h" +#include "RiaStatisticsTools.h" + +#include "RicNewStatisticsContourMapViewFeature.h" + +#include "RifReaderSettings.h" + +#include "ContourMap/RigContourMapCalculator.h" +#include "ContourMap/RigContourMapGrid.h" +#include "ContourMap/RigEclipseContourMapProjection.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigEclipseResultAddress.h" +#include "RigFormationNames.h" +#include "RigMainGrid.h" +#include "RigPolyLinesData.h" +#include "RigStatisticsMath.h" + +#include "Formations/RimFormationNames.h" +#include "Polygons/RimPolygon.h" +#include "Polygons/RimPolygonCollection.h" +#include "RimEclipseCase.h" +#include "RimEclipseCaseEnsemble.h" +#include "RimEclipseContourMapProjection.h" +#include "RimEclipseResultDefinition.h" +#include "RimSimWellInViewCollection.h" +#include "RimStatisticsContourMapProjection.h" +#include "RimStatisticsContourMapView.h" +#include "RimTools.h" + +#include "Riu3DMainWindowTools.h" + +#include "cafCmdFeatureMenuBuilder.h" +#include "cafPdmUiDoubleSliderEditor.h" +#include "cafPdmUiPushButtonEditor.h" +#include "cafPdmUiTreeSelectionEditor.h" +#include "cafProgressInfo.h" + +#include +#include + +CAF_PDM_SOURCE_INIT( RimStatisticsContourMap, "RimStatisticalContourMap" ); + +namespace caf +{ +template <> +void caf::AppEnum::setUp() +{ + addItem( RimStatisticsContourMap::StatisticsType::P10, "P10", "P10" ); + addItem( RimStatisticsContourMap::StatisticsType::P50, "P50", "P50" ); + addItem( RimStatisticsContourMap::StatisticsType::P90, "P90", "P90" ); + addItem( RimStatisticsContourMap::StatisticsType::MEAN, "MEAN", "Mean" ); + addItem( RimStatisticsContourMap::StatisticsType::MIN, "MIN", "Minimum" ); + addItem( RimStatisticsContourMap::StatisticsType::MAX, "MAX", "Maximum" ); + setDefault( RimStatisticsContourMap::StatisticsType::MEAN ); +} +}; // namespace caf + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMap::RimStatisticsContourMap() + : m_openEclipseCase( nullptr ) +{ + CAF_PDM_InitObject( "Ensemble Contour Map", ":/Histogram16x16.png" ); + + CAF_PDM_InitField( &m_boundingBoxExpPercent, + "BoundingBoxExpPercent", + 5.0, + "Bounding Box Expansion (%)", + "", + "How much to increase the bounding box of the primary case to cover for any grid size differences across the " + "ensemble." ); + + CAF_PDM_InitFieldNoDefault( &m_resolution, "Resolution", "Sampling Resolution" ); + + CAF_PDM_InitFieldNoDefault( &m_resultAggregation, "ResultAggregation", "Result Aggregation" ); + + CAF_PDM_InitFieldNoDefault( &m_oilFloodingType, "OilFloodingType", "Residual Oil Given By" ); + m_oilFloodingType.setValue( RigFloodingSettings::FloodingType::WATER_FLOODING ); + CAF_PDM_InitField( &m_userDefinedFloodingOil, "UserDefinedFloodingOil", 0.0, "" ); + m_userDefinedFloodingOil.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_gasFloodingType, "GasFloodingType", RigFloodingSettings::FloodingType::GAS_FLOODING, "Residual Gas Given By" ); + caf::AppEnum::setEnumSubset( &m_gasFloodingType, + { RigFloodingSettings::FloodingType::GAS_FLOODING, + RigFloodingSettings::FloodingType::USER_DEFINED } ); + + CAF_PDM_InitField( &m_userDefinedFloodingGas, "UserDefinedFloodingGas", 0.0, "" ); + m_userDefinedFloodingGas.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitFieldNoDefault( &m_selectedTimeSteps, "SelectedTimeSteps", "Time Step Selection" ); + m_selectedTimeSteps.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() ); + + CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "" ); + m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); + m_resultDefinition = new RimEclipseResultDefinition; + m_resultDefinition->findField( "MResultType" )->uiCapability()->setUiName( "Result" ); + m_resultDefinition->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); + m_resultDefinition->setResultVariable( "SOIL" ); + + CAF_PDM_InitFieldNoDefault( &m_primaryCase, + "PrimaryEclipseCase", + "Primary Case", + "", + "Eclipse Case used for wells and faults shown in views, initializing available result list, timesteps, " + "etc." ); + + CAF_PDM_InitFieldNoDefault( &m_computeStatisticsButton, "ComputeStatisticsButton", "" ); + caf::PdmUiPushButtonEditor::configureEditorLabelLeft( &m_computeStatisticsButton ); + m_computeStatisticsButton = false; + + CAF_PDM_InitFieldNoDefault( &m_views, "ContourMapViews", "Contour Maps", ":/CrossSection16x16.png" ); + + CAF_PDM_InitField( &m_enableFormationFilter, "EnableFormationFilter", false, "Enable Formation Filter" ); + CAF_PDM_InitFieldNoDefault( &m_selectedFormations, "Formations", "Select Formations" ); + m_selectedFormations.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() ); + m_selectedFormations.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP ); + + CAF_PDM_InitFieldNoDefault( &m_selectedPolygons, "Polygons", "Select Polygons" ); + m_selectedPolygons.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() ); + m_selectedPolygons.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP ); + + setDeletable( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + if ( ( eclipseCase() == nullptr ) && ( ensemble()->cases().size() > 0 ) ) + { + auto selCase = ensemble()->cases().front(); + setEclipseCase( selCase ); + } + + bool computeOK = !( m_enableFormationFilter && m_selectedFormations().empty() ); + computeOK = computeOK && !selectedTimeSteps().empty(); + + uiOrdering.add( nameField() ); + uiOrdering.add( &m_computeStatisticsButton ); + m_computeStatisticsButton.uiCapability()->setUiReadOnly( !computeOK ); + if ( computeOK ) + { + m_computeStatisticsButton.uiCapability()->setUiToolTip( "Start statistics computations." ); + } + else + { + m_computeStatisticsButton.uiCapability()->setUiToolTip( "Please check your time step and/or formation filter selections." ); + } + + auto genGrp = uiOrdering.addNewGroup( "General" ); + + genGrp->add( &m_resultAggregation ); + + if ( RigContourMapCalculator::isMobileColumnResult( m_resultAggregation() ) ) + { + if ( m_resultAggregation() != RigContourMapCalculator::MOBILE_GAS_COLUMN ) + { + genGrp->add( &m_oilFloodingType ); + if ( m_oilFloodingType() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + genGrp->add( &m_userDefinedFloodingOil ); + } + } + if ( m_resultAggregation() != RigContourMapCalculator::MOBILE_OIL_COLUMN ) + { + genGrp->add( &m_gasFloodingType ); + if ( m_gasFloodingType() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + genGrp->add( &m_userDefinedFloodingGas ); + } + } + } + + genGrp->add( &m_resolution ); + genGrp->add( &m_primaryCase ); + genGrp->add( &m_boundingBoxExpPercent ); + + auto tsGroup = uiOrdering.addNewGroup( "Time Step Selection" ); + tsGroup->setCollapsedByDefault(); + tsGroup->add( &m_selectedTimeSteps ); + + if ( eclipseCase() && eclipseCase()->activeFormationNames() ) + { + auto formationGrp = uiOrdering.addNewGroup( "Formation Selection" ); + if ( !m_enableFormationFilter ) formationGrp->setCollapsedByDefault(); + formationGrp->add( &m_enableFormationFilter ); + if ( m_enableFormationFilter ) formationGrp->add( &m_selectedFormations ); + } + + if ( auto polygonCollection = RimTools::polygonCollection() ) + { + if ( !polygonCollection->allPolygons().empty() ) + { + auto polyGrp = uiOrdering.addNewGroup( "Polygon Selection" ); + polyGrp->setCollapsedByDefault(); + polyGrp->add( &m_selectedPolygons ); + } + } + + if ( !isColumnResult() ) + { + auto resultDefinitionGroup = uiOrdering.addNewGroup( "Result Definition" ); + m_resultDefinition->uiOrdering( uiConfigName, *resultDefinitionGroup ); + } + + uiOrdering.skipRemainingFields(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::setEclipseCase( RimEclipseCase* eCase ) +{ + m_resultDefinition->setEclipseCase( eCase ); + m_primaryCase = eCase; + + if ( eCase != nullptr ) + { + if ( m_selectedTimeSteps().empty() ) + { + int nSteps = (int)eCase->timeStepStrings().size(); + if ( nSteps > 0 ) + { + m_selectedTimeSteps.setValue( { nSteps - 1 } ); + } + } + } + + for ( auto& view : m_views ) + { + view->setEclipseCase( eCase ); + } + m_resultDefinition->updateConnectedEditors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCaseEnsemble* RimStatisticsContourMap::ensemble() const +{ + return firstAncestorOrThisOfType(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) +{ + if ( &m_computeStatisticsButton == changedField ) + { + computeStatistics(); + m_computeStatisticsButton = false; + + if ( m_views.empty() ) + { + auto view = RicNewStatisticsContourMapViewFeature::createAndAddView( this ); + updateConnectedEditors(); + Riu3DMainWindowTools::selectAsCurrentItem( view ); + Riu3DMainWindowTools::setExpanded( this ); + Riu3DMainWindowTools::setExpanded( view ); + } + else + { + for ( auto& view : m_views ) + { + auto proj = dynamic_cast( view->contourMapProjection() ); + if ( proj != nullptr ) + proj->clearGridMappingAndRedraw(); + else + view->scheduleCreateDisplayModelAndRedraw(); + } + } + } + else if ( &m_primaryCase == changedField ) + { + switchToSelectedSourceCase(); + + // Update well views as wells might have changed from last case + for ( auto& view : m_views ) + { + view->wellCollection()->wells.deleteChildren(); + view->updateDisplayModelForWellResults(); + view->wellCollection()->updateConnectedEditors(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::switchToSelectedSourceCase() +{ + auto newCase = eclipseCase(); + if ( newCase == nullptr ) return; + + if ( m_openEclipseCase != newCase ) + { + newCase->ensureReservoirCaseIsOpen(); + + if ( m_openEclipseCase && !ensemble()->casesInViews().contains( m_openEclipseCase ) ) + { + m_openEclipseCase->closeReservoirCase(); + } + m_openEclipseCase = newCase; + setEclipseCase( newCase ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimStatisticsContourMap::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + QList options; + + if ( &m_selectedTimeSteps == fieldNeedingOptions ) + { + if ( auto eCase = eclipseCase() ) + { + const auto timeStepStrings = eCase->timeStepStrings(); + + int index = 0; + for ( const auto& text : timeStepStrings ) + { + options.push_back( caf::PdmOptionItemInfo( text, index++ ) ); + } + } + return options; + } + else if ( &m_primaryCase == fieldNeedingOptions ) + { + for ( auto eCase : ensemble()->cases() ) + { + options.push_back( caf::PdmOptionItemInfo( eCase->caseUserDescription(), eCase, false, eCase->uiIconProvider() ) ); + } + return options; + } + else if ( &m_selectedFormations == fieldNeedingOptions ) + { + if ( auto eCase = eclipseCase() ) + { + if ( auto formations = eCase->activeFormationNames() ) + { + if ( formations->formationNamesData() ) + { + for ( auto& f : formations->formationNamesData()->formationNames() ) + { + options.push_back( caf::PdmOptionItemInfo( f, f, false ) ); + } + } + } + } + } + else if ( &m_selectedPolygons == fieldNeedingOptions ) + { + if ( auto polygonCollection = RimTools::polygonCollection() ) + { + for ( auto p : polygonCollection->allPolygons() ) + { + options.push_back( caf::PdmOptionItemInfo( p->name(), p, false ) ); + } + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) +{ + if ( &m_computeStatisticsButton == field ) + { + if ( auto attrib = dynamic_cast( attribute ) ) + { + attrib->m_buttonText = "Compute"; + } + } + else if ( ( &m_userDefinedFloodingOil == field ) || ( &m_userDefinedFloodingGas == field ) ) + { + if ( auto myAttr = dynamic_cast( attribute ) ) + { + myAttr->m_minimum = 0.0; + myAttr->m_maximum = 1.0; + myAttr->m_sliderTickCount = 20; + myAttr->m_delaySliderUpdateUntilRelease = true; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::initAfterRead() +{ + auto ensemble = firstAncestorOrThisOfType(); + if ( !ensemble ) return; + + switchToSelectedSourceCase(); + + for ( auto view : m_views.childrenByType() ) + { + view->loadDataAndUpdate(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::doStatisticsCalculation( std::map>>& timestepResults ) +{ + m_timeResults.clear(); + + for ( const auto& [timeStep, res] : timestepResults ) + { + if ( res.empty() ) continue; + + int nCells = static_cast( res[0].size() ); + std::vector p10Results( nCells, std::numeric_limits::infinity() ); + std::vector p50Results( nCells, std::numeric_limits::infinity() ); + std::vector p90Results( nCells, std::numeric_limits::infinity() ); + std::vector meanResults( nCells, std::numeric_limits::infinity() ); + std::vector minResults( nCells, std::numeric_limits::infinity() ); + std::vector maxResults( nCells, std::numeric_limits::infinity() ); + + const size_t numSamples = res.size(); + +// Clang version 16.0.6 does not handle OpenMP here, the compiler crashes. +#ifndef __clang__ +#pragma omp parallel for +#endif + for ( int i = 0; i < nCells; i++ ) + { + std::vector samples( numSamples, 0.0 ); + for ( size_t s = 0; s < numSamples; s++ ) + { + samples[s] = res[s][i]; + } + + double p10 = std::numeric_limits::infinity(); + double p50 = std::numeric_limits::infinity(); + double p90 = std::numeric_limits::infinity(); + double mean = std::numeric_limits::infinity(); + + RigStatisticsMath::calculateStatisticsCurves( samples, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED ); + + if ( RiaStatisticsTools::isValidNumber( p10 ) ) p10Results[i] = p10; + if ( RiaStatisticsTools::isValidNumber( p50 ) ) p50Results[i] = p50; + if ( RiaStatisticsTools::isValidNumber( p90 ) ) p90Results[i] = p90; + if ( RiaStatisticsTools::isValidNumber( mean ) ) meanResults[i] = mean; + + double minValue = RiaStatisticsTools::minimumValue( samples ); + if ( RiaStatisticsTools::isValidNumber( minValue ) && minValue < std::numeric_limits::max() ) minResults[i] = minValue; + + double maxValue = RiaStatisticsTools::maximumValue( samples ); + if ( RiaStatisticsTools::isValidNumber( maxValue ) && maxValue > -std::numeric_limits::max() ) maxResults[i] = maxValue; + } + + m_timeResults[timeStep][StatisticsType::P10] = p10Results; + m_timeResults[timeStep][StatisticsType::P50] = p50Results; + m_timeResults[timeStep][StatisticsType::P90] = p90Results; + m_timeResults[timeStep][StatisticsType::MEAN] = meanResults; + m_timeResults[timeStep][StatisticsType::MIN] = minResults; + m_timeResults[timeStep][StatisticsType::MAX] = maxResults; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::computeStatistics() +{ + if ( m_computeStatisticsButton.isReadOnly() ) return; + + RiaLogging::info( "Computing statistics" ); + auto ensemble = firstAncestorOrThisOfType(); + if ( !ensemble ) return; + + if ( ensemble->cases().empty() ) return; + if ( eclipseCase() == nullptr ) return; + + RigFloodingSettings floodSettings( m_oilFloodingType(), m_userDefinedFloodingOil(), m_gasFloodingType(), m_userDefinedFloodingGas() ); + RigContourMapCalculator::ResultAggregationType resultAggregation = m_resultAggregation(); + + cvf::BoundingBox gridBoundingBox = eclipseCase()->activeCellsBoundingBox(); + gridBoundingBox.expandPercent( m_boundingBoxExpPercent() ); + + double sampleSpacing = 1.0; + if ( auto mainGrid = eclipseCase()->mainGrid() ) + { + sampleSpacing = sampleSpacingFactor() * mainGrid->characteristicIJCellSize(); + } + + auto contourMapGrid = std::make_unique( gridBoundingBox, sampleSpacing ); + + const size_t nCases = ensemble->cases().size(); + + std::map>> timestep_results; + + caf::ProgressInfo progInfo( nCases, QString( "Reading Eclipse Ensemble" ) ); + + auto readerSettings = RiaPreferencesGrid::current()->gridOnlyReaderSettings(); + readerSettings.onlyLoadActiveCells = true; + auto casesInViews = ensemble->casesInViews(); + auto oldReaderType = RiaPreferencesGrid::current()->gridModelReaderOverride(); + RiaPreferencesGrid::current()->setGridModelReaderOverride( RiaDefines::GridModelReader::OPM_COMMON ); + + int i = 1; + for ( RimEclipseCase* eCase : ensemble->cases() ) + { + auto task = progInfo.task( QString( "Processing Case %1 of %2" ).arg( i++ ).arg( nCases ) ); + + RifReaderSettings oldSettings = eCase->readerSettings(); + eCase->setReaderSettings( readerSettings ); + + if ( eCase->ensureReservoirCaseIsOpen() ) + { + RiaLogging::info( QString( "Processing Grid: %1" ).arg( eCase->caseUserDescription() ) ); + + auto eclipseCaseData = eCase->eclipseCaseData(); + auto resultData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + + RigEclipseContourMapProjection contourMapProjection( *contourMapGrid, *eclipseCaseData, *resultData ); + + std::set usedKLayers; + auto formationNames = selectedFormations(); + + bool formationNamesOk = true; + if ( formationNames.size() > 0 ) + { + if ( auto names = eCase->activeFormationNames() ) + { + if ( auto fData = names->formationNamesData() ) + { + usedKLayers = fData->findKLayers( formationNames ); + } + else + { + formationNamesOk = false; + } + } + else + { + formationNamesOk = false; + } + } + + if ( formationNamesOk ) + { + contourMapProjection.generateGridMapping( resultAggregation, {}, usedKLayers, selectedPolygons() ); + + if ( m_resultDefinition()->hasDynamicResult() ) + { + std::vector> timeSteps = mapLocalToGlobalTimeSteps( eCase->timeStepDates() ); + + for ( auto [localTs, globalTs] : timeSteps ) + { + std::vector result = contourMapProjection.generateResults( m_resultDefinition()->eclipseResultAddress(), + resultAggregation, + localTs, + floodSettings ); + timestep_results[globalTs].push_back( result ); + } + } + else + { + std::vector result = + contourMapProjection.generateResults( m_resultDefinition()->eclipseResultAddress(), resultAggregation, 0, floodSettings ); + timestep_results[0].push_back( result ); + } + } + else + { + RiaLogging::warning( QString( "Formation names are missing for case %1, skipping case." ).arg( eCase->caseUserDescription() ) ); + } + } + eCase->setReaderSettings( oldSettings ); + + if ( eCase->views().empty() && eCase != eclipseCase() && !casesInViews.contains( eCase ) ) + { + eCase->closeReservoirCase(); + } + } + + RiaPreferencesGrid::current()->setGridModelReaderOverride( oldReaderType ); + + m_contourMapGrid = std::move( contourMapGrid ); + + doStatisticsCalculation( timestep_results ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCase* RimStatisticsContourMap::eclipseCase() const +{ + return m_primaryCase(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const +{ + menuBuilder << "RicNewStatisticsContourMapViewFeature"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigContourMapGrid* RimStatisticsContourMap::contourMapGrid() const +{ + return m_contourMapGrid.get(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMap::result( size_t timeStep, StatisticsType statisticsType ) const +{ + auto realTimeSteps = selectedTimeSteps(); + if ( timeStep >= realTimeSteps.size() ) return {}; + + timeStep = (size_t)realTimeSteps[timeStep]; + + if ( !m_timeResults.contains( timeStep ) ) return {}; + + if ( !m_timeResults.at( timeStep ).contains( statisticsType ) ) return {}; + + return m_timeResults.at( timeStep ).at( statisticsType ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMap::selectedTimeSteps() const +{ + if ( !m_resultDefinition->hasDynamicResult() ) + { + return { 0 }; + } + + auto steps = m_selectedTimeSteps(); + std::sort( steps.begin(), steps.end() ); + return steps; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMap::selectedTimeStepDates() const +{ + std::vector retDates; + + auto eCase = eclipseCase(); + if ( eCase != nullptr ) + { + auto allDates = eCase->timeStepDates(); + for ( auto i : selectedTimeSteps() ) + { + if ( i < (int)allDates.size() ) retDates.push_back( allDates[i] ); + } + } + return retDates; +} + +//-------------------------------------------------------------------------------------------------- +/// returns pair of (local date index, matching global date index) +//-------------------------------------------------------------------------------------------------- +std::vector> RimStatisticsContourMap::mapLocalToGlobalTimeSteps( std::vector localDates ) const +{ + std::vector> indexSubset; + + auto globalDates = selectedTimeStepDates(); + auto globalIndexes = selectedTimeSteps(); + + for ( int i = 0; i < (int)localDates.size(); i++ ) + { + auto pos = std::find( globalDates.begin(), globalDates.end(), localDates[i] ); + if ( pos == globalDates.end() ) continue; + + int foundIdx = (int)( pos - globalDates.begin() ); + indexSubset.emplace_back( i, globalIndexes[foundIdx] ); + } + + return indexSubset; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMap::selectedFormations() const +{ + if ( !m_enableFormationFilter ) return {}; + return m_selectedFormations(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector> RimStatisticsContourMap::selectedPolygons() +{ + std::vector> allLines; + + for ( auto p : m_selectedPolygons() ) + { + auto pData = p->polyLinesData(); + if ( pData.isNull() ) continue; + + const std::vector> lines = pData->completePolyLines(); + for ( auto l : lines ) + { + allLines.push_back( l ); + } + } + + return allLines; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMap::timeStepName( int timeStep ) const +{ + if ( eclipseCase() == nullptr ) return ""; + + if ( ( timeStep < 0 ) || ( timeStep >= eclipseCase()->timeStepStrings().size() ) ) return ""; + + return eclipseCase()->timeStepName( timeStep ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::ensureResultsComputed() +{ + if ( !m_contourMapGrid ) computeStatistics(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMap::resultAggregationText() const +{ + return m_resultAggregation().uiText(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMap::resultVariable() const +{ + if ( m_resultDefinition().isNull() ) return ""; + return m_resultDefinition()->resultVariable(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimStatisticsContourMap::isColumnResult() const +{ + return RigContourMapCalculator::isColumnResult( m_resultAggregation() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimStatisticsContourMap::sampleSpacingFactor() const +{ + return RimContourMapResolutionTools::resolutionFromEnumValue( m_resolution() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMap::views() const +{ + return m_views.childrenByType(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMap::addView( RimStatisticsContourMapView* view ) +{ + // make sure to update the other views as the calculated data might have changed + for ( auto view : m_views ) + { + view->scheduleCreateDisplayModelAndRedraw(); + } + m_views.push_back( view ); +} diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMap.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMap.h new file mode 100644 index 0000000000..cc7da3cfb0 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMap.h @@ -0,0 +1,129 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimNamedObject.h" + +#include "ContourMap/RimContourMapResolutionTools.h" +#include "RimContourMapProjection.h" + +#include "cafPdmChildArrayField.h" +#include "cafPdmField.h" +#include "cafPdmPtrArrayField.h" +#include "cafPdmPtrField.h" + +#include "cvfVector3.h" + +#include +#include +#include + +class RimEclipseCase; +class RimEclipseResultDefinition; +class RimEclipseCaseEnsemble; +class RimEclipseContourMapView; +class RimStatisticsContourMapView; +class RimPolygon; +class RigPolyLinesData; + +//================================================================================================== +// +//================================================================================================== +class RimStatisticsContourMap : public RimNamedObject +{ + CAF_PDM_HEADER_INIT; + +public: + enum class StatisticsType + { + P10, + P50, + P90, + MEAN, + MIN, + MAX + }; + + RimStatisticsContourMap(); + + void setEclipseCase( RimEclipseCase* eclipseCase ); + RimEclipseCase* eclipseCase() const; + + RimEclipseCaseEnsemble* ensemble() const; + + RigContourMapGrid* contourMapGrid() const; + std::vector result( size_t timeStep, StatisticsType statisticsType ) const; + + void addView( RimStatisticsContourMapView* view ); + std::vector views() const; + + void ensureResultsComputed(); + + QString resultAggregationText() const; + QString resultVariable() const; + double sampleSpacingFactor() const; + bool isColumnResult() const; + + std::vector selectedTimeSteps() const; + std::vector selectedTimeStepDates() const; + QString timeStepName( int timeStep ) const; + + std::vector selectedFormations() const; + std::vector> selectedPolygons(); + +protected: + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + void initAfterRead() override; + void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + + void switchToSelectedSourceCase(); + +private: + void computeStatistics(); + void doStatisticsCalculation( std::map>>& timestep_results ); + + std::vector> mapLocalToGlobalTimeSteps( std::vector localDates ) const; + + caf::PdmField m_boundingBoxExpPercent; + caf::PdmField m_resultAggregation; + caf::PdmField> m_selectedTimeSteps; + caf::PdmChildField m_resultDefinition; + caf::PdmField m_computeStatisticsButton; + caf::PdmField m_enableFormationFilter; + caf::PdmField> m_selectedFormations; + caf::PdmPtrField m_primaryCase; + caf::PdmPtrArrayField m_selectedPolygons; + + caf::PdmField> m_resolution; + + caf::PdmField> m_oilFloodingType; + caf::PdmField> m_gasFloodingType; + caf::PdmField m_userDefinedFloodingGas; + caf::PdmField m_userDefinedFloodingOil; + + std::unique_ptr m_contourMapGrid; + std::map>> m_timeResults; + + caf::PdmChildArrayField m_views; + + RimEclipseCase* m_openEclipseCase; +}; diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapProjection.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapProjection.cpp new file mode 100644 index 0000000000..d0761e0cc9 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapProjection.cpp @@ -0,0 +1,360 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimStatisticsContourMapProjection.h" + +#include "ContourMap/RigContourMapCalculator.h" +#include "ContourMap/RigContourMapGrid.h" +#include "ContourMap/RigContourMapProjection.h" +#include "ContourMap/RigStatisticsContourMapProjection.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" + +#include "RimEclipseCase.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseResultDefinition.h" +#include "RimEclipseView.h" +#include "RimRegularLegendConfig.h" +#include "RimStatisticsContourMap.h" +#include "RimStatisticsContourMapView.h" + +#include + +CAF_PDM_SOURCE_INIT( RimStatisticsContourMapProjection, "RimStatisticsContourMapProjection" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMapProjection::RimStatisticsContourMapProjection() + : RimContourMapProjection() +{ + CAF_PDM_InitObject( "Map Projection", ":/2DMapProjection16x16.png" ); + + CAF_PDM_InitFieldNoDefault( &m_statisticsType, "StatisticsType", "Statistics Type" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMapProjection::~RimStatisticsContourMapProjection() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMapProjection::resultDescriptionText() const +{ + QString resultText; + if ( auto scm = statisticsContourMap() ) + { + resultText = scm->resultAggregationText(); + + if ( !scm->isColumnResult() ) + { + resultText += QString( ", %1" ).arg( scm->resultVariable() ); + } + resultText += ", " + statisticsType(); + } + + return resultText; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMapProjection::statisticsType() const +{ + return m_statisticsType().uiText(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMapProjection::resultVariableName() const +{ + if ( auto scm = statisticsContourMap() ) + { + if ( !scm->isColumnResult() ) + return scm->resultVariable() + ", " + statisticsType(); + else + return scm->resultAggregationText() + ", " + statisticsType(); + } + + return ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimRegularLegendConfig* RimStatisticsContourMapProjection::legendConfig() const +{ + return view()->cellResult()->legendConfig(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::updateLegend() +{ + auto [minValAllTimeSteps, maxValAllTimeSteps] = minmaxValuesAllTimeSteps(); + + double minVal = m_contourMapProjection ? m_contourMapProjection->minValue() : std::numeric_limits::infinity(); + double maxVal = m_contourMapProjection ? m_contourMapProjection->maxValue() : -std::numeric_limits::infinity(); + + legendConfig()->setAutomaticRanges( minValAllTimeSteps, maxValAllTimeSteps, minVal, maxVal ); + + if ( statisticsContourMap()->isColumnResult() ) + { + legendConfig()->setTitle( QString( "Map Projection\n%1" ).arg( resultVariableName() ) ); + } + else + { + QString projectionLegendText = QString( "Map Projection\n%1" ).arg( resultAggregationText() ); + projectionLegendText += QString( "\nResult: %1" ).arg( resultVariableName() ); + + legendConfig()->setTitle( projectionLegendText ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RimStatisticsContourMapProjection::sampleSpacing() const +{ + if ( RimStatisticsContourMap* contourMap = statisticsContourMap() ) + { + if ( RigContourMapGrid* contourMapGrid = contourMap->contourMapGrid() ) + { + return contourMapGrid->sampleSpacing(); + } + } + + return 1.0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::clearGridMappingAndRedraw() +{ + clearGridMapping(); + generateResultsIfNecessary( view()->currentTimeStep() ); + updateLegend(); + updateConnectedEditors(); + + RimEclipseView* parentView = firstAncestorOrThisOfTypeAsserted(); + parentView->scheduleCreateDisplayModelAndRedraw(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMapProjection::generateResults( int timeStep ) const +{ + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::generateAndSaveResults( int timeStep ) +{ + if ( auto statistics = statisticsContourMap() ) + { + dynamic_cast( m_contourMapProjection.get() ) + ->generateAndSaveResults( statistics->result( timeStep, m_statisticsType() ) ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimStatisticsContourMapProjection::resultVariableChanged() const +{ + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::clearResultVariable() +{ + m_currentResultName = ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::updateGridInformation() +{ + RimStatisticsContourMap* contourMap = statisticsContourMap(); + contourMap->ensureResultsComputed(); + + m_contourMapGrid = std::make_unique( *contourMap->contourMapGrid() ); + m_contourMapProjection = std::make_unique( *m_contourMapGrid ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMapProjection::retrieveParameterWeights() +{ + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCase* RimStatisticsContourMapProjection::eclipseCase() const +{ + auto v = view(); + if ( !v ) return nullptr; + + return dynamic_cast( v->ownerCase() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMap* RimStatisticsContourMapProjection::statisticsContourMap() const +{ + auto v = view(); + if ( !v ) return nullptr; + + return v->statisticsContourMap(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGridView* RimStatisticsContourMapProjection::baseView() const +{ + return view(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMapView* RimStatisticsContourMapProjection::view() const +{ + return firstAncestorOrThisOfTypeAsserted(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::updateAfterResultGeneration( int timeStep ) +{ + m_currentResultTimestep = timeStep; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RimStatisticsContourMapProjection::computeMinMaxValuesAllTimeSteps() +{ + double minimum = std::numeric_limits::infinity(); + double maximum = -std::numeric_limits::infinity(); + + if ( auto map = statisticsContourMap() ) + { + for ( size_t ts = 0; ts < map->selectedTimeSteps().size(); ts++ ) + { + std::vector aggregatedResults = statisticsContourMap()->result( ts, m_statisticsType() ); + minimum = std::min( minimum, RigContourMapProjection::minValue( aggregatedResults ) ); + maximum = std::max( maximum, RigContourMapProjection::maxValue( aggregatedResults ) ); + } + } + + return std::make_pair( minimum, maximum ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( &m_statisticsType ); + + appendValueFilterGroup( uiOrdering ); + + caf::PdmUiGroup* mainGroup = uiOrdering.addNewGroup( "Projection Settings" ); + mainGroup->add( &m_showContourLines ); + mainGroup->add( &m_showContourLabels ); + m_showContourLabels.uiCapability()->setUiReadOnly( !m_showContourLines() ); + mainGroup->add( &m_smoothContourLines ); + m_smoothContourLines.uiCapability()->setUiReadOnly( !m_showContourLines() ); + uiOrdering.skipRemainingFields( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimStatisticsContourMapProjection::isColumnResult() const +{ + return ( statisticsContourMap() && statisticsContourMap()->isColumnResult() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMapProjection::resultAggregationText() const +{ + if ( statisticsContourMap() ) return statisticsContourMap()->resultAggregationText(); + + return ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapProjection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, + const QVariant& oldValue, + const QVariant& newValue ) +{ + if ( changedField == &m_statisticsType ) + { + clearGridMappingAndRedraw(); + } + else + { + RimContourMapProjection::fieldChangedByUi( changedField, oldValue, newValue ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimStatisticsContourMapProjection::gridMappingNeedsUpdating() const +{ + if ( !m_contourMapProjection ) return true; + + auto cellGridIdxVisibility = m_contourMapProjection->getCellVisibility(); + if ( cellGridIdxVisibility.isNull() ) return true; + + cvf::ref currentVisibility = getCellVisibility(); + if ( currentVisibility->size() != cellGridIdxVisibility->size() ) return true; + + for ( size_t i = 0; i < currentVisibility->size(); ++i ) + { + if ( ( *currentVisibility )[i] != ( *cellGridIdxVisibility )[i] ) return true; + } + + return false; +} diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapProjection.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapProjection.h new file mode 100644 index 0000000000..e597e955e4 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapProjection.h @@ -0,0 +1,89 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimContourMapProjection.h" +#include "RimStatisticsContourMap.h" + +#include "cafAppEnum.h" +#include "cafPdmField.h" +#include "cafPdmObject.h" + +class RigActiveCellInfo; +class RigMainGrid; +class RigContourMapGrid; +class RigResultAccessor; +class RimStatisticsContourMapView; +class RimEclipseCase; +class RimEclipseResultDefinition; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimStatisticsContourMapProjection : public RimContourMapProjection +{ + CAF_PDM_HEADER_INIT; + +public: + RimStatisticsContourMapProjection(); + ~RimStatisticsContourMapProjection() override; + + void clearGridMappingAndRedraw(); + + QString statisticsType() const; + QString resultVariableName() const override; + QString resultDescriptionText() const override; + RimRegularLegendConfig* legendConfig() const override; + void updateLegend() override; + + double sampleSpacing() const override; + + bool isColumnResult() const override; + QString resultAggregationText() const override; + +protected: + void updateGridInformation() override; + std::vector retrieveParameterWeights() override; + std::vector generateResults( int timeStep ) const override; + void generateAndSaveResults( int timeStep ) override; + bool resultVariableChanged() const override; + void clearResultVariable() override; + RimGridView* baseView() const override; + + RimEclipseCase* eclipseCase() const; + RimStatisticsContourMap* statisticsContourMap() const; + RimStatisticsContourMapView* view() const; + + std::pair computeMinMaxValuesAllTimeSteps() override; + + void updateAfterResultGeneration( int timeStep ) override; + + bool gridMappingNeedsUpdating() const override; + +protected: + // Framework overrides + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + +protected: + caf::PdmField> m_statisticsType; + + QString m_currentResultName; +}; diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapView.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapView.cpp new file mode 100644 index 0000000000..87c37e75d7 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapView.cpp @@ -0,0 +1,253 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimStatisticsContourMapView.h" + +#include "RiuViewer.h" + +#include "RivContourMapProjectionPartMgr.h" + +#include "Polygons/RimPolygonInViewCollection.h" +#include "Rim3dOverlayInfoConfig.h" +#include "RimAnnotationInViewCollection.h" +#include "RimCase.h" +#include "RimCellFilterCollection.h" +#include "RimEclipseCaseEnsemble.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseContourMapView.h" +#include "RimEclipseFaultColors.h" +#include "RimFaultInViewCollection.h" +#include "RimRegularLegendConfig.h" +#include "RimSimWellInViewCollection.h" +#include "RimStatisticsContourMap.h" +#include "RimStatisticsContourMapProjection.h" +#include "RimViewLinker.h" +#include "RimViewNameConfig.h" + +#include "cafPdmUiTreeOrdering.h" +#include "cafProgressInfo.h" + +CAF_PDM_SOURCE_INIT( RimStatisticsContourMapView, "RimStatisticsContourMapView" ); + +RimStatisticsContourMapView::RimStatisticsContourMapView() + : RimEclipseContourMapView() +{ + CAF_PDM_InitObject( "Contour Map View", ":/2DMap16x16.png", "", "", "StatisticsContourMap", "A contour map for Eclipse cases" ); + + CAF_PDM_InitFieldNoDefault( &m_statisticsContourMap, "StatisticsContourMap", "Statistics Contour Map" ); + + m_contourMapProjection = new RimStatisticsContourMapProjection(); + + setFaultVisParameters(); + setDefaultCustomName(); + + m_contourMapProjectionPartMgr = new RivContourMapProjectionPartMgr( contourMapProjection() ); + + cellResult()->setTernaryEnabled( false ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapView::setStatisticsContourMap( RimStatisticsContourMap* statisticsContourMap ) +{ + m_statisticsContourMap = statisticsContourMap; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMapView::createAutoName() const +{ + QStringList autoName; + + if ( !nameConfig()->customName().isEmpty() ) + { + autoName.push_back( nameConfig()->customName() ); + } + + QStringList generatedAutoTags; + + if ( nameConfig()->addCaseName() && m_statisticsContourMap->ensemble() ) + { + generatedAutoTags.push_back( m_statisticsContourMap->ensemble()->name() ); + } + + if ( nameConfig()->addAggregationType() ) + { + generatedAutoTags.push_back( m_statisticsContourMap->resultAggregationText() ); + } + + if ( nameConfig()->addProperty() ) + { + if ( auto proj = dynamic_cast( m_contourMapProjection().p() ) ) + { + if ( !m_statisticsContourMap->isColumnResult() ) + { + generatedAutoTags.push_back( m_statisticsContourMap->resultVariable() ); + } + generatedAutoTags.push_back( proj->statisticsType() ); + } + } + + if ( nameConfig()->addSampleSpacing() ) + { + generatedAutoTags.push_back( QString( "%1" ).arg( m_statisticsContourMap->sampleSpacingFactor(), 3, 'f', 2 ) ); + } + + if ( !generatedAutoTags.empty() ) + { + autoName.push_back( generatedAutoTags.join( ", " ) ); + } + return autoName.join( ": " ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapView::setDefaultCustomName() +{ + nameConfig()->setCustomName( "" ); + nameConfig()->hideCaseNameField( false ); + nameConfig()->hideAggregationTypeField( false ); + nameConfig()->hidePropertyField( false ); + nameConfig()->hideSampleSpacingField( false ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Contour Map Name" ); + nameConfig()->uiOrdering( uiConfigName, *nameGroup ); + + caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup( "Viewer" ); + viewGroup->add( userDescriptionField() ); + viewGroup->add( backgroundColorField() ); + viewGroup->add( &m_showAxisLines ); + viewGroup->add( &m_showScaleLegend ); + viewGroup->add( &m_showFaultLines ); + + uiOrdering.skipRemainingFields( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ ) +{ + uiTreeOrdering.add( m_overlayInfoConfig() ); + uiTreeOrdering.add( m_contourMapProjection ); + uiTreeOrdering.add( cellResult()->legendConfig() ); + uiTreeOrdering.add( wellCollection() ); + uiTreeOrdering.add( faultCollection() ); + uiTreeOrdering.add( annotationCollection() ); + uiTreeOrdering.add( polygonInViewCollection() ); + + uiTreeOrdering.skipRemainingChildren(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimStatisticsContourMap* RimStatisticsContourMapView::statisticsContourMap() const +{ + return m_statisticsContourMap; +} + +//-------------------------------------------------------------------------------------------------- +/// Clamp the current timestep to actual possibilities +//-------------------------------------------------------------------------------------------------- +void RimStatisticsContourMapView::onClampCurrentTimestep() +{ + if ( statisticsContourMap() ) + { + auto maxSteps = (int)statisticsContourMap()->selectedTimeSteps().size(); + if ( m_currentTimeStep() >= maxSteps ) + { + m_currentTimeStep = maxSteps - 1; + } + } + + if ( m_currentTimeStep < 0 ) m_currentTimeStep = 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimStatisticsContourMapView::onTimeStepCountRequested() +{ + if ( statisticsContourMap() ) + { + return statisticsContourMap()->selectedTimeSteps().size(); + } + + return 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimStatisticsContourMapView::timeStepName( int frameIdx ) const +{ + if ( !statisticsContourMap() ) return ""; + + auto steps = statisticsContourMap()->selectedTimeSteps(); + if ( frameIdx >= (int)steps.size() ) return ""; + auto realTimeStep = steps[frameIdx]; + return statisticsContourMap()->timeStepName( realTimeStep ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QStringList RimStatisticsContourMapView::timeStepStrings() const +{ + QStringList retList; + + if ( !statisticsContourMap() ) return retList; + + for ( auto ts : statisticsContourMap()->selectedTimeSteps() ) + { + retList.append( statisticsContourMap()->timeStepName( ts ) ); + } + + return retList; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimStatisticsContourMapView::activeTimeStepIndices( bool propertyFiltersActive ) +{ + std::vector timeStepIndices; + + // First entry in this vector is used to define the geometry only result mode with no results. + timeStepIndices.push_back( 0 ); + + // add any timesteps with dynamic data + if ( !statisticsContourMap() ) return timeStepIndices; + + for ( size_t i = 0; i < statisticsContourMap()->selectedTimeSteps().size(); i++ ) + { + timeStepIndices.push_back( i ); + } + + return timeStepIndices; +} diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapView.h b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapView.h new file mode 100644 index 0000000000..c79dcc218a --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimStatisticsContourMapView.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimEclipseContourMapView.h" + +class RimStatisticsContourMap; + +class RimStatisticsContourMapView : public RimEclipseContourMapView +{ + CAF_PDM_HEADER_INIT; + +public: + RimStatisticsContourMapView(); + + void setStatisticsContourMap( RimStatisticsContourMap* statisticsContourMap ); + RimStatisticsContourMap* statisticsContourMap() const; + + QString createAutoName() const override; + void setDefaultCustomName(); + +protected: + void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + + std::vector activeTimeStepIndices( bool propertyFiltersActive ) override; + + void onClampCurrentTimestep() override; + size_t onTimeStepCountRequested() override; + QString timeStepName( int frameIdx ) const override; + QStringList timeStepStrings() const override; + +private: + caf::PdmPtrField m_statisticsContourMap; +}; diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/CMakeLists_files.cmake index 6a402f087b..ca8742f7b3 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/CMakeLists_files.cmake @@ -17,11 +17,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\CorrelationPlots" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.cpp index fdf4ba84fa..e34193db9b 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.cpp @@ -79,13 +79,13 @@ RimAbstractCorrelationPlot::RimAbstractCorrelationPlot() CAF_PDM_InitField( &m_description, "PlotTitle", QString( "Correlation Plot" ), "Custom Plot Title" ); CAF_PDM_InitFieldNoDefault( &m_labelFontSize, "LabelFontSize", "Label Font Size" ); - m_labelFontSize = caf::FontTools::RelativeSize::XSmall; + m_labelFontSize = caf::FontTools::RelativeSize::Small; CAF_PDM_InitFieldNoDefault( &m_axisTitleFontSize, "AxisTitleFontSize", "Axis Title Font Size" ); CAF_PDM_InitFieldNoDefault( &m_axisValueFontSize, "AxisValueFontSize", "Axis Value Font Size" ); - m_axisValueFontSize = caf::FontTools::RelativeSize::XSmall; + m_axisValueFontSize = caf::FontTools::RelativeSize::Small; - m_legendFontSize = caf::FontTools::RelativeSize::XSmall; + m_legendFontSize = caf::FontTools::RelativeSize::Small; CAF_PDM_InitField( &m_useCaseFilter, "UseCaseFilter", false, "Use Ensemble Filter" ); CAF_PDM_InitFieldNoDefault( &m_curveSetForFiltering, "CurveSetForFiltering", " Ensemble Filter" ); @@ -419,6 +419,11 @@ std::set RimAbstractCorrelationPlot::filterEnsembleCases( RimSu setOfCases.insert( summaryCasesVector.begin(), summaryCasesVector.end() ); } + for ( auto excludedCase : m_excludedCases ) + { + setOfCases.erase( excludedCase ); + } + return setOfCases; } @@ -458,7 +463,23 @@ void RimAbstractCorrelationPlot::setCaseFilterDataSource( RimEnsembleCurveSet* e //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::set RimAbstractCorrelationPlot::ensembleParameters() +void RimAbstractCorrelationPlot::setExcludedSummaryCases( const std::vector& summaryCases ) +{ + m_excludedCases = summaryCases; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimAbstractCorrelationPlot::excludedSummaryCases() const +{ + return m_excludedCases; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RimAbstractCorrelationPlot::ensembleParameters() const { std::set ensembleParms; @@ -492,7 +513,7 @@ std::set RimAbstractCorrelationPlot::variationSortedEnsemb //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigEnsembleParameter RimAbstractCorrelationPlot::ensembleParameter( const QString& ensembleParameterName ) +RigEnsembleParameter RimAbstractCorrelationPlot::ensembleParameter( const QString& ensembleParameterName ) const { std::set ensembleParms = ensembleParameters(); for ( const RigEnsembleParameter& eParam : ensembleParms ) diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.h b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.h index 095dd7e896..6c1df5d9cc 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.h +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimAbstractCorrelationPlot.h @@ -61,6 +61,9 @@ public: RimEnsembleCurveSet* caseFilterDataSource() const; void setCaseFilterDataSource( RimEnsembleCurveSet* ensemble ); + void setExcludedSummaryCases( const std::vector& summaryCases ); + std::vector excludedSummaryCases() const; + RiuQwtPlotWidget* viewer(); RiuPlotWidget* plotWidget() override; void detachAllCurves() override; @@ -86,9 +89,9 @@ protected: QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; std::set addresses() const; - std::set ensembleParameters(); + std::set ensembleParameters() const; std::set variationSortedEnsembleParameters(); - RigEnsembleParameter ensembleParameter( const QString& ensembleParameterName ); + RigEnsembleParameter ensembleParameter( const QString& ensembleParameterName ) const; // RimViewWindow overrides QWidget* viewWidget() override; @@ -153,4 +156,6 @@ private: caf::PdmField m_useCaseFilter; caf::PdmPtrField m_curveSetForFiltering; caf::PdmField m_editCaseFilter; + + std::vector m_excludedCases; }; diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp index 561b24ae73..d072df5002 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp @@ -123,7 +123,7 @@ RimCorrelationMatrixPlot::RimCorrelationMatrixPlot() CAF_PDM_InitField( &m_sortByAbsoluteValues, "CorrelationAbsSorting", true, "Sort by Absolute Values" ); CAF_PDM_InitField( &m_excludeParametersWithoutVariation, "ExcludeParamsWithoutVariation", true, "Exclude Parameters Without Variation" ); CAF_PDM_InitField( &m_showOnlyTopNCorrelations, "ShowOnlyTopNCorrelations", true, "Show Only Top Correlations" ); - CAF_PDM_InitField( &m_topNFilterCount, "TopNFilterCount", 20, "Number rows/columns" ); + CAF_PDM_InitField( &m_topNFilterCount, "TopNFilterCount", 5, "Number rows/columns" ); CAF_PDM_InitFieldNoDefault( &m_legendConfig, "LegendConfig", "" ); CAF_PDM_InitFieldNoDefault( &m_selectedParametersList, "SelectedParameters", "Select Parameters" ); m_selectedParametersList.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP ); @@ -401,8 +401,7 @@ void RimCorrelationMatrixPlot::updateAxes() m_plotWidget->qwtPlot()->setAxisScaleDraw( QwtAxis::YLeft, new TextScaleDraw( m_resultLabels ) ); m_plotWidget->qwtPlot()->setAxisScaleEngine( QwtAxis::YLeft, new RiuQwtLinearScaleEngine ); - m_plotWidget->setAxisTitleText( RiuPlotAxis::defaultLeft(), "Result Vector" ); - m_plotWidget->setAxisTitleEnabled( RiuPlotAxis::defaultLeft(), true ); + m_plotWidget->setAxisTitleEnabled( RiuPlotAxis::defaultLeft(), false ); m_plotWidget->setAxisFontsAndAlignment( RiuPlotAxis::defaultLeft(), axisTitleFontSize(), axisValueFontSize(), false, Qt::AlignCenter ); m_plotWidget->setAxisLabelsAndTicksEnabled( RiuPlotAxis::defaultLeft(), true, false ); m_plotWidget->setAxisRange( RiuPlotAxis::defaultLeft(), 0.0, (double)m_resultLabels.size() + 1 ); @@ -418,8 +417,7 @@ void RimCorrelationMatrixPlot::updateAxes() scaleDraw->setLabelRotation( 30.0 ); m_plotWidget->qwtPlot()->setAxisScaleDraw( QwtAxis::XBottom, scaleDraw ); m_plotWidget->qwtPlot()->setAxisScaleEngine( QwtAxis::XBottom, new RiuQwtLinearScaleEngine ); - m_plotWidget->setAxisTitleText( RiuPlotAxis::defaultBottom(), "Ensemble Parameter" ); - m_plotWidget->setAxisTitleEnabled( RiuPlotAxis::defaultBottom(), true ); + m_plotWidget->setAxisTitleEnabled( RiuPlotAxis::defaultBottom(), false ); m_plotWidget->setAxisFontsAndAlignment( RiuPlotAxis::defaultBottom(), axisTitleFontSize(), axisValueFontSize(), @@ -629,7 +627,7 @@ void RimCorrelationMatrixPlot::createMatrix() cvf::Color3f contrastColor = RiaColorTools::contrastColor( cvf::Color3f( color ) ); textLabel.setColor( RiaColorTools::toQColor( contrastColor ) ); QFont font = textLabel.font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( labelFontSize() ) ); + font.setPointSize( labelFontSize() ); textLabel.setFont( font ); QwtPlotMarker* marker = new QwtPlotMarker(); marker->setLabel( textLabel ); @@ -658,7 +656,7 @@ void RimCorrelationMatrixPlot::updatePlotTitle() { if ( m_useAutoPlotTitle ) { - m_description = QString( "Correlation Matrix for Parameters vs Result Vectors at %2" ).arg( timeStepString() ); + m_description = QString( "Result Vectors vs Parameters at %2" ).arg( timeStepString() ); } if ( m_plotWidget ) diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp index 730dd587de..35dfca8499 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp @@ -265,7 +265,7 @@ void RimCorrelationPlot::updatePlotTitle() QString vectorName = completeAddressText(); auto ensemble = *ensembles().begin(); - m_description = QString( "Correlations for %2, %3 at %4" ).arg( ensemble->name() ).arg( vectorName ).arg( timeStepString() ); + m_description = QString( "%1, %2 at %3" ).arg( vectorName ).arg( ensemble->name() ).arg( timeStepString() ); } m_plotWidget->setPlotTitle( m_description ); m_plotWidget->setPlotTitleEnabled( m_showPlotTitle && !isSubPlot() ); diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp index 256c0c9a90..b1edbb9503 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp @@ -15,6 +15,7 @@ // for more details. // ///////////////////////////////////////////////////////////////////////////////// + #include "RimCorrelationReportPlot.h" #include "RiaPreferences.h" @@ -55,8 +56,8 @@ RimCorrelationReportPlot::RimCorrelationReportPlot() CAF_PDM_InitObject( "Correlation Report Plot", ":/CorrelationReportPlot16x16.png" ); setDeletable( true ); - CAF_PDM_InitFieldNoDefault( &m_plotWindowTitle, "PlotWindowTitle", "Title" ); - m_plotWindowTitle.registerGetMethod( this, &RimCorrelationReportPlot::createPlotWindowTitle ); + CAF_PDM_InitFieldNoDefault( &m_name, "PlotWindowTitle", "Title" ); + m_name.registerGetMethod( this, &RimCorrelationReportPlot::createDescription ); CAF_PDM_InitFieldNoDefault( &m_correlationMatrixPlot, "MatrixPlot", "Matrix Plot" ); CAF_PDM_InitFieldNoDefault( &m_correlationPlot, "CorrelationPlot", "Correlation Plot" ); @@ -75,9 +76,9 @@ RimCorrelationReportPlot::RimCorrelationReportPlot() m_titleFontSize = caf::FontTools::RelativeSize::XLarge; m_subTitleFontSize = caf::FontTools::RelativeSize::Large; - m_labelFontSize = caf::FontTools::RelativeSize::XSmall; + m_labelFontSize = caf::FontTools::RelativeSize::Small; m_axisTitleFontSize = caf::FontTools::RelativeSize::Small; - m_axisValueFontSize = caf::FontTools::RelativeSize::XSmall; + m_axisValueFontSize = caf::FontTools::RelativeSize::Small; m_correlationMatrixPlot = new RimCorrelationMatrixPlot; m_correlationMatrixPlot->setLegendsVisible( false ); @@ -118,7 +119,7 @@ QWidget* RimCorrelationReportPlot::viewWidget() //-------------------------------------------------------------------------------------------------- QString RimCorrelationReportPlot::description() const { - return m_plotWindowTitle(); + return createDescription(); } //-------------------------------------------------------------------------------------------------- @@ -150,7 +151,7 @@ void RimCorrelationReportPlot::zoomAll() //-------------------------------------------------------------------------------------------------- caf::PdmFieldHandle* RimCorrelationReportPlot::userDescriptionField() { - return &m_plotWindowTitle; + return &m_name; } //-------------------------------------------------------------------------------------------------- @@ -213,6 +214,14 @@ int RimCorrelationReportPlot::axisValueFontSize() const /// //-------------------------------------------------------------------------------------------------- QString RimCorrelationReportPlot::createPlotWindowTitle() const +{ + return "Correlation Report for " + createDescription(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimCorrelationReportPlot::createDescription() const { QStringList ensembles; for ( auto entry : m_correlationMatrixPlot->curveDefinitions() ) @@ -226,7 +235,7 @@ QString RimCorrelationReportPlot::createPlotWindowTitle() const QString ensembleNames = ensembles.join( ", " ); QString timeStep = m_correlationMatrixPlot->timeStepString(); - return QString( "Correlation Report for %1 at %2" ).arg( ensembleNames ).arg( timeStep ); + return QString( "%1 at %2" ).arg( ensembleNames ).arg( timeStep ); } //-------------------------------------------------------------------------------------------------- @@ -281,7 +290,7 @@ QWidget* RimCorrelationReportPlot::createViewWidget( QWidget* mainWindowParent / { m_viewer = new RiuMultiPlotPage( this, mainWindowParent ); m_viewer->setAutoAlignAxes( false ); - m_viewer->setPlotTitle( m_plotWindowTitle() ); + m_viewer->setPlotTitle( createPlotWindowTitle() ); recreatePlotWidgets(); return m_viewer; @@ -304,6 +313,10 @@ void RimCorrelationReportPlot::onLoadDataAndUpdate() if ( m_showWindow ) { + auto cases = m_parameterResultCrossPlot->summaryCasesExcludedByFilter(); + m_correlationMatrixPlot->setExcludedSummaryCases( cases ); + m_correlationPlot->setExcludedSummaryCases( cases ); + m_correlationMatrixPlot->setLabelFontSize( m_labelFontSize() ); m_correlationMatrixPlot->setAxisTitleFontSize( m_axisTitleFontSize() ); m_correlationMatrixPlot->setAxisValueFontSize( m_axisValueFontSize() ); @@ -338,7 +351,7 @@ void RimCorrelationReportPlot::onLoadDataAndUpdate() m_correlationPlot->loadDataAndUpdate(); m_parameterResultCrossPlot->loadDataAndUpdate(); - m_viewer->setPlotTitle( m_plotWindowTitle() ); + m_viewer->setPlotTitle( createDescription() ); } updateLayout(); @@ -350,7 +363,12 @@ void RimCorrelationReportPlot::onLoadDataAndUpdate() void RimCorrelationReportPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { m_correlationMatrixPlot->uiOrdering( "report", uiOrdering ); + + auto filterGroup = uiOrdering.addNewGroup( "Filter" ); + m_parameterResultCrossPlot->appendFilterFields( *filterGroup ); + auto plotGroup = uiOrdering.addNewGroup( "Plot Settings" ); + plotGroup->setCollapsedByDefault(); plotGroup->add( &m_titleFontSize ); plotGroup->add( &m_subTitleFontSize ); plotGroup->add( &m_labelFontSize ); @@ -358,6 +376,7 @@ void RimCorrelationReportPlot::defineUiOrdering( QString uiConfigName, caf::PdmU plotGroup->add( &m_axisTitleFontSize ); plotGroup->add( &m_axisValueFontSize ); m_correlationMatrixPlot->legendConfig()->uiOrdering( "ColorsOnly", *plotGroup ); + uiOrdering.skipRemainingFields( true ); } @@ -406,6 +425,9 @@ QList RimCorrelationReportPlot::calculateValueOptions( c return options; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- void RimCorrelationReportPlot::onDataSelection( const caf::SignalEmitter* emitter, std::pair parameterAndCurveDef ) { @@ -421,4 +443,6 @@ void RimCorrelationReportPlot::onDataSelection( const caf::SignalEmitter* { m_viewer->updateSubTitles(); } + + updateConnectedEditors(); } diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.h b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.h index 36c63ef34d..08cd7cc096 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.h +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.h @@ -62,6 +62,7 @@ public: private: QString createPlotWindowTitle() const; + QString createDescription() const; void recreatePlotWidgets(); void cleanupBeforeClose(); @@ -78,7 +79,7 @@ private: void onDataSelection( const caf::SignalEmitter* emitter, std::pair parameterAndCurveDef ); private: - caf::PdmProxyValueField m_plotWindowTitle; + caf::PdmProxyValueField m_name; caf::PdmChildField m_correlationMatrixPlot; caf::PdmChildField m_correlationPlot; diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp index 310724a729..4b5407d9fd 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp @@ -19,46 +19,39 @@ #include "RimParameterResultCrossPlot.h" #include "RiaColorTables.h" -#include "RiaPreferences.h" -#include "RiaQDateTimeTools.h" -#include "RiaTextStringTools.h" #include "RifSummaryReaderInterface.h" #include "RigEnsembleParameter.h" -#include "RimDeltaSummaryCase.h" -#include "RimEnsembleCurveSet.h" -#include "RimMultiPlot.h" -#include "RimPlotAxisProperties.h" -#include "RimPlotAxisPropertiesInterface.h" #include "RimPlotDataFilterCollection.h" #include "RimProject.h" #include "RimSummaryAddress.h" #include "RimSummaryCase.h" #include "RimSummaryEnsemble.h" -#include "RimSummaryPlotAxisFormatter.h" +#include "RiuContextMenuLauncher.h" #include "RiuPlotCurve.h" -#include "RiuPlotMainWindowTools.h" #include "RiuQwtPlotCurve.h" +#include "RiuQwtPlotRectAnnotation.h" +#include "RiuQwtPlotWidget.h" #include "RiuQwtSymbol.h" -#include "RiuSummaryQwtPlot.h" -#include "RiuSummaryVectorSelectionDialog.h" #include "cafPdmUiComboBoxEditor.h" -#include "cafPdmUiLineEditor.h" -#include "cafPdmUiPushButtonEditor.h" +#include "cafPdmUiTextEditor.h" +#include "cafPdmUiValueRangeEditor.h" -#include "qwt_legend.h" +#include "qwt_picker_machine.h" #include "qwt_plot.h" #include "qwt_plot_curve.h" -#include "qwt_scale_engine.h" +#include "qwt_plot_marker.h" +#include "qwt_plot_picker.h" +#include "qwt_text.h" +#include #include #include -#include #include CAF_PDM_SOURCE_INIT( RimParameterResultCrossPlot, "ParameterResultCrossPlot" ); @@ -68,18 +61,30 @@ CAF_PDM_SOURCE_INIT( RimParameterResultCrossPlot, "ParameterResultCrossPlot" ); //-------------------------------------------------------------------------------------------------- RimParameterResultCrossPlot::RimParameterResultCrossPlot() : RimAbstractCorrelationPlot() + , m_xValueRange( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ) + , m_yValueRange( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ) { CAF_PDM_InitObject( "ParameterResultCross Plot", ":/CorrelationCrossPlot16x16.png" ); CAF_PDM_InitField( &m_ensembleParameter, "EnsembleParameter", QString( "" ), "Ensemble Parameter" ); m_ensembleParameter.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() ); + CAF_PDM_InitField( &m_useParameterFilter, "UseParameterFilter", false, "Use Parameter Filter" ); + CAF_PDM_InitField( &m_summaryFilterRange, "SummaryFilterRange", std::make_pair( 0.0, 0.0 ), "Summary Value Range", "", "", "" ); + CAF_PDM_InitField( &m_parameterFilterRange, "ParameterFilterRange", std::make_pair( 0.0, 0.0 ), "Parameter Value Range", "", "", "" ); + + CAF_PDM_InitFieldNoDefault( &m_excludedCasesText, "ExcludedCasesText", "Excluded Cases" ); + m_excludedCasesText.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() ); + m_excludedCasesText.registerGetMethod( this, &RimParameterResultCrossPlot::excludedCasesText ); + m_selectMultipleVectors = true; - m_legendFontSize = caf::FontTools::RelativeSize::XSmall; + m_legendFontSize = caf::FontTools::RelativeSize::Small; - m_xRange = std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ); - m_yRange = std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ); + m_xValueRange = std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ); + m_yValueRange = std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ); + + m_showPlotLegends = false; } //-------------------------------------------------------------------------------------------------- @@ -96,7 +101,51 @@ RimParameterResultCrossPlot::~RimParameterResultCrossPlot() //-------------------------------------------------------------------------------------------------- void RimParameterResultCrossPlot::setEnsembleParameter( const QString& ensembleParameter ) { + writeDataToCache(); + m_ensembleParameter = ensembleParameter; + + updateValueRanges(); + updateFilterRanges(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimParameterResultCrossPlot::summaryCasesExcludedByFilter() const +{ + if ( ensembles().size() != 1 ) return {}; + + if ( !m_useParameterFilter() ) return {}; + + std::vector cases; + + auto plotValues = createCaseData(); + for ( const auto& caseData : plotValues ) + { + if ( caseData.summaryValue < m_summaryFilterRange().first || caseData.summaryValue > m_summaryFilterRange().second || + caseData.parameterValue < m_parameterFilterRange().first || caseData.parameterValue > m_parameterFilterRange().second ) + { + cases.push_back( caseData.summaryCase ); + } + } + + return cases; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimParameterResultCrossPlot::appendFilterFields( caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( &m_useParameterFilter ); + if ( m_useParameterFilter ) + { + uiOrdering.add( &m_summaryFilterRange ); + uiOrdering.add( &m_parameterFilterRange ); + uiOrdering.add( &m_excludedCasesText ); + } + uiOrdering.skipRemainingFields(); } //-------------------------------------------------------------------------------------------------- @@ -122,7 +171,11 @@ void RimParameterResultCrossPlot::defineUiOrdering( QString uiConfigName, caf::P caf::PdmUiGroup* crossPlotGroup = uiOrdering.addNewGroup( "Cross Plot Parameters" ); crossPlotGroup->add( &m_ensembleParameter ); + auto filterGroup = uiOrdering.addNewGroup( "Filter" ); + appendFilterFields( *filterGroup ); + caf::PdmUiGroup* plotGroup = uiOrdering.addNewGroup( "Plot Settings" ); + plotGroup->setCollapsedByDefault(); plotGroup->add( &m_showPlotTitle ); plotGroup->add( &m_useAutoPlotTitle ); plotGroup->add( &m_description ); @@ -133,6 +186,7 @@ void RimParameterResultCrossPlot::defineUiOrdering( QString uiConfigName, caf::P plotGroup->add( &m_axisValueFontSize ); m_description.uiCapability()->setUiReadOnly( m_useAutoPlotTitle() ); + uiOrdering.skipRemainingFields( true ); } @@ -152,6 +206,37 @@ QList RimParameterResultCrossPlot::calculateValueOptions return options; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimParameterResultCrossPlot::defineEditorAttribute( const caf::PdmFieldHandle* field, + QString uiConfigName, + caf::PdmUiEditorAttribute* attribute ) +{ + if ( field == &m_summaryFilterRange ) + { + if ( auto attr = dynamic_cast( attribute ) ) + { + attr->m_decimals = 4; + attr->m_sliderTickCount = 20; + + attr->m_minimum = m_yValueRange.first; + attr->m_maximum = m_yValueRange.second; + } + } + else if ( field == &m_parameterFilterRange ) + { + if ( auto attr = dynamic_cast( attribute ) ) + { + attr->m_decimals = 4; + attr->m_sliderTickCount = 20; + + attr->m_minimum = m_xValueRange.first; + attr->m_maximum = m_xValueRange.second; + } + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -164,15 +249,40 @@ void RimParameterResultCrossPlot::onLoadDataAndUpdate() if ( m_plotWidget && m_analyserOfSelectedCurveDefs ) { createPoints(); - if ( m_showPlotLegends && !isSubPlot() ) + + if ( m_useParameterFilter ) { - QwtLegend* legend = new QwtLegend( m_plotWidget ); - m_plotWidget->qwtPlot()->insertLegend( legend, QwtPlot::RightLegend ); - m_plotWidget->setLegendFontSize( legendFontSize() ); - m_plotWidget->updateLegend(); + if ( !m_rectAnnotation ) + { + m_rectAnnotation = std::make_unique(); + } + + m_rectAnnotation->setInterval( m_parameterFilterRange().first, + m_parameterFilterRange().second, + m_summaryFilterRange().first, + m_summaryFilterRange().second ); + + QColor penColor( "orange" ); + QPen pen( penColor ); + m_rectAnnotation->setPen( pen ); + + QColor brushColor = penColor; + double transparency = 0.3; + brushColor.setAlphaF( transparency ); + QBrush brush( brushColor ); + m_rectAnnotation->setBrush( brush ); + + m_rectAnnotation->attach( m_plotWidget->qwtPlot() ); + } + + updateValueRanges(); + if ( m_xValueRange.first != std::numeric_limits::infinity() ) + { + writeDataToCache(); } updateAxes(); + updatePlotTitle(); m_plotWidget->scheduleReplot(); } @@ -188,16 +298,12 @@ void RimParameterResultCrossPlot::updateAxes() m_plotWidget->setAxisTitleText( RiuPlotAxis::defaultLeft(), completeAddressText() ); m_plotWidget->setAxisTitleEnabled( RiuPlotAxis::defaultLeft(), true ); m_plotWidget->setAxisFontsAndAlignment( RiuPlotAxis::defaultLeft(), axisTitleFontSize(), axisValueFontSize(), false, Qt::AlignCenter ); - - double yRangeWidth = m_yRange.second - m_yRange.first; - m_plotWidget->setAxisRange( RiuPlotAxis::defaultLeft(), m_yRange.first - yRangeWidth * 0.1, m_yRange.second + yRangeWidth * 0.1 ); + m_plotWidget->setAxisRange( RiuPlotAxis::defaultLeft(), m_yValueRange.first, m_yValueRange.second ); m_plotWidget->setAxisTitleText( RiuPlotAxis::defaultBottom(), m_ensembleParameter ); m_plotWidget->setAxisTitleEnabled( RiuPlotAxis::defaultBottom(), true ); m_plotWidget->setAxisFontsAndAlignment( RiuPlotAxis::defaultBottom(), axisTitleFontSize(), axisValueFontSize(), false, Qt::AlignCenter ); - - double xRangeWidth = m_xRange.second - m_xRange.first; - m_plotWidget->setAxisRange( RiuPlotAxis::defaultBottom(), m_xRange.first - xRangeWidth * 0.1, m_xRange.second + xRangeWidth * 0.1 ); + m_plotWidget->setAxisRange( RiuPlotAxis::defaultBottom(), m_xValueRange.first, m_xValueRange.second ); } //-------------------------------------------------------------------------------------------------- @@ -224,9 +330,6 @@ QStringList caseNamesOfValidEnsembleCases( const RimSummaryEnsemble* ensemble ) void RimParameterResultCrossPlot::createPoints() { detachAllCurves(); - m_valuesForTextReport.clear(); - - time_t selectedTimestep = m_timeStep().toSecsSinceEpoch(); caf::ColorTable colorTable = RiaColorTables::categoryPaletteColors(); @@ -234,23 +337,121 @@ void RimParameterResultCrossPlot::createPoints() if ( addresses().empty() ) return; bool showEnsembleName = ensembles().size() > 1u; - bool showAddressName = addresses().size() > 1u; - m_xRange = std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ); - m_yRange = std::make_pair( std::numeric_limits::infinity(), -std::numeric_limits::infinity() ); + int idx = 0; + auto caseData = createCaseData(); + for ( const auto& [paramValue, closestValue, summaryCase] : caseData ) + { + RiuQwtPlotCurve* plotCurve = new RiuQwtPlotCurve; + plotCurve->setSamplesValues( { paramValue }, { closestValue } ); + plotCurve->setStyle( QwtPlotCurve::NoCurve ); + + RiuQwtSymbol* symbol = new RiuQwtSymbol( RiuPlotCurveSymbol::SYMBOL_ELLIPSE ); + symbol->setSize( legendFontSize(), legendFontSize() ); + symbol->setColor( colorTable.cycledQColor( idx++ ) ); + plotCurve->setSymbol( symbol ); + + QStringList curveName; + if ( showEnsembleName && summaryCase->ensemble() ) + { + curveName += summaryCase->ensemble()->name(); + } + curveName += summaryCase->displayCaseName(); + + plotCurve->setTitle( curveName.join( " - " ) ); + + plotCurve->attach( m_plotWidget->qwtPlot() ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimParameterResultCrossPlot::updateValueRanges() +{ + auto parameterMin = std::numeric_limits::infinity(); + auto parameterMax = -std::numeric_limits::infinity(); + auto summaryMin = std::numeric_limits::infinity(); + auto summaryMax = -std::numeric_limits::infinity(); + + auto caseData = createCaseData(); + for ( const auto& [paramValue, summaryValue, summaryCase] : caseData ) + { + parameterMin = std::min( parameterMin, paramValue ); + parameterMax = std::max( parameterMax, paramValue ); + summaryMin = std::min( summaryMin, summaryValue ); + summaryMax = std::max( summaryMax, summaryValue ); + } + + double parameterRange = parameterMax - parameterMin; + double summaryRange = summaryMax - summaryMin; + + m_xValueRange = { parameterMin - parameterRange * 0.1, parameterMax + parameterRange * 0.1 }; + m_yValueRange = { summaryMin - summaryRange * 0.1, summaryMax + summaryRange * 0.1 }; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimParameterResultCrossPlot::updateFilterRanges() +{ + const auto hashValue = hashFromCurrentData(); + if ( m_filterValueRangeCache.contains( hashValue ) ) + { + const auto& cachedRanges = m_filterValueRangeCache[hashValue]; + m_parameterFilterRange = { cachedRanges[0], cachedRanges[1] }; + m_summaryFilterRange = { cachedRanges[2], cachedRanges[3] }; + } + else + { + m_summaryFilterRange = m_yValueRange; + m_parameterFilterRange = m_xValueRange; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimParameterResultCrossPlot::excludedCasesText() const +{ + auto cases = summaryCasesExcludedByFilter(); + QStringList caseNames; + for ( auto summaryCase : cases ) + { + caseNames.push_back( summaryCase->displayCaseName() ); + } + return caseNames.join( ", " ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimParameterResultCrossPlot::detachAllCurves() +{ + if ( m_plotWidget && m_rectAnnotation ) + { + m_rectAnnotation->detach(); + } + + RimAbstractCorrelationPlot::detachAllCurves(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimParameterResultCrossPlot::createCaseData() const +{ + RigEnsembleParameter parameter = ensembleParameter( m_ensembleParameter ); + if ( !( parameter.isNumeric() && parameter.isValid() ) ) return {}; + + std::vector caseData; + + time_t selectedTimestep = m_timeStep().toSecsSinceEpoch(); - int ensembleIdx = 0; for ( auto ensemble : ensembles() ) { - int addressIdx = 0; for ( auto address : addresses() ) { - RigEnsembleParameter parameter = ensembleParameter( m_ensembleParameter ); - if ( !( parameter.isNumeric() && parameter.isValid() ) ) return; - - QStringList caseNames = caseNamesOfValidEnsembleCases( ensemble ); - QString commonCaseRoot = RiaTextStringTools::commonRoot( caseNames ); - std::set activeCases = filterEnsembleCases( ensemble ); for ( size_t caseIdx = 0u; caseIdx < ensemble->allSummaryCases().size(); ++caseIdx ) @@ -263,9 +464,9 @@ void RimParameterResultCrossPlot::createPoints() if ( !summaryCase->caseRealizationParameters() ) continue; - double closestValue = std::numeric_limits::infinity(); - time_t closestTimeStep = 0; - auto [isOk, values] = reader->values( address ); + double summaryValue = std::numeric_limits::infinity(); + time_t closestTimeStep = 0; + auto [isOk, summaryValues] = reader->values( address ); if ( isOk ) { const std::vector& timeSteps = reader->timeSteps( address ); @@ -273,49 +474,118 @@ void RimParameterResultCrossPlot::createPoints() { if ( timeDiff( timeSteps[i], selectedTimestep ) < timeDiff( selectedTimestep, closestTimeStep ) ) { - closestValue = values[i]; + summaryValue = summaryValues[i]; closestTimeStep = timeSteps[i]; } } } - if ( closestValue != std::numeric_limits::infinity() ) + + if ( summaryValue != std::numeric_limits::infinity() ) { - std::vector caseValuesAtTimestep; - std::vector parameterValues; - - caseValuesAtTimestep.push_back( closestValue ); - double paramValue = parameter.values[caseIdx].toDouble(); - parameterValues.push_back( paramValue ); - - m_valuesForTextReport.push_back( { paramValue, closestValue } ); - - m_xRange.first = std::min( m_xRange.first, paramValue ); - m_xRange.second = std::max( m_xRange.second, paramValue ); - - m_yRange.first = std::min( m_yRange.first, closestValue ); - m_yRange.second = std::max( m_yRange.second, closestValue ); - - RiuQwtPlotCurve* plotCurve = new RiuQwtPlotCurve; - plotCurve->setSamplesValues( parameterValues, caseValuesAtTimestep ); - plotCurve->setStyle( QwtPlotCurve::NoCurve ); - RiuQwtSymbol* symbol = new RiuQwtSymbol( RiuPlotCurveSymbol::cycledSymbolStyle( ensembleIdx, addressIdx ), "" ); - symbol->setSize( legendFontSize(), legendFontSize() ); - symbol->setColor( colorTable.cycledQColor( caseIdx ) ); - plotCurve->setSymbol( symbol ); - QStringList curveName; - if ( showEnsembleName ) curveName += ensemble->name(); - curveName += summaryCase->displayCaseName().replace( commonCaseRoot, "" ); - if ( showAddressName ) curveName += QString::fromStdString( address.uiText() ); - - plotCurve->setTitle( curveName.join( " - " ) ); - - plotCurve->attach( m_plotWidget->qwtPlot() ); + caseData.push_back( + { .parameterValue = parameter.values[caseIdx].toDouble(), .summaryValue = summaryValue, .summaryCase = summaryCase } ); } } - addressIdx++; } - ensembleIdx++; } + return caseData; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimParameterResultCrossPlot::hashFromCurrentData() const +{ + return RiaHashTools::hash( m_ensembleParameter().toStdString(), + m_xValueRange.first, + m_xValueRange.second, + m_yValueRange.first, + m_yValueRange.second ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimParameterResultCrossPlot::writeDataToCache() +{ + const auto hashValue = hashFromCurrentData(); + m_filterValueRangeCache[hashValue] = { m_parameterFilterRange().first, + m_parameterFilterRange().second, + m_summaryFilterRange().first, + m_summaryFilterRange().second }; +} + +namespace internal +{ +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +class CurveTracker : public QwtPlotPicker +{ +public: + CurveTracker( QwtPlot* plot ) + : QwtPlotPicker( plot->canvas() ) + { + setStateMachine( new QwtPickerTrackerMachine() ); + setRubberBand( QwtPicker::NoRubberBand ); + setTrackerMode( QwtPicker::AlwaysOn ); + } + +protected: + QwtText trackerText( const QPoint& pos ) const override + { + double minDistance = std::numeric_limits::max(); + QString closestCurveLabel; + + for ( QwtPlotItem* item : plot()->itemList() ) + { + if ( item->rtti() == QwtPlotItem::Rtti_PlotCurve ) + { + auto curve = static_cast( item ); + double distance = std::numeric_limits::max(); + curve->closestPoint( pos, &distance ); + + if ( distance < minDistance ) + { + minDistance = distance; + closestCurveLabel = curve->title().text(); + } + } + } + + if ( minDistance < 20.0 ) + { + QwtText text( closestCurveLabel ); + text.setBackgroundBrush( QBrush( Qt::white ) ); + text.setColor( Qt::black ); + return text; + } + + return QwtText(); + } +}; +} // namespace internal + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuPlotWidget* RimParameterResultCrossPlot::doCreatePlotViewWidget( QWidget* mainWindowParent /*= nullptr */ ) +{ + if ( !m_plotWidget ) + { + m_plotWidget = new RiuQwtPlotWidget( this, mainWindowParent ); + updatePlotTitle(); + + new RiuContextMenuLauncher( m_plotWidget, { "RicShowPlotDataFeature", "RicCreateEnsembleFromFilteredCasesFeature" } ); + } + + if ( m_plotWidget ) + { + // Add a curve tracker to display the name of the realization when mouse is close to a sample in the cross plot + new internal::CurveTracker( m_plotWidget->qwtPlot() ); + } + + return m_plotWidget; } //-------------------------------------------------------------------------------------------------- @@ -325,10 +595,13 @@ QString RimParameterResultCrossPlot::asciiDataForPlotExport() const { QString asciiData; - asciiData += "Parameter\tResult\n"; - for ( const auto& valuePair : m_valuesForTextReport ) + auto data = createCaseData(); + + asciiData += "Realization\tParameter\tResult\n"; + for ( const auto& [parameterValue, summaryValue, summaryCase] : data ) { - asciiData += QString( "%1\t%2\n" ).arg( valuePair.first ).arg( valuePair.second ); + auto caseName = summaryCase->displayCaseName(); + asciiData += QString( "%1\t%2\t%3\n" ).arg( caseName ).arg( parameterValue ).arg( summaryValue ); } return asciiData; @@ -346,7 +619,7 @@ void RimParameterResultCrossPlot::updatePlotTitle() QString vectorName = completeAddressText(); m_description = - QString( "Cross Plot %1, %2 x %3 at %4" ).arg( ensemble->name() ).arg( m_ensembleParameter ).arg( vectorName ).arg( timeStepString() ); + QString( "%1 x %2, %3 at %4" ).arg( vectorName ).arg( m_ensembleParameter ).arg( ensemble->name() ).arg( timeStepString() ); } m_plotWidget->setPlotTitle( m_description ); m_plotWidget->setPlotTitleEnabled( m_showPlotTitle && !isSubPlot() ); diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.h b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.h index bcfacbf2dc..1839d72a0a 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.h +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.h @@ -20,6 +20,11 @@ #include "RimAbstractCorrelationPlot.h" +#include +#include + +class RiuQwtPlotRectAnnotation; + //================================================================================================== /// /// @@ -33,27 +38,54 @@ public: ~RimParameterResultCrossPlot() override; void setEnsembleParameter( const QString& ensembleParameter ); -private: - // Overridden PDM methods + std::vector summaryCasesExcludedByFilter() const; + void appendFilterFields( caf::PdmUiOrdering& uiOrdering ); + void detachAllCurves() override; + +private: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + + RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override; void onLoadDataAndUpdate() override; void updateAxes() override; QString asciiDataForPlotExport() const override; + void updatePlotTitle() override; + void createPoints(); - // Private methods - void updatePlotTitle() override; - void createPoints(); + void updateValueRanges(); + void updateFilterRanges(); + + QString excludedCasesText() const; + + struct CaseData + { + double parameterValue; + double summaryValue; + RimSummaryCase* summaryCase; + }; + + std::vector createCaseData() const; + + size_t hashFromCurrentData() const; + void writeDataToCache(); private: caf::PdmField m_ensembleParameter; - std::pair m_xRange; - std::pair m_yRange; + caf::PdmField m_useParameterFilter; + caf::PdmField> m_summaryFilterRange; + caf::PdmField> m_parameterFilterRange; + caf::PdmProxyValueField m_excludedCasesText; - std::vector> m_valuesForTextReport; + std::pair m_xValueRange; + std::pair m_yValueRange; + + std::unique_ptr m_rectAnnotation; + + std::map> m_filterValueRangeCache; }; diff --git a/ApplicationLibCode/ProjectDataModel/Faults/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Faults/CMakeLists_files.cmake index 58d388a898..70be5591cf 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Faults/CMakeLists_files.cmake @@ -37,11 +37,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Faults" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp index 91c42fec25..aab2a8b349 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp @@ -56,6 +56,7 @@ #include "RimTools.h" #include "cafPdmUiDoubleSliderEditor.h" +#include "cafPdmUiFilePathEditor.h" #include "cafPdmUiTableViewEditor.h" #include "cafPdmUiTreeSelectionEditor.h" @@ -560,17 +561,21 @@ void RimFaultReactivationModel::defineEditorAttribute( const caf::PdmFieldHandle { if ( field == &m_targets ) { - auto tvAttribute = dynamic_cast( attribute ); - if ( tvAttribute ) + if ( auto tvAttribute = dynamic_cast( attribute ) ) { tvAttribute->resizePolicy = caf::PdmUiTableViewEditorAttribute::RESIZE_TO_FIT_CONTENT; } } + else if ( field == &m_baseDir ) + { + if ( auto myAttr = dynamic_cast( attribute ) ) + { + myAttr->m_selectDirectory = true; + } + } else if ( ( field == &m_faultExtendUpwards ) || ( field == &m_faultExtendDownwards ) ) { - auto* attr = dynamic_cast( attribute ); - - if ( attr ) + if ( auto attr = dynamic_cast( attribute ) ) { auto eclCase = eclipseCase(); if ( eclCase ) diff --git a/ApplicationLibCode/ProjectDataModel/Flow/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Flow/CMakeLists_files.cmake index 5680c97f12..5f0b9c46fd 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Flow/CMakeLists_files.cmake @@ -43,11 +43,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Flow" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp index 0d486d05fd..4f1cbacafb 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp @@ -188,7 +188,13 @@ RimWellConnectivityTable::RimWellConnectivityTable() m_legendConfig->setAutomaticRanges( 0.0, 100.0, 0.0, 100.0 ); m_legendConfig->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::HEAT_MAP ) ); - CAF_PDM_InitFieldNoDefault( &m_mappingType, "MappingType", "Mapping Type" ); + CAF_PDM_InitField( &m_mappingType, "MappingType", RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS, "Mapping Type" ); + caf::AppEnum::setEnumSubset( &m_mappingType, + { RimRegularLegendConfig::MappingType::LINEAR_DISCRETE, + RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS, + RimRegularLegendConfig::MappingType::LOG10_CONTINUOUS, + RimRegularLegendConfig::MappingType::LOG10_DISCRETE } ); + CAF_PDM_InitFieldNoDefault( &m_rangeType, "RangeType", "Range Type" ); setLegendsVisible( true ); @@ -753,17 +759,6 @@ QList RimWellConnectivityTable::calculateValueOptions( c { options = caf::FontTools::relativeSizeValueOptions( RiaPreferences::current()->defaultPlotFontSize() ); } - else if ( fieldNeedingOptions == &m_mappingType ) - { - std::vector mappingTypes = { RimRegularLegendConfig::MappingType::LINEAR_DISCRETE, - RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS, - RimRegularLegendConfig::MappingType::LOG10_CONTINUOUS, - RimRegularLegendConfig::MappingType::LOG10_DISCRETE }; - for ( const auto mappingType : mappingTypes ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( mappingType ), mappingType ) ); - } - } return options; } diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp index fe53d13c69..a3a731b22b 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp @@ -25,6 +25,7 @@ #include "RigEclipseResultAddress.h" #include "Well/RigSimWellData.h" +#include "RimDepthTrackPlot.h" #include "RimEclipseCase.h" #include "RimEclipseResultCase.h" #include "RimObservedDataCollection.h" @@ -42,6 +43,7 @@ #include "RimWellLogRftCurve.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" +#include "RimWellRftPlot.h" #include @@ -540,6 +542,24 @@ std::vector pressureDepthDataForWell( const QString& simW return observedDataForWell; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void loadDataAndUpdateDepthTrackPlots( const std::set& depthTrackPlots ) +{ + for ( auto plot : depthTrackPlots ) + { + plot->updateConnectedEditors(); + + if ( auto rftPlot = dynamic_cast( plot ) ) + { + rftPlot->rebuildCurves(); + } + + plot->loadDataAndUpdate(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.h b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.h index f87e7262e2..7f0c145a49 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.h +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.h @@ -41,6 +41,7 @@ class RiuWellRftPlot; class RigEclipseCaseData; class RigEclipseResultAddress; class RifReaderRftInterface; +class RimDepthTrackPlot; namespace RimWellPlotTools { @@ -116,4 +117,5 @@ bool hasFlowData( const RimWellPath* wellPath ); std::vector pressureDepthData(); std::vector pressureDepthDataForWell( const QString& simWellName ); +void loadDataAndUpdateDepthTrackPlots( const std::set& depthTrackPlots ); }; // namespace RimWellPlotTools diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp index d7192ca5aa..a1859fd91b 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp @@ -596,43 +596,45 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set rftAddresses = - curveSet->statisticsEclipseRftReader()->eclipseRftAddresses( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ); - for ( const auto& rftAddress : rftAddresses ) + if ( auto curveSet = findEnsembleCurveSet( ensemble ) ) { - if ( rftAddress.wellLogChannel() == RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P50 ) + std::set rftAddresses = + curveSet->statisticsEclipseRftReader()->eclipseRftAddresses( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ); + for ( const auto& rftAddress : rftAddresses ) { - // Default statistics curves are P10, P50, P90 and mean - // It is not common to use P50 for ensemble RFT, so skip display of P50 to avoid confusion with mean - // https://github.com/OPM/ResInsight/issues/5238 + if ( rftAddress.wellLogChannel() == RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P50 ) + { + // Default statistics curves are P10, P50, P90 and mean + // It is not common to use P50 for ensemble RFT, so skip display of P50 to avoid confusion with mean + // https://github.com/OPM/ResInsight/issues/5238 - continue; - } + continue; + } - if ( rftAddress.wellLogChannel() != RifEclipseRftAddress::RftWellLogChannelType::TVD ) - { - auto curve = new RimWellLogRftCurve(); - plotTrack->addCurve( curve ); - curve->setEnsemble( ensemble ); - curve->setEclipseCase( curveSet->eclipseCase() ); - curve->setRftAddress( rftAddress ); - curve->setObservedFmuRftData( findObservedFmuData( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ) ); - curve->setZOrder( RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_ENSEMBLE_STAT_CURVE ) ); - applyCurveAppearance( curve ); - auto symbol = statisticsCurveSymbolFromAddress( rftAddress ); - RiuPlotCurveSymbol::LabelPosition labelPos = statisticsLabelPosFromAddress( rftAddress ); - curve->setSymbol( symbol ); - curve->setSymbolLabelPosition( labelPos ); - curve->setSymbolSize( curve->symbolSize() + 3 ); - curve->setSymbolSkipDistance( 150 ); - curve->setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID ); - QString uiText = caf::AppEnum::uiText( rftAddress.wellLogChannel() ); - QString label = uiText.replace( ": Pressure", "" ); - curve->setSymbolLabel( label ); - curve->setLineThickness( 3 ); - curve->setShowInLegend( !m_showEnsembleCurves ); + if ( rftAddress.wellLogChannel() != RifEclipseRftAddress::RftWellLogChannelType::TVD ) + { + auto curve = new RimWellLogRftCurve(); + plotTrack->addCurve( curve ); + curve->setEnsemble( ensemble ); + curve->setEclipseCase( curveSet->eclipseCase() ); + curve->setRftAddress( rftAddress ); + curve->setObservedFmuRftData( findObservedFmuData( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ) ); + curve->setZOrder( RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_ENSEMBLE_STAT_CURVE ) ); + applyCurveAppearance( curve ); + auto symbol = statisticsCurveSymbolFromAddress( rftAddress ); + RiuPlotCurveSymbol::LabelPosition labelPos = statisticsLabelPosFromAddress( rftAddress ); + curve->setSymbol( symbol ); + curve->setSymbolLabelPosition( labelPos ); + curve->setSymbolSize( curve->symbolSize() + 3 ); + curve->setSymbolSkipDistance( 150 ); + curve->setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID ); + QString uiText = caf::AppEnum::uiText( rftAddress.wellLogChannel() ); + QString label = uiText.replace( ": Pressure", "" ); + curve->setSymbolLabel( label ); + curve->setLineThickness( 3 ); + curve->setShowInLegend( !m_showEnsembleCurves ); + } } } } @@ -1541,6 +1543,16 @@ RimWellRftEnsembleCurveSet* RimWellRftPlot::findEnsembleCurveSet( RimSummaryEnse return nullptr; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellRftPlot::rebuildCurves() +{ + createEnsembleCurveSets(); + updateFormationsOnPlot(); + syncCurvesFromUiSelection(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.h b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.h index 56f0de8845..e126595a77 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.h +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.h @@ -24,6 +24,7 @@ #include "RimWellRftEnsembleCurveSet.h" #include "RifDataSourceForRftPltQMetaType.h" + #include "RiuPlotCurveSymbol.h" #include "cafPdmField.h" @@ -96,6 +97,8 @@ public: RimWellRftEnsembleCurveSet* findEnsembleCurveSet( RimSummaryEnsemble* ensemble ) const; + void rebuildCurves(); + protected: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override; diff --git a/ApplicationLibCode/ProjectDataModel/Formations/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Formations/CMakeLists_files.cmake new file mode 100644 index 0000000000..812ccca15e --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Formations/CMakeLists_files.cmake @@ -0,0 +1,15 @@ +set(SOURCE_GROUP_HEADER_FILES + ${CMAKE_CURRENT_LIST_DIR}/RimFormationNames.h + ${CMAKE_CURRENT_LIST_DIR}/RimFormationNamesCollection.h + ${CMAKE_CURRENT_LIST_DIR}/RimFormationTools.h +) + +set(SOURCE_GROUP_SOURCE_FILES + ${CMAKE_CURRENT_LIST_DIR}/RimFormationNames.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimFormationNamesCollection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimFormationTools.cpp +) + +list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) + +list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) diff --git a/ApplicationLibCode/ProjectDataModel/RimFormationNames.cpp b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationNames.cpp similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimFormationNames.cpp rename to ApplicationLibCode/ProjectDataModel/Formations/RimFormationNames.cpp diff --git a/ApplicationLibCode/ProjectDataModel/RimFormationNames.h b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationNames.h similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimFormationNames.h rename to ApplicationLibCode/ProjectDataModel/Formations/RimFormationNames.h diff --git a/ApplicationLibCode/ProjectDataModel/RimFormationNamesCollection.cpp b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationNamesCollection.cpp similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimFormationNamesCollection.cpp rename to ApplicationLibCode/ProjectDataModel/Formations/RimFormationNamesCollection.cpp diff --git a/ApplicationLibCode/ProjectDataModel/RimFormationNamesCollection.h b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationNamesCollection.h similarity index 100% rename from ApplicationLibCode/ProjectDataModel/RimFormationNamesCollection.h rename to ApplicationLibCode/ProjectDataModel/Formations/RimFormationNamesCollection.h diff --git a/ApplicationLibCode/ProjectDataModel/Formations/RimFormationTools.cpp b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationTools.cpp new file mode 100644 index 0000000000..d10148a7cd --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationTools.cpp @@ -0,0 +1,76 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 - 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimFormationTools.h" + +#include "RiaLogging.h" + +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" + +#include "cafUtils.h" + +#include +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// look for formation file two levels up from the egrid file +//-------------------------------------------------------------------------------------------------- +QStringList RimFormationTools::formationFoldersFromCaseFileName( const QString caseFileName ) +{ + QStringList folders; + + QFileInfo fi( caseFileName ); + + auto formationFolder = QDir( fi.dir().path() + "/../../" ); + auto rmsFolder = QDir( fi.dir().path() + "/../../rms/output/zone/" ); + + folders.push_back( rmsFolder.absolutePath() ); // rms folder is 1st pri. + folders.push_back( formationFolder.absolutePath() ); + + return folders; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFormationNames* RimFormationTools::loadFormationNamesFromFolder( const QStringList& folderNames ) +{ + QStringList filters; + filters << "*.lyr"; + + QStringList fileList; + + for ( auto& folder : folderNames ) + { + fileList.append( caf::Utils::getFilesInDirectory( folder, filters, true /*absolute filename*/ ) ); + if ( !fileList.isEmpty() ) break; + } + + if ( fileList.isEmpty() ) return nullptr; + + RimFormationNamesCollection* fomNameColl = new RimFormationNamesCollection(); + std::vector formationNames = fomNameColl->importFiles( fileList ); + if ( formationNames.size() > 1 ) + { + RiaLogging::warning( QString( "Multiple formation name files found in ensemble folders." ) ); + } + + return formationNames.front(); +} diff --git a/ApplicationLibCode/ProjectDataModel/Formations/RimFormationTools.h b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationTools.h new file mode 100644 index 0000000000..d30ac4eb0f --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Formations/RimFormationTools.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 - 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include +#include + +class RimFormationNames; + +class RimFormationTools +{ +public: + static QStringList formationFoldersFromCaseFileName( const QString caseFileName ); + static RimFormationNames* loadFormationNamesFromFolder( const QStringList& folderNames ); + +private: + RimFormationTools(){}; +}; \ No newline at end of file diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/GeoMech/CMakeLists_files.cmake index 09273eece6..ac0351e79d 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/CMakeLists_files.cmake @@ -27,11 +27,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\GeoMech" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp index 8800ce7ec4..b2d7990019 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp @@ -34,9 +34,9 @@ #include "RigFormationNames.h" #include "RigGeoMechCaseData.h" +#include "Formations/RimFormationNames.h" #include "Rim2dIntersectionViewCollection.h" #include "RimCellFilterCollection.h" -#include "RimFormationNames.h" #include "RimGeoMechCellColors.h" #include "RimGeoMechContourMapView.h" #include "RimGeoMechContourMapViewCollection.h" @@ -922,7 +922,7 @@ void RimGeoMechCase::updateFormationNamesData() RimGeoMechPropertyFilterCollection* eclFilColl = geomView->geoMechPropertyFilterCollection(); for ( RimGeoMechPropertyFilter* propFilter : eclFilColl->propertyFilters ) { - if ( propFilter->resultDefinition->resultPositionType() == RIG_FORMATION_NAMES ) + if ( propFilter->resultDefinition()->resultPositionType() == RIG_FORMATION_NAMES ) { propFilter->setToDefaultValues(); propFilter->updateConnectedEditors(); @@ -1021,9 +1021,9 @@ void RimGeoMechCase::closeSelectedElementPropertyFiles() for ( RimGeoMechPropertyFilter* propertyFilter : view->geoMechPropertyFilterCollection()->propertyFilters() ) { - if ( address == propertyFilter->resultDefinition->resultAddress() ) + if ( address == propertyFilter->resultDefinition()->resultAddress() ) { - propertyFilter->resultDefinition->setResultAddress( RigFemResultAddress() ); + propertyFilter->resultDefinition()->setResultAddress( RigFemResultAddress() ); } } } diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.cpp index 411abdb862..abdcf4e1eb 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.cpp +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.cpp @@ -17,16 +17,16 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimGeoMechContourMapProjection.h" -#include "RigContourMapCalculator.h" -#include "RigContourMapGrid.h" -#include "RigContourMapProjection.h" +#include "ContourMap/RigContourMapCalculator.h" +#include "ContourMap/RigContourMapGrid.h" +#include "ContourMap/RigContourMapProjection.h" +#include "ContourMap/RigGeoMechContourMapProjection.h" #include "RigFemAddressDefines.h" #include "RigFemPart.h" #include "RigFemPartCollection.h" #include "RigFemPartGrid.h" #include "RigFemPartResultsCollection.h" #include "RigGeoMechCaseData.h" -#include "RigGeoMechContourMapProjection.h" #include "RimCellFilterCollection.h" #include "RimGeoMechCase.h" @@ -50,7 +50,7 @@ CAF_PDM_SOURCE_INIT( RimGeoMechContourMapProjection, "RimGeoMechContourMapProjec //-------------------------------------------------------------------------------------------------- RimGeoMechContourMapProjection::RimGeoMechContourMapProjection() { - CAF_PDM_InitObject( "RimContourMapProjection", ":/2DMapProjection16x16.png" ); + CAF_PDM_InitObject( "Map Projection", ":/2DMapProjection16x16.png" ); CAF_PDM_InitField( &m_limitToPorePressureRegions, "LimitToPorRegion", true, "Limit to Pore Pressure regions" ); CAF_PDM_InitField( &m_applyPPRegionLimitVertically, "VerticalLimit", false, "Apply Limit Vertically" ); CAF_PDM_InitField( &m_paddingAroundPorePressureRegion, "PaddingAroundPorRegion", 0.0, "Horizontal Padding around PP regions" ); @@ -75,12 +75,36 @@ QString RimGeoMechContourMapProjection::resultDescriptionText() const return resultText; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimGeoMechContourMapProjection::resultVariableName() const +{ + if ( auto v = view() ) + { + if ( auto c = v->cellResult() ) + { + return c->resultFieldUiName(); + } + } + + return ""; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RimRegularLegendConfig* RimGeoMechContourMapProjection::legendConfig() const { - return view()->cellResult()->legendConfig(); + if ( auto v = view() ) + { + if ( auto c = v->cellResult() ) + { + return c->legendConfig(); + } + } + + return nullptr; } //-------------------------------------------------------------------------------------------------- @@ -122,7 +146,7 @@ double RimGeoMechContourMapProjection::sampleSpacing() const RimGeoMechCase* geoMechCase = this->geoMechCase(); if ( geoMechCase ) { - return m_relativeSampleSpacing * geoMechCase->characteristicCellSize(); + return sampleSpacingFactor() * geoMechCase->characteristicCellSize(); } return 0.0; } @@ -398,22 +422,20 @@ void RimGeoMechContourMapProjection::defineEditorAttribute( const caf::PdmFieldH //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair RimGeoMechContourMapProjection::minmaxValuesAllTimeSteps() +std::pair RimGeoMechContourMapProjection::computeMinMaxValuesAllTimeSteps() { - if ( !resultRangeIsValid() ) - { - clearTimeStepRange(); + double minimum = std::numeric_limits::infinity(); + double maximum = -std::numeric_limits::infinity(); - if ( geoMechCase()->geoMechData()->femPartResults() ) + if ( geoMechCase()->geoMechData()->femPartResults() ) + { + int steps = geoMechCase()->geoMechData()->femPartResults()->totalSteps(); + for ( int stepIdx = 0; stepIdx < steps; stepIdx++ ) { - int steps = geoMechCase()->geoMechData()->femPartResults()->totalSteps(); - for ( int stepIdx = 0; stepIdx < steps; stepIdx++ ) - { - std::vector aggregatedResults = generateResults( stepIdx ); - m_minResultAllTimeSteps = std::min( m_minResultAllTimeSteps, RigContourMapProjection::minValue( aggregatedResults ) ); - m_maxResultAllTimeSteps = std::max( m_maxResultAllTimeSteps, RigContourMapProjection::maxValue( aggregatedResults ) ); - } + std::vector aggregatedResults = generateResults( stepIdx ); + minimum = std::min( minimum, RigContourMapProjection::minValue( aggregatedResults ) ); + maximum = std::max( maximum, RigContourMapProjection::maxValue( aggregatedResults ) ); } } - return std::make_pair( m_minResultAllTimeSteps, m_maxResultAllTimeSteps ); + return std::make_pair( minimum, maximum ); } diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.h b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.h index f78d0079e0..f9fb384072 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.h +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapProjection.h @@ -21,7 +21,7 @@ #include "RigFemPart.h" #include "RigFemResultAddress.h" -#include "RimContourMapProjection.h" +#include "ContourMap/RimContourMapProjection.h" #include "cafPdmField.h" #include "cafPdmObject.h" @@ -45,6 +45,7 @@ public: ~RimGeoMechContourMapProjection() override; // GeoMech case overrides for contour map methods + QString resultVariableName() const override; QString resultDescriptionText() const override; RimRegularLegendConfig* legendConfig() const override; void updateLegend() override; @@ -68,7 +69,7 @@ protected: RimGeoMechCase* geoMechCase() const; RimGeoMechContourMapView* view() const; - std::pair minmaxValuesAllTimeSteps() override; + std::pair computeMinMaxValuesAllTimeSteps() override; void updateAfterResultGeneration( int timeStep ) override; diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp index 0d3efc8225..3c5a7a803a 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp @@ -77,7 +77,7 @@ RimGeoMechContourMapView::RimGeoMechContourMapView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimGeoMechContourMapProjection* RimGeoMechContourMapView::contourMapProjection() const +RimContourMapProjection* RimGeoMechContourMapView::contourMapProjection() const { return m_contourMapProjection().p(); } diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h index 38f126b8bc..2fe4bbd7e0 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h @@ -23,6 +23,7 @@ enum class RimLegendConfigChangeType; class RimGeoMechContourMapProjection; +class RimContourMapProjection; class RimRegularLegendConfig; class RimViewNameConfig; class RimScaleLegendConfig; @@ -34,7 +35,7 @@ class RimGeoMechContourMapView : public RimGeoMechView public: RimGeoMechContourMapView(); - RimGeoMechContourMapProjection* contourMapProjection() const; + RimContourMapProjection* contourMapProjection() const; RiaDefines::View3dContent viewContent() const override; diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp index 7b9777b9b6..1ea3a69699 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp @@ -195,7 +195,7 @@ void RimGeoMechView::onLoadDataAndUpdate() geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters(); m_wellMeasurementCollection->syncWithChangesInWellMeasurementCollection(); - if ( m_surfaceCollection ) m_surfaceCollection->loadData(); + if ( m_surfaceCollection ) m_surfaceCollection->loadData( m_currentTimeStep ); if ( m_partsCollection ) m_partsCollection->syncWithCase( m_geomechCase ); @@ -472,7 +472,6 @@ void RimGeoMechView::onUpdateDisplayModelForCurrentTimeStep() // Intersections if ( intersectionCollection()->shouldApplyCellFiltersToIntersections() && propertyFilterCollection()->hasActiveDynamicFilters() ) { - m_intersectionCollection->clearGeometry(); appendIntersectionsForCurrentTimeStep(); } @@ -504,6 +503,14 @@ void RimGeoMechView::onUpdateStaticCellColors() m_vizLogic->updateStaticCellColors( -1 ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGeoMechView::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) +{ + m_propertyFilterCollection->updateFromResult( cellResult() ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.h b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.h index edbe419717..d0906e8b1b 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.h +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.h @@ -138,6 +138,8 @@ private: void onUpdateDisplayModelForCurrentTimeStep() override; void onUpdateStaticCellColors() override; + void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override; + void onUpdateLegends() override; void updateTensorLegendTextAndRanges( RimRegularLegendConfig* legendConfig, int viewerTimeStep ); diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CMakeLists_files.cmake index d6742c68b9..d89cd512c2 100644 --- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CMakeLists_files.cmake @@ -19,13 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlot.h) - -source_group( - "ProjectDataModel\\GridCrossPlots" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CellFilters/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CellFilters/CMakeLists_files.cmake index 52dcbe9860..dff962b685 100644 --- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CellFilters/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/CellFilters/CMakeLists_files.cmake @@ -11,11 +11,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\GridCrossPlots\\CellFilters" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp index 81e3dd0d71..85ad2095a9 100644 --- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp @@ -374,7 +374,6 @@ QString RimGridCrossPlot::generateInfoBoxText() const } } QStringList infoText; - infoText << QString( "View ID: %1
" ).arg( id() ); if ( curveInfoTexts.size() > 1 ) { infoText += QString( "
    " ); diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp index a6c80ddb42..c4e57db5e4 100644 --- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotDataSet.cpp @@ -39,13 +39,13 @@ #include "RiuPlotWidget.h" #include "RiuScalarMapperLegendFrame.h" +#include "Formations/RimFormationNames.h" #include "RimCase.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseResultCase.h" #include "RimEclipseResultDefinition.h" #include "RimEclipseView.h" -#include "RimFormationNames.h" #include "RimGridCrossPlot.h" #include "RimGridCrossPlotCurve.h" #include "RimGridCrossPlotRegressionCurve.h" @@ -508,20 +508,16 @@ void RimGridCrossPlotDataSet::onLoadDataAndUpdate( bool updateParentPlot ) legendConfig()->setMappingMode( RimRegularLegendConfig::MappingType::LINEAR_DISCRETE ); } - RigEclipseResultAddress xAddress( m_xAxisProperty->resultType(), m_xAxisProperty->resultVariable() ); - RigEclipseResultAddress yAddress( m_yAxisProperty->resultType(), m_yAxisProperty->resultVariable() ); - RigEclipseResultAddress groupAddress( m_groupingProperty->resultType(), m_groupingProperty->resultVariable() ); - std::map timeStepCellVisibilityMap = calculateCellVisibility( eclipseCase ); updateLegendRange(); RigEclipseCrossPlotResult result = RigEclipseCrossPlotDataExtractor::extract( eclipseCase->eclipseCaseData(), m_timeStep(), - xAddress, - yAddress, + *m_xAxisProperty, + *m_yAxisProperty, m_grouping(), - groupAddress, + *m_groupingProperty, timeStepCellVisibilityMap ); if ( isXAxisLogarithmic() || isYAxisLogarithmic() ) @@ -574,12 +570,6 @@ void RimGridCrossPlotDataSet::assignCurveDataGroups( const RigEclipseCrossPlotRe { m_groupedResults.clear(); - if ( groupingEnabled() && ( result.groupValuesContinuous.empty() && result.groupValuesDiscrete.empty() ) ) - { - // Basis for group determination (i.e. formation list) may have been deleted since the grouping was assigned. - m_grouping = NO_GROUPING; - } - if ( !groupingEnabled() ) { m_groupedResults[0] = result; @@ -1212,7 +1202,11 @@ void RimGridCrossPlotDataSet::updateLegendRange() RimEclipseCase* eclipseCase = dynamic_cast( m_case() ); if ( eclipseCase ) { - m_groupingProperty->updateRangesForEmbeddedLegends( m_timeStep() ); + auto eclipseView = dynamic_cast( m_cellFilterView() ); + m_groupingProperty->updateRangesForExplicitLegends( m_groupingProperty->legendConfig(), + m_groupingProperty->ternaryLegendConfig(), + m_timeStep(), + eclipseView ); } } if ( !m_legendOverlayFrame ) diff --git a/ApplicationLibCode/ProjectDataModel/Intersections/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Intersections/CMakeLists_files.cmake index 35100c285e..1790702f38 100644 --- a/ApplicationLibCode/ProjectDataModel/Intersections/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Intersections/CMakeLists_files.cmake @@ -19,11 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Intersection" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Intersections/RimIntersectionEnums.cpp b/ApplicationLibCode/ProjectDataModel/Intersections/RimIntersectionEnums.cpp index e521708f48..d58424d98d 100644 --- a/ApplicationLibCode/ProjectDataModel/Intersections/RimIntersectionEnums.cpp +++ b/ApplicationLibCode/ProjectDataModel/Intersections/RimIntersectionEnums.cpp @@ -25,7 +25,7 @@ namespace caf template <> void caf::AppEnum::setUp() { - addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_NONE, "INTERSECT_SHOW_ALL", "None" ); + addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_NONE, "INTERSECT_SHOW_ALL", "Disabled" ); addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE, "INTERSECT_SHOW_ABOVE", "Above" ); addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW, "INTERSECT_SHOW_BELOW", "Below" ); addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN, "INTERSECT_SHOW_BELOW", "Between" ); diff --git a/ApplicationLibCode/ProjectDataModel/Measurement/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Measurement/CMakeLists_files.cmake index b45bc96890..d12a01ae46 100644 --- a/ApplicationLibCode/ProjectDataModel/Measurement/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Measurement/CMakeLists_files.cmake @@ -9,15 +9,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -set(QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RiuMeasurementEventFilter.h - ${QT_MOC_HEADERS} -) - -source_group( - "ProjectDataModel\\Measurement" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Parameters/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Parameters/CMakeLists_files.cmake index 8cd3f11149..ae6006de74 100644 --- a/ApplicationLibCode/ProjectDataModel/Parameters/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Parameters/CMakeLists_files.cmake @@ -21,11 +21,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Parameters" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/PlotTemplates/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/PlotTemplates/CMakeLists_files.cmake index 2362866b95..b9ee954806 100644 --- a/ApplicationLibCode/ProjectDataModel/PlotTemplates/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/PlotTemplates/CMakeLists_files.cmake @@ -9,11 +9,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\PlotTemplates" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Polygons/CMakeLists_files.cmake index ace8580f7d..42579167bb 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Polygons/CMakeLists_files.cmake @@ -19,11 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Polygons" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.cpp b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.cpp index 6298db2e68..36eb785bdc 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.cpp @@ -18,6 +18,8 @@ #include "RimPolygonCollection.h" +#include "RiaColorTables.h" + #include "Rim3dView.h" #include "RimPolygon.h" #include "RimPolygonFile.h" @@ -57,6 +59,9 @@ RimPolygon* RimPolygonCollection::createUserDefinedPolygon() auto newPolygon = new RimPolygon(); newPolygon->setName( "Polygon " + QString::number( userDefinedPolygons().size() + 1 ) ); + auto colorCandidates = RiaColorTables::summaryCurveDefaultPaletteColors(); + newPolygon->setColor( colorCandidates.cycledColor3f( userDefinedPolygons().size() ) ); + return newPolygon; } @@ -95,6 +100,18 @@ void RimPolygonCollection::deleteUserDefinedPolygons() scheduleRedrawViews(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPolygonCollection::deleteAllPolygons() +{ + m_polygons().deleteChildren(); + m_polygonFiles().deleteChildren(); + + updateViewTreeItems(); + scheduleRedrawViews(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -179,6 +196,8 @@ void RimPolygonCollection::childFieldChangedByUi( const caf::PdmFieldHandle* cha void RimPolygonCollection::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const { RimPolygonCollection::appendPolygonMenuItems( menuBuilder ); + menuBuilder.addSeparator(); + menuBuilder << "RicDeleteAllPolygonsFeature"; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.h b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.h index 3c0b163582..126bf80480 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonCollection.h @@ -40,6 +40,7 @@ public: RimPolygon* appendUserDefinedPolygon(); void addUserDefinedPolygon( RimPolygon* polygon ); void deleteUserDefinedPolygons(); + void deleteAllPolygons(); void addPolygonFile( RimPolygonFile* polygonFile ); diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInView.cpp b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInView.cpp index f7d1ad7d0e..aa02502673 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInView.cpp @@ -65,7 +65,7 @@ RimPolygonInView::RimPolygonInView() CAF_PDM_InitField( &m_selectPolygon, "SelectPolygon", false, "" ); caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_selectPolygon ); - CAF_PDM_InitField( &m_handleScalingFactor, "HandleScalingFactor", 1.0, "Handle Scaling Factor" ); + CAF_PDM_InitField( &m_handleScalingFactor, "HandleScalingFactor", 2.0, "Handle Scaling Factor" ); CAF_PDM_InitFieldNoDefault( &m_targets, "Targets", "Targets" ); m_targets.uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() ); diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp index 531a27e63d..869b2f28e6 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp @@ -18,6 +18,7 @@ #include "RimPolygonInViewCollection.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" #include "RimPolygon.h" #include "RimPolygonCollection.h" @@ -25,6 +26,8 @@ #include "RimPolygonInView.h" #include "RimTools.h" +#include "cafCmdFeatureMenuBuilder.h" + CAF_PDM_SOURCE_INIT( RimPolygonInViewCollection, "RimPolygonInViewCollection" ); //-------------------------------------------------------------------------------------------------- @@ -128,6 +131,10 @@ void RimPolygonInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch //-------------------------------------------------------------------------------------------------- void RimPolygonInViewCollection::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const { + if ( firstAncestorOfType() ) + { + menuBuilder << "RicCreateContourMapPolygonFeature"; + } RimPolygonCollection::appendPolygonMenuItems( menuBuilder ); } diff --git a/ApplicationLibCode/ProjectDataModel/ProcessControl/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/ProcessControl/CMakeLists_files.cmake index e0dfb8e9fa..8789b97eb1 100644 --- a/ApplicationLibCode/ProjectDataModel/ProcessControl/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/ProcessControl/CMakeLists_files.cmake @@ -7,13 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimProcess.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RimProcessMonitor.h) - -source_group( - "ProjectDataModel\\ProcessControl" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp b/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp index ef6589d363..7e5aed86c2 100644 --- a/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/RiaOpmParserTools.cpp @@ -27,6 +27,7 @@ #include "opm/common/utility/OpmInputError.hpp" #include "opm/input/eclipse/Deck/Deck.hpp" +#include "opm/input/eclipse/Parser/InputErrorAction.hpp" #include "opm/input/eclipse/Parser/ParseContext.hpp" #include "opm/input/eclipse/Parser/Parser.hpp" #include "opm/input/eclipse/Parser/ParserKeywords/G.hpp" @@ -115,7 +116,7 @@ std::pair, std::vector> extract parser.addParserKeyword( kw ); } - Opm::ParseContext parseContext( Opm::InputError::Action::WARN ); + Opm::ParseContext parseContext( Opm::InputErrorAction::WARN ); auto deck = parser.parseFile( dataDeckFilename, parseContext ); { @@ -174,7 +175,7 @@ std::map>> extractWseglink( const s parser.addParserKeyword( kw3 ); std::stringstream ss; - Opm::ParseContext parseContext( Opm::InputError::Action::WARN ); + Opm::ParseContext parseContext( Opm::InputErrorAction::WARN ); auto deck = parser.parseFile( filename, parseContext ); std::string keyword = "WSEGLINK"; @@ -246,7 +247,7 @@ std::vector extractWsegAicd( const std::s parser.addParserKeyword( kw3 ); std::stringstream ss; - Opm::ParseContext parseContext( Opm::InputError::Action::WARN ); + Opm::ParseContext parseContext( Opm::InputErrorAction::WARN ); auto deck = parser.parseFile( filename, parseContext ); const std::string keyword = "WSEGAICD"; diff --git a/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp b/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp index 156d756fc1..474489ca78 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp @@ -455,7 +455,7 @@ size_t Rim2dIntersectionView::onTimeStepCountRequested() { if ( isTimeStepDependentDataVisible() && ownerCase() ) { - return ownerCase()->timeStepStrings().size(); + return timeStepStrings().size(); } return 0; diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp b/ApplicationLibCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp index 54cf91d21a..8ed70b77dd 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp +++ b/ApplicationLibCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp @@ -26,9 +26,9 @@ #include "RicGridStatisticsDialog.h" +#include "ContourMap/RigContourMapProjection.h" #include "RigActiveCellInfo.h" #include "RigCaseCellResultsData.h" -#include "RigContourMapProjection.h" #include "RigEclipseCaseData.h" #include "RigFemPartCollection.h" #include "RigFemPartResultsCollection.h" @@ -37,6 +37,8 @@ #include "RigGeoMechCaseData.h" #include "RigMainGrid.h" +#include "ContourMap/RimEclipseContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim2dIntersectionView.h" #include "Rim2dIntersectionViewCollection.h" #include "Rim3dView.h" @@ -44,15 +46,12 @@ #include "RimCellEdgeColors.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseFaultColors.h" #include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseStatisticsCase.h" #include "RimEclipseView.h" #include "RimFaultInViewCollection.h" #include "RimGeoMechCase.h" -#include "RimGeoMechContourMapProjection.h" #include "RimGeoMechContourMapView.h" #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" @@ -316,21 +315,27 @@ QString Rim3dOverlayInfoConfig::caseInfoText( RimEclipseView* eclipseView ) RimEclipseContourMapView* contourMap = dynamic_cast( eclipseView ); if ( contourMap && contourMap->contourMapProjection() && contourMap->contourMapProjection()->mapProjection() ) { + RimEclipseContourMapProjection* eclipseProjection = + dynamic_cast( contourMap->contourMapProjection() ); QString totCellCount = localeWithSpaceAsGroupSeparator.toString( contourMap->contourMapProjection()->mapProjection()->numberOfCells() ); cvf::uint validCellCount = contourMap->contourMapProjection()->mapProjection()->numberOfValidCells(); QString activeCellCountText = localeWithSpaceAsGroupSeparator.toString( validCellCount ); QString aggregationType = contourMap->contourMapProjection()->resultAggregationText(); QString weightingParameterString; - if ( contourMap->contourMapProjection()->weightingParameter() != "None" ) + if ( eclipseProjection && eclipseProjection->weightingParameter() != "None" ) { - weightingParameterString += QString( " (Weight: %1)" ).arg( contourMap->contourMapProjection()->weightingParameter() ); + weightingParameterString += QString( " (Weight: %1)" ).arg( eclipseProjection->weightingParameter() ); } infoText += QString( "

    -- Contour Map: %1 --

    " - "Sample Count. Total: %2 Valid Results: %3
    " - "Projection Type: %4%5
    " ) - .arg( caseName, totCellCount, activeCellCountText, aggregationType, weightingParameterString ); + "Sample Count. Total: %2 Valid Results: %3
    " ) + .arg( caseName, totCellCount, activeCellCountText ); + + if ( !contourMap->contourMapProjection()->isColumnResult() ) + { + infoText += QString( "Projection Type: %1%2
    " ).arg( aggregationType, weightingParameterString ); + } } else if ( eclipseView->mainGrid() ) { @@ -390,9 +395,13 @@ QString Rim3dOverlayInfoConfig::caseInfoText( RimGeoMechView* geoMechView ) QString aggregationType = contourMap->contourMapProjection()->resultAggregationText(); infoText += QString( "

    -- Contour Map: %1 --

    " - "Sample Count. Total: %2 Valid Results: %3
    " - "Projection Type: %4
    " ) - .arg( caseName, totCellCount, activeCellCountText, aggregationType ); + "Sample Count. Total: %2 Valid Results: %3
    " ) + .arg( caseName, totCellCount, activeCellCountText ); + + if ( !contourMap->contourMapProjection()->isColumnResult() ) + { + infoText += QString( "Projection Type: %1
    " ).arg( aggregationType ); + } } else { @@ -452,12 +461,9 @@ QString Rim3dOverlayInfoConfig::resultInfoText( const RigHistogramData& histData bool isResultsInfoRelevant = contourMap->contourMapProjection()->mapProjection()->numberOfValidCells() > 0u; if ( isResultsInfoRelevant ) { - QString propName = eclipseView->cellResult()->resultVariableUiShortName(); + QString propName = contourMap->contourMapProjection()->resultVariableName(); QString diffResString = eclipseView->cellResult()->additionalResultText(); - if ( !contourMap->contourMapProjection()->isColumnResult() ) - { - infoText += QString( "Cell Property: %1
    " ).arg( propName ); - } + infoText += QString( "Cell Property: %1
    " ).arg( propName ); if ( !diffResString.isEmpty() ) { infoText += QString( "%1
    " ).arg( diffResString ); @@ -1046,7 +1052,7 @@ QString Rim3dOverlayInfoConfig::timeStepText( RimEclipseView* eclipseView ) QString dateString = RiaQDateTimeTools::toStringUsingApplicationLocale( timeSteps[currTimeStepIndex], dateFormat ); dateTimeString = - QString( "Time Step: %1/%2 %3" ).arg( QString::number( currTimeStepIndex ), QString::number( timeSteps.size() - 1 ), dateString ); + QString( "Time Step: %1/%2 %3" ).arg( QString::number( currTimeStepIndex + 1 ), QString::number( timeSteps.size() ), dateString ); } } @@ -1069,7 +1075,7 @@ QString Rim3dOverlayInfoConfig::timeStepText( RimGeoMechView* geoMechView ) { dateTimeString = QString( "Time Step: %1/%2 %3" ) - .arg( QString::number( currTimeStepIndex ), QString::number( timeSteps.size() - 1 ), timeSteps[currTimeStepIndex] ); + .arg( QString::number( currTimeStepIndex + 1 ), QString::number( timeSteps.size() ), timeSteps[currTimeStepIndex] ); } return QString( "

    -- %1 --
    " ).arg( dateTimeString ) + diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp b/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp index 00d27d02ab..7148d9fbd1 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp @@ -57,6 +57,7 @@ #include "cafFrameAnimationControl.h" #include "cafPdmFieldScriptingCapability.h" #include "cafPdmFieldScriptingCapabilityCvfColor3.h" +#include "cafPdmFieldScriptingCapabilityCvfVec3d.h" #include "cafPdmUiComboBoxEditor.h" #include "cvfCamera.h" #include "cvfModelBasicList.h" @@ -112,6 +113,17 @@ Rim3dView::Rim3dView() CAF_PDM_InitField( &m_cameraPointOfInterest, "CameraPointOfInterest", cvf::Vec3d::ZERO, "" ); m_cameraPointOfInterest.uiCapability()->setUiHidden( true ); + CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_cameraPositionProxy, "CameraPositionProxy", "CameraMatrix", "Camera Matrix" ); + m_cameraPositionProxy.registerGetMethod( this, &Rim3dView::cameraPosition ); + m_cameraPositionProxy.registerSetMethod( this, &Rim3dView::setCameraPosition ); + + CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_cameraPointOfInterestProxy, + "CameraPointOfInterestProxy", + "CameraPointOfInterest", + "Camera Point of Interest" ); + m_cameraPointOfInterestProxy.registerGetMethod( this, &Rim3dView::cameraPointOfInterest ); + m_cameraPointOfInterestProxy.registerSetMethod( this, &Rim3dView::setCameraPointOfInterest ); + CAF_PDM_InitScriptableField( &isPerspectiveView, "PerspectiveProjection", true, "Perspective Projection" ); double defaultScaleFactor = preferences->defaultScaleFactorZ(); @@ -604,13 +616,25 @@ size_t Rim3dView::timeStepCount() //-------------------------------------------------------------------------------------------------- QString Rim3dView::timeStepName( int frameIdx ) const { - if ( this->ownerCase() ) + if ( ownerCase() ) { - return this->ownerCase()->timeStepName( frameIdx ); + return ownerCase()->timeStepName( frameIdx ); } return QString( "" ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QStringList Rim3dView::timeStepStrings() const +{ + if ( ownerCase() ) + { + return ownerCase()->timeStepStrings(); + } + return QStringList(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -817,6 +841,8 @@ void Rim3dView::setupBeforeSave() { if ( m_viewer ) { + // The update of these fields is also done in cameraPosition() and cameraPointOfInterest(). When the + // project is saved to file, these functions are not used, so we need to update the fields here. m_cameraPosition = m_viewer->mainCamera()->viewMatrix(); m_cameraPointOfInterest = m_viewer->pointOfInterest(); } @@ -981,17 +1007,22 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const m_viewer->update(); } } - else if ( changedField == &m_backgroundColor || changedField == &m_fontSize ) + else if ( changedField == &m_backgroundColor ) { - if ( changedField == &m_fontSize ) + if ( viewer() != nullptr ) { - auto fontHolderChildren = descendantsOfType(); - for ( auto fontHolder : fontHolderChildren ) - { - fontHolder->updateFonts(); - } + viewer()->mainCamera()->viewport()->setClearColor( cvf::Color4f( backgroundColor() ) ); } - this->applyBackgroundColorAndFontChanges(); + this->scheduleCreateDisplayModelAndRedraw(); + } + else if ( changedField == &m_fontSize ) + { + auto fontHolderChildren = descendantsOfType(); + for ( auto fontHolder : fontHolderChildren ) + { + fontHolder->updateFonts(); + } + this->applyFontChanges(); this->updateConnectedEditors(); } else if ( changedField == &maximumFrameRate ) @@ -1023,6 +1054,13 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const m_viewer->update(); } } + else if ( changedField == &m_cameraPositionProxy || changedField == &m_cameraPointOfInterestProxy ) + { + if ( m_viewer ) + { + m_viewer->repaint(); + } + } } //-------------------------------------------------------------------------------------------------- @@ -1330,11 +1368,10 @@ void Rim3dView::setShowGridBox( bool showGridBox ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void Rim3dView::applyBackgroundColorAndFontChanges() +void Rim3dView::applyFontChanges() { if ( viewer() != nullptr ) { - viewer()->mainCamera()->viewport()->setClearColor( cvf::Color4f( backgroundColor() ) ); viewer()->updateFonts( fontSize() ); } updateGridBoxData(); @@ -1358,7 +1395,7 @@ int Rim3dView::fontSize() const //-------------------------------------------------------------------------------------------------- void Rim3dView::updateFonts() { - applyBackgroundColorAndFontChanges(); + applyFontChanges(); } //-------------------------------------------------------------------------------------------------- @@ -1498,6 +1535,11 @@ QList Rim3dView::calculateValueOptions( const caf::PdmFi //-------------------------------------------------------------------------------------------------- cvf::Mat4d Rim3dView::cameraPosition() const { + if ( m_viewer && m_viewer->mainCamera() ) + { + m_cameraPosition = m_viewer->mainCamera()->viewMatrix(); + } + return m_cameraPosition(); } @@ -1506,6 +1548,11 @@ cvf::Mat4d Rim3dView::cameraPosition() const //-------------------------------------------------------------------------------------------------- cvf::Vec3d Rim3dView::cameraPointOfInterest() const { + if ( m_viewer ) + { + m_cameraPointOfInterest = m_viewer->pointOfInterest(); + } + return m_cameraPointOfInterest(); } @@ -1533,6 +1580,10 @@ QWidget* Rim3dView::viewWidget() void Rim3dView::setCameraPosition( const cvf::Mat4d& cameraPosition ) { m_cameraPosition = cameraPosition; + if ( m_viewer && m_viewer->mainCamera() ) + { + m_viewer->mainCamera()->setViewMatrix( m_cameraPosition ); + } } //-------------------------------------------------------------------------------------------------- @@ -1541,6 +1592,10 @@ void Rim3dView::setCameraPosition( const cvf::Mat4d& cameraPosition ) void Rim3dView::setCameraPointOfInterest( const cvf::Vec3d& cameraPointOfInterest ) { m_cameraPointOfInterest = cameraPointOfInterest; + if ( m_viewer ) + { + m_viewer->setPointOfInterest( m_cameraPointOfInterest ); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dView.h b/ApplicationLibCode/ProjectDataModel/Rim3dView.h index 0a60790f77..7632780388 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim3dView.h +++ b/ApplicationLibCode/ProjectDataModel/Rim3dView.h @@ -34,6 +34,7 @@ #include "cafPdmPtrField.h" #include "cafSignal.h" +#include "cafFontTools.h" #include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfMat4d.h" #include "cafPdmFieldCvfVec3d.h" @@ -133,10 +134,10 @@ public: void setBackgroundColor( const cvf::Color3f& newBackgroundColor ); cvf::Color3f backgroundColor() const override; // Implementation of RiuViewerToViewInterface - void applyBackgroundColorAndFontChanges(); int fontSize() const override; void updateFonts() override; + void applyFontChanges(); void disableLighting( bool disable ); bool isLightingDisabled() const; @@ -150,12 +151,13 @@ public: void forceShowWindowOn(); // Timestep control - int currentTimeStep() const; - void setCurrentTimeStep( int frameIdx ); - void setCurrentTimeStepAndUpdate( int frameIdx ) override; - bool isTimeStepDependentDataVisibleInThisOrComparisonView() const; - size_t timeStepCount(); - QString timeStepName( int frameIdx ) const override; + int currentTimeStep() const; + void setCurrentTimeStep( int frameIdx ); + void setCurrentTimeStepAndUpdate( int frameIdx ) override; + bool isTimeStepDependentDataVisibleInThisOrComparisonView() const; + size_t timeStepCount(); + QString timeStepName( int frameIdx ) const override; + virtual QStringList timeStepStrings() const; // Animation control caf::Signal<> updateAnimations; @@ -280,7 +282,6 @@ protected: cvf::ref m_screenSpaceModel; caf::PdmField m_scaleZ; - caf::PdmField m_customScaleZ; caf::PdmChildField m_annotationCollection; @@ -328,13 +329,19 @@ private: caf::PdmField m_id; caf::PdmChildField m_nameConfig; caf::PdmField m_disableLighting; - caf::PdmField m_cameraPosition; - caf::PdmField m_cameraPointOfInterest; caf::PdmField m_backgroundColor; caf::PdmField m_showGridBox; caf::PdmField m_showZScaleLabel; caf::PdmPtrField m_comparisonView; + // Camera position and point of interest. The member variables are mutable to allow for setting them from const methods. + // The camera position and point of interest can change rapidly as the user interacts with the 3D view. Only update the Pdm field values + // when the application requests the camera position or point of interest. + mutable caf::PdmField m_cameraPosition; + mutable caf::PdmField m_cameraPointOfInterest; + caf::PdmProxyValueField m_cameraPointOfInterestProxy; + caf::PdmProxyValueField m_cameraPositionProxy; + caf::PdmField m_useCustomAnnotationStrategy; caf::PdmField> m_annotationStrategy; caf::PdmField m_annotationCountHint; diff --git a/ApplicationLibCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp b/ApplicationLibCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp index e02f198250..4f2ae22d94 100644 --- a/ApplicationLibCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimAdvancedSnapshotExportDefinition.cpp @@ -48,7 +48,11 @@ RimAdvancedSnapshotExportDefinition::RimAdvancedSnapshotExportDefinition() CAF_PDM_InitFieldNoDefault( &view, "View", "View" ); - CAF_PDM_InitFieldNoDefault( &eclipseResultType, "EclipseResultType", "Result Type" ); + CAF_PDM_InitField( &eclipseResultType, "EclipseResultType", RiaDefines::ResultCatType::STATIC_NATIVE, "Result Type" ); + caf::AppEnum::setEnumSubset( &eclipseResultType, + { RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::ResultCatType::DYNAMIC_NATIVE } ); + CAF_PDM_InitFieldNoDefault( &m_selectedEclipseResult, "SelectedEclipseResults", "Properties" ); CAF_PDM_InitField( &timeStepStart, "TimeStepStart", 0, "Start Time" ); @@ -119,13 +123,6 @@ QList RimAdvancedSnapshotExportDefinition::calculateValu RiaOptionItemFactory::appendOptionItemFromViewNameAndCaseName( rim3dView, &options ); } } - else if ( fieldNeedingOptions == &eclipseResultType ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum( RiaDefines::ResultCatType::DYNAMIC_NATIVE ).uiText(), - RiaDefines::ResultCatType::DYNAMIC_NATIVE ) ); - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum( RiaDefines::ResultCatType::STATIC_NATIVE ).uiText(), - RiaDefines::ResultCatType::STATIC_NATIVE ) ); - } else if ( fieldNeedingOptions == &m_selectedEclipseResult ) { auto* rimEclipseView = dynamic_cast( view() ); @@ -162,7 +159,7 @@ void RimAdvancedSnapshotExportDefinition::getTimeStepStrings( QListownerCase()->timeStepStrings(); + timeSteps = view->timeStepStrings(); for ( int i = 0; i < timeSteps.size(); i++ ) { diff --git a/ApplicationLibCode/ProjectDataModel/RimCase.cpp b/ApplicationLibCode/ProjectDataModel/RimCase.cpp index 14250fb879..0d0eab5a99 100644 --- a/ApplicationLibCode/ProjectDataModel/RimCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimCase.cpp @@ -19,16 +19,19 @@ #include "RimCase.h" +#include "RiaEnsembleNameTools.h" + #include "RicfCommandObject.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" #include "RimOilField.h" #include "RimProject.h" #include "RimTimeStepFilter.h" #include "Rim2dIntersectionView.h" #include "Rim2dIntersectionViewCollection.h" +#include "RimCaseCollection.h" #include "RimExtrudedCurveIntersection.h" #include "RimGridView.h" @@ -325,7 +328,27 @@ void RimCase::updateAutoShortName() } else if ( m_displayNameOption == RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME ) { - m_caseUserDescription = RimCase::uniqueShortNameCase( this, RimCaseDisplayNameTools::CASE_SHORT_NAME_LENGTH ); + if ( auto caseCollection = firstAncestorOrThisOfType() ) + { + QStringList filePaths; + auto cases = caseCollection->cases(); + if ( !cases.empty() ) + { + for ( int i = 0; i < std::min( 4, static_cast( cases.size() ) ); ++i ) + { + auto caseInEnsemble = cases[i]; + filePaths.push_back( caseInEnsemble->gridFileName() ); + } + } + + filePaths.push_back( gridFileName() ); + + m_caseUserDescription = RiaEnsembleNameTools::uniqueShortName( gridFileName(), filePaths, caseName() ); + } + else + { + m_caseUserDescription = RimCase::uniqueShortNameCase( this, RimCaseDisplayNameTools::CASE_SHORT_NAME_LENGTH ); + } } updateTreeItemName(); } diff --git a/ApplicationLibCode/ProjectDataModel/RimCaseCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimCaseCollection.cpp index 4a90f23926..cd62b2ca46 100644 --- a/ApplicationLibCode/ProjectDataModel/RimCaseCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimCaseCollection.cpp @@ -35,6 +35,21 @@ RimCaseCollection::RimCaseCollection() CAF_PDM_InitFieldNoDefault( &reservoirs, "Reservoirs", "Reservoirs ChildArrayField" ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimCaseCollection::cases() const +{ + std::vector caseVector; + + for ( auto rimCase : reservoirs ) + { + caseVector.push_back( rimCase ); + } + + return caseVector; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimCaseCollection.h b/ApplicationLibCode/ProjectDataModel/RimCaseCollection.h index 56d7052a83..78066f9034 100644 --- a/ApplicationLibCode/ProjectDataModel/RimCaseCollection.h +++ b/ApplicationLibCode/ProjectDataModel/RimCaseCollection.h @@ -24,6 +24,7 @@ class RimEclipseCase; class RimIdenticalGridCaseGroup; +class RimCase; //================================================================================================== // @@ -36,6 +37,9 @@ class RimCaseCollection : public caf::PdmObject public: RimCaseCollection(); + + std::vector cases() const; + caf::PdmChildArrayField reservoirs; RimIdenticalGridCaseGroup* parentCaseGroup(); diff --git a/ApplicationLibCode/ProjectDataModel/RimContextCommandBuilder.cpp b/ApplicationLibCode/ProjectDataModel/RimContextCommandBuilder.cpp index 78d82cbf86..37b2cb81e8 100644 --- a/ApplicationLibCode/ProjectDataModel/RimContextCommandBuilder.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimContextCommandBuilder.cpp @@ -19,8 +19,12 @@ #include "RimContextCommandBuilder.h" +#include "QuickAccess/RimFieldQuickAccess.h" #include "RiaApplication.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" #include "PlotTemplates/RimPlotTemplateFileItem.h" #include "PlotTemplates/RimPlotTemplateFolderItem.h" #include "Rim3dOverlayInfoConfig.h" @@ -47,31 +51,28 @@ #include "RimCustomObjectiveFunctionCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapViewCollection.h" #include "RimEclipseFaultColors.h" #include "RimEclipseInputProperty.h" #include "RimEclipsePropertyFilter.h" -#include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseResultAddress.h" +#include "RimEclipseResultCase.h" #include "RimEclipseStatisticsCase.h" #include "RimEclipseView.h" #include "RimEclipseViewCollection.h" #include "RimElasticProperties.h" #include "RimEllipseFractureTemplate.h" #include "RimEnsembleCurveFilterCollection.h" -#include "RimEnsembleCurveSet.h" #include "RimEnsembleCurveSetCollection.h" #include "RimEnsembleFractureStatisticsCollection.h" #include "RimExtrudedCurveIntersection.h" #include "RimFaultInView.h" #include "RimFaultReactivationModel.h" +#include "RimFileWellPath.h" #include "RimFishbones.h" #include "RimFishbonesCollection.h" #include "RimFlowCharacteristicsPlot.h" #include "RimFlowDiagSolution.h" #include "RimFlowPlotCollection.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" #include "RimFractureTemplateCollection.h" #include "RimGeoMechCase.h" #include "RimGeoMechCellColors.h" @@ -112,9 +113,7 @@ #include "RimSeismicDataCollection.h" #include "RimSeismicSectionCollection.h" #include "RimSeismicViewCollection.h" -#include "RimSimWellFracture.h" #include "RimSimWellInView.h" -#include "RimSimWellInViewCollection.h" #include "RimStimPlanFractureTemplate.h" #include "RimStimPlanModel.h" #include "RimStimPlanModelCollection.h" @@ -127,7 +126,6 @@ #include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveCollection.h" -#include "RimSummaryEnsemble.h" #include "RimSummaryMultiPlot.h" #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" @@ -268,15 +266,17 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() } else if ( dynamic_cast( firstUiItem ) ) { - menuBuilder << "RicRenameCaseFeature"; - menuBuilder << "RicPasteEclipseCasesFeature"; - menuBuilder << "RicPasteEclipseViewsFeature"; - menuBuilder << "Separator"; - menuBuilder << "RicNewViewFeature"; menuBuilder << "RicNewContourMapViewFeature"; + menuBuilder << "RicNewWellTargetMappingFeature"; + menuBuilder << "Separator"; + menuBuilder << "RicReloadCaseFeature"; + menuBuilder << "RicReplaceCaseFeature"; + menuBuilder << "RicRenameCaseFeature"; + menuBuilder << "Separator"; menuBuilder << "RicShowFlowCharacteristicsPlotFeature"; - menuBuilder << "RicEclipseCaseNewGroupFeature"; + menuBuilder << "RicPasteEclipseCasesFeature"; + menuBuilder << "RicPasteEclipseViewsFeature"; menuBuilder << "Separator"; menuBuilder << "RicCopyReferencesToClipboardFeature"; menuBuilder << "Separator"; @@ -317,10 +317,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() { menuBuilder << "RicSaveEclipseInputPropertyFeature"; } - else if ( dynamic_cast( firstUiItem ) ) - { - menuBuilder << "RicEclipsePropertyFilterNewFeature"; - } else if ( dynamic_cast( firstUiItem ) ) { menuBuilder << "RicEclipsePropertyFilterInsertFeature"; @@ -371,10 +367,15 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() } else if ( dynamic_cast( firstUiItem ) ) { - menuBuilder << "RicNewEditableWellPathFeature"; + if ( dynamic_cast( firstUiItem ) != nullptr ) + { + menuBuilder << "RicNewEditableWellPathFeature"; + } menuBuilder << "RicNewWellPathLateralFeature"; - menuBuilder << "RicDuplicateWellPathFeature"; - + if ( dynamic_cast( firstUiItem ) != nullptr ) + { + menuBuilder << "RicDuplicateWellPathFeature"; + } menuBuilder.addSeparator(); menuBuilder << "RicSetParentWellPathFeature"; @@ -737,16 +738,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "RicNewSummaryEnsembleCurveSetFeature"; menuBuilder << "RicPasteEnsembleCurveSetFeature"; } - else if ( dynamic_cast( firstUiItem ) ) - { - menuBuilder << "RicNewSummaryEnsembleCurveSetFeature"; - menuBuilder << "Separator"; - menuBuilder << "RicSetSourceSteppingEnsembleCurveSetFeature"; - menuBuilder << "RicClearSourceSteppingEnsembleCurveSetFeature"; - menuBuilder << "Separator"; - menuBuilder << "RicNewEnsembleCurveFilterFeature"; - menuBuilder << "RicCreateRegressionAnalysisCurveFeature"; - } else if ( dynamic_cast( firstUiItem ) ) { menuBuilder << "RicNewCustomObjectiveFunctionFeature"; @@ -772,24 +763,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "Separator"; menuBuilder << "RicShowSummaryCurveCalculatorFeature"; } - else if ( dynamic_cast( firstUiItem ) ) - { - menuBuilder.subMenuStart( "Import" ); - menuBuilder << "RicImportSummaryCaseFeature"; - menuBuilder << "RicImportSummaryCasesFeature"; - menuBuilder << "RicImportSummaryGroupFeature"; - menuBuilder << "RicImportEnsembleFeature"; - menuBuilder.subMenuEnd(); - menuBuilder.addSeparator(); - menuBuilder << "RicNewSummaryMultiPlotFeature"; - menuBuilder << "RicNewDerivedEnsembleFeature"; - menuBuilder << "RicOpenSummaryPlotEditorFeature"; - menuBuilder << "RicAppendSummaryCurvesForSummaryCasesFeature"; - menuBuilder << "RicAppendSummaryPlotsForSummaryCasesFeature"; - menuBuilder.addSeparator(); - menuBuilder << "RicConvertGroupToEnsembleFeature"; - menuBuilder.addSeparator(); - } else if ( dynamic_cast( firstUiItem ) ) { menuBuilder << "RicAddWellLogToPlotFeature"; @@ -847,12 +820,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "RicShowWellAllocationPlotFeature"; menuBuilder << "RicShowCumulativePhasePlotFeature"; menuBuilder.subMenuEnd(); - - menuBuilder << "RicExportCompletionsForVisibleSimWellsFeature"; - } - else if ( dynamic_cast( firstUiItem ) ) - { - menuBuilder << "RicExportCompletionsForVisibleSimWellsFeature"; } else if ( dynamic_cast( firstUiItem ) ) { @@ -908,10 +875,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() #endif menuBuilder << "RicShowGridStatisticsFeature"; } - else if ( dynamic_cast( firstUiItem ) ) - { - menuBuilder << "RicNewSimWellFractureFeature"; - } else if ( dynamic_cast( firstUiItem ) ) { menuBuilder << "RicNewValveTemplateFeature"; @@ -1116,9 +1079,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "RicSummaryCurveSwitchAxisFeature"; menuBuilder << "RicNewDerivedSummaryFeature"; menuBuilder.addSeparator(); - menuBuilder << "RicConvertGroupToEnsembleFeature"; - menuBuilder.addSeparator(); - menuBuilder.addSeparator(); menuBuilder << "RicStackSelectedCurvesFeature"; menuBuilder << "RicUnstackSelectedCurvesFeature"; menuBuilder.addSeparator(); @@ -1131,7 +1091,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "RicRenameSummaryCaseFeature"; menuBuilder << "RicReloadSummaryCaseFeature"; menuBuilder << "RicReplaceSummaryCaseFeature"; - menuBuilder << "RicCreateSummaryCaseCollectionFeature"; menuBuilder << "Separator"; menuBuilder << "RicCutReferencesToClipboardFeature"; @@ -1140,7 +1099,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "RicDeleteWellPathFeature"; menuBuilder << "RicLinkWellPathFeature"; - if ( dynamic_cast( firstUiItem ) || dynamic_cast( firstUiItem ) ) + if ( dynamic_cast( firstUiItem ) ) { menuBuilder << "RicAppendSummaryCurvesForSummaryCasesFeature"; menuBuilder << "RicAppendSummaryPlotsForSummaryCasesFeature"; @@ -1181,10 +1140,11 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() { menuBuilder << "RicShowGridCalculatorFeature"; menuBuilder << "RicAddEclipseInputPropertyFeature"; - menuBuilder << "RicReloadCaseFeature"; - menuBuilder << "RicReplaceCaseFeature"; createExecuteScriptForCasesFeatureMenu( menuBuilder ); - menuBuilder << "RicCloseSourSimDataFeature"; + if ( auto resultCase = dynamic_cast( firstUiItem ); resultCase && resultCase->hasSourSimFile() ) + { + menuBuilder << "RicCloseSourSimDataFeature"; + } } else if ( dynamic_cast( firstUiItem ) ) { @@ -1219,6 +1179,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() else if ( dynamic_cast( firstUiItem ) ) { menuBuilder << "RicShowContributingWellsFeature"; + menuBuilder << "RicCreateWellPathFromSimulationWellFeature"; menuBuilder << "Separator"; menuBuilder << "RicEclipseWellShowLabelFeature"; menuBuilder << "RicEclipseWellShowHeadFeature"; @@ -1227,7 +1188,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection() menuBuilder << "RicEclipseWellShowWellCellsFeature"; menuBuilder << "RicEclipseWellShowWellCellFenceFeature"; menuBuilder << "Separator"; - menuBuilder << "RicNewSimWellFractureFeature"; menuBuilder << "RicNewSimWellIntersectionFeature"; } else if ( dynamic_cast( firstUiItem ) ) diff --git a/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.cpp b/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.cpp index fb61df4c9b..aedf927fbd 100644 --- a/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.cpp @@ -22,6 +22,7 @@ #include "RimSummaryCalculationCollection.h" #include "RifEclipseSummaryAddress.h" +#include "RifEclipseSummaryTools.h" //-------------------------------------------------------------------------------------------------- /// @@ -137,8 +138,19 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant& return true; } } + else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION ) + { + int oldInt = oldValue.toInt(); + int newInt = newValue.toInt(); + if ( adr.wellCompletionNumber() == oldInt ) + { + adr.setWellCompletionNumber( newInt ); + + return true; + } + } else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK || - category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION ) + category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION ) { std::string oldString = oldValue.toString().toStdString(); std::string newString = newValue.toString().toStdString(); @@ -180,12 +192,18 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant& //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimDataSourceSteppingTools::updateQuantityIfMatching( const QVariant& oldValue, const QVariant& newValue, RifEclipseSummaryAddress& adr ) +bool RimDataSourceSteppingTools::updateQuantityIfMatching( const QVariant& previousName, const QVariant& newName, RifEclipseSummaryAddress& adr ) { - std::string oldString = oldValue.toString().toStdString(); - auto newQString = newValue.toString(); - std::string newString = newQString.toStdString(); + return updateQuantityIfMatching( previousName.toString().toStdString(), newName.toString().toStdString(), adr ); +}; +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimDataSourceSteppingTools::updateQuantityIfMatching( const std::string& previousName, + const std::string& newName, + RifEclipseSummaryAddress& adr ) +{ // Calculation ID < 0 means native summary vector int calculationId = -1; @@ -195,10 +213,11 @@ bool RimDataSourceSteppingTools::updateQuantityIfMatching( const QVariant& oldVa // Parse the calculations and find ID if text is matching. This can cause issues if a calculation has the same name as a native // summary vector imported from file. - auto calculations = calculationColl->calculations(); + const auto qNewName = QString::fromStdString( newName ); + auto calculations = calculationColl->calculations(); for ( auto c : calculations ) { - if ( c->shortName() == newQString ) + if ( c->shortName() == qNewName ) { calculationId = c->id(); break; @@ -206,9 +225,11 @@ bool RimDataSourceSteppingTools::updateQuantityIfMatching( const QVariant& oldVa } } - if ( adr.vectorName() == oldString ) + auto [vectorName, suffix] = RifEclipseSummaryTools::splitVectorNameAndSuffix( adr.vectorName() ); + if ( vectorName == previousName ) { - adr.setVectorName( newString ); + auto name = newName + suffix; + adr.setVectorName( name ); adr.setId( calculationId ); return true; diff --git a/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.h b/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.h index 7dca9aaef1..d5e7d44636 100644 --- a/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.h +++ b/ApplicationLibCode/ProjectDataModel/RimDataSourceSteppingTools.h @@ -41,5 +41,6 @@ public: RifEclipseSummaryAddressDefines::SummaryCategory category, RifEclipseSummaryAddress& adr ); - static bool updateQuantityIfMatching( const QVariant& oldValue, const QVariant& newValue, RifEclipseSummaryAddress& adr ); + static bool updateQuantityIfMatching( const QVariant& previousName, const QVariant& newName, RifEclipseSummaryAddress& adr ); + static bool updateQuantityIfMatching( const std::string& previousName, const std::string& newName, RifEclipseSummaryAddress& adr ); }; diff --git a/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp b/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp index 3617bbcd4a..44f6ce69f3 100644 --- a/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp @@ -473,7 +473,8 @@ void RimDepthTrackPlot::setDepthMarkerPosition( double depth ) if ( firstAnnotation == nullptr ) { - firstAnnotation = RimPlotAxisAnnotation::createLineAnnotation(); + firstAnnotation = new RimPlotAxisAnnotation(); + firstAnnotation->setAnnotationType( RimPlotAxisAnnotation::AnnotationType::LINE ); firstAnnotation->setPenStyle( Qt::DashLine ); m_depthAnnotations.push_back( firstAnnotation ); } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp index 48ea3dc035..08b2558c88 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp @@ -43,12 +43,13 @@ #include "Well/RigSimWellData.h" #include "Well/RigWellResultFrame.h" +#include "ContourMap/RimEclipseContourMapView.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" +#include "Formations/RimFormationNames.h" #include "Rim2dIntersectionViewCollection.h" #include "RimCaseCollection.h" #include "RimCellEdgeColors.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapView.h" -#include "RimEclipseContourMapViewCollection.h" #include "RimEclipseInputProperty.h" #include "RimEclipseInputPropertyCollection.h" #include "RimEclipsePropertyFilter.h" @@ -59,7 +60,6 @@ #include "RimEclipseView.h" #include "RimEclipseViewCollection.h" #include "RimFaultInViewCollection.h" -#include "RimFormationNames.h" #include "RimGridCollection.h" #include "RimIntersectionCollection.h" #include "RimMainPlotCollection.h" @@ -72,6 +72,7 @@ #include "RimWellLogPlotCollection.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" +#include "RimWellTargetMapping.h" #include "cafPdmDocument.h" #include "cafPdmFieldScriptingCapability.h" @@ -119,6 +120,8 @@ RimEclipseCase::RimEclipseCase() CAF_PDM_InitFieldNoDefault( &m_viewCollection, "ViewCollection", "Views" ); m_viewCollection = new RimEclipseViewCollection; + CAF_PDM_InitFieldNoDefault( &m_wellTargetMappings, "WellTargetMappings", "Well Target Mappings" ); + // Init m_matrixModelResults = new RimReservoirCellResultsStorage; @@ -126,7 +129,6 @@ RimEclipseCase::RimEclipseCase() m_fractureModelResults = new RimReservoirCellResultsStorage; m_fractureModelResults.uiCapability()->setUiTreeChildrenHidden( true ); - setReservoirData( nullptr ); m_readerSettings = RiaPreferencesGrid::current()->readerSettings(); @@ -557,6 +559,8 @@ void RimEclipseCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin { uiTreeOrdering.add( &m_2dIntersectionViewCollection ); } + + uiTreeOrdering.add( &m_wellTargetMappings ); } else if ( uiConfigName == "MainWindow.DataSources" ) { @@ -955,16 +959,16 @@ void RimEclipseCase::setFilesContainingFaults( const std::vector& pathS //-------------------------------------------------------------------------------------------------- bool RimEclipseCase::ensureReservoirCaseIsOpen() { - // Call openReserviorCase, as this is a cheap method to call multiple times + // Call openReservoirCase, as this is a cheap method to call multiple times // Add extra testing here if performance issues are seen - return openReserviorCase(); + return openReservoirCase(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimEclipseCase::openReserviorCase() +bool RimEclipseCase::openReservoirCase() { if ( !openEclipseGridFile() ) { @@ -1048,15 +1052,18 @@ bool RimEclipseCase::openReserviorCase() createTimeStepFormatString(); - // Associate existing well paths with simulation wells - RimProject* proj = RimProject::current(); - for ( const auto& oilField : proj->oilFields() ) + if ( !m_readerSettings.skipWellData ) { - for ( const auto& wellPath : oilField->wellPathCollection()->allWellPaths() ) + // Associate existing well paths with simulation wells + RimProject* proj = RimProject::current(); + for ( const auto& oilField : proj->oilFields() ) { - if ( !wellPath->isAssociatedWithSimulationWell() ) + for ( const auto& wellPath : oilField->wellPathCollection()->allWellPaths() ) { - wellPath->tryAssociateWithSimulationWell(); + if ( !wellPath->isAssociatedWithSimulationWell() ) + { + wellPath->tryAssociateWithSimulationWell(); + } } } } @@ -1064,6 +1071,23 @@ bool RimEclipseCase::openReserviorCase() return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseCase::reloadEclipseGridFile() +{ + closeReservoirCase(); + openReservoirCase(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseCase::closeReservoirCase() +{ + setReservoirData( nullptr ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1180,6 +1204,14 @@ void RimEclipseCase::setReaderSettings( RifReaderSettings& readerSettings ) m_readerSettings = readerSettings; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RifReaderSettings RimEclipseCase::readerSettings() const +{ + return m_readerSettings; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1259,3 +1291,12 @@ std::vector RimEclipseCase::contourMapViews() const return views; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseCase::addWellTargetMapping( RimWellTargetMapping* generator ) +{ + m_wellTargetMappings.push_back( generator ); + generator->updateResultDefinition(); +} diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCase.h b/ApplicationLibCode/ProjectDataModel/RimEclipseCase.h index a1897c729f..dc99a932e3 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCase.h @@ -40,6 +40,7 @@ class QString; +class RimWellTargetMapping; class RigCaseCellResultsData; class RigEclipseCaseData; class RigGridBase; @@ -75,8 +76,10 @@ public: void setFilesContainingFaults( const std::vector& val ); bool ensureReservoirCaseIsOpen(); - bool openReserviorCase(); + bool openReservoirCase(); + virtual void closeReservoirCase(); virtual bool openEclipseGridFile() = 0; + virtual void reloadEclipseGridFile(); virtual bool importAsciiInputProperties( const QStringList& fileNames ); RigEclipseCaseData* eclipseCaseData(); @@ -114,8 +117,6 @@ public: cvf::BoundingBox allCellsBoundingBox() const override; cvf::Vec3d displayModelOffset() const override; - virtual void reloadEclipseGridFile() = 0; - double characteristicCellSize() const override; std::set sortedSimWellNames() const; @@ -127,7 +128,10 @@ public: void createDisplayModelAndUpdateAllViews(); void computeActiveCellsBoundingBox(); - void setReaderSettings( RifReaderSettings& readerSettings ); + void setReaderSettings( RifReaderSettings& readerSettings ); + RifReaderSettings readerSettings() const; + + void addWellTargetMapping( RimWellTargetMapping* wellTargetMapping ); void updateResultAddressCollection(); @@ -173,6 +177,8 @@ private: caf::PdmChildField m_fractureModelResults; caf::PdmChildField m_viewCollection; + caf::PdmChildArrayField m_wellTargetMappings; + caf::PdmField> m_filesContainingFaults; // Obsolete fields: diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.cpp index ea9499f7e7..98a5f0b06b 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.cpp @@ -18,12 +18,13 @@ #include "RimEclipseCaseEnsemble.h" +#include "ContourMap/RimStatisticsContourMap.h" +#include "ContourMap/RimStatisticsContourMapView.h" #include "RimCaseCollection.h" #include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimEclipseViewCollection.h" -#include "RimStatisticsContourMap.h" -#include "RimWellTargetCandidatesGenerator.h" +#include "RimWellTargetMapping.h" #include "cafCmdFeatureMenuBuilder.h" #include "cafPdmFieldScriptingCapability.h" @@ -44,15 +45,13 @@ RimEclipseCaseEnsemble::RimEclipseCaseEnsemble() CAF_PDM_InitFieldNoDefault( &m_caseCollection, "CaseCollection", "Ensemble Cases" ); m_caseCollection = new RimCaseCollection; - m_caseCollection->uiCapability()->setUiName( "Cases" ); + m_caseCollection->uiCapability()->setUiName( "Realizations" ); m_caseCollection->uiCapability()->setUiIconFromResourceString( ":/Cases16x16.png" ); - CAF_PDM_InitFieldNoDefault( &m_selectedCase, "SelectedCase", "Selected Case" ); - CAF_PDM_InitFieldNoDefault( &m_viewCollection, "ViewCollection", "Views" ); m_viewCollection = new RimEclipseViewCollection; - CAF_PDM_InitFieldNoDefault( &m_wellTargetGenerators, "WellTargetGenerators", "Well Target Candidates Generators" ); + CAF_PDM_InitFieldNoDefault( &m_wellTargetMappings, "WellTargetMappings", "Well Target Mappings" ); CAF_PDM_InitFieldNoDefault( &m_statisticsContourMaps, "StatisticsContourMaps", "Statistics Contour maps" ); @@ -106,6 +105,16 @@ bool RimEclipseCaseEnsemble::contains( RimEclipseCase* reservoir ) const return false; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCase* RimEclipseCaseEnsemble::findByDescription( const QString& caseDescription ) const +{ + if ( !m_caseCollection ) return nullptr; + + return m_caseCollection->findByDescription( caseDescription ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -116,6 +125,32 @@ std::vector RimEclipseCaseEnsemble::cases() const return m_caseCollection->reservoirs.childrenByType(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RimEclipseCaseEnsemble::casesInViews() const +{ + if ( !m_caseCollection ) return {}; + if ( !m_viewCollection || m_viewCollection->isEmpty() ) return {}; + + std::set retCases; + + for ( auto view : m_viewCollection->views() ) + { + if ( view->eclipseCase() != nullptr ) retCases.insert( view->eclipseCase() ); + } + + return retCases; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimEclipseCaseEnsemble::wellTargetMappings() const +{ + return m_wellTargetMappings.childrenByType(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -132,50 +167,16 @@ RimEclipseView* RimEclipseCaseEnsemble::addViewForCase( RimEclipseCase* eclipseC return m_viewCollection->addView( eclipseCase ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RimEclipseCaseEnsemble::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) -{ - QList options; - - if ( fieldNeedingOptions == &m_selectedCase ) - { - for ( auto eclCase : cases() ) - { - options.push_back( caf::PdmOptionItemInfo( eclCase->caseUserDescription(), eclCase, false, eclCase->uiIconProvider() ) ); - } - - return options; - } - - return options; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseCaseEnsemble::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) -{ - if ( changedField == &m_selectedCase ) - { - for ( auto view : m_viewCollection->views() ) - { - view->setEclipseCase( m_selectedCase() ); - view->loadDataAndUpdate(); - view->updateGridBoxData(); - view->updateAnnotationItems(); - } - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimEclipseCaseEnsemble::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const { menuBuilder << "RicNewViewForGridEnsembleFeature"; - menuBuilder << "RicNewWellTargetCandidatesGeneratorFeature"; + + // Hide this feature for the 2025.04 release, not ready for production use yet. + // menuBuilder << "RicNewWellTargetMappingFeature"; + menuBuilder << "RicNewStatisticsContourMapFeature"; } @@ -190,9 +191,34 @@ RimEclipseViewCollection* RimEclipseCaseEnsemble::viewCollection() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseCaseEnsemble::addWellTargetsGenerator( RimWellTargetCandidatesGenerator* generator ) +std::vector RimEclipseCaseEnsemble::allViews() const { - m_wellTargetGenerators.push_back( generator ); + std::vector retList; + if ( !viewCollection() ) return retList; + + for ( auto view : viewCollection()->views() ) + { + retList.push_back( view ); + } + + for ( auto cmap : m_statisticsContourMaps.childrenByType() ) + { + for ( auto view : cmap->views() ) + { + retList.push_back( view ); + } + } + + return retList; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseCaseEnsemble::addWellTargetMapping( RimWellTargetMapping* wellTargetMapping ) +{ + m_wellTargetMappings.push_back( wellTargetMapping ); + wellTargetMapping->updateResultDefinition(); } //-------------------------------------------------------------------------------------------------- @@ -201,4 +227,14 @@ void RimEclipseCaseEnsemble::addWellTargetsGenerator( RimWellTargetCandidatesGen void RimEclipseCaseEnsemble::addStatisticsContourMap( RimStatisticsContourMap* statisticsContourMap ) { m_statisticsContourMaps.push_back( statisticsContourMap ); + statisticsContourMap->setName( QString( "Ensemble Contour Map #%1" ).arg( m_statisticsContourMaps.size() ) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseCaseEnsemble::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( nameField() ); + uiOrdering.skipRemainingFields(); } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.h b/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.h index ffdefeee53..929402d262 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCaseEnsemble.h @@ -25,11 +25,13 @@ #include "cafPdmField.h" #include "cafPdmPtrField.h" +#include + class RimCaseCollection; class RimEclipseCase; class RimEclipseView; class RimEclipseViewCollection; -class RimWellTargetCandidatesGenerator; +class RimWellTargetMapping; class RimStatisticsContourMap; //================================================================================================== @@ -49,27 +51,32 @@ public: void removeCase( RimEclipseCase* reservoir ); bool contains( RimEclipseCase* reservoir ) const; + RimEclipseCase* findByDescription( const QString& description ) const; + std::vector cases() const; + std::set casesInViews() const; void addView( RimEclipseView* view ); RimEclipseView* addViewForCase( RimEclipseCase* eclipseCase ); + std::vector allViews() const; + RimEclipseViewCollection* viewCollection() const; - void addWellTargetsGenerator( RimWellTargetCandidatesGenerator* generator ); + void addWellTargetMapping( RimWellTargetMapping* wellTargetMapping ); + std::vector wellTargetMappings() const; void addStatisticsContourMap( RimStatisticsContourMap* statisticsContourMap ); protected: - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override; + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; private: - caf::PdmField m_groupId; - caf::PdmChildField m_caseCollection; - caf::PdmChildField m_viewCollection; - caf::PdmChildArrayField m_wellTargetGenerators; - caf::PdmChildArrayField m_statisticsContourMaps; - caf::PdmPtrField m_selectedCase; + caf::PdmField m_groupId; + caf::PdmChildField m_caseCollection; + caf::PdmChildField m_viewCollection; + caf::PdmChildArrayField m_wellTargetMappings; + caf::PdmChildArrayField m_statisticsContourMaps; + caf::PdmPtrField m_selectedCase; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.cpp index e563561f0b..71a0aa30d2 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.cpp @@ -300,14 +300,6 @@ RimEclipseView* RimEclipseCellColors::reservoirView() return m_reservoirView; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseCellColors::updateRangesForEmbeddedLegends( int currentTimeStep ) -{ - updateRangesForExplicitLegends( legendConfig(), m_ternaryLegendConfig(), currentTimeStep ); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.h b/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.h index 857ad94606..94ea00c1f4 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCellColors.h @@ -49,7 +49,6 @@ public: void setReservoirView( RimEclipseView* ownerReservoirView ); RimEclipseView* reservoirView(); - void updateRangesForEmbeddedLegends( int timestep ); RimRegularLegendConfig* legendConfig(); RimTernaryLegendConfig* ternaryLegendConfig(); diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp index e2b06c9b01..b4dd28c7ed 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp @@ -18,6 +18,8 @@ #include "RimEclipseGeometrySelectionItem.h" +#include "RiaTextStringTools.h" + #include "RigEclipseCaseData.h" #include "RigGridBase.h" #include "RigTimeHistoryResultAccessor.h" @@ -25,6 +27,7 @@ #include "RimEclipseCase.h" #include "RimEclipseResultDefinition.h" #include "RimEclipseView.h" +#include "RimTools.h" #include "Riu3dSelectionManager.h" @@ -40,7 +43,10 @@ RimEclipseGeometrySelectionItem::RimEclipseGeometrySelectionItem() CAF_PDM_InitFieldNoDefault( &m_eclipseCase, "EclipseCase", "Eclipse Case" ); CAF_PDM_InitFieldNoDefault( &m_gridIndex, "GridIndex", "Grid Index" ); CAF_PDM_InitFieldNoDefault( &m_cellIndex, "CellIndex", "Cell Index" ); - CAF_PDM_InitFieldNoDefault( &m_localIntersectionPointInDisplay, "LocalIntersectionPoint", "local Intersection Point" ); + + CAF_PDM_InitFieldNoDefault( &m_ijkText, "CellText", "Cell I J K" ); + m_ijkText.registerGetMethod( this, &RimEclipseGeometrySelectionItem::ijkTextFromCell ); + m_ijkText.registerSetMethod( this, &RimEclipseGeometrySelectionItem::setCellFromIjkText ); } //-------------------------------------------------------------------------------------------------- @@ -55,13 +61,22 @@ RimEclipseGeometrySelectionItem::~RimEclipseGeometrySelectionItem() //-------------------------------------------------------------------------------------------------- void RimEclipseGeometrySelectionItem::setFromSelectionItem( const RiuEclipseSelectionItem* selectionItem ) { - m_gridIndex = selectionItem->m_gridIndex; - m_cellIndex = selectionItem->m_gridLocalCellIndex; - m_localIntersectionPointInDisplay = selectionItem->m_localIntersectionPointInDisplay; + m_gridIndex = selectionItem->m_gridIndex; + m_cellIndex = selectionItem->m_gridLocalCellIndex; m_eclipseCase = selectionItem->m_resultDefinition->eclipseCase(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseGeometrySelectionItem::setFromSelectionItem( RimEclipseGeometrySelectionItem* selectionItem ) +{ + m_eclipseCase = selectionItem->eclipseCase(); + m_gridIndex = selectionItem->m_gridIndex(); + m_cellIndex = selectionItem->m_cellIndex(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -70,8 +85,8 @@ void RimEclipseGeometrySelectionItem::setFromCaseGridAndIJK( RimEclipseCase* ecl m_eclipseCase = eclipseCase; m_gridIndex = gridIndex; - size_t lgrCellIndex = eclipseCase->eclipseCaseData()->grid( gridIndex )->cellIndexFromIJK( i, j, k ); - size_t reservoirCellIndex = eclipseCase->eclipseCaseData()->grid( gridIndex )->reservoirCellIndex( lgrCellIndex ); + size_t localIndex = grid()->cellIndexFromIJK( i, j, k ); + size_t reservoirCellIndex = grid()->reservoirCellIndex( localIndex ); m_cellIndex = reservoirCellIndex; } @@ -126,17 +141,76 @@ size_t RimEclipseGeometrySelectionItem::cellIndex() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::Vec3st RimEclipseGeometrySelectionItem::cellIJK() const +void RimEclipseGeometrySelectionItem::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { - cvf::Vec3st IJK( -1, -1, -1 ); + uiOrdering.add( &m_ijkText ); + uiOrdering.add( &m_eclipseCase ); + uiOrdering.skipRemainingFields(); +} - if ( m_cellIndex != cvf::UNDEFINED_SIZE_T ) +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimEclipseGeometrySelectionItem::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + QList options; + + if ( fieldNeedingOptions == &m_eclipseCase ) { - if ( m_eclipseCase && m_eclipseCase->eclipseCaseData() && m_eclipseCase->eclipseCaseData()->grid( m_gridIndex ) ) + RimTools::caseOptionItems( &options ); + + options.push_front( caf::PdmOptionItemInfo( "None", nullptr ) ); + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimEclipseGeometrySelectionItem::ijkTextFromCell() const +{ + if ( grid() ) + { + if ( auto zeroBased = grid()->ijkFromCellIndex( m_cellIndex ) ) { - m_eclipseCase->eclipseCaseData()->grid( m_gridIndex )->ijkFromCellIndex( m_cellIndex, &IJK[0], &IJK[1], &IJK[2] ); + auto oneBased = zeroBased->toOneBased(); + return QString( "%1 %2 %3" ).arg( oneBased.i() ).arg( oneBased.j() ).arg( oneBased.k() ); } } - return IJK; + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseGeometrySelectionItem::setCellFromIjkText( const QString& text ) +{ + auto values = RiaTextStringTools::parseDoubleValues( text ); + if ( values.size() >= 3 ) + { + int i = values[0] - 1; + int j = values[1] - 1; + int k = values[2] - 1; + + if ( grid() ) + { + size_t localIndex = grid()->cellIndexFromIJK( i, j, k ); + m_cellIndex = grid()->reservoirCellIndex( localIndex ); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigGridBase* RimEclipseGeometrySelectionItem::grid() const +{ + if ( m_eclipseCase && m_eclipseCase->eclipseCaseData() && m_eclipseCase->eclipseCaseData()->grid( m_gridIndex ) ) + { + return m_eclipseCase->eclipseCaseData()->grid( m_gridIndex ); + } + + return nullptr; } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h b/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h index 7b83085337..daa0370b62 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h @@ -21,17 +21,19 @@ #include "RimGeometrySelectionItem.h" #include "cafPdmField.h" -#include "cafPdmFieldCvfVec3d.h" +#include "cafPdmObject.h" +#include "cafPdmProxyValueField.h" #include "cafPdmPtrField.h" class RimEclipseCase; class RiuEclipseSelectionItem; +class RigGridBase; //================================================================================================== /// /// //================================================================================================== -class RimEclipseGeometrySelectionItem : public RimGeometrySelectionItem +class RimEclipseGeometrySelectionItem : public RimGeometrySelectionItem_OBSOLETE { CAF_PDM_HEADER_INIT; @@ -40,18 +42,28 @@ public: ~RimEclipseGeometrySelectionItem() override; void setFromSelectionItem( const RiuEclipseSelectionItem* selectionItem ); + void setFromSelectionItem( RimEclipseGeometrySelectionItem* selectionItem ); void setFromCaseGridAndIJK( RimEclipseCase* eclipseCase, size_t gridIndex, size_t i, size_t j, size_t k ); - QString geometrySelectionText() const override; + QString geometrySelectionText() const; RimEclipseCase* eclipseCase() const; size_t gridIndex() const; size_t cellIndex() const; - cvf::Vec3st cellIJK() const; + +private: + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + + QString ijkTextFromCell() const; + void setCellFromIjkText( const QString& text ); + + const RigGridBase* grid() const; private: caf::PdmPtrField m_eclipseCase; - caf::PdmField m_gridIndex; - caf::PdmField m_cellIndex; - caf::PdmField m_localIntersectionPointInDisplay; + caf::PdmProxyValueField m_ijkText; + + caf::PdmField m_gridIndex; + caf::PdmField m_cellIndex; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.cpp index 0f8cacceae..110c70b29f 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.cpp @@ -235,15 +235,6 @@ bool RimEclipseInputCase::openEclipseGridFile() return true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseInputCase::reloadEclipseGridFile() -{ - setReservoirData( nullptr ); - openReserviorCase(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.h b/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.h index 20f97edb05..c04c4acd27 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseInputCase.h @@ -50,7 +50,6 @@ public: // RimCase overrides bool openEclipseGridFile() override; - void reloadEclipseGridFile() override; // Overrides from RimCase QString locationOnDisc() const override; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp index b7290e796a..9192d8dd88 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp @@ -44,7 +44,10 @@ #include "RigFlowDiagSolverInterface.h" #include "RigMainGrid.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationTools.h" #include "RimDialogData.h" +#include "RimEclipseCaseEnsemble.h" #include "RimEclipseCellColors.h" #include "RimEclipseInputProperty.h" #include "RimEclipseInputPropertyCollection.h" @@ -110,6 +113,21 @@ bool RimEclipseResultCase::openEclipseGridFile() return importGridAndResultMetaData( false ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultCase::initAfterRead() +{ + RimEclipseCase::initAfterRead(); + + // handle special formations for ensembles + if ( firstAncestorOrThisOfType() != nullptr ) + { + auto folderNames = RimFormationTools::formationFoldersFromCaseFileName( m_caseFileName().path() ); + m_activeFormationNames = RimFormationTools::loadFormationNamesFromFolder( folderNames ); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -287,12 +305,11 @@ bool RimEclipseResultCase::importAsciiInputProperties( const QStringList& fileNa //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimEclipseResultCase::reloadEclipseGridFile() +void RimEclipseResultCase::closeReservoirCase() { + RimEclipseCase::closeReservoirCase(); m_gridAndWellDataIsReadFromFile = false; m_activeCellInfoIsReadFromFile = false; - setReservoirData( nullptr ); - openReserviorCase(); } //-------------------------------------------------------------------------------------------------- @@ -696,3 +713,30 @@ void RimEclipseResultCase::defineEditorAttribute( const caf::PdmFieldHandle* fie } } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimEclipseResultCase::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + // if this is part of an ensemble, use lyr file set during ensemble creating + if ( fieldNeedingOptions == &m_activeFormationNames ) + { + auto ensemble = firstAncestorOrThisOfType(); + if ( ensemble != nullptr ) + { + QList options; + if ( m_activeFormationNames() ) + { + options.push_back( caf::PdmOptionItemInfo( m_activeFormationNames->fileNameWoPath(), m_activeFormationNames(), false ) ); + } + else + { + options.push_back( caf::PdmOptionItemInfo( "None", nullptr ) ); + } + return options; + } + } + + return RimEclipseCase::calculateValueOptions( fieldNeedingOptions ); +} diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.h b/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.h index ab0473a85d..8ad28dfa27 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.h @@ -55,11 +55,11 @@ public: bool hasSourSimFile(); bool openEclipseGridFile() override; + void closeReservoirCase() override; bool importGridAndResultMetaData( bool showTimeStepFilter ); bool importAsciiInputProperties( const QStringList& fileNames ) override; - void reloadEclipseGridFile() override; bool openAndReadActiveCellData( RigEclipseCaseData* mainEclipseCase ); void readGridDimensions( std::vector>& gridDimensions ); @@ -80,6 +80,8 @@ public: protected: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + void initAfterRead() override; private: void loadAndUpdateSourSimData(); diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.cpp index e35bddd12b..583eb496a0 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.cpp @@ -33,14 +33,14 @@ #include "RigFlowDiagResults.h" #include "RigFormationNames.h" +#include "ContourMap/RimContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" #include "Rim3dWellLogCurve.h" #include "RimCellEdgeColors.h" -#include "RimContourMapProjection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseFaultColors.h" #include "RimEclipsePropertyFilter.h" #include "RimEclipseResultCase.h" @@ -326,7 +326,8 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch if ( contourMapView ) { - contourMapView->contourMapProjection()->clearGridMappingAndRedraw(); + if ( auto projection = dynamic_cast( contourMapView->contourMapProjection() ) ) + projection->clearGridMappingAndRedraw(); } loadDataAndUpdate(); @@ -336,7 +337,8 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch { if ( contourMapView ) { - contourMapView->contourMapProjection()->clearGridMappingAndRedraw(); + if ( auto projection = dynamic_cast( contourMapView->contourMapProjection() ) ) + projection->clearGridMappingAndRedraw(); } loadDataAndUpdate(); @@ -1680,7 +1682,8 @@ void RimEclipseResultDefinition::setTernaryEnabled( bool enabled ) //-------------------------------------------------------------------------------------------------- void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegendConfig* legendConfigToUpdate, RimTernaryLegendConfig* ternaryLegendConfigToUpdate, - int currentTimeStep ) + int currentTimeStep, + RimEclipseView* cellVisibilityView ) { if ( hasResult() ) @@ -1694,7 +1697,7 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen } else { - RimEclipseResultDefinitionTools::updateCellResultLegend( this, legendConfigToUpdate, currentTimeStep ); + RimEclipseResultDefinitionTools::updateCellResultLegend( this, legendConfigToUpdate, currentTimeStep, cellVisibilityView ); } } @@ -1704,6 +1707,17 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegendConfig* legendConfig, + RimTernaryLegendConfig* ternaryLegendConfig, + int currentTimeStep ) +{ + RimEclipseView* cellVisibilityView = nullptr; + updateRangesForExplicitLegends( legendConfig, ternaryLegendConfig, currentTimeStep, cellVisibilityView ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.h b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.h index 21b3557059..23aabbd17c 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinition.h @@ -137,6 +137,11 @@ public: void setTernaryEnabled( bool enabled ); void updateRangesForExplicitLegends( RimRegularLegendConfig* legendConfig, RimTernaryLegendConfig* ternaryLegendConfig, int currentTimeStep ); + void updateRangesForExplicitLegends( RimRegularLegendConfig* legendConfig, + RimTernaryLegendConfig* ternaryLegendConfig, + int currentTimeStep, + RimEclipseView* viewUsedForCategoryValues ); + void updateLegendTitle( RimRegularLegendConfig* legendConfig, const QString& legendHeading ); bool showOnlyVisibleCategoriesInLegend() const; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.cpp index 084fc9f70b..472f2fa058 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.cpp @@ -42,10 +42,12 @@ #include "RimSimWellInViewCollection.h" #include "RimTernaryLegendConfig.h" +#include "cafCategoryMapper.h" + +#include "cvfColor3.h" + #include -#include "cafCategoryMapper.h" -#include "cvfColor3.h" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -491,7 +493,8 @@ void RimEclipseResultDefinitionTools::updateLegendForFlowDiagnostics( const RimE //-------------------------------------------------------------------------------------------------- void RimEclipseResultDefinitionTools::updateCellResultLegend( const RimEclipseResultDefinition* resultDefinition, RimRegularLegendConfig* legendConfigToUpdate, - int timeStep ) + int timeStep, + RimEclipseView* sourceCellVisibilityView ) { if ( !resultDefinition || !legendConfigToUpdate ) return; @@ -638,19 +641,17 @@ void RimEclipseResultDefinitionTools::updateCellResultLegend( const RimEclipseRe if ( resultDefinition->showOnlyVisibleCategoriesInLegend() ) { - auto eclView = resultDefinition->firstAncestorOrThisOfType(); - if ( eclView && eclView->showWindow() ) + // If a predefined view is nullptr, search for an ancestor view + auto cellVisibilityView = sourceCellVisibilityView ? sourceCellVisibilityView + : resultDefinition->firstAncestorOrThisOfType(); + if ( cellVisibilityView && cellVisibilityView->showWindow() ) { - // Check if current result is cell result, and update the visible set of values - // TODO: Can be extended to the separate geometry results (separate fault result, separate - // intersection results), but this requires some refactoring - if ( eclView->cellResult() == resultDefinition ) - { - std::set visibleCategorySet = RigVisibleCategoriesCalculator::visibleCategories( eclView ); + std::set visibleCategorySet = + RigVisibleCategoriesCalculator::visibleCategories( cellVisibilityView, resultDefinition ); - visibleCategoryValues.clear(); - visibleCategoryValues.insert( visibleCategoryValues.begin(), visibleCategorySet.begin(), visibleCategorySet.end() ); - } + // If we have a view, use the unique values defined by visible cells in this view + visibleCategoryValues.clear(); + visibleCategoryValues.insert( visibleCategoryValues.begin(), visibleCategorySet.begin(), visibleCategorySet.end() ); } } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.h b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.h index b9ac6482ed..e7a7c37c42 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultDefinitionTools.h @@ -52,7 +52,10 @@ void updateLegendForFlowDiagnostics( const RimEclipseResultDefinition* resultDef RimRegularLegendConfig* legendConfigToUpdate, int timeStep ); -void updateCellResultLegend( const RimEclipseResultDefinition* resultDefinition, RimRegularLegendConfig* legendConfigToUpdate, int timeStep ); +void updateCellResultLegend( const RimEclipseResultDefinition* resultDefinition, + RimRegularLegendConfig* legendConfigToUpdate, + int timeStep, + RimEclipseView* sourceCellVisibilityView ); QList calcOptionsForVariableUiFieldStandard( RiaDefines::ResultCatType resultCatType, const RigCaseCellResultsData* results, diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.cpp index fcb48f1f76..13f064dc38 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.cpp @@ -202,15 +202,6 @@ bool RimEclipseStatisticsCase::openEclipseGridFile() return true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEclipseStatisticsCase::reloadEclipseGridFile() -{ - setReservoirData( nullptr ); - openReserviorCase(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -561,7 +552,10 @@ void RimEclipseStatisticsCase::defineUiOrdering( QString uiConfigName, caf::PdmU uiOrdering.skipRemainingFields(); } -QList toOptionList( const QStringList& varList ) +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimEclipseStatisticsCase::toOptionList( const QStringList& varList ) { QList optionList; int i; @@ -904,9 +898,7 @@ void RimEclipseStatisticsCase::updateSelectionListVisibilities() { bool isLocked = hasComputedStatistics(); m_resultType.uiCapability()->setUiHidden( isLocked ); - m_porosityModel.uiCapability()->setUiHidden( - isLocked ); // || - // !caseGroup()->mainCase()->reservoirData()->results(RiaDefines::FRACTURE_MODEL)->resultCount() + m_porosityModel.uiCapability()->setUiHidden( isLocked ); m_selectedDynamicProperties.uiCapability()->setUiHidden( isLocked || m_porosityModel() != RiaDefines::PorosityModelType::MATRIX_MODEL || m_resultType() != RiaDefines::ResultCatType::DYNAMIC_NATIVE ); diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.h b/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.h index f7c2fa04a3..8adea0a7be 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseStatisticsCase.h @@ -72,7 +72,6 @@ public: void updateConnectedEditorsAndReservoirViews(); bool openEclipseGridFile() override; - void reloadEclipseGridFile() override; RimCaseCollection* parentStatisticsCaseCollection() const; @@ -106,6 +105,8 @@ private: void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; void initializeSelectedTimeSteps(); + static QList toOptionList( const QStringList& varList ); + private: caf::PdmField> m_dataSourceForStatistics; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp index 6a9f632724..5e1e4e6cbb 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp @@ -79,7 +79,6 @@ #include "RimReservoirCellResultsStorage.h" #include "RimSeismicSection.h" #include "RimSeismicSectionCollection.h" -#include "RimSimWellFracture.h" #include "RimSimWellInView.h" #include "RimSimWellInViewCollection.h" #include "RimStimPlanColors.h" @@ -121,6 +120,8 @@ #include "cafPdmObjectScriptingCapability.h" #include "cafPdmUiComboBoxEditor.h" #include "cafPdmUiTreeOrdering.h" +#include "cafSelectionManager.h" +#include "cafUpdateEditorsScheduler.h" #include "cvfDrawable.h" #include "cvfModelBasicList.h" @@ -542,6 +543,8 @@ void RimEclipseView::childFieldChangedByUi( const caf::PdmFieldHandle* changedCh if ( changedChildField == &m_cellResult ) { updateMdiWindowTitle(); + + m_propertyFilterCollection->updateDefaultResult( m_cellResult() ); } } @@ -559,6 +562,38 @@ void RimEclipseView::onUpdateScaleTransform() if ( nativeOrOverrideViewer() ) nativeOrOverrideViewer()->updateCachedValuesInScene(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimEclipseView::activeTimeStepIndices( bool propertyFiltersActive ) +{ + std::vector timeStepIndices; + + // First entry in this vector is used to define the geometry only result mode with no results. + timeStepIndices.push_back( 0 ); + + // Find the number of time frames the animation needs to show the requested data. + if ( ( isTimeStepDependentDataVisibleInThisOrComparisonView() && currentGridCellResults()->maxTimeStepCount() > 0 ) ) + { + CVF_ASSERT( currentGridCellResults() ); + + size_t i; + for ( i = 0; i < currentGridCellResults()->maxTimeStepCount(); i++ ) + { + timeStepIndices.push_back( i ); + } + } + else if ( cellResult()->hasStaticResult() || cellEdgeResult()->hasResult() || propertyFiltersActive || + intersectionCollection()->hasAnyActiveSeparateResults() || + ( surfaceInViewCollection() && surfaceInViewCollection()->hasAnyActiveSeparateResults() ) ) + { + // The one and only static result entry + timeStepIndices.push_back( 0 ); + } + + return timeStepIndices; +} + //-------------------------------------------------------------------------------------------------- /// Create display model, /// or at least empty scenes as frames that is delivered to the viewer @@ -583,30 +618,7 @@ void RimEclipseView::onCreateDisplayModel() // Define a vector containing time step indices to produce geometry for. // First entry in this vector is used to define the geometry only result mode with no results. - std::vector timeStepIndices; - - // The one and only geometry entry - timeStepIndices.push_back( 0 ); - - // Find the number of time frames the animation needs to show the requested data. - - if ( ( isTimeStepDependentDataVisibleInThisOrComparisonView() && currentGridCellResults()->maxTimeStepCount() > 0 ) ) - { - CVF_ASSERT( currentGridCellResults() ); - - size_t i; - for ( i = 0; i < currentGridCellResults()->maxTimeStepCount(); i++ ) - { - timeStepIndices.push_back( i ); - } - } - else if ( cellResult()->hasStaticResult() || cellEdgeResult()->hasResult() || propertyFiltersActive || - intersectionCollection()->hasAnyActiveSeparateResults() || - ( surfaceInViewCollection() && surfaceInViewCollection()->hasAnyActiveSeparateResults() ) ) - { - // The one and only static result entry - timeStepIndices.push_back( 0 ); - } + std::vector timeStepIndices = activeTimeStepIndices( propertyFiltersActive ); cvf::Collection frameModels; size_t timeIdx; @@ -816,7 +828,26 @@ void RimEclipseView::onCreateDisplayModel() { if ( curveSet != nullptr ) { + // https://github.com/OPM/ResInsight/issues/12189 + // + // If a 3D interaction process is active, like adding new well targets or creating a polyline, this process can be interrupted + // by the update of property editors in the plot window. + // The update of the view can cause new grid cross plot curves in the Plot Window to be created. If this happens, the project + // tree view is recreated and updated. The selection will be updated when this happens. Make sure that all scheduled updates for + // PdmUiEditors is processed, and reset the selection to initial selection. + // + // Related code + // PdmUiTreeViewEditor::updateSelectionManager(), + // PdmUiTreeViewEditor::enableSelectionManagerUpdating + + std::vector selectedItems; + caf::SelectionManager::instance()->selectedItems( selectedItems ); + curveSet->cellFilterViewUpdated(); + + caf::UpdateEditorsScheduler::instance()->performScheduledUpdates(); + + caf::SelectionManager::instance()->setSelectedItems( selectedItems ); } } @@ -863,10 +894,17 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep() if ( intersectionCollection()->shouldApplyCellFiltersToIntersections() && eclipsePropertyFilterCollection()->hasActiveFilters() ) { - m_intersectionCollection->clearGeometry(); appendIntersectionsForCurrentTimeStep(); } + if ( surfaceInViewCollection() ) + { + m_surfaceVizModel->removeAllParts(); + + surfaceInViewCollection()->loadData( currentTimeStep() ); + surfaceInViewCollection()->appendPartsToModel( m_surfaceVizModel.p(), m_reservoirGridPartManager->scaleTransform() ); + } + updateVisibleCellColors(); wellCollection()->scaleWellDisks(); @@ -878,7 +916,7 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep() m_overlayInfoConfig()->update3DInfo(); // Invisible Wells are marked as read only when "show wells intersecting visible cells" is enabled - // Visibility of wells differ betweeen time steps, so trigger a rebuild of tree state items + // Visibility of wells differ between time steps, so trigger a rebuild of tree state items wellCollection()->updateConnectedEditors(); RicExportToSharingServerScheduler::instance()->scheduleUpdateSession(); @@ -1090,37 +1128,6 @@ void RimEclipseView::appendWellsAndFracturesToModel() frameScene->addModel( wellPathModelBasicList.p() ); } - - // Sim Well Fractures - { - cvf::String name = "SimWellFracturesModel"; - RimEclipseView::removeModelByName( frameScene, name ); - - cvf::ref simWellFracturesModelBasicList = new cvf::ModelBasicList; - simWellFracturesModelBasicList->setName( name ); - - cvf::ref transForm = displayCoordTransform(); - - std::vector fractures = descendantsIncludingThisOfType(); - for ( RimFracture* f : fractures ) - { - RimSimWellInView* simWell = f->firstAncestorOrThisOfType(); - if ( simWell ) - { - bool isAnyGeometryPresent = simWell->isWellPipeVisible( m_currentTimeStep ) || - simWell->isWellSpheresVisible( m_currentTimeStep ); - if ( !isAnyGeometryPresent ) - { - continue; - } - } - - f->fracturePartManager()->appendGeometryPartsToModel( simWellFracturesModelBasicList.p(), *this ); - } - - simWellFracturesModelBasicList->updateBoundingBoxesRecursive(); - frameScene->addModel( simWellFracturesModelBasicList.p() ); - } } } } @@ -1193,7 +1200,7 @@ void RimEclipseView::onLoadDataAndUpdate() if ( eclipseCase() ) { - if ( !eclipseCase()->openReserviorCase() ) + if ( !eclipseCase()->openReservoirCase() ) { RiaLogging::warning( "Could not open the Eclipse Grid file: \n" + eclipseCase()->gridFileName() ); setEclipseCase( nullptr ); @@ -1218,7 +1225,7 @@ void RimEclipseView::onLoadDataAndUpdate() m_wellCollection->scaleWellDisks(); - if ( m_surfaceCollection ) m_surfaceCollection->loadData(); + if ( m_surfaceCollection ) m_surfaceCollection->loadData( m_currentTimeStep ); scheduleReservoirGridGeometryRegen(); m_simWellsPartManager->clearGeometryCache(); @@ -1227,16 +1234,6 @@ void RimEclipseView::onLoadDataAndUpdate() synchronizeLocalAnnotationsFromGlobal(); - { - // Update simulation well fractures after well cell results are imported - - std::vector simFractures = descendantsIncludingThisOfType(); - for ( auto fracture : simFractures ) - { - fracture->loadDataAndUpdate(); - } - } - if ( isVirtualConnectionFactorGeometryVisible() ) { m_virtualPerforationResult->loadData(); @@ -2348,6 +2345,8 @@ void RimEclipseView::setOverridePropertyFilterCollection( RimEclipsePropertyFilt //-------------------------------------------------------------------------------------------------- void RimEclipseView::calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep ) { + if ( !mainGrid() ) return; + size_t cellCount = mainGrid()->totalCellCount(); totalVisibility->resize( cellCount ); diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseView.h b/ApplicationLibCode/ProjectDataModel/RimEclipseView.h index 7f43f8c095..d11133b239 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseView.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseView.h @@ -184,6 +184,8 @@ protected: void onLoadDataAndUpdate() override; caf::PdmFieldHandle* userDescriptionField() override; + virtual std::vector activeTimeStepIndices( bool propertyFiltersActive ); + bool isShowingActiveCellsOnly() override; void onUpdateDisplayModelForCurrentTimeStep() override; void updateVisibleCellColors(); diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseViewCollection.cpp index 4acdf4caf2..b9542114d9 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseViewCollection.cpp @@ -27,6 +27,7 @@ #include "Rim3dView.h" #include "RimCase.h" #include "RimCellEdgeColors.h" +#include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" #include "RimFaultInViewCollection.h" @@ -92,13 +93,6 @@ RimEclipseView* RimEclipseViewCollection::addView( RimEclipseCase* eclipseCase ) view->setEclipseCase( eclipseCase ); - // Set default values - if ( view->currentGridCellResults() ) - { - auto defaultResult = view->currentGridCellResults()->defaultResult(); - view->cellResult()->setFromEclipseResultAddress( defaultResult ); - } - auto prefs = RiaPreferences::current(); view->faultCollection()->setActive( prefs->enableFaultsByDefault() ); @@ -114,6 +108,13 @@ RimEclipseView* RimEclipseViewCollection::addView( RimEclipseCase* eclipseCase ) view->loadDataAndUpdate(); + // Set default values + if ( view->currentGridCellResults() ) + { + auto defaultResult = view->currentGridCellResults()->defaultResult(); + view->cellResult()->setFromEclipseResultAddress( defaultResult ); + } + updateConnectedEditors(); return view; diff --git a/ApplicationLibCode/ProjectDataModel/RimEmCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEmCase.cpp index 4cc3c4fff7..59aaa2b970 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEmCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEmCase.cpp @@ -174,15 +174,6 @@ bool RimEmCase::openEclipseGridFile() return true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimEmCase::reloadEclipseGridFile() -{ - setReservoirData( nullptr ); - openReserviorCase(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimEmCase.h b/ApplicationLibCode/ProjectDataModel/RimEmCase.h index 408286e7cf..d306a0a065 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEmCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimEmCase.h @@ -46,7 +46,6 @@ public: ~RimEmCase() override; bool openEclipseGridFile() override; - void reloadEclipseGridFile() override; QString locationOnDisc() const override; diff --git a/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.cpp b/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.cpp index 4694c4432a..494adb705c 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.cpp @@ -18,18 +18,18 @@ #include "RimGeometrySelectionItem.h" -CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimGeometrySelectionItem, "GeometrySelectionItem" ); +CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimGeometrySelectionItem_OBSOLETE, "GeometrySelectionItem" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimGeometrySelectionItem::RimGeometrySelectionItem() +RimGeometrySelectionItem_OBSOLETE::RimGeometrySelectionItem_OBSOLETE() { } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimGeometrySelectionItem::~RimGeometrySelectionItem() +RimGeometrySelectionItem_OBSOLETE::~RimGeometrySelectionItem_OBSOLETE() { } diff --git a/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.h b/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.h index 8d3614481f..d7c0b2fcee 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.h +++ b/ApplicationLibCode/ProjectDataModel/RimGeometrySelectionItem.h @@ -20,13 +20,11 @@ #include "cafPdmObject.h" -class RimGeometrySelectionItem : public caf::PdmObject +class RimGeometrySelectionItem_OBSOLETE : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimGeometrySelectionItem(); - ~RimGeometrySelectionItem() override; - - virtual QString geometrySelectionText() const = 0; + RimGeometrySelectionItem_OBSOLETE(); + ~RimGeometrySelectionItem_OBSOLETE() override; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimGridCalculation.cpp b/ApplicationLibCode/ProjectDataModel/RimGridCalculation.cpp index 6211ad6b9f..ea91d24e0c 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridCalculation.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimGridCalculation.cpp @@ -37,6 +37,7 @@ #include "RimCaseCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCaseCollection.h" +#include "RimEclipseCaseEnsemble.h" #include "RimEclipseCaseTools.h" #include "RimEclipseCellColors.h" #include "RimEclipseResultAddress.h" @@ -77,6 +78,7 @@ void caf::AppEnum::setUp() { addItem( RimGridCalculation::AdditionalCasesType::NONE, "NONE", "None" ); addItem( RimGridCalculation::AdditionalCasesType::GRID_CASE_GROUP, "GRID_CASE_GROUP", "Case Group" ); + addItem( RimGridCalculation::AdditionalCasesType::ENSEMBLE, "ENSEMBLE", "Ensemble" ); addItem( RimGridCalculation::AdditionalCasesType::ALL_CASES, "NONE", "All Cases" ); setDefault( RimGridCalculation::AdditionalCasesType::NONE ); } @@ -98,6 +100,7 @@ RimGridCalculation::RimGridCalculation() CAF_PDM_InitFieldNoDefault( &m_additionalCasesType, "AdditionalCasesType", "Apply To Additional Cases" ); CAF_PDM_InitFieldNoDefault( &m_additionalCaseGroup, "AdditionalCaseGroup", "Case Group" ); + CAF_PDM_InitFieldNoDefault( &m_additionalEnsemble, "AdditionalEnsemble", "Ensemble" ); CAF_PDM_InitFieldNoDefault( &m_nonVisibleResultAddress, "NonVisibleResultAddress", "" ); m_nonVisibleResultAddress = new RimEclipseResultAddress; @@ -175,7 +178,8 @@ bool RimGridCalculation::calculate() { // Equal grid size is required if there is more than one grid case in the expression. If a cell filter view is active, the visibility is // based on one view and reused for all other grid models, and requires equal grid size. - bool checkIfGridSizeIsEqual = !allSourceCasesAreEqualToDestinationCase() || m_cellFilterView != nullptr; + bool checkIfGridSizeIsEqual = ( !allSourceCasesAreEqualToDestinationCase() || m_cellFilterView != nullptr ) && + m_additionalCasesType != AdditionalCasesType::ENSEMBLE; for ( auto calculationCase : outputEclipseCases() ) { @@ -183,9 +187,16 @@ bool RimGridCalculation::calculate() if ( !calculationCase->eclipseCaseData() ) { - QString msg = QString( "No data available for case %1, aborting calculation" ).arg( calculationCase->caseUserDescription() ); - RiaLogging::errorInMessageBox( nullptr, "Grid Property Calculator", msg ); - return false; + if ( m_additionalCasesType == AdditionalCasesType::ENSEMBLE ) + { + calculationCase->ensureReservoirCaseIsOpen(); + } + else + { + QString msg = QString( "No data available for case %1, aborting calculation" ).arg( calculationCase->caseUserDescription() ); + RiaLogging::errorInMessageBox( nullptr, "Grid Property Calculator", msg ); + return false; + } } if ( !calculationCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ) ) @@ -275,6 +286,11 @@ std::vector RimGridCalculation::outputEclipseCases() const return m_additionalCaseGroup()->caseCollection()->reservoirs.childrenByType(); } + if ( m_additionalCasesType() == RimGridCalculation::AdditionalCasesType::ENSEMBLE ) + { + if ( m_additionalEnsemble() ) return m_additionalEnsemble()->cases(); + } + return { m_destinationCase }; } @@ -333,6 +349,9 @@ void RimGridCalculation::defineUiOrdering( QString uiConfigName, caf::PdmUiOrder uiOrdering.add( &m_additionalCaseGroup ); m_additionalCaseGroup.uiCapability()->setUiHidden( m_additionalCasesType() != RimGridCalculation::AdditionalCasesType::GRID_CASE_GROUP ); + uiOrdering.add( &m_additionalEnsemble ); + m_additionalEnsemble.uiCapability()->setUiHidden( m_additionalCasesType() != RimGridCalculation::AdditionalCasesType::ENSEMBLE ); + caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup( "Cell Filter" ); filterGroup->setCollapsedByDefault(); filterGroup->add( &m_cellFilterView ); @@ -442,6 +461,20 @@ QList RimGridCalculation::calculateValueOptions( const c } } } + else if ( &m_additionalEnsemble == fieldNeedingOptions ) + { + options.push_back( caf::PdmOptionItemInfo( "None", nullptr ) ); + + RimProject* proj = RimProject::current(); + if ( proj->activeOilField() && proj->activeOilField()->analysisModels() ) + { + auto analysisModels = proj->activeOilField()->analysisModels(); + for ( RimEclipseCaseEnsemble* e : analysisModels->caseEnsembles() ) + { + options.push_back( caf::PdmOptionItemInfo( e->name(), e, false, e->uiIconProvider() ) ); + } + } + } return options; } @@ -903,8 +936,9 @@ bool RimGridCalculation::calculateForCases( const std::vector& RimGridCalculationVariable* v = dynamic_cast( m_variables[i] ); CAF_ASSERT( v != nullptr ); - bool useDataFromSourceCase = ( v->eclipseCase() == m_destinationCase ); - auto sourceCase = useDataFromSourceCase ? calculationCase : v->eclipseCase(); + bool useDataFromSourceCase = ( v->eclipseCase() == m_destinationCase ) || + m_additionalCasesType == AdditionalCasesType::ENSEMBLE; + auto sourceCase = useDataFromSourceCase ? calculationCase : v->eclipseCase(); auto dataForVariable = getActiveCellValuesForVariable( v, tsId, porosityModel, sourceCase, calculationCase ); if ( dataForVariable.empty() ) diff --git a/ApplicationLibCode/ProjectDataModel/RimGridCalculation.h b/ApplicationLibCode/ProjectDataModel/RimGridCalculation.h index a4454f5a5b..eb50781b28 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridCalculation.h +++ b/ApplicationLibCode/ProjectDataModel/RimGridCalculation.h @@ -19,6 +19,7 @@ #pragma once #include "RiaPorosityModel.h" +#include "RimEclipseCaseEnsemble.h" #include "RimGridCalculationVariable.h" #include "RimUserDefinedCalculation.h" @@ -56,6 +57,7 @@ public: { NONE, GRID_CASE_GROUP, + ENSEMBLE, ALL_CASES }; @@ -146,6 +148,7 @@ private: caf::PdmField> m_additionalCasesType; caf::PdmPtrField m_additionalCaseGroup; + caf::PdmPtrField m_additionalEnsemble; caf::PdmField> m_selectedTimeSteps; diff --git a/ApplicationLibCode/ProjectDataModel/RimGridCalculationVariable.cpp b/ApplicationLibCode/ProjectDataModel/RimGridCalculationVariable.cpp index 21040520c6..5307c01068 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridCalculationVariable.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimGridCalculationVariable.cpp @@ -50,7 +50,13 @@ RimGridCalculationVariable::RimGridCalculationVariable() { CAF_PDM_InitObject( "RimGridCalculationVariable", ":/octave.png" ); - CAF_PDM_InitFieldNoDefault( &m_resultType, "ResultType", "Type" ); + CAF_PDM_InitField( &m_resultType, "ResultType", RiaDefines::ResultCatType::STATIC_NATIVE, "Type" ); + caf::AppEnum::setEnumSubset( &m_resultType, + { RiaDefines::ResultCatType::STATIC_NATIVE, + RiaDefines::ResultCatType::DYNAMIC_NATIVE, + RiaDefines::ResultCatType::INPUT_PROPERTY, + RiaDefines::ResultCatType::GENERATED } ); + CAF_PDM_InitField( &m_resultVariable, "ResultVariable", RiaResultNames::undefinedResultName(), "Variable" ); CAF_PDM_InitFieldNoDefault( &m_eclipseCase, "EclipseGridCase", "Grid Case" ); CAF_PDM_InitField( &m_timeStep, "TimeStep", allTimeStepsValue(), "Time Step" ); @@ -145,19 +151,7 @@ QList RimGridCalculationVariable::calculateValueOptions( { QList options; - if ( fieldNeedingOptions == &m_resultType ) - { - std::vector resultCategories = { RiaDefines::ResultCatType::STATIC_NATIVE, - RiaDefines::ResultCatType::DYNAMIC_NATIVE, - RiaDefines::ResultCatType::INPUT_PROPERTY, - RiaDefines::ResultCatType::GENERATED }; - - for ( auto c : resultCategories ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum( c ).uiText(), c ) ); - } - } - else if ( fieldNeedingOptions == &m_resultVariable ) + if ( fieldNeedingOptions == &m_resultVariable ) { auto results = currentGridCellResults(); if ( results ) diff --git a/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp b/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp index 34d25a2358..a7729866c5 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp @@ -18,7 +18,7 @@ #include "RimGridTimeHistoryCurve.h" -#include +#include "Tools/Summary/RiaSummaryTools.h" #include "RigCaseCellResultsData.h" #include "RigEclipseCaseData.h" @@ -26,26 +26,26 @@ #include "RigMainGrid.h" #include "RigTimeHistoryResultAccessor.h" +#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h" + #include "RimEclipseCase.h" -#include "RimEclipseCellColors.h" #include "RimEclipseGeometrySelectionItem.h" #include "RimEclipseResultDefinition.h" -#include "RimEclipseView.h" #include "RimGeoMechCase.h" #include "RimGeoMechGeometrySelectionItem.h" #include "RimGeoMechResultDefinition.h" -#include "RimGeoMechView.h" -#include "RimProject.h" #include "RimReservoirCellResultsStorage.h" #include "RimSummaryPlot.h" #include "RimSummaryTimeAxisProperties.h" +#include "RimTools.h" +#include "Tools/RimAutomationSettings.h" #include "Riu3dSelectionManager.h" #include "RiuFemTimeHistoryResultAccessor.h" -#include "RiuQwtPlotCurve.h" +#include "RiuPlotCurve.h" +#include "RiuPlotMainWindowTools.h" -#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" -#include "qwt_plot.h" +#include "cafPdmUiTreeAttributes.h" CAF_PDM_SOURCE_INIT( RimGridTimeHistoryCurve, "GridTimeHistoryCurve" ); @@ -60,17 +60,30 @@ RimGridTimeHistoryCurve::RimGridTimeHistoryCurve() m_geometrySelectionText.registerGetMethod( this, &RimGridTimeHistoryCurve::geometrySelectionText ); m_geometrySelectionText.uiCapability()->setUiReadOnly( true ); + CAF_PDM_InitField( &m_isLocked, "IsLocked", false, "Lock Curve" ); + CAF_PDM_InitFieldNoDefault( &m_eclipseResultDefinition, "EclipseResultDefinition", "Eclipse Result Definition" ); m_eclipseResultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); + m_eclipseResultDefinition = new RimEclipseResultDefinition; CAF_PDM_InitFieldNoDefault( &m_geoMechResultDefinition, "GeoMechResultDefinition", "GeoMech Result Definition" ); m_geoMechResultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); + m_geoMechResultDefinition = new RimGeoMechResultDefinition; - CAF_PDM_InitFieldNoDefault( &m_geometrySelectionItem, "GeometrySelectionItem", "Geometry Selection" ); - m_geometrySelectionItem.uiCapability()->setUiTreeChildrenHidden( true ); + CAF_PDM_InitFieldNoDefault( &m_eclipseDataSource, "EclipseDataSource", "Eclipse Data Source" ); + m_eclipseDataSource.uiCapability()->setUiTreeChildrenHidden( true ); + m_eclipseDataSource = new RimEclipseGeometrySelectionItem; + + CAF_PDM_InitFieldNoDefault( &m_geoMechDataSource, "GeoMechDataSource", "Geomechanical Data Source" ); + m_geoMechDataSource.uiCapability()->setUiTreeChildrenHidden( true ); + m_geoMechDataSource = new RimGeoMechGeometrySelectionItem; CAF_PDM_InitField( &m_plotAxis, "PlotAxis", caf::AppEnum( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ), "Axis" ); + CAF_PDM_InitFieldNoDefault( &m_geometrySelectionItem_OBSOLETE, "GeometrySelectionItem", "Geometry Selection" ); + m_geometrySelectionItem_OBSOLETE.uiCapability()->setUiTreeChildrenHidden( true ); + m_geometrySelectionItem_OBSOLETE.xmlCapability()->setIOWritable( false ); + setDeletable( true ); } @@ -84,49 +97,24 @@ RimGridTimeHistoryCurve::~RimGridTimeHistoryCurve() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimGridTimeHistoryCurve::setFromSelectionItem( const RiuSelectionItem* selectionItem ) +void RimGridTimeHistoryCurve::setFromSelectionItem( const RiuSelectionItem* selectionItem, bool updateResultDefinition ) { - if ( m_geometrySelectionItem() ) + if ( const RiuEclipseSelectionItem* eclSelectionItem = dynamic_cast( selectionItem ) ) { - delete m_geometrySelectionItem(); - } + m_eclipseDataSource->setFromSelectionItem( eclSelectionItem ); - if ( m_eclipseResultDefinition() ) - { - delete m_eclipseResultDefinition(); - } - - if ( m_geoMechResultDefinition() ) - { - delete m_geoMechResultDefinition(); - } - - const RiuEclipseSelectionItem* eclSelectionItem = dynamic_cast( selectionItem ); - if ( eclSelectionItem ) - { - RimEclipseGeometrySelectionItem* geomSelectionItem = new RimEclipseGeometrySelectionItem; - m_geometrySelectionItem = geomSelectionItem; - - geomSelectionItem->setFromSelectionItem( eclSelectionItem ); - - if ( eclSelectionItem->m_resultDefinition ) + if ( updateResultDefinition && eclSelectionItem->m_resultDefinition ) { - m_eclipseResultDefinition = new RimEclipseResultDefinition; m_eclipseResultDefinition->simpleCopy( eclSelectionItem->m_resultDefinition ); } } - const RiuGeoMechSelectionItem* geoMechSelectionItem = dynamic_cast( selectionItem ); - if ( geoMechSelectionItem ) + if ( const RiuGeoMechSelectionItem* geoMechSelectionItem = dynamic_cast( selectionItem ) ) { - RimGeoMechGeometrySelectionItem* geomSelectionItem = new RimGeoMechGeometrySelectionItem; - m_geometrySelectionItem = geomSelectionItem; + m_geoMechDataSource->setFromSelectionItem( geoMechSelectionItem ); - geomSelectionItem->setFromSelectionItem( geoMechSelectionItem ); - - if ( geoMechSelectionItem->m_resultDefinition ) + if ( updateResultDefinition && geoMechSelectionItem->m_resultDefinition ) { - m_geoMechResultDefinition = new RimGeoMechResultDefinition; m_geoMechResultDefinition->setGeoMechCase( geoMechSelectionItem->m_resultDefinition->geoMechCase() ); m_geoMechResultDefinition->setResultAddress( geoMechSelectionItem->m_resultDefinition->resultAddress() ); } @@ -145,41 +133,10 @@ void RimGridTimeHistoryCurve::setFromEclipseCellAndResult( RimEclipseCase* size_t k, const RigEclipseResultAddress& resAddr ) { - delete m_geometrySelectionItem(); - delete m_eclipseResultDefinition(); - delete m_geoMechResultDefinition(); - - m_eclipseResultDefinition = new RimEclipseResultDefinition; m_eclipseResultDefinition->setEclipseCase( eclCase ); m_eclipseResultDefinition->setFromEclipseResultAddress( resAddr ); - RimEclipseGeometrySelectionItem* geomSelectionItem = new RimEclipseGeometrySelectionItem; - m_geometrySelectionItem = geomSelectionItem; - geomSelectionItem->setFromCaseGridAndIJK( eclCase, gridIdx, i, j, k ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigGridCellResultAddress RimGridTimeHistoryCurve::resultAddress() -{ - RimEclipseGeometrySelectionItem* eclipseGeomSelectionItem = - dynamic_cast( m_geometrySelectionItem.value() ); - - if ( m_eclipseResultDefinition && eclipseGeomSelectionItem ) - { - cvf::Vec3st IJK = eclipseGeomSelectionItem->cellIJK(); - - return RigGridCellResultAddress( eclipseGeomSelectionItem->gridIndex(), - IJK[0], - IJK[1], - IJK[2], - m_eclipseResultDefinition->eclipseResultAddress() ); - } - - // Todo: support geomech stuff - - return RigGridCellResultAddress(); + m_eclipseDataSource->setFromCaseGridAndIJK( eclCase, gridIdx, i, j, k ); } //-------------------------------------------------------------------------------------------------- @@ -343,6 +300,60 @@ RimCase* RimGridTimeHistoryCurve::gridCase() const return nullptr; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::setLocked( bool locked ) +{ + m_isLocked = locked; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimGridTimeHistoryCurve::isLocked() const +{ + return m_isLocked(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::createCurveFromSelectionItem( const RiuSelectionItem* selectionItem, RimSummaryPlot* plot ) +{ + if ( !selectionItem || !plot ) return; + + auto newCurve = new RimGridTimeHistoryCurve(); + bool updateResultDefinition = true; + newCurve->setFromSelectionItem( selectionItem, updateResultDefinition ); + newCurve->setLineThickness( 2 ); + + cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable( plot->curveCount() ); + newCurve->setColor( curveColor ); + + plot->addGridTimeHistoryCurve( newCurve ); + + newCurve->loadDataAndUpdate( true ); + + plot->updateConnectedEditors(); + + RiuPlotMainWindowTools::showPlotMainWindow(); + RiuPlotMainWindowTools::selectAsCurrentItem( newCurve ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefines::PhaseType RimGridTimeHistoryCurve::phaseType() const +{ + if ( m_eclipseResultDefinition ) + { + return m_eclipseResultDefinition->resultPhaseType(); + } + + return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -382,6 +393,8 @@ void RimGridTimeHistoryCurve::onLoadDataAndUpdate( bool updateParentPlot ) if ( isChecked() && m_plotCurve ) { + updateResultDefinitionFromCase(); + std::vector values; RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); @@ -434,8 +447,7 @@ void RimGridTimeHistoryCurve::onLoadDataAndUpdate( bool updateParentPlot ) } } - updateZoomInParentPlot(); - + plot->zoomAll(); if ( m_parentPlot ) m_parentPlot->replot(); updateQwtPlotAxis(); @@ -554,31 +566,38 @@ void RimGridTimeHistoryCurve::defineUiOrdering( QString uiConfigName, caf::PdmUi { RimPlotCurve::updateFieldUiState(); - uiOrdering.add( &m_geometrySelectionText ); + uiOrdering.add( &m_isLocked ); + + caf::PdmUiGroup* dataSource = uiOrdering.addNewGroup( "Data Source" ); + dataSource->add( &m_geometrySelectionText ); + eclipseGeomSelectionItem()->uiOrdering( uiConfigName, *dataSource ); - // Fields declared in RimResultDefinition caf::PdmUiGroup* group1 = uiOrdering.addNewGroup( "Result" ); - if ( eclipseGeomSelectionItem() ) + if ( eclipseGeomSelectionItem() && m_eclipseResultDefinition->eclipseCase() ) { - CVF_ASSERT( m_eclipseResultDefinition() ); m_eclipseResultDefinition->uiOrdering( uiConfigName, *group1 ); } - if ( geoMechGeomSelectionItem() ) + if ( geoMechGeomSelectionItem() && m_geoMechResultDefinition->geoMechCase() ) { - CVF_ASSERT( m_geoMechResultDefinition() ); m_geoMechResultDefinition->uiOrdering( uiConfigName, *group1 ); } uiOrdering.add( &m_plotAxis ); + caf::PdmUiGroup* stackingGroup = uiOrdering.addNewGroup( "Stacking" ); + RimStackablePlotCurve::stackingUiOrdering( *stackingGroup ); + caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup( "Appearance" ); RimPlotCurve::appearanceUiOrdering( *appearanceGroup ); + appearanceGroup->setCollapsedByDefault(); caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Curve Name" ); nameGroup->setCollapsedByDefault(); nameGroup->add( &m_showLegend ); RimPlotCurve::curveNameUiOrdering( *nameGroup ); + + uiOrdering.skipRemainingFields(); } //-------------------------------------------------------------------------------------------------- @@ -588,6 +607,20 @@ void RimGridTimeHistoryCurve::initAfterRead() { RimPlotCurve::initAfterRead(); + // Convert old geometry selection item to new data source + // This change was introduced in 2025.03 + // When this class is removed, the inheritance of RimGeometrySelectionItem_OBSOLETE should be removed as well + // The project files will then work as expected + RimGeometrySelectionItem_OBSOLETE* obj = m_geometrySelectionItem_OBSOLETE(); + if ( auto eclipseObject = dynamic_cast( obj ) ) + { + m_eclipseDataSource->setFromSelectionItem( eclipseObject ); + } + else if ( auto geoMechObject = dynamic_cast( obj ) ) + { + m_geoMechDataSource->setFromSelectionItem( geoMechObject ); + } + updateResultDefinitionFromCase(); } @@ -596,6 +629,8 @@ void RimGridTimeHistoryCurve::initAfterRead() //-------------------------------------------------------------------------------------------------- void RimGridTimeHistoryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) { + RimStackablePlotCurve::fieldChangedByUi( changedField, oldValue, newValue ); + if ( changedField == &m_plotAxis ) { updateQwtPlotAxis(); @@ -610,6 +645,46 @@ void RimGridTimeHistoryCurve::fieldChangedByUi( const caf::PdmFieldHandle* chang } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) +{ + onLoadDataAndUpdate( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) +{ + bool isUpdatedByAutomation = false; + + if ( auto parentPlot = RiaSummaryTools::parentSummaryPlot( this ) ) + { + for ( auto plot : RimTools::automationSettings()->summaryPlots() ) + { + if ( parentPlot == plot ) isUpdatedByAutomation = true; + } + } + + // The padlock icon is only shown if the curve is updated by automation + if ( isUpdatedByAutomation ) + { + QString iconResourceString = m_isLocked ? ":/padlock.svg" : ":/padlock-unlocked.svg"; + + if ( auto* treeItemAttribute = dynamic_cast( attribute ) ) + { + auto tag = caf::PdmUiTreeViewItemAttribute::createTag(); + tag->icon = caf::IconProvider( iconResourceString ); + + tag->clicked.connect( this, &RimGridTimeHistoryCurve::onPadlockClicked ); + + treeItemAttribute->tags.push_back( std::move( tag ) ); + } + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -629,9 +704,7 @@ RigMainGrid* RimGridTimeHistoryCurve::mainGrid() //-------------------------------------------------------------------------------------------------- RimEclipseGeometrySelectionItem* RimGridTimeHistoryCurve::eclipseGeomSelectionItem() const { - RimGeometrySelectionItem* pickItem = m_geometrySelectionItem(); - - return dynamic_cast( pickItem ); + return m_eclipseDataSource(); } //-------------------------------------------------------------------------------------------------- @@ -639,9 +712,7 @@ RimEclipseGeometrySelectionItem* RimGridTimeHistoryCurve::eclipseGeomSelectionIt //-------------------------------------------------------------------------------------------------- RimGeoMechGeometrySelectionItem* RimGridTimeHistoryCurve::geoMechGeomSelectionItem() const { - RimGeometrySelectionItem* pickItem = m_geometrySelectionItem(); - - return dynamic_cast( pickItem ); + return m_geoMechDataSource(); } //-------------------------------------------------------------------------------------------------- @@ -649,17 +720,13 @@ RimGeoMechGeometrySelectionItem* RimGridTimeHistoryCurve::geoMechGeomSelectionIt //-------------------------------------------------------------------------------------------------- void RimGridTimeHistoryCurve::updateResultDefinitionFromCase() { - if ( eclipseGeomSelectionItem() ) + if ( eclipseGeomSelectionItem() && m_eclipseResultDefinition() ) { - CVF_ASSERT( m_eclipseResultDefinition() ); - m_eclipseResultDefinition->setEclipseCase( eclipseGeomSelectionItem()->eclipseCase() ); } - if ( geoMechGeomSelectionItem() ) + if ( geoMechGeomSelectionItem() && m_geoMechResultDefinition() ) { - CVF_ASSERT( m_geoMechResultDefinition() ); - m_geoMechResultDefinition->setGeoMechCase( geoMechGeomSelectionItem()->geoMechCase() ); } } @@ -671,9 +738,9 @@ QString RimGridTimeHistoryCurve::geometrySelectionText() const { QString text; - if ( eclipseGeomSelectionItem() && m_geometrySelectionItem() ) + if ( eclipseGeomSelectionItem() ) { - text = m_geometrySelectionItem->geometrySelectionText(); + text = eclipseGeomSelectionItem()->geometrySelectionText(); } else if ( geoMechGeomSelectionItem() ) { @@ -699,6 +766,16 @@ void RimGridTimeHistoryCurve::updateQwtPlotAxis() if ( m_plotCurve ) updateYAxisInPlot( yAxis() ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGridTimeHistoryCurve::onPadlockClicked( const SignalEmitter* emitter, size_t index ) +{ + m_isLocked = !m_isLocked(); + + updateConnectedEditors(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.h b/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.h index 4c9cb21389..edd7b2e153 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.h +++ b/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.h @@ -17,15 +17,16 @@ ///////////////////////////////////////////////////////////////////////////////// #pragma once -#include "RimPlotCurve.h" +#include "RimStackablePlotCurve.h" #include "RiaDefines.h" +#include "RimGeometrySelectionItem.h" + #include "cafPdmChildField.h" #include "cafPdmProxyValueField.h" #include "cafPdmPtrField.h" -#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" #include class RigMainGrid; @@ -34,26 +35,27 @@ class RimEclipseResultDefinition; class RimEclipseGeometrySelectionItem; class RimGeoMechResultDefinition; class RimGeoMechGeometrySelectionItem; -class RimGeometrySelectionItem; class RiuFemTimeHistoryResultAccessor; class RiuSelectionItem; class RigEclipseResultAddress; class RimCase; +class RimSummaryPlot; //================================================================================================== /// /// //================================================================================================== -class RimGridTimeHistoryCurve : public RimPlotCurve +class RimGridTimeHistoryCurve : public RimStackablePlotCurve { CAF_PDM_HEADER_INIT; -public: public: RimGridTimeHistoryCurve(); ~RimGridTimeHistoryCurve() override; - void setFromSelectionItem( const RiuSelectionItem* selectionItem ); + static void createCurveFromSelectionItem( const RiuSelectionItem* selectionItem, RimSummaryPlot* plot ); + + void setFromSelectionItem( const RiuSelectionItem* selectionItem, bool updateResultDefinition ); void setFromEclipseCellAndResult( RimEclipseCase* eclCase, size_t gridIdx, size_t i, size_t j, size_t k, const RigEclipseResultAddress& resAddr ); RiuPlotAxis yAxis() const; void setYAxis( RiaDefines::PlotAxis plotAxis ); @@ -62,12 +64,15 @@ public: std::vector timeStepValues() const; std::vector daysSinceSimulationStart() const; - RigGridCellResultAddress resultAddress(); - QString quantityName() const; QString caseName() const; RimCase* gridCase() const; + void setLocked( bool locked ); + bool isLocked() const; + + RiaDefines::PhaseType phaseType() const override; + protected: QString createCurveAutoName() override; void updateZoomInParentPlot() override; @@ -76,6 +81,8 @@ protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void initAfterRead() override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override; + void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; private: RigMainGrid* mainGrid(); @@ -85,14 +92,22 @@ private: QString geometrySelectionText() const; void updateQwtPlotAxis(); + void onPadlockClicked( const SignalEmitter* emitter, size_t index ); + std::unique_ptr femTimeHistoryResultAccessor() const; private: + caf::PdmField m_isLocked; + caf::PdmProxyValueField m_geometrySelectionText; caf::PdmChildField m_eclipseResultDefinition; caf::PdmChildField m_geoMechResultDefinition; - caf::PdmChildField m_geometrySelectionItem; caf::PdmField> m_plotAxis; + + caf::PdmChildField m_eclipseDataSource; + caf::PdmChildField m_geoMechDataSource; + + caf::PdmChildField m_geometrySelectionItem_OBSOLETE; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimGridView.cpp b/ApplicationLibCode/ProjectDataModel/RimGridView.cpp index 17f809177e..aefd5dff2e 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridView.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimGridView.cpp @@ -538,6 +538,12 @@ void RimGridView::updateViewTreeItems( RiaDefines::ItemIn3dView itemType ) //-------------------------------------------------------------------------------------------------- void RimGridView::appendIntersectionsForCurrentTimeStep() { + // Remove previous intersection parts for static geometry. This is required to avoid the static parts to be rendered + // in front of the dynamic geometry added in this function. Note that a new model is created for the dynamic geometry + m_intersectionVizModel->removeAllParts(); + + m_intersectionCollection->clearGeometry(); + if ( nativeOrOverrideViewer() ) { cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() ); @@ -555,6 +561,9 @@ void RimGridView::appendIntersectionsForCurrentTimeStep() m_intersectionCollection->appendDynamicPartsToModel( frameParts.p(), scaleTransform(), m_currentTimeStep, &visibility ); + // Static parts for polygon lines and 3D handles + m_intersectionCollection->appendPartsToModel( *this, frameParts.p(), scaleTransform() ); + frameParts->updateBoundingBoxesRecursive(); frameScene->addModel( frameParts.p() ); @@ -572,8 +581,6 @@ void RimGridView::appendIntersectionsToModel( bool cellFiltersActive, bool prope { m_intersectionCollection->clearGeometry(); - bool addStaticModel = true; - if ( m_intersectionCollection->shouldApplyCellFiltersToIntersections() && ( cellFiltersActive || propertyFiltersActive ) ) { if ( propertyFiltersActive ) @@ -581,10 +588,6 @@ void RimGridView::appendIntersectionsToModel( bool cellFiltersActive, bool prope cvf::UByteArray visibleCells; calculateCellVisibility( &visibleCells, { PROPERTY_FILTERED, PROPERTY_FILTERED_WELL_CELLS } ); m_intersectionCollection->appendDynamicPartsToModel( m_intersectionVizModel.p(), scaleTransform(), currentTimeStep(), &visibleCells ); - - // If property filters are active, we do not want to add the static model as the static parts can cover the dynamic parts in - // some cases - addStaticModel = false; } else { @@ -606,14 +609,7 @@ void RimGridView::appendIntersectionsToModel( bool cellFiltersActive, bool prope m_intersectionCollection->appendPartsToModel( *this, m_intersectionVizModel.p(), scaleTransform() ); } - if ( addStaticModel ) - { - nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() ); - } - else - { - nativeOrOverrideViewer()->removeStaticModel( m_intersectionVizModel.p() ); - } + nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() ); m_intersectionVizModel->updateBoundingBoxesRecursive(); } diff --git a/ApplicationLibCode/ProjectDataModel/RimHistogramCalculator.cpp b/ApplicationLibCode/ProjectDataModel/RimHistogramCalculator.cpp index e9c0842a18..8fac6aba67 100644 --- a/ApplicationLibCode/ProjectDataModel/RimHistogramCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimHistogramCalculator.cpp @@ -18,7 +18,7 @@ #include "RimHistogramCalculator.h" -#include "RigContourMapProjection.h" +#include "ContourMap/RigContourMapProjection.h" #include "RigEclipseMultiPropertyStatCalc.h" #include "RigEclipseNativeVisibleCellsStatCalc.h" #include "RigFemNativeVisibleCellsStatCalc.h" @@ -28,12 +28,11 @@ #include "RigFlowDiagVisibleCellsStatCalc.h" #include "RigGeoMechCaseData.h" +#include "ContourMap/RimEclipseContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseView.h" #include "RimGeoMechCase.h" -#include "RimGeoMechContourMapProjection.h" #include "RimGeoMechContourMapView.h" #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" diff --git a/ApplicationLibCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp b/ApplicationLibCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp index b945e5f3e4..963d32025f 100644 --- a/ApplicationLibCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimIdenticalGridCaseGroup.cpp @@ -176,7 +176,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo() // When reading active cell info, only the total cell count is tested for consistency RimEclipseCase* mainCase = caseCollection()->reservoirs[0]; - if ( !mainCase->openReserviorCase() ) + if ( !mainCase->openReservoirCase() ) { QString errorMessage = QString( "Could not open the Eclipse Grid file: \n" ) + mainCase->gridFileName() + "\n" + "Current working directory is: \n" + QDir::currentPath(); diff --git a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp index faa0b63244..cb657ec977 100644 --- a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp @@ -21,8 +21,7 @@ #include "RiaPlotCollectionScheduler.h" #include "Summary/RiaSummaryDefines.h" - -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "RimAbstractPlotCollection.h" #include "RimAnalysisPlotCollection.h" @@ -173,7 +172,7 @@ void RimMainPlotCollection::initAfterRead() { m_summaryPlotCollection_OBSOLETE()->removePlot( singlePlot ); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlotNoAutoSettings( singlePlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlotNoAutoSettings( singlePlot ); } } diff --git a/ApplicationLibCode/ProjectDataModel/RimMudWeightWindowParameters.cpp b/ApplicationLibCode/ProjectDataModel/RimMudWeightWindowParameters.cpp index 6d783a8255..5f5cbf9cea 100644 --- a/ApplicationLibCode/ProjectDataModel/RimMudWeightWindowParameters.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimMudWeightWindowParameters.cpp @@ -144,8 +144,9 @@ RimMudWeightWindowParameters::RimMudWeightWindowParameters() CAF_PDM_InitField( &m_K0_FGAddress, "K0_FGAddress", QString( "" ), "Value" ); m_K0_FGAddress.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() ); - caf::AppEnum defaultOBG0SourceType = RimMudWeightWindowParameters::SourceType::GRID; - CAF_PDM_InitField( &m_obg0Type, "obg0SourceType", defaultOBG0SourceType, "Initial Overburden Gradient" ); + CAF_PDM_InitField( &m_obg0Type, "obg0SourceType", RimMudWeightWindowParameters::SourceType::GRID, "Initial Overburden Gradient" ); + caf::AppEnum::setEnumSubset( &m_obg0Type, { SourceType::GRID, SourceType::PER_ELEMENT } ); + CAF_PDM_InitField( &m_obg0Fixed, "obg0Fixed", 0.75, "Fixed Initial Overburden Gradient" ); m_obg0Fixed.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleValueEditor::uiEditorTypeName() ); @@ -540,16 +541,8 @@ QList RimMudWeightWindowParameters::calculateValueOption auto geoMechCase = firstAncestorOrThisOfType(); if ( geoMechCase != nullptr ) { - if ( fieldNeedingOptions == &m_obg0Type ) - { - std::vector sourceTypes = { SourceType::GRID, SourceType::PER_ELEMENT }; - for ( auto sourceType : sourceTypes ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( sourceType ), sourceType ) ); - } - } - else if ( fieldNeedingOptions == &m_wellDeviationType || fieldNeedingOptions == &m_wellAzimuthType || - fieldNeedingOptions == &m_UCSType || fieldNeedingOptions == &m_poissonsRatioType || fieldNeedingOptions == &m_K0_FGType ) + if ( fieldNeedingOptions == &m_wellDeviationType || fieldNeedingOptions == &m_wellAzimuthType || + fieldNeedingOptions == &m_UCSType || fieldNeedingOptions == &m_poissonsRatioType || fieldNeedingOptions == &m_K0_FGType ) { std::vector sourceTypes = { SourceType::FIXED, SourceType::PER_ELEMENT }; for ( auto sourceType : sourceTypes ) diff --git a/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h b/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h index 68868a6df9..9215f2abc4 100644 --- a/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h +++ b/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h @@ -137,7 +137,7 @@ protected: void updateZoom(); void recreatePlotWidgets(); - void onPlotAdditionOrRemoval(); + virtual void onPlotAdditionOrRemoval(); bool isMouseCursorInsidePlot(); diff --git a/ApplicationLibCode/ProjectDataModel/RimOilField.cpp b/ApplicationLibCode/ProjectDataModel/RimOilField.cpp index 97cb58c00d..7fa50cdaa0 100644 --- a/ApplicationLibCode/ProjectDataModel/RimOilField.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimOilField.cpp @@ -20,13 +20,13 @@ #include "RimOilField.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" +#include "Formations/RimFormationNamesCollection.h" #include "RimAnnotationCollection.h" #include "RimCompletionTemplateCollection.h" #include "RimEclipseCaseCollection.h" -#include "RimEclipseContourMapViewCollection.h" #include "RimEclipseViewCollection.h" #include "RimEnsembleWellLogsCollection.h" -#include "RimFormationNamesCollection.h" #include "RimFractureTemplateCollection.h" #include "RimGeoMechModels.h" #include "RimMeasurement.h" diff --git a/ApplicationLibCode/ProjectDataModel/RimPlot.cpp b/ApplicationLibCode/ProjectDataModel/RimPlot.cpp index b65ab2ea2e..6ac0f39dbb 100644 --- a/ApplicationLibCode/ProjectDataModel/RimPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimPlot.cpp @@ -300,6 +300,24 @@ bool RimPlot::isCurveHighlightSupported() const return false; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::any RimPlot::valueForKey( std::string key ) const +{ + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimPlot::zoomAllForMultiPlot() +{ + // Default behavior is to call zoomAll() on the current plot. Override this function to find the parent multi plot and do zoomAll(). See + // RimSummaryPlot::zoomAllForMultiPlot() + zoomAll(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimPlot.h b/ApplicationLibCode/ProjectDataModel/RimPlot.h index 250d06ec6b..cbbd4b365d 100644 --- a/ApplicationLibCode/ProjectDataModel/RimPlot.h +++ b/ApplicationLibCode/ProjectDataModel/RimPlot.h @@ -32,6 +32,8 @@ #include #include +#include + class QPaintDevice; class QWheelEvent; class RiuPlotWidget; @@ -104,6 +106,10 @@ public: virtual std::vector visibleCurvesForLegend(); virtual bool isCurveHighlightSupported() const; + virtual std::any valueForKey( std::string key ) const; + + virtual void zoomAllForMultiPlot(); + protected: virtual RiuPlotWidget* doCreatePlotViewWidget( QWidget* parent ) = 0; diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotCurve.cpp b/ApplicationLibCode/ProjectDataModel/RimPlotCurve.cpp index 13433e3c11..95971221a9 100644 --- a/ApplicationLibCode/ProjectDataModel/RimPlotCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimPlotCurve.cpp @@ -1194,9 +1194,16 @@ void RimPlotCurve::detach( bool deletePlotCurve ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimPlotCurve::reattach() +void RimPlotCurve::reattach( bool updateParentPlot ) { - if ( m_parentPlot && canCurveBeAttached() ) attach( m_parentPlot ); + if ( m_parentPlot && canCurveBeAttached() ) + { + setParentPlotNoReplot( m_parentPlot ); + if ( updateParentPlot ) + { + m_parentPlot->replot(); + } + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotCurve.h b/ApplicationLibCode/ProjectDataModel/RimPlotCurve.h index 14a6d94ac4..cb6cef5407 100644 --- a/ApplicationLibCode/ProjectDataModel/RimPlotCurve.h +++ b/ApplicationLibCode/ProjectDataModel/RimPlotCurve.h @@ -133,13 +133,15 @@ public: void attach( RiuPlotWidget* ); void detach( bool deletePlotCurve = false ); - void reattach(); + void reattach( bool updateParentPlot = true ); bool isSameCurve( const RiuPlotCurve* plotCurve ) const; void deletePlotCurve(); RiuPlotCurve* plotCurve() const; std::vector rectAnnotations() const; + void setSamplesFromXYValues( const std::vector& xValues, const std::vector& yValues, bool useLogarithmicScale ); + protected: virtual QString createCurveAutoName(); @@ -160,8 +162,6 @@ protected: bool useLogarithmicScale, RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS ); - void setSamplesFromXYValues( const std::vector& xValues, const std::vector& yValues, bool useLogarithmicScale ); - void setSamplesFromDatesAndYValues( const std::vector& dateTimes, const std::vector& yValues, bool useLogarithmicScale ); void setSamplesFromTimeTAndYValues( const std::vector& dateTimes, const std::vector& yValues, bool useLogarithmicScale ); diff --git a/ApplicationLibCode/ProjectDataModel/RimProject.cpp b/ApplicationLibCode/ProjectDataModel/RimProject.cpp index 084e723e6b..469ef38af7 100644 --- a/ApplicationLibCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimProject.cpp @@ -35,6 +35,8 @@ #include "RigGridBase.h" #include "Cloud/RimCloudDataSourceCollection.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" +#include "Formations/RimFormationNamesCollection.h" #include "PlotTemplates/RimPlotTemplateFolderItem.h" #include "Polygons/RimPolygonCollection.h" #include "QuickAccess/RimQuickAccessCollection.h" @@ -53,12 +55,11 @@ #include "RimEclipseCase.h" #include "RimEclipseCaseCollection.h" #include "RimEclipseCaseEnsemble.h" -#include "RimEclipseContourMapViewCollection.h" +#include "RimEclipseView.h" #include "RimEclipseViewCollection.h" #include "RimEnsembleWellLogsCollection.h" #include "RimFileWellPath.h" #include "RimFlowPlotCollection.h" -#include "RimFormationNamesCollection.h" #include "RimFractureTemplate.h" #include "RimFractureTemplateCollection.h" #include "RimGeoMechCase.h" @@ -101,7 +102,8 @@ #include "RimWellLogPlotCollection.h" #include "RimWellPath.h" #include "RimWellPathCollection.h" - +#include "RimWellTargetMapping.h" +#include "Tools/RimAutomationSettings.h" #include "VerticalFlowPerformance/RimVfpDataCollection.h" #include "VerticalFlowPerformance/RimVfpPlotCollection.h" @@ -230,6 +232,9 @@ RimProject::RimProject() m_plotTemplateTopFolder = new RimPlotTemplateFolderItem(); m_plotTemplateTopFolder.xmlCapability()->disableIO(); + CAF_PDM_InitFieldNoDefault( &m_automationSettings, "AutomationSettings", "Automation Settings" ); + m_automationSettings = new RimAutomationSettings(); + // For now, create a default first oilfield that contains the rest of the project oilFields.push_back( new RimOilField ); @@ -363,6 +368,14 @@ RimQuickAccessCollection* RimProject::pinnedFieldCollection() const return m_pinnedFieldCollection(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimAutomationSettings* RimProject::automationSettings() const +{ + return m_automationSettings(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -605,6 +618,12 @@ std::vector RimProject::allGridCases() const { cases.push_back( acase ); } + + for ( RimWellTargetMapping* wellTargetMapping : ensemble->wellTargetMappings() ) + { + if ( auto ensembleStatisticsCase = wellTargetMapping->ensembleStatisticsCase() ) + cases.push_back( ensembleStatisticsCase ); + } } RimGeoMechModels* geomModels = oilField->geoMechModels(); @@ -734,7 +753,7 @@ std::vector RimProject::allSummaryCases() const //-------------------------------------------------------------------------------------------------- std::vector RimProject::summaryGroups() const { - std::vector groups; + std::vector ensembles; for ( RimOilField* oilField : oilFields ) { @@ -742,12 +761,12 @@ std::vector RimProject::summaryGroups() const RimSummaryCaseMainCollection* sumCaseMainColl = oilField->summaryCaseMainCollection(); if ( sumCaseMainColl ) { - std::vector g = sumCaseMainColl->summaryCaseCollections(); - groups.insert( groups.end(), g.begin(), g.end() ); + std::vector ensemble = sumCaseMainColl->summaryEnsembles(); + ensembles.insert( ensembles.end(), ensemble.begin(), ensemble.end() ); } } - return groups; + return ensembles; } //-------------------------------------------------------------------------------------------------- @@ -823,11 +842,26 @@ std::vector RimProject::allViews() const for ( RimOilField* oilField : oilFields() ) { if ( !oilField ) continue; - if ( !oilField->seismicViewCollection() ) continue; - for ( auto seisview : oilField->seismicViewCollection()->views() ) + if ( oilField->seismicViewCollection() ) { - views.push_back( seisview ); + for ( auto seisview : oilField->seismicViewCollection()->views() ) + { + views.push_back( seisview ); + } + } + + if ( oilField->analysisModels() ) + { + for ( auto ensemble : oilField->analysisModels()->caseEnsembles.childrenByType() ) + { + if ( !ensemble ) continue; + + for ( auto view : ensemble->allViews() ) + { + views.push_back( view ); + } + } } } @@ -840,16 +874,12 @@ std::vector RimProject::allViews() const std::vector RimProject::allVisibleViews() const { std::vector views; - for ( RimCase* rimCase : allGridCases() ) - { - if ( !rimCase ) continue; - for ( Rim3dView* view : rimCase->views() ) + for ( auto view : allViews() ) + { + if ( view && view->viewer() ) { - if ( view && view->viewer() ) - { - views.push_back( view ); - } + views.push_back( view ); } } @@ -876,22 +906,9 @@ std::vector RimProject::allVisibleGridViews() const //-------------------------------------------------------------------------------------------------- void RimProject::scheduleCreateDisplayModelAndRedrawAllViews() { - for ( RimCase* rimCase : allGridCases() ) + for ( auto view : allViews() ) { - if ( !rimCase ) continue; - for ( Rim3dView* view : rimCase->views() ) - { - view->scheduleCreateDisplayModelAndRedraw(); - } - } - - auto seismicViewCollection = activeOilField()->seismicViewCollection(); - if ( seismicViewCollection ) - { - for ( auto seisview : seismicViewCollection->views() ) - { - seisview->scheduleCreateDisplayModelAndRedraw(); - } + if ( view ) view->scheduleCreateDisplayModelAndRedraw(); } } @@ -1411,6 +1428,7 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q statisticsItemCollection->add( m_mainPlotCollection->ensembleFractureStatisticsPlotCollection() ); } #endif + uiTreeOrdering.add( automationSettings() ); } } else if ( uiConfigName == "PlotWindow.DataSources" ) diff --git a/ApplicationLibCode/ProjectDataModel/RimProject.h b/ApplicationLibCode/ProjectDataModel/RimProject.h index 06cc3dcda7..27254009b0 100644 --- a/ApplicationLibCode/ProjectDataModel/RimProject.h +++ b/ApplicationLibCode/ProjectDataModel/RimProject.h @@ -72,6 +72,7 @@ class RimCompletionTemplateCollection; class RimPlotTemplateFolderItem; class RimGridCalculationCollection; class RimQuickAccessCollection; +class RimAutomationSettings; namespace caf { @@ -192,6 +193,7 @@ public: void updatesAfterProjectFileIsRead(); RimQuickAccessCollection* pinnedFieldCollection() const; + RimAutomationSettings* automationSettings() const; protected: void initAfterRead() override; @@ -207,6 +209,7 @@ private: private: caf::PdmChildField m_mainPlotCollection; caf::PdmChildField m_pinnedFieldCollection; + caf::PdmChildField m_automationSettings; caf::PdmField m_globalPathList; caf::PdmField m_projectFileVersionString; diff --git a/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp new file mode 100644 index 0000000000..1a50f60f4f --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp @@ -0,0 +1,144 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimRegularGridCase.h" + +#include "RifReaderRegularGridModel.h" + +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigReservoirBuilder.h" + +#include "RimTools.h" + +CAF_PDM_SOURCE_INIT( RimRegularGridCase, "EclipseBoundingBoxCase" ); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimRegularGridCase::RimRegularGridCase() +{ + CAF_PDM_InitObject( "Bounding Box Case", ":/Case48x48.png", "", "Bounding Box Case" ); + + CAF_PDM_InitFieldNoDefault( &m_minimum, "Minimum", "Minimum" ); + m_minimum.uiCapability()->setUiReadOnly( true ); + + CAF_PDM_InitFieldNoDefault( &m_maximum, "Maximum", "Maximum" ); + m_maximum.uiCapability()->setUiReadOnly( true ); + + CAF_PDM_InitField( &m_cellCountI, "CellCountI", 100, "Cell Count I" ); + m_cellCountI.uiCapability()->setUiReadOnly( true ); + + CAF_PDM_InitField( &m_cellCountJ, "CellCountJ", 100, "Cell Count J" ); + m_cellCountJ.uiCapability()->setUiReadOnly( true ); + + CAF_PDM_InitField( &m_cellCountK, "CellCountK", 10, "Cell Count K" ); + m_cellCountK.uiCapability()->setUiReadOnly( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimRegularGridCase::setBoundingBox( const cvf::BoundingBox& boundingBox ) +{ + m_minimum = boundingBox.min(); + m_maximum = boundingBox.max(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimRegularGridCase::setCellCount( const cvf::Vec3st& cellCount ) +{ + m_cellCountI = static_cast( cellCount.x() ); + m_cellCountJ = static_cast( cellCount.y() ); + m_cellCountK = static_cast( cellCount.z() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimRegularGridCase::createModel() +{ + cvf::ref reservoir = new RigEclipseCaseData( this ); + + RigReservoirBuilder reservoirBuilder; + reservoirBuilder.setWorldCoordinates( m_minimum, m_maximum ); + + cvf::Vec3st gridPointDimensions( m_cellCountI, m_cellCountJ, m_cellCountK ); + reservoirBuilder.setIJKCount( gridPointDimensions ); + + reservoirBuilder.createGridsAndCells( reservoir.p() ); + + setReservoirData( reservoir.p() ); + computeCachedData(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimRegularGridCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( &m_caseUserDescription ); + uiOrdering.add( &m_displayNameOption ); + uiOrdering.add( &m_caseId ); + + auto group = uiOrdering.addNewGroup( "Regular Grid Definition" ); + group->add( &m_minimum ); + group->add( &m_maximum ); + + group->add( &m_cellCountI ); + group->add( &m_cellCountJ ); + group->add( &m_cellCountK ); + + uiOrdering.skipRemainingFields(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimRegularGridCase::setupBeforeSave() +{ + auto fileName = cacheFileName(); + RifReaderRegularGridModel::writeCache( fileName, this ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimRegularGridCase::cacheFileName() const +{ + auto cacheDirPath = RimTools::getCacheRootDirectoryPathFromProject(); + cacheDirPath += "_welltarget/welltargetdata.GRDECL"; + return cacheDirPath; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimRegularGridCase::openEclipseGridFile() +{ + if ( !eclipseCaseData() ) + { + createModel(); + } + + auto fileName = cacheFileName(); + RifReaderRegularGridModel::ensureDataIsReadFromCache( fileName, this ); + + return true; +} diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportSimWellFractureCompletions.h b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h similarity index 55% rename from ApplicationLibCode/CommandFileInterface/RicfExportSimWellFractureCompletions.h rename to ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h index 086b8c1312..65e140cc99 100644 --- a/ApplicationLibCode/CommandFileInterface/RicfExportSimWellFractureCompletions.h +++ b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2017 Statoil ASA +// Copyright (C) 2024- 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,33 +18,44 @@ #pragma once -#include "RicfCommandObject.h" +#include "RiaDefines.h" -#include "CompletionExportCommands/RicExportCompletionDataSettingsUi.h" +#include "RimEclipseResultCase.h" -#include "cafPdmField.h" +#include "cafPdmFieldCvfVec3d.h" +#include "cvfBoundingBox.h" //================================================================================================== // // // //================================================================================================== -class RicfExportSimWellFractureCompletions : public RicfCommandObject +class RimRegularGridCase : public RimEclipseResultCase { CAF_PDM_HEADER_INIT; public: - RicfExportSimWellFractureCompletions(); + RimRegularGridCase(); - caf::PdmScriptResponse execute() override; + void setBoundingBox( const cvf::BoundingBox& boundingBox ); + + void setCellCount( const cvf::Vec3st& cellCount ); + + bool openEclipseGridFile() override; + + void createModel(); private: - caf::PdmField m_caseId; - caf::PdmField m_viewId; - caf::PdmField m_viewName; - caf::PdmField m_timeStep; - caf::PdmField> m_simWellNames; + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - caf::PdmField m_fileSplit; - caf::PdmField m_compdatExport; + void setupBeforeSave() override; + QString cacheFileName() const; + +private: + caf::PdmField m_minimum; + caf::PdmField m_maximum; + + caf::PdmField m_cellCountI; + caf::PdmField m_cellCountJ; + caf::PdmField m_cellCountK; }; diff --git a/ApplicationLibCode/ProjectDataModel/RimReloadCaseTools.cpp b/ApplicationLibCode/ProjectDataModel/RimReloadCaseTools.cpp index 83f979a4fb..6f0cf6187c 100644 --- a/ApplicationLibCode/ProjectDataModel/RimReloadCaseTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimReloadCaseTools.cpp @@ -30,13 +30,13 @@ #include "RigCaseCellResultsData.h" #include "RigEclipseCaseData.h" +#include "ContourMap/RimEclipseContourMapProjection.h" +#include "ContourMap/RimEclipseContourMapView.h" +#include "ContourMap/RimEclipseContourMapViewCollection.h" #include "Rim2dIntersectionView.h" #include "Rim2dIntersectionViewCollection.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseContourMapView.h" -#include "RimEclipseContourMapViewCollection.h" #include "RimEclipseResultCase.h" #include "RimEclipseView.h" #include "RimGridCalculation.h" @@ -98,7 +98,7 @@ void RimReloadCaseTools::reloadEclipseData( RimEclipseCase* eclipseCase, bool re if ( reloadSummaryData ) { auto summaryCase = RimReloadCaseTools::findSummaryCaseFromEclipseResultCase( dynamic_cast( eclipseCase ) ); - RiaSummaryTools::reloadSummaryCase( summaryCase ); + RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( summaryCase ); } updateAllPlots(); @@ -150,7 +150,8 @@ void RimReloadCaseTools::updateAll3dViews( RimEclipseCase* eclipseCase ) // computations are updated based on new data. // See RimEclipseContourMapProjection::generateResults() contourMap->contourMapProjection()->clearGeometry(); - contourMap->contourMapProjection()->clearGridMappingAndRedraw(); + if ( auto projection = dynamic_cast( contourMap->contourMapProjection() ) ) + projection->clearGridMappingAndRedraw(); } contourMap->loadDataAndUpdate(); diff --git a/ApplicationLibCode/ProjectDataModel/RimRoffCase.cpp b/ApplicationLibCode/ProjectDataModel/RimRoffCase.cpp index e78365c6dd..0c77f8ba2b 100644 --- a/ApplicationLibCode/ProjectDataModel/RimRoffCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimRoffCase.cpp @@ -111,15 +111,6 @@ bool RimRoffCase::openEclipseGridFile() return true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimRoffCase::reloadEclipseGridFile() -{ - setReservoirData( nullptr ); - openReserviorCase(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimRoffCase.h b/ApplicationLibCode/ProjectDataModel/RimRoffCase.h index da670d38af..389fb4466a 100644 --- a/ApplicationLibCode/ProjectDataModel/RimRoffCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimRoffCase.h @@ -38,7 +38,7 @@ public: ~RimRoffCase() override; bool openEclipseGridFile() override; - void reloadEclipseGridFile() override; + bool importAsciiInputProperties( const QStringList& fileNames ) override; QString locationOnDisc() const override; diff --git a/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp b/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp index ba0de2b820..0fa142f39b 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimSimWellInView.cpp @@ -39,8 +39,6 @@ #include "RimExtrudedCurveIntersection.h" #include "RimIntersectionCollection.h" #include "RimPropertyFilterCollection.h" -#include "RimSimWellFracture.h" -#include "RimSimWellFractureCollection.h" #include "RimSimWellInViewCollection.h" #include "RimSimWellInViewTools.h" #include "RimSummaryCase.h" @@ -88,28 +86,16 @@ RimSimWellInView::RimSimWellInView() CAF_PDM_InitField( &showWellCells, "ShowWellCells", false, "Well Cells" ); CAF_PDM_InitField( &showWellCellFence, "ShowWellCellFence", false, "Well Cell Fence" ); - CAF_PDM_InitFieldNoDefault( &simwellFractureCollection, "FractureCollection", "Fractures" ); - name.uiCapability()->setUiHidden( true ); name.uiCapability()->setUiReadOnly( true ); m_resultWellIndex = cvf::UNDEFINED_SIZE_T; - simwellFractureCollection = new RimSimWellFractureCollection(); - m_isInjector = false; m_isValidDisk = false; m_diskScale = 1.0; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimSimWellInView::~RimSimWellInView() -{ - if ( simwellFractureCollection() ) delete simwellFractureCollection(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -439,10 +425,6 @@ void RimSimWellInView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin //-------------------------------------------------------------------------------------------------- void RimSimWellInView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ ) { - for ( RimSimWellFracture* fracture : simwellFractureCollection()->simwellFractures() ) - { - uiTreeOrdering.add( fracture ); - } uiTreeOrdering.skipRemainingChildren( true ); const auto reservoirView = firstAncestorOrThisOfType(); diff --git a/ApplicationLibCode/ProjectDataModel/RimSimWellInView.h b/ApplicationLibCode/ProjectDataModel/RimSimWellInView.h index 3b4db2d480..27241f0e04 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSimWellInView.h +++ b/ApplicationLibCode/ProjectDataModel/RimSimWellInView.h @@ -38,7 +38,6 @@ class RigSimWellData; class RigWellResultFrame; -class RimSimWellFractureCollection; class RigWellPath; class RimWellDiskConfig; @@ -52,7 +51,6 @@ class RimSimWellInView : public caf::PdmObject, public Rim3dPropertiesInterface public: RimSimWellInView(); - ~RimSimWellInView() override; void setSimWellData( RigSimWellData* simWellData, size_t resultWellIndex ); RigSimWellData* simWellData(); @@ -102,8 +100,6 @@ public: caf::PdmField showWellCells; caf::PdmField showWellCellFence; - caf::PdmChildField simwellFractureCollection; - double calculateInjectionProductionFractions( const RimWellDiskConfig& wellDiskConfig, bool* isOk ); void scaleDisk( double minValue, double maxValue ); diff --git a/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp index 45607ea5f5..e5743343b7 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimSimWellInViewCollection.cpp @@ -27,12 +27,11 @@ #include "Well/RigSimWellData.h" #include "Well/RigWellResultFrame.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "RimEclipseCase.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseResultCase.h" #include "RimEclipseView.h" #include "RimProject.h" -#include "RimSimWellFractureCollection.h" #include "RimSimWellInView.h" #include "RimSimWellInViewTools.h" #include "RimSummaryCase.h" @@ -475,11 +474,6 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch if ( &wellPipeCoordType == changedField || &isAutoDetectingBranches == changedField ) { if ( m_reservoirView ) m_reservoirView->scheduleCreateDisplayModelAndRedraw(); - - for ( RimSimWellInView* w : wells ) - { - w->simwellFractureCollection()->recomputeSimWellCenterlines(); - } } } diff --git a/ApplicationLibCode/ProjectDataModel/RimStatisticsContourMap.cpp b/ApplicationLibCode/ProjectDataModel/RimStatisticsContourMap.cpp deleted file mode 100644 index 17b3f1dda3..0000000000 --- a/ApplicationLibCode/ProjectDataModel/RimStatisticsContourMap.cpp +++ /dev/null @@ -1,251 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2024- 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RimStatisticsContourMap.h" - -#include "RiaLogging.h" -#include "RiaStatisticsTools.h" - -#include "RigCaseCellResultsData.h" -#include "RigContourMapGrid.h" -#include "RigEclipseCaseData.h" -#include "RigEclipseContourMapProjection.h" -#include "RigEclipseResultAddress.h" -#include "RigMainGrid.h" -#include "RigStatisticsMath.h" - -#include "RimEclipseCase.h" -#include "RimEclipseCaseEnsemble.h" -#include "RimEclipseContourMapProjection.h" -#include "RimEclipseResultDefinition.h" -#include "RimProject.h" -#include "RimTools.h" - -#include "cafPdmUiDoubleSliderEditor.h" -#include "cafPdmUiPushButtonEditor.h" -#include "cafProgressInfo.h" - -#include - -CAF_PDM_SOURCE_INIT( RimStatisticsContourMap, "RimStatisticalContourMap" ); - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimStatisticsContourMap::RimStatisticsContourMap() -{ - CAF_PDM_InitObject( "StatisticsContourMap", ":/Histogram16x16.png" ); - - CAF_PDM_InitField( &m_relativeSampleSpacing, "SampleSpacing", 0.9, "Sample Spacing Factor" ); - m_relativeSampleSpacing.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); - - CAF_PDM_InitFieldNoDefault( &m_resultAggregation, "ResultAggregation", "Result Aggregation" ); - - CAF_PDM_InitField( &m_timeStep, "TimeStep", 0, "Time Step" ); - - CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "" ); - m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); - m_resultDefinition = new RimEclipseResultDefinition; - m_resultDefinition->findField( "MResultType" )->uiCapability()->setUiName( "Result" ); - m_resultDefinition->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); - m_resultDefinition->setResultVariable( "SOIL" ); - - CAF_PDM_InitFieldNoDefault( &m_computeStatisticsButton, "ComputeStatisticsButton", "" ); - caf::PdmUiPushButtonEditor::configureEditorLabelLeft( &m_computeStatisticsButton ); - m_computeStatisticsButton = false; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStatisticsContourMap::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) -{ - uiOrdering.add( &m_relativeSampleSpacing ); - uiOrdering.add( &m_resultAggregation ); - uiOrdering.add( &m_timeStep ); - - caf::PdmUiGroup* resultDefinitionGroup = uiOrdering.addNewGroup( "Result Definition" ); - m_resultDefinition->uiOrdering( uiConfigName, *resultDefinitionGroup ); - - uiOrdering.add( &m_computeStatisticsButton ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStatisticsContourMap::setEclipseCase( RimEclipseCase* eclipseCase ) -{ - m_resultDefinition->setEclipseCase( eclipseCase ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStatisticsContourMap::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) -{ - if ( &m_computeStatisticsButton == changedField ) - { - computeStatistics(); - m_computeStatisticsButton = false; - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RimStatisticsContourMap::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) -{ - QList options; - - if ( fieldNeedingOptions == &m_timeStep ) - { - auto ensemble = firstAncestorOrThisOfType(); - if ( ensemble && !ensemble->cases().empty() ) - { - RimEclipseCase* firstEclipseCase = ensemble->cases().front(); - RimTools::timeStepsForCase( firstEclipseCase, &options ); - } - } - - return options; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStatisticsContourMap::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) -{ - if ( &m_computeStatisticsButton == field ) - { - if ( auto attrib = dynamic_cast( attribute ) ) - { - attrib->m_buttonText = "Compute"; - } - } - - if ( &m_relativeSampleSpacing == field ) - { - if ( auto myAttr = dynamic_cast( attribute ) ) - { - myAttr->m_minimum = 0.2; - myAttr->m_maximum = 2.0; - myAttr->m_sliderTickCount = 9; - myAttr->m_delaySliderUpdateUntilRelease = true; - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStatisticsContourMap::initAfterRead() -{ - auto ensemble = firstAncestorOrThisOfType(); - if ( !ensemble ) return; - - if ( ensemble->cases().empty() ) return; - - RimEclipseCase* eclipseCase = ensemble->cases().front(); - setEclipseCase( eclipseCase ); -} -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimStatisticsContourMap::computeStatistics() -{ - RiaLogging::info( "Computing statistics" ); - auto ensemble = firstAncestorOrThisOfType(); - if ( !ensemble ) return; - - if ( ensemble->cases().empty() ) return; - - RimEclipseCase* firstEclipseCase = ensemble->cases().front(); - firstEclipseCase->ensureReservoirCaseIsOpen(); - - RigContourMapCalculator::ResultAggregationType resultAggregation = m_resultAggregation(); - - cvf::BoundingBox gridBoundingBox = firstEclipseCase->activeCellsBoundingBox(); - - auto computeSampleSpacing = []( auto ec, double relativeSampleSpacing ) - { - if ( ec ) - { - if ( auto mainGrid = ec->mainGrid() ) - { - return relativeSampleSpacing * mainGrid->characteristicIJCellSize(); - } - } - - return 0.0; - }; - - double sampleSpacing = computeSampleSpacing( firstEclipseCase, m_relativeSampleSpacing() ); - - auto contourMapGrid = std::make_unique( gridBoundingBox, sampleSpacing ); - - std::vector> results; - for ( RimEclipseCase* eclipseCase : ensemble->cases() ) - { - if ( eclipseCase->ensureReservoirCaseIsOpen() ) - { - RiaLogging::info( QString( "Grid: %1" ).arg( eclipseCase->caseUserDescription() ) ); - - auto eclipseCaseData = eclipseCase->eclipseCaseData(); - auto resultData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - - RigEclipseContourMapProjection contourMapProjection( *contourMapGrid, *eclipseCaseData, *resultData ); - contourMapProjection.generateGridMapping( resultAggregation, {} ); - - std::vector result = - contourMapProjection.generateResults( m_resultDefinition()->eclipseResultAddress(), resultAggregation, m_timeStep() ); - results.push_back( result ); - } - } - - if ( !results.empty() ) - { - int nCells = static_cast( results[0].size() ); - std::vector p10Results( nCells, std::numeric_limits::infinity() ); - std::vector p50Results( nCells, std::numeric_limits::infinity() ); - std::vector p90Results( nCells, std::numeric_limits::infinity() ); - std::vector meanResults( nCells, std::numeric_limits::infinity() ); - std::vector minResults( nCells, std::numeric_limits::infinity() ); - std::vector maxResults( nCells, std::numeric_limits::infinity() ); - -#pragma omp parallel for - for ( int i = 0; i < nCells; i++ ) - { - size_t numSamples = results.size(); - std::vector samples( numSamples, 0.0 ); - for ( size_t s = 0; s < numSamples; s++ ) - samples[s] = results[s][i]; - - double p10, p50, p90, mean; - - RigStatisticsMath::calculateStatisticsCurves( samples, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED ); - - p10Results[i] = p10; - p50Results[i] = p50; - p90Results[i] = p90; - meanResults[i] = mean; - - minResults[i] = RiaStatisticsTools::minimumValue( samples ); - maxResults[i] = RiaStatisticsTools::maximumValue( samples ); - } - } -} diff --git a/ApplicationLibCode/ProjectDataModel/RimStatisticsPlot.cpp b/ApplicationLibCode/ProjectDataModel/RimStatisticsPlot.cpp index c4b5647235..e5caec0da3 100644 --- a/ApplicationLibCode/ProjectDataModel/RimStatisticsPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimStatisticsPlot.cpp @@ -436,7 +436,7 @@ void RimStatisticsPlot::updatePlots() // Set font of label equal axis value font QFont labelFont = QFont(); - labelFont.setPixelSize( fontScalingToMatchQwt * axisValueFontSize() ); + labelFont.setPointSize( fontScalingToMatchQwt * axisValueFontSize() ); labelSeries->setPointLabelsFont( labelFont ); // Remove legend for dummy point @@ -446,23 +446,23 @@ void RimStatisticsPlot::updatePlots() // Set axis value font QFont axisYValueFont = axisY->labelsFont(); - axisYValueFont.setPixelSize( fontScalingToMatchQwt * axisValueFontSize() ); + axisYValueFont.setPointSize( fontScalingToMatchQwt * axisValueFontSize() ); axisY->setLabelsFont( axisYValueFont ); QFont axisXValueFont = axisX->labelsFont(); - axisXValueFont.setPixelSize( fontScalingToMatchQwt * axisValueFontSize() ); + axisXValueFont.setPointSize( fontScalingToMatchQwt * axisValueFontSize() ); axisX->setLabelsFont( axisXValueFont ); // Set axis title font QFont axisYTitleFont = axisY->titleFont(); - axisYTitleFont.setPixelSize( fontScalingToMatchQwt * axisTitleFontSize() ); + axisYTitleFont.setPointSize( fontScalingToMatchQwt * axisTitleFontSize() ); axisY->setTitleFont( axisYTitleFont ); QFont axisXTitleFont = axisX->titleFont(); - axisXTitleFont.setPixelSize( fontScalingToMatchQwt * axisTitleFontSize() ); + axisXTitleFont.setPointSize( fontScalingToMatchQwt * axisTitleFontSize() ); axisX->setTitleFont( axisXTitleFont ); // Set plot title font QFont titleFont = chart->titleFont(); - titleFont.setPixelSize( fontScalingToMatchQwt * titleFontSize() ); + titleFont.setPointSize( fontScalingToMatchQwt * titleFontSize() ); chart->setTitleFont( titleFont ); // Set legend font @@ -470,7 +470,7 @@ void RimStatisticsPlot::updatePlots() if ( legend ) { QFont legendFont = legend->font(); - legendFont.setPixelSize( fontScalingToMatchQwt * legendFontSize() ); + legendFont.setPointSize( fontScalingToMatchQwt * legendFontSize() ); legend->setFont( legendFont ); legend->setVisible( legendsVisible() ); } diff --git a/ApplicationLibCode/ProjectDataModel/RimSummaryCalculation.cpp b/ApplicationLibCode/ProjectDataModel/RimSummaryCalculation.cpp index 4f8d485420..0d516baca5 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSummaryCalculation.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimSummaryCalculation.cpp @@ -249,13 +249,19 @@ void RimSummaryCalculation::substituteVariables( std::vector std::vector addresses; std::string name = shortName().toStdString(); + if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_FIELD ) { addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::fieldAddress( name, m_id ) ) ); @@ -482,7 +489,10 @@ std::vector std::set uniqueNumbers; std::for_each( allResultAddresses.begin(), allResultAddresses.end(), - [&]( const auto& addr ) { uniqueNumbers.insert( addr.aquiferNumber() ); } ); + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_AQUIFER ) uniqueNumbers.insert( addr.aquiferNumber() ); + } ); for ( auto num : uniqueNumbers ) { @@ -498,7 +508,10 @@ std::vector std::set uniqueNames; std::for_each( allResultAddresses.begin(), allResultAddresses.end(), - [&]( const auto& addr ) { uniqueNames.insert( addr.networkName() ); } ); + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_NETWORK ) uniqueNames.insert( addr.networkName() ); + } ); for ( auto networkName : uniqueNames ) { @@ -510,7 +523,10 @@ std::vector std::set uniqueWellNames; std::for_each( allResultAddresses.begin(), allResultAddresses.end(), - [&]( const auto& addr ) { uniqueWellNames.insert( addr.wellName() ); } ); + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_WELL ) uniqueWellNames.insert( addr.wellName() ); + } ); for ( auto wellName : uniqueWellNames ) { @@ -522,7 +538,10 @@ std::vector std::set uniqueGroupNames; std::for_each( allResultAddresses.begin(), allResultAddresses.end(), - [&]( const auto& addr ) { uniqueGroupNames.insert( addr.groupName() ); } ); + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_GROUP ) uniqueGroupNames.insert( addr.groupName() ); + } ); for ( auto groupName : uniqueGroupNames ) { @@ -534,7 +553,10 @@ std::vector std::set uniqueRegionNumbers; std::for_each( allResultAddresses.begin(), allResultAddresses.end(), - [&]( const auto& addr ) { uniqueRegionNumbers.insert( addr.regionNumber() ); } ); + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_REGION ) uniqueRegionNumbers.insert( addr.regionNumber() ); + } ); for ( auto regionNumber : uniqueRegionNumbers ) { @@ -546,7 +568,11 @@ std::vector std::set> uniqueRegionNumbers; std::for_each( allResultAddresses.begin(), allResultAddresses.end(), - [&]( const auto& addr ) { uniqueRegionNumbers.insert( std::make_pair( addr.regionNumber(), addr.regionNumber2() ) ); } ); + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_REGION_2_REGION ) + uniqueRegionNumbers.insert( std::make_pair( addr.regionNumber(), addr.regionNumber2() ) ); + } ); for ( auto regionNumber : uniqueRegionNumbers ) { @@ -554,6 +580,64 @@ std::vector addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::regionToRegionAddress( name, r1, r2, m_id ) ) ); } } + else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION ) + { + std::set uniqueWellNames; + std::for_each( allResultAddresses.begin(), + allResultAddresses.end(), + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_WELL_COMPLETION ) uniqueWellNames.insert( addr.wellName() ); + } ); + + for ( auto wellName : uniqueWellNames ) + { + std::set uniqueNumbers; + std::for_each( allResultAddresses.begin(), + allResultAddresses.end(), + [&]( const auto& addr ) + { + if ( addr.wellName() == wellName && addr.category() == SummaryCategory::SUMMARY_WELL_COMPLETION ) + uniqueNumbers.insert( addr.wellCompletionNumber() ); + } ); + + for ( auto number : uniqueNumbers ) + { + addresses.push_back( + RimSummaryCalculationAddress( RifEclipseSummaryAddress::wellCompletionAddress( name, wellName, number, m_id ) ) ); + } + } + } + else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION ) + { + std::set uniqueWellNames; + std::for_each( allResultAddresses.begin(), + allResultAddresses.end(), + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_WELL_CONNECTION ) uniqueWellNames.insert( addr.wellName() ); + } ); + + for ( auto wellName : uniqueWellNames ) + { + std::set> uniqueBlocks; + std::for_each( allResultAddresses.begin(), + allResultAddresses.end(), + [&]( const auto& addr ) + { + if ( addr.category() == SummaryCategory::SUMMARY_WELL_CONNECTION ) + { + uniqueBlocks.insert( { addr.cellI(), addr.cellJ(), addr.cellK() } ); + } + } ); + + for ( auto block : uniqueBlocks ) + { + addresses.push_back( RimSummaryCalculationAddress( + RifEclipseSummaryAddress::wellConnectionAddress( name, wellName, block[0], block[1], block[2], m_id ) ) ); + } + } + } else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_IMPORTED ) { addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::importedAddress( name, m_id ) ) ); @@ -602,6 +686,14 @@ RimSummaryCalculationAddress RimSummaryCalculation::singleAddressesForCategory( { return RifEclipseSummaryAddress::regionToRegionAddress( name, address.regionNumber(), address.regionNumber2(), m_id ); } + else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION ) + { + return RifEclipseSummaryAddress::wellCompletionAddress( name, address.wellName(), address.wellCompletionNumber(), m_id ); + } + else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION ) + { + return RifEclipseSummaryAddress::wellConnectionAddress( name, address.wellName(), address.cellI(), address.cellJ(), address.cellK(), m_id ); + } else if ( category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_IMPORTED ) { return RifEclipseSummaryAddress::importedAddress( name, m_id ); diff --git a/ApplicationLibCode/ProjectDataModel/RimSummaryCalculationCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimSummaryCalculationCollection.cpp index 054c3cfc3e..7050890f63 100644 --- a/ApplicationLibCode/ProjectDataModel/RimSummaryCalculationCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimSummaryCalculationCollection.cpp @@ -82,10 +82,9 @@ void RimSummaryCalculationCollection::updateDataDependingOnCalculations() } } - auto summaryCaseCollections = summaryCaseCollection->summaryCaseCollections(); - for ( RimSummaryEnsemble* summaryCaseCollection : summaryCaseCollections ) + for ( auto ensemble : summaryCaseCollection->summaryEnsembles() ) { - summaryCaseCollection->onCalculationUpdated(); + ensemble->onCalculationUpdated(); } } diff --git a/ApplicationLibCode/ProjectDataModel/RimTools.cpp b/ApplicationLibCode/ProjectDataModel/RimTools.cpp index 47c6e8d9a3..35d6d5cd49 100644 --- a/ApplicationLibCode/ProjectDataModel/RimTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimTools.cpp @@ -558,8 +558,7 @@ RimWellPath* RimTools::firstWellPath() //-------------------------------------------------------------------------------------------------- RimSurfaceCollection* RimTools::surfaceCollection() { - RimProject* proj = RimProject::current(); - return proj->activeOilField()->surfaceCollection(); + return RimProject::current()->activeOilField()->surfaceCollection(); } //-------------------------------------------------------------------------------------------------- @@ -567,8 +566,15 @@ RimSurfaceCollection* RimTools::surfaceCollection() //-------------------------------------------------------------------------------------------------- RimPolygonCollection* RimTools::polygonCollection() { - RimProject* proj = RimProject::current(); - return proj->activeOilField()->polygonCollection(); + return RimProject::current()->activeOilField()->polygonCollection(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimAutomationSettings* RimTools::automationSettings() +{ + return RimProject::current()->automationSettings(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimTools.h b/ApplicationLibCode/ProjectDataModel/RimTools.h index 8985404324..50ba08ead8 100644 --- a/ApplicationLibCode/ProjectDataModel/RimTools.h +++ b/ApplicationLibCode/ProjectDataModel/RimTools.h @@ -42,6 +42,7 @@ class RimWellPath; class RimSurfaceCollection; class RimFaultInViewCollection; class RimPolygonCollection; +class RimAutomationSettings; //-------------------------------------------------------------------------------------------------- /// @@ -77,8 +78,9 @@ public: static RimWellPathCollection* wellPathCollection(); static RimWellPath* firstWellPath(); - static RimSurfaceCollection* surfaceCollection(); - static RimPolygonCollection* polygonCollection(); + static RimSurfaceCollection* surfaceCollection(); + static RimPolygonCollection* polygonCollection(); + static RimAutomationSettings* automationSettings(); static void timeStepsForCase( RimCase* gridCase, QList* options ); diff --git a/ApplicationLibCode/ProjectDataModel/RimViewController.cpp b/ApplicationLibCode/ProjectDataModel/RimViewController.cpp index 1014876c87..27c3c2b199 100644 --- a/ApplicationLibCode/ProjectDataModel/RimViewController.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimViewController.cpp @@ -28,6 +28,7 @@ #include "RigGeoMechCaseData.h" #include "RigMainGrid.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim3dView.h" #include "RimCase.h" #include "RimCellFilter.h" @@ -35,7 +36,6 @@ #include "RimCellRangeFilter.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapView.h" #include "RimEclipsePropertyFilterCollection.h" #include "RimEclipseView.h" #include "RimGeoMechCase.h" diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp b/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp deleted file mode 100644 index fe4cdf04fb..0000000000 --- a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp +++ /dev/null @@ -1,296 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2024- 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RimWellTargetCandidatesGenerator.h" - -#include "RiaLogging.h" -#include "RiaPorosityModel.h" -#include "RiaResultNames.h" - -#include "RigCaseCellResultsData.h" -#include "RigEclipseResultAddress.h" -#include "Well/RigWellTargetCandidatesGenerator.h" - -#include "RimEclipseCase.h" -#include "RimEclipseCaseEnsemble.h" -#include "RimEclipseView.h" -#include "RimProject.h" -#include "RimTools.h" - -#include "cafPdmUiDoubleSliderEditor.h" -#include "cafPdmUiSliderTools.h" - -#include "cvfMath.h" - -#include -#include - -CAF_PDM_SOURCE_INIT( RimWellTargetCandidatesGenerator, "RimWellTargetCandidatesGenerator" ); - -namespace caf -{ -template <> -void caf::AppEnum::setUp() -{ - addItem( RigWellTargetCandidatesGenerator::VolumeType::OIL, "OIL", "Oil" ); - addItem( RigWellTargetCandidatesGenerator::VolumeType::GAS, "GAS", "Gas" ); - addItem( RigWellTargetCandidatesGenerator::VolumeType::HYDROCARBON, "HYDROCARBON", "Hydrocarbon" ); - setDefault( RigWellTargetCandidatesGenerator::VolumeType::OIL ); -} - -template <> -void caf::AppEnum::setUp() -{ - addItem( RigWellTargetCandidatesGenerator::VolumeResultType::MOBILE, "MOBILE", "Mobile" ); - addItem( RigWellTargetCandidatesGenerator::VolumeResultType::TOTAL, "TOTAL", "Total" ); - setDefault( RigWellTargetCandidatesGenerator::VolumeResultType::TOTAL ); -} - -template <> -void caf::AppEnum::setUp() -{ - addItem( RigWellTargetCandidatesGenerator::VolumesType::RESERVOIR_VOLUMES, "RESERVOIR", "Reservoir Volumes (RFIPOIL, RFIPGAS)" ); - addItem( RigWellTargetCandidatesGenerator::VolumesType::SURFACE_VOLUMES, "SURFACE", "Surface Volumes (SFIPOIL, SFIPGAS)" ); - addItem( RigWellTargetCandidatesGenerator::VolumesType::COMPUTED_VOLUMES, "COMPUTED", "Computed Volumes (PORV*SOIL, PORV*SGAS)" ); - setDefault( RigWellTargetCandidatesGenerator::VolumesType::COMPUTED_VOLUMES ); -} - -} // End namespace caf - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellTargetCandidatesGenerator::RimWellTargetCandidatesGenerator() -{ - CAF_PDM_InitObject( "Well Target Candidates Generator" ); - - CAF_PDM_InitField( &m_timeStep, "TimeStep", 0, "Time Step" ); - - CAF_PDM_InitFieldNoDefault( &m_volumeType, "VolumeType", "Volume" ); - CAF_PDM_InitFieldNoDefault( &m_volumeResultType, "VolumeResultType", "Result" ); - CAF_PDM_InitFieldNoDefault( &m_volumesType, "VolumesType", "" ); - - CAF_PDM_InitField( &m_volume, "Volume", 0.0, "Volume" ); - m_volume.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); - - CAF_PDM_InitField( &m_pressure, "Pressure", 0.0, "Pressure" ); - m_pressure.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); - - CAF_PDM_InitField( &m_permeability, "Permeability", 0.0, "Permeability" ); - m_permeability.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); - - CAF_PDM_InitField( &m_transmissibility, "Transmissibility", 0.0, "Transmissibility" ); - m_transmissibility.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); - - CAF_PDM_InitField( &m_maxIterations, "Iterations", 10000, "Max Iterations" ); - CAF_PDM_InitField( &m_maxClusters, "MaxClusters", 5, "Max Clusters" ); - - m_minimumVolume = cvf::UNDEFINED_DOUBLE; - m_maximumVolume = cvf::UNDEFINED_DOUBLE; - - m_minimumPressure = cvf::UNDEFINED_DOUBLE; - m_maximumPressure = cvf::UNDEFINED_DOUBLE; - - m_minimumPermeability = cvf::UNDEFINED_DOUBLE; - m_maximumPermeability = cvf::UNDEFINED_DOUBLE; - - m_minimumTransmissibility = cvf::UNDEFINED_DOUBLE; - m_maximumTransmissibility = cvf::UNDEFINED_DOUBLE; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellTargetCandidatesGenerator::~RimWellTargetCandidatesGenerator() -{ -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellTargetCandidatesGenerator::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) -{ - updateAllBoundaries(); - - generateCandidates(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RimWellTargetCandidatesGenerator::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) -{ - QList options; - - if ( fieldNeedingOptions == &m_timeStep ) - { - auto ensemble = firstAncestorOrThisOfType(); - if ( ensemble && !ensemble->cases().empty() ) - { - RimEclipseCase* eclipseCase = ensemble->cases().front(); - - RimTools::timeStepsForCase( eclipseCase, &options ); - } - } - - return options; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellTargetCandidatesGenerator::updateAllBoundaries() -{ - auto ensemble = firstAncestorOrThisOfType(); - if ( !ensemble ) return; - - if ( ensemble->cases().empty() ) return; - - RimEclipseCase* eclipseCase = ensemble->cases().front(); - - int timeStepIdx = m_timeStep(); - - auto updateBoundaryValues = - []( auto resultsData, const std::vector& addresses, size_t timeStepIdx ) -> std::pair - { - double globalMin = std::numeric_limits::max(); - double globalMax = -std::numeric_limits::max(); - for ( auto address : addresses ) - { - double currentMinimum; - double currentMaximum; - resultsData->ensureKnownResultLoaded( address ); - resultsData->minMaxCellScalarValues( address, timeStepIdx, currentMinimum, currentMaximum ); - globalMin = std::min( globalMin, currentMinimum ); - globalMax = std::max( globalMax, currentMaximum ); - } - return { globalMin, globalMax }; - }; - - auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - std::tie( m_minimumPressure, m_maximumPressure ) = - updateBoundaryValues( resultsData, { RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) }, timeStepIdx ); - - std::vector volume = - RigWellTargetCandidatesGenerator::getVolumeVector( *resultsData, m_volumeType(), m_volumesType(), m_volumeResultType(), timeStepIdx ); - if ( !volume.empty() ) - { - const auto [min, max] = std::minmax_element( volume.begin(), volume.end() ); - m_minimumVolume = *min; - m_maximumVolume = *max; - } - - std::tie( m_minimumPermeability, m_maximumPermeability ) = - updateBoundaryValues( resultsData, - { RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ), - RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ), - RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) }, - 0 ); - - std::tie( m_minimumTransmissibility, m_maximumTransmissibility ) = - updateBoundaryValues( resultsData, - { RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ), - RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ), - RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ) }, - 0 ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellTargetCandidatesGenerator::defineEditorAttribute( const caf::PdmFieldHandle* field, - QString uiConfigName, - caf::PdmUiEditorAttribute* attribute ) - -{ - if ( field == &m_volume && m_minimumVolume != cvf::UNDEFINED_DOUBLE && m_maximumVolume != cvf::UNDEFINED_DOUBLE ) - { - if ( auto doubleAttributes = dynamic_cast( attribute ) ) - { - doubleAttributes->m_minimum = m_minimumVolume; - doubleAttributes->m_maximum = m_maximumVolume; - doubleAttributes->m_decimals = 3; - } - } - - if ( field == &m_pressure && m_minimumPressure != cvf::UNDEFINED_DOUBLE && m_maximumPressure != cvf::UNDEFINED_DOUBLE ) - { - if ( auto doubleAttributes = dynamic_cast( attribute ) ) - { - doubleAttributes->m_minimum = m_minimumPressure; - doubleAttributes->m_maximum = m_maximumPressure; - doubleAttributes->m_decimals = 3; - } - } - - if ( field == &m_permeability && m_minimumPermeability != cvf::UNDEFINED_DOUBLE && m_maximumPermeability != cvf::UNDEFINED_DOUBLE ) - { - if ( auto doubleAttributes = dynamic_cast( attribute ) ) - { - doubleAttributes->m_minimum = m_minimumPermeability; - doubleAttributes->m_maximum = m_maximumPermeability; - doubleAttributes->m_decimals = 3; - } - } - - if ( field == &m_transmissibility && m_minimumTransmissibility != cvf::UNDEFINED_DOUBLE && m_maximumTransmissibility != cvf::UNDEFINED_DOUBLE ) - { - if ( auto doubleAttributes = dynamic_cast( attribute ) ) - { - doubleAttributes->m_minimum = m_minimumTransmissibility; - doubleAttributes->m_maximum = m_maximumTransmissibility; - doubleAttributes->m_decimals = 3; - } - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellTargetCandidatesGenerator::generateCandidates() -{ - auto ensemble = firstAncestorOrThisOfType(); - if ( !ensemble ) return; - - if ( ensemble->cases().empty() ) return; - - RimEclipseCase* eclipseCase = ensemble->cases().front(); - - RigWellTargetCandidatesGenerator::ClusteringLimits limits; - limits.volume = m_volume; - limits.permeability = m_permeability; - limits.pressure = m_pressure; - limits.transmissibility = m_transmissibility; - limits.maxClusters = m_maxClusters; - limits.maxIterations = m_maxIterations; - - RigWellTargetCandidatesGenerator::generateCandidates( eclipseCase, m_timeStep(), m_volumeType(), m_volumesType(), m_volumeResultType(), limits ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellTargetCandidatesGenerator::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) -{ - PdmObject::defineUiOrdering( uiConfigName, uiOrdering ); - - if ( m_minimumVolume == cvf::UNDEFINED_DOUBLE || m_maximumVolume == cvf::UNDEFINED_DOUBLE ) - { - updateAllBoundaries(); - } -} diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.h b/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.h deleted file mode 100644 index b9334226bf..0000000000 --- a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.h +++ /dev/null @@ -1,74 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2024- 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cafAppEnum.h" -#include "cafPdmField.h" -#include "cafPdmObject.h" - -#include "Well/RigWellTargetCandidatesGenerator.h" - -//================================================================================================== -/// -/// -//================================================================================================== -class RimWellTargetCandidatesGenerator : public caf::PdmObject -{ - CAF_PDM_HEADER_INIT; - -public: - RimWellTargetCandidatesGenerator(); - ~RimWellTargetCandidatesGenerator() override; - -protected: - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; - void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - -private: - void generateCandidates(); - void updateAllBoundaries(); - - caf::PdmField m_timeStep; - - caf::PdmField> m_volumeType; - caf::PdmField> m_volumeResultType; - caf::PdmField> m_volumesType; - - caf::PdmField m_volume; - caf::PdmField m_pressure; - caf::PdmField m_permeability; - caf::PdmField m_transmissibility; - - caf::PdmField m_maxIterations; - caf::PdmField m_maxClusters; - - double m_minimumVolume; - double m_maximumVolume; - - double m_minimumPressure; - double m_maximumPressure; - - double m_minimumPermeability; - double m_maximumPermeability; - - double m_minimumTransmissibility; - double m_maximumTransmissibility; -}; diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp b/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp new file mode 100644 index 0000000000..d3adc9e2e9 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.cpp @@ -0,0 +1,716 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimWellTargetMapping.h" + +#include "RiaGuiApplication.h" +#include "RiaLogging.h" +#include "RiaOptionItemFactory.h" +#include "RiaPorosityModel.h" +#include "RiaResultNames.h" + +#include "RigActiveCellInfo.h" +#include "RiuMainWindow.h" + +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigEclipseResultAddress.h" +#include "RigFloodingSettings.h" +#include "RigStatisticsMath.h" +#include "Well/RigWellTargetMapping.h" + +#include "RimEclipseCase.h" +#include "RimEclipseCaseCollection.h" +#include "RimEclipseCaseEnsemble.h" +#include "RimEclipseCellColors.h" +#include "RimEclipsePropertyFilterCollection.h" +#include "RimEclipseResultDefinition.h" +#include "RimEclipseView.h" +#include "RimRegularGridCase.h" +#include "RimTools.h" + +#include "cafPdmUiDoubleSliderEditor.h" +#include "cafPdmUiPushButtonEditor.h" +#include "cafPdmUiSliderTools.h" + +#include "cvfMath.h" + +#include +#include + +CAF_PDM_SOURCE_INIT( RimWellTargetMapping, "RimWellTargetMapping" ); + +namespace caf +{ +template <> +void caf::AppEnum::setUp() +{ + addItem( RigWellTargetMapping::VolumeType::OIL, "OIL", "Oil" ); + addItem( RigWellTargetMapping::VolumeType::GAS, "GAS", "Gas" ); + addItem( RigWellTargetMapping::VolumeType::HYDROCARBON, "HYDROCARBON", "Hydrocarbon" ); + setDefault( RigWellTargetMapping::VolumeType::OIL ); +} + +template <> +void caf::AppEnum::setUp() +{ + addItem( RigWellTargetMapping::VolumeResultType::MOBILE, "MOBILE", "Mobile" ); + addItem( RigWellTargetMapping::VolumeResultType::TOTAL, "TOTAL", "Total" ); + setDefault( RigWellTargetMapping::VolumeResultType::TOTAL ); +} + +template <> +void caf::AppEnum::setUp() +{ + addItem( RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES, "RESERVOIR_VOLUMES", "Reservoir Volumes (RFIPOIL, RFIPGAS)" ); + addItem( RigWellTargetMapping::VolumesType::SURFACE_VOLUMES_SFIP, "SURFACE_VOLUMES_SFIP", "Surface Volumes (SFIPOIL, SFIPGAS)" ); + addItem( RigWellTargetMapping::VolumesType::SURFACE_VOLUMES_FIP, "SURFACE_VOLUMES_FIP", "Surface Volumes (FIPOIL, FIPGAS)" ); + addItem( RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED, + "RESERVOIR_VOLUMES_COMPUTED", + "Reservoir Volumes (PORV*SOIL, PORV*SGAS)" ); + setDefault( RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED ); +} + +} // End namespace caf + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellTargetMapping::RimWellTargetMapping() +{ + CAF_PDM_InitObject( "Well Target Mapping", ":/WellTargets.png" ); + + CAF_PDM_InitField( &m_timeStep, "TimeStep", 0, "Time Step" ); + + CAF_PDM_InitFieldNoDefault( &m_volumeType, "VolumeType", "Volume" ); + CAF_PDM_InitFieldNoDefault( &m_volumeResultType, "VolumeResultType", "Result" ); + CAF_PDM_InitFieldNoDefault( &m_volumesType, "VolumesType", "" ); + + CAF_PDM_InitFieldNoDefault( &m_oilFloodingType, "OilFloodingType", "Residual Oil Given By" ); + m_oilFloodingType.setValue( RigFloodingSettings::FloodingType::WATER_FLOODING ); + CAF_PDM_InitField( &m_userDefinedFloodingOil, "UserDefinedFloodingOil", 0.0, "" ); + m_userDefinedFloodingOil.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_gasFloodingType, "GasFloodingType", RigFloodingSettings::FloodingType::GAS_FLOODING, "Residual Oil-in-Gas Given By" ); + caf::AppEnum::setEnumSubset( &m_gasFloodingType, + { RigFloodingSettings::FloodingType::GAS_FLOODING, + RigFloodingSettings::FloodingType::USER_DEFINED } ); + + CAF_PDM_InitField( &m_userDefinedFloodingGas, "UserDefinedFloodingGas", 0.0, "" ); + m_userDefinedFloodingGas.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_saturationOil, "SaturationOil", 0.0, "Saturation Oil" ); + m_saturationOil.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_saturationGas, "SaturationGas", 0.0, "Saturation Gas" ); + m_saturationGas.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_pressure, "Pressure", 0.0, "Pressure" ); + m_pressure.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_permeability, "Permeability", 0.0, "Permeability [Kh]" ); + m_permeability.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_transmissibility, "Transmissibility", 0.0, "Transmissibility" ); + m_transmissibility.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); + + CAF_PDM_InitField( &m_resetDefaultButton, "ResetDefaultButton", true, "Reset to Default" ); + caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_resetDefaultButton ); + m_resetDefaultButton.xmlCapability()->disableIO(); + + CAF_PDM_InitField( &m_maxIterations, "Iterations", 100000, "Max Iterations" ); + CAF_PDM_InitField( &m_maxNumTargets, "MaxNumTargets", 5, "Maximum Number of Well Targets" ); + + CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "" ); + m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); + m_resultDefinition = new RimEclipseResultDefinition; + m_resultDefinition->findField( "MResultType" )->uiCapability()->setUiName( "Result" ); + m_resultDefinition->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE ); + m_resultDefinition->setResultVariable( "SOIL" ); + + CAF_PDM_InitField( &m_cellCountI, "CellCountI", 100, "Cell Count I" ); + CAF_PDM_InitField( &m_cellCountJ, "CellCountJ", 100, "Cell Count J" ); + CAF_PDM_InitField( &m_cellCountK, "CellCountK", 10, "Cell Count K" ); + + CAF_PDM_InitField( &m_generateButton, "GenerateButton", true, "Generate" ); + caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_generateButton ); + m_generateButton.xmlCapability()->disableIO(); + + CAF_PDM_InitFieldNoDefault( &m_filterView, "FilterView", "Filter By View" ); + + CAF_PDM_InitFieldNoDefault( &m_ensembleStatisticsCase, "EnsembleStatisticsCase", "Ensemble Statistics Case" ); + + m_minimumSaturationOil = cvf::UNDEFINED_DOUBLE; + m_maximumSaturationOil = cvf::UNDEFINED_DOUBLE; + m_defaultSaturationOil = cvf::UNDEFINED_DOUBLE; + + m_minimumSaturationGas = cvf::UNDEFINED_DOUBLE; + m_maximumSaturationGas = cvf::UNDEFINED_DOUBLE; + m_defaultSaturationGas = cvf::UNDEFINED_DOUBLE; + + m_minimumPressure = cvf::UNDEFINED_DOUBLE; + m_maximumPressure = cvf::UNDEFINED_DOUBLE; + m_defaultPressure = cvf::UNDEFINED_DOUBLE; + + m_minimumPermeability = cvf::UNDEFINED_DOUBLE; + m_maximumPermeability = cvf::UNDEFINED_DOUBLE; + m_defaultPermeability = cvf::UNDEFINED_DOUBLE; + + m_minimumTransmissibility = cvf::UNDEFINED_DOUBLE; + m_maximumTransmissibility = cvf::UNDEFINED_DOUBLE; + m_defaultTransmissibility = cvf::UNDEFINED_DOUBLE; + + setDeletable( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellTargetMapping::~RimWellTargetMapping() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) +{ + updateAllBoundaries(); + + if ( changedField == &m_generateButton ) + { + auto hasEnsembleParent = firstAncestorOrThisOfType() != nullptr; + if ( hasEnsembleParent ) + generateEnsembleStatistics(); + else if ( auto eclipseCase = firstCase() ) + { + generateCandidates( eclipseCase ); + if ( auto views = eclipseCase->reservoirViews(); !views.empty() ) + { + auto eclipseView = views.front(); + eclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::GENERATED ); + eclipseView->cellResult()->setResultVariable( RigWellTargetMapping::wellTargetResultName() ); + + if ( eclipseView->eclipsePropertyFilterCollection()->propertyFilters().empty() ) + { + eclipseView->eclipsePropertyFilterCollection()->addFilterLinkedToCellResult(); + eclipseView->eclipsePropertyFilterCollection()->updateConnectedEditors(); + } + + if ( RiaGuiApplication::isRunning() || RiuMainWindow::instance() ) + { + RiuMainWindow::instance()->selectAsCurrentItem( eclipseView->cellResult() ); + } + } + } + } + else if ( changedField == &m_resetDefaultButton ) + { + resetMinimumCellValuesToDefault(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimWellTargetMapping::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + QList options; + + if ( fieldNeedingOptions == &m_timeStep ) + { + if ( auto fc = firstCase() ) + { + RimTools::timeStepsForCase( fc, &options ); + } + } + else if ( fieldNeedingOptions == &m_volumesType ) + { + if ( auto fc = firstCase() ) + { + caf::AppEnum::setEnumSubset( &m_volumesType, findAvailableVolumesTypes( fc ) ); + } + } + else if ( fieldNeedingOptions == &m_filterView ) + { + options.push_back( caf::PdmOptionItemInfo( "None", nullptr ) ); + + if ( auto fc = firstCase() ) + { + for ( const auto& view : fc->views() ) + { + RiaOptionItemFactory::appendOptionItemFromViewNameAndCaseName( view, &options ); + } + } + } + + return options; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::updateAllBoundaries() +{ + RimEclipseCase* eclipseCase = firstCase(); + if ( !eclipseCase ) return; + + eclipseCase->ensureReservoirCaseIsOpen(); + + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) return; + + const int timeStepIdx = m_timeStep(); + + auto updateBoundaryValues = + []( auto resultsData, const std::vector& addresses, size_t timeStepIdx ) -> std::tuple + { + double globalMin = std::numeric_limits::max(); + double globalMax = -std::numeric_limits::max(); + std::vector allValues; + for ( auto address : addresses ) + { + double currentMinimum; + double currentMaximum; + if ( resultsData->ensureKnownResultLoaded( address ) ) + { + resultsData->minMaxCellScalarValues( address, timeStepIdx, currentMinimum, currentMaximum ); + + globalMin = std::min( globalMin, currentMinimum ); + globalMax = std::max( globalMax, currentMaximum ); + const std::vector& values = resultsData->cellScalarResults( address, timeStepIdx ); + allValues.insert( allValues.end(), values.begin(), values.end() ); + } + } + + double p10, p50, p90, mean; + RigStatisticsMath::calculateStatisticsCurves( allValues, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED ); + + return { globalMin, globalMax, p90 }; + }; + + std::tie( m_minimumSaturationOil, m_maximumSaturationOil, m_defaultSaturationOil ) = + updateBoundaryValues( resultsData, { RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SOIL" ) }, timeStepIdx ); + m_defaultSaturationOil = 0.3; + + std::tie( m_minimumSaturationGas, m_maximumSaturationGas, m_defaultSaturationGas ) = + updateBoundaryValues( resultsData, { RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SGAS" ) }, timeStepIdx ); + m_defaultSaturationGas = 0.3; + + std::tie( m_minimumPressure, m_maximumPressure, m_defaultPressure ) = + updateBoundaryValues( resultsData, { RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) }, timeStepIdx ); + + std::tie( m_minimumPermeability, m_maximumPermeability, m_defaultPermeability ) = + updateBoundaryValues( resultsData, { RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) }, 0 ); + + std::tie( m_minimumTransmissibility, m_maximumTransmissibility, m_defaultTransmissibility ) = + updateBoundaryValues( resultsData, + { RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ), + RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ) }, + 0 ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) + +{ + if ( field == &m_saturationOil && m_minimumSaturationOil != cvf::UNDEFINED_DOUBLE && m_maximumSaturationOil != cvf::UNDEFINED_DOUBLE ) + { + if ( auto doubleAttributes = dynamic_cast( attribute ) ) + { + doubleAttributes->m_minimum = m_minimumSaturationOil; + doubleAttributes->m_maximum = m_maximumSaturationOil; + doubleAttributes->m_decimals = 3; + } + } + + if ( field == &m_saturationGas && m_minimumSaturationGas != cvf::UNDEFINED_DOUBLE && m_maximumSaturationGas != cvf::UNDEFINED_DOUBLE ) + { + if ( auto doubleAttributes = dynamic_cast( attribute ) ) + { + doubleAttributes->m_minimum = m_minimumSaturationGas; + doubleAttributes->m_maximum = m_maximumSaturationGas; + doubleAttributes->m_decimals = 3; + } + } + + if ( field == &m_pressure && m_minimumPressure != cvf::UNDEFINED_DOUBLE && m_maximumPressure != cvf::UNDEFINED_DOUBLE ) + { + if ( auto doubleAttributes = dynamic_cast( attribute ) ) + { + doubleAttributes->m_minimum = m_minimumPressure; + doubleAttributes->m_maximum = m_maximumPressure; + doubleAttributes->m_decimals = 3; + } + } + + if ( field == &m_permeability && m_minimumPermeability != cvf::UNDEFINED_DOUBLE && m_maximumPermeability != cvf::UNDEFINED_DOUBLE ) + { + if ( auto doubleAttributes = dynamic_cast( attribute ) ) + { + doubleAttributes->m_minimum = m_minimumPermeability; + doubleAttributes->m_maximum = m_maximumPermeability; + doubleAttributes->m_decimals = 3; + } + } + + if ( field == &m_transmissibility && m_minimumTransmissibility != cvf::UNDEFINED_DOUBLE && m_maximumTransmissibility != cvf::UNDEFINED_DOUBLE ) + { + if ( auto doubleAttributes = dynamic_cast( attribute ) ) + { + doubleAttributes->m_minimum = m_minimumTransmissibility; + doubleAttributes->m_maximum = m_maximumTransmissibility; + doubleAttributes->m_decimals = 3; + } + } + + if ( field == &m_generateButton ) + { + if ( auto attrib = dynamic_cast( attribute ) ) + { + attrib->m_buttonText = "Generate"; + } + } + + if ( field == &m_resetDefaultButton ) + { + if ( auto attrib = dynamic_cast( attribute ) ) + { + attrib->m_buttonText = "Reset to Default"; + } + } + + if ( ( &m_userDefinedFloodingOil == field ) || ( &m_userDefinedFloodingGas == field ) ) + { + if ( auto myAttr = dynamic_cast( attribute ) ) + { + myAttr->m_minimum = 0.0; + myAttr->m_maximum = 1.0; + myAttr->m_sliderTickCount = 20; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::Vec3st RimWellTargetMapping::getResultGridCellCount() const +{ + return cvf::Vec3st( m_cellCountI, m_cellCountJ, m_cellCountK ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::generateCandidates( RimEclipseCase* eclipseCase ) +{ + RigWellTargetMapping::ClusteringLimits limits = getClusteringLimits(); + RigFloodingSettings floodingSettings( m_oilFloodingType(), m_userDefinedFloodingOil(), m_gasFloodingType(), m_userDefinedFloodingGas() ); + + RigWellTargetMapping::generateCandidates( eclipseCase, + m_timeStep(), + m_volumeType(), + m_volumesType(), + m_volumeResultType(), + floodingSettings, + limits, + true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::generateEnsembleStatistics() +{ + auto ensemble = firstAncestorOrThisOfType(); + if ( !ensemble ) return; + + const cvf::Vec3st& resultGridCellCount = getResultGridCellCount(); + RigWellTargetMapping::ClusteringLimits limits = getClusteringLimits(); + RigFloodingSettings floodingSettings( m_oilFloodingType(), m_userDefinedFloodingOil(), m_gasFloodingType(), m_userDefinedFloodingGas() ); + + RimRegularGridCase* regularGridCase = RigWellTargetMapping::generateEnsembleCandidates( *ensemble, + m_timeStep(), + resultGridCellCount, + m_volumeType(), + m_volumesType(), + m_volumeResultType(), + floodingSettings, + limits ); + + regularGridCase->setCustomCaseName( "Ensemble Grid" ); + + m_ensembleStatisticsCase = regularGridCase; + + auto eclipseView = regularGridCase->createAndAddReservoirView(); + + eclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::GENERATED ); + eclipseView->cellResult()->setResultVariable( "TOTAL_PORV_SOIL_P10" ); + + if ( RiaGuiApplication::isRunning() || RiuMainWindow::instance() ) + { + RiuMainWindow::instance()->selectAsCurrentItem( eclipseView->cellResult() ); + } + + eclipseView->loadDataAndUpdate(); + + m_ensembleStatisticsCase->updateConnectedEditors(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + caf::PdmUiGroup* resultGroup = uiOrdering.addNewGroup( "Result" ); + resultGroup->add( &m_timeStep ); + resultGroup->add( &m_volumeType ); + resultGroup->add( &m_volumeResultType ); + + bool showGasOptions = m_volumeType() == RigWellTargetMapping::VolumeType::GAS || + m_volumeType() == RigWellTargetMapping::VolumeType::HYDROCARBON; + bool showOilOptions = m_volumeType() == RigWellTargetMapping::VolumeType::OIL || + m_volumeType() == RigWellTargetMapping::VolumeType::HYDROCARBON; + + if ( m_volumeResultType() == RigWellTargetMapping::VolumeResultType::MOBILE ) + { + if ( showOilOptions ) + { + resultGroup->add( &m_oilFloodingType ); + if ( m_oilFloodingType() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + resultGroup->add( &m_userDefinedFloodingOil ); + } + } + if ( showGasOptions ) + { + resultGroup->add( &m_gasFloodingType ); + if ( m_gasFloodingType() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + resultGroup->add( &m_userDefinedFloodingGas ); + } + } + } + + resultGroup->add( &m_volumesType ); + + auto hasEnsembleParent = firstAncestorOrThisOfType() != nullptr; + if ( !hasEnsembleParent ) uiOrdering.add( &m_filterView ); + + caf::PdmUiGroup* minimumCellValuesGroup = uiOrdering.addNewGroup( "Minimum Cell Values" ); + if ( showOilOptions ) minimumCellValuesGroup->add( &m_saturationOil ); + if ( showGasOptions ) minimumCellValuesGroup->add( &m_saturationGas ); + minimumCellValuesGroup->add( &m_pressure ); + minimumCellValuesGroup->add( &m_permeability ); + minimumCellValuesGroup->add( &m_transmissibility ); + minimumCellValuesGroup->add( &m_resetDefaultButton ); + + if ( hasEnsembleParent ) + { + caf::PdmUiGroup* ensembleGridGroup = uiOrdering.addNewGroup( "Ensemble Statistics Grid" ); + ensembleGridGroup->add( &m_cellCountI ); + ensembleGridGroup->add( &m_cellCountJ ); + ensembleGridGroup->add( &m_cellCountK ); + } + + caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup( "Advanced" ); + advancedGroup->add( &m_maxNumTargets ); + advancedGroup->setCollapsedByDefault(); + + uiOrdering.add( &m_generateButton ); + + uiOrdering.skipRemainingFields(); + + if ( m_minimumPressure == cvf::UNDEFINED_DOUBLE || m_maximumPressure == cvf::UNDEFINED_DOUBLE ) + { + updateAllBoundaries(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigWellTargetMapping::ClusteringLimits RimWellTargetMapping::getClusteringLimits() const +{ + return { .saturationOil = m_saturationOil, + .saturationGas = m_saturationGas, + .permeability = m_permeability, + .pressure = m_pressure, + .transmissibility = m_transmissibility, + .maxNumTargets = m_maxNumTargets, + .maxIterations = m_maxIterations, + .filterAddress = m_resultDefinition->eclipseResultAddress(), + .filter = getVisibilityFilter() }; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimWellTargetMapping::getVisibilityFilter() const +{ + std::vector filter = {}; + + // Visibility filter is only valid in the single case setting + auto hasEnsembleParent = firstAncestorOrThisOfType() != nullptr; + if ( !hasEnsembleParent ) + { + auto fc = firstCase(); + if ( m_filterView() && fc ) + { + cvf::ref visibility = m_filterView->currentTotalCellVisibility(); + + auto activeReservoirCellIndices = + fc->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL )->activeReservoirCellIndices(); + int numActiveCells = static_cast( activeReservoirCellIndices.size() ); + + filter.resize( numActiveCells, std::numeric_limits::infinity() ); + + // Create binary filter for active cells: 1.0 can be used, 0.0 is filtered out. +#pragma omp parallel for + for ( int i = 0; i < numActiveCells; i++ ) + { + const auto reservoirCellIndex = activeReservoirCellIndices[i]; + filter[i] = visibility->val( reservoirCellIndex ) ? 1.0 : 0.0; + } + } + } + + return filter; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCase* RimWellTargetMapping::firstCase() const +{ + auto ensemble = firstAncestorOrThisOfType(); + if ( ensemble && !ensemble->cases().empty() ) + return ensemble->cases()[0]; + else + return firstAncestorOrThisOfType(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::initAfterRead() +{ + if ( RimEclipseCase* eclipseCase = firstCase() ) + { + m_resultDefinition->setEclipseCase( eclipseCase ); + + // Automatically generate results on project load + // Consider to also do this for ensemble cases, but this will be more expensive + generateCandidates( eclipseCase ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::updateResultDefinition() +{ + RimEclipseCase* eclipseCase = firstCase(); + if ( eclipseCase ) m_resultDefinition->setEclipseCase( eclipseCase ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEclipseCase* RimWellTargetMapping::ensembleStatisticsCase() const +{ + return m_ensembleStatisticsCase; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::setDefaults() +{ + auto findFirstByPriority = []( const std::vector& priority, + const std::vector& available ) + { + for ( auto pri : priority ) + { + if ( std::find( available.begin(), available.end(), pri ) != available.end() ) return pri; + } + + return RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED; + }; + + // Use last available time step + if ( RimEclipseCase* eclipseCase = firstCase() ) + { + m_timeStep = static_cast( eclipseCase->timeStepDates().size() ) - 1; + + std::vector volumesTypesByPriority = { RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES, + RigWellTargetMapping::VolumesType::SURFACE_VOLUMES_SFIP, + RigWellTargetMapping::VolumesType::SURFACE_VOLUMES_FIP, + RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED }; + std::vector availableVolumesTypes = findAvailableVolumesTypes( eclipseCase ); + m_volumesType = findFirstByPriority( volumesTypesByPriority, availableVolumesTypes ); + + updateAllBoundaries(); + resetMinimumCellValuesToDefault(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellTargetMapping::resetMinimumCellValuesToDefault() +{ + m_saturationOil = std::clamp( m_defaultSaturationOil, m_minimumSaturationOil, m_maximumSaturationOil ); + m_saturationGas = std::clamp( m_defaultSaturationGas, m_minimumSaturationGas, m_maximumSaturationGas ); + m_pressure = std::clamp( m_defaultPressure, m_minimumPressure, m_maximumPressure ); + m_permeability = std::clamp( m_defaultPermeability, m_minimumPermeability, m_maximumPermeability ); + m_transmissibility = std::clamp( m_defaultTransmissibility, std::max( m_minimumTransmissibility, 0.1 ), m_maximumTransmissibility ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimWellTargetMapping::findAvailableVolumesTypes( RimEclipseCase* eclipseCase ) +{ + auto hasResult = []( RigCaseCellResultsData& resultsData, const QString& resultName ) -> bool + { + RigEclipseResultAddress address( RiaDefines::ResultCatType::DYNAMIC_NATIVE, resultName ); + return resultsData.ensureKnownResultLoaded( address ); + }; + + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) return {}; + + std::vector availableVolumesTypes; + if ( hasResult( *resultsData, RiaResultNames::riPorvSoil() ) || hasResult( *resultsData, RiaResultNames::riPorvSgas() ) ) + availableVolumesTypes.push_back( RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED ); + + if ( hasResult( *resultsData, "RFIPOIL" ) || hasResult( *resultsData, "RFIPGAS" ) ) + availableVolumesTypes.push_back( RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES ); + + if ( hasResult( *resultsData, "SFIPOIL" ) || hasResult( *resultsData, "SFIPGAS" ) ) + availableVolumesTypes.push_back( RigWellTargetMapping::VolumesType::SURFACE_VOLUMES_SFIP ); + + if ( hasResult( *resultsData, "FIPOIL" ) || hasResult( *resultsData, "FIPGAS" ) ) + availableVolumesTypes.push_back( RigWellTargetMapping::VolumesType::SURFACE_VOLUMES_FIP ); + + return availableVolumesTypes; +} diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.h b/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.h new file mode 100644 index 0000000000..474fa1fa9f --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/RimWellTargetMapping.h @@ -0,0 +1,127 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafAppEnum.h" +#include "cafPdmField.h" +#include "cafPdmObject.h" +#include "cafPdmPtrField.h" + +#include "RigFloodingSettings.h" +#include "Well/RigWellTargetMapping.h" + +class RimEclipseResultDefinition; +class RimEclipseCase; +class RimEclipseView; + +//================================================================================================== +/// +/// +//================================================================================================== +class RimWellTargetMapping : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + using FloodingType = caf::AppEnum; + + RimWellTargetMapping(); + ~RimWellTargetMapping() override; + + void updateResultDefinition(); + + RimEclipseCase* ensembleStatisticsCase() const; + + void setDefaults(); + +protected: + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void initAfterRead() override; + +private: + void generateCandidates( RimEclipseCase* eclipseCase ); + void updateAllBoundaries(); + void generateEnsembleStatistics(); + cvf::Vec3st getResultGridCellCount() const; + + RimEclipseCase* firstCase() const; + + static std::vector findAvailableVolumesTypes( RimEclipseCase* eclipseCase ); + + RigWellTargetMapping::ClusteringLimits getClusteringLimits() const; + std::vector getVisibilityFilter() const; + + void resetMinimumCellValuesToDefault(); + + caf::PdmField m_timeStep; + + caf::PdmField> m_volumeType; + caf::PdmField> m_volumeResultType; + caf::PdmField> m_volumesType; + + caf::PdmField m_oilFloodingType; + caf::PdmField m_gasFloodingType; + caf::PdmField m_userDefinedFloodingGas; + caf::PdmField m_userDefinedFloodingOil; + + caf::PdmField m_saturationOil; + caf::PdmField m_saturationGas; + caf::PdmField m_pressure; + caf::PdmField m_permeability; + caf::PdmField m_transmissibility; + caf::PdmField m_resetDefaultButton; + + caf::PdmField m_maxIterations; + caf::PdmField m_maxNumTargets; + + caf::PdmChildField m_resultDefinition; + + caf::PdmField m_cellCountI; + caf::PdmField m_cellCountJ; + caf::PdmField m_cellCountK; + + caf::PdmField m_generateButton; + + caf::PdmPtrField m_filterView; + + caf::PdmChildField m_ensembleStatisticsCase; + + double m_minimumSaturationOil; + double m_maximumSaturationOil; + double m_defaultSaturationOil; + + double m_minimumSaturationGas; + double m_maximumSaturationGas; + double m_defaultSaturationGas; + + double m_minimumPressure; + double m_maximumPressure; + double m_defaultPressure; + + double m_minimumPermeability; + double m_maximumPermeability; + double m_defaultPermeability; + + double m_minimumTransmissibility; + double m_maximumTransmissibility; + double m_defaultTransmissibility; +}; diff --git a/ApplicationLibCode/ProjectDataModel/Seismic/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Seismic/CMakeLists_files.cmake index 0cfb1872c9..afdf0decf5 100644 --- a/ApplicationLibCode/ProjectDataModel/Seismic/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Seismic/CMakeLists_files.cmake @@ -25,11 +25,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Seismic" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp b/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp index c5bed5b6be..765237bb28 100644 --- a/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp @@ -413,7 +413,7 @@ void RimSeismicView::onLoadDataAndUpdate() updateMdiWindowVisibility(); - if ( m_surfaceCollection ) m_surfaceCollection->loadData(); + if ( m_surfaceCollection ) m_surfaceCollection->loadData( m_currentTimeStep ); scheduleCreateDisplayModelAndRedraw(); } diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/StimPlanModel/CMakeLists_files.cmake index 9231aa59e8..d488e000cd 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/CMakeLists_files.cmake @@ -51,13 +51,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS) - -source_group( - "ProjectDataModel\\StimPlanModel" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScaling.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScaling.cpp index 1aaf5b1ae9..6e87adff1a 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScaling.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScaling.cpp @@ -44,8 +44,10 @@ RimElasticPropertyScaling::RimElasticPropertyScaling() CAF_PDM_InitScriptableFieldNoDefault( &m_formation, "Formation", "Formation" ); CAF_PDM_InitScriptableFieldNoDefault( &m_facies, "Facies", "Facies" ); - caf::AppEnum defaultProperty = RiaDefines::CurveProperty::YOUNGS_MODULUS; - CAF_PDM_InitScriptableField( &m_property, "Property", defaultProperty, "Property" ); + + CAF_PDM_InitScriptableField( &m_property, "Property", RiaDefines::CurveProperty::YOUNGS_MODULUS, "Property" ); + caf::AppEnum::setEnumSubset( &m_property, RimElasticProperties::scalableProperties() ); + CAF_PDM_InitScriptableField( &m_scale, "Scale", 1.0, "Scale" ); nameField()->uiCapability()->setUiReadOnly( true ); @@ -85,14 +87,6 @@ QList RimElasticPropertyScaling::calculateValueOptions( options.push_back( caf::PdmOptionItemInfo( item->categoryName(), item->categoryName() ) ); } } - else if ( fieldNeedingOptions == &m_property ) - { - std::vector properties = RimElasticProperties::scalableProperties(); - for ( auto property : properties ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( property ), property ) ); - } - } return options; } diff --git a/ApplicationLibCode/ProjectDataModel/Streamlines/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Streamlines/CMakeLists_files.cmake index 17fe7accae..3bb12191ec 100644 --- a/ApplicationLibCode/ProjectDataModel/Streamlines/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Streamlines/CMakeLists_files.cmake @@ -15,11 +15,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Streamlines" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.cpp b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.cpp index 28d63e0b4e..c2493014bb 100644 --- a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.cpp +++ b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.cpp @@ -23,6 +23,7 @@ #include "RigEclipseCaseData.h" #include "RigEclipseResultAddress.h" #include "RigMainGrid.h" +#include "RigNNCData.h" #include "RigResultAccessor.h" #include "RigResultAccessorFactory.h" @@ -75,6 +76,24 @@ bool RimStreamlineDataAccess::setupDataAccess( RigMainGrid* grid, RigEclipseCase } } + auto nncData = grid->nncData(); + m_nncData.clear(); + if ( nncData != nullptr ) + { + m_nncData[RiaDefines::PhaseType::WATER_PHASE] = + nncData->dynamicConnectionScalarResultByName( RiaDefines::propertyNameFluxWat(), timeIdx ); + m_nncData[RiaDefines::PhaseType::OIL_PHASE] = + nncData->dynamicConnectionScalarResultByName( RiaDefines::propertyNameFluxOil(), timeIdx ); + m_nncData[RiaDefines::PhaseType::GAS_PHASE] = + nncData->dynamicConnectionScalarResultByName( RiaDefines::propertyNameFluxGas(), timeIdx ); + } + else + { + m_nncData[RiaDefines::PhaseType::WATER_PHASE] = nullptr; + m_nncData[RiaDefines::PhaseType::OIL_PHASE] = nullptr; + m_nncData[RiaDefines::PhaseType::GAS_PHASE] = nullptr; + } + return true; } @@ -229,3 +248,50 @@ double RimStreamlineDataAccess::combinedFaceRate( RigCell return retValue; } + +//-------------------------------------------------------------------------------------------------- +/// Return the nnc scalar value for the given connection, by combining flow for all specified phases +/// Positive values is flow from cell1 to cell2, negative values is the other way +//-------------------------------------------------------------------------------------------------- +double RimStreamlineDataAccess::combinedNNCRate( size_t resultIdx, + std::list phases, + double direction, + RiaDefines::PhaseType& outDominantPhase ) const +{ + double retValue = 0.0; + outDominantPhase = phases.front(); + + double max = 0.0; + + for ( auto phase : phases ) + { + double tmp = 0.0; + + if ( m_nncData.at( phase ) != nullptr ) + { + if ( resultIdx < m_nncData.at( phase )->size() ) + { + tmp = m_nncData.at( phase )->at( resultIdx ); + } + } + + if ( tmp * direction > max ) + { + outDominantPhase = phase; + max = std::abs( tmp ); + } + + retValue += tmp; + } + + return retValue; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const RigConnection& RimStreamlineDataAccess::nncConnection( size_t idx ) const +{ + auto nncData = m_grid->nncData(); + return nncData->availableConnections()[idx]; +} diff --git a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.h b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.h index eeb590f796..dcad7e0513 100644 --- a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.h +++ b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineDataAccess.h @@ -33,6 +33,7 @@ class RigMainGrid; class RigGridBase; class RigResultAccessor; class RigEclipseCaseData; +class RigConnection; //-------------------------------------------------------------------------------------------------- /// Specialized data access for streamline generation. Operates using flow rate in meters/day @@ -54,7 +55,14 @@ public: double direction, RiaDefines::PhaseType& dominantPhaseOut ) const; - const RigMainGrid* grid() const { return m_grid; } + double combinedNNCRate( size_t resultIdx, + std::list phases, + double direction, + RiaDefines::PhaseType& outDominantPhase ) const; + + RigMainGrid* grid() const { return m_grid; } + + const RigConnection& nncConnection( size_t idx ) const; protected: cvf::ref getDataAccessor( cvf::StructGridInterface::FaceType faceIdx, RiaDefines::PhaseType phase, int timeIdx ); @@ -68,4 +76,5 @@ private: RigEclipseCaseData* m_data; std::map>> m_dataAccess; + std::map*> m_nncData; }; diff --git a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.cpp b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.cpp index 1e4210bbd1..260b7bf7a4 100644 --- a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.cpp +++ b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.cpp @@ -20,6 +20,8 @@ #include "RigCell.h" #include "RigMainGrid.h" +#include "RigNNCData.h" +#include "RigNncConnection.h" #include "RimStreamline.h" #include "RimStreamlineDataAccess.h" @@ -32,18 +34,22 @@ class StreamlineSeedPoint { public: - StreamlineSeedPoint( double rate, size_t cellIdx, cvf::StructGridInterface::FaceType faceIdx ) + StreamlineSeedPoint( double rate, size_t index, RimStreamlineGenerator::CellFaceType faceIdx ) : m_rate( rate ) - , m_cellIdx( cellIdx ) + , m_index( index ) , m_faceIdx( faceIdx ){}; ~StreamlineSeedPoint(){}; - bool operator<( const StreamlineSeedPoint& other ) const { return m_rate < other.m_rate; }; + bool operator<( const StreamlineSeedPoint& other ) const { return rate() < other.rate(); }; -public: - double m_rate; - size_t m_cellIdx; - cvf::StructGridInterface::FaceType m_faceIdx; + double rate() const { return m_rate; }; + size_t index() const { return m_index; }; + RimStreamlineGenerator::CellFaceType face() const { return m_faceIdx; }; + +private: + double m_rate; + size_t m_index; + RimStreamlineGenerator::CellFaceType m_faceIdx; }; //-------------------------------------------------------------------------------------------------- @@ -77,19 +83,27 @@ void RimStreamlineGenerator::generateTracer( RigCell cell, double direction, QSt double rate = m_dataAccess->combinedFaceRate( cell, faceIdx, m_phases, direction, dominantPhase ) * direction; if ( rate > m_flowThreshold ) { - m_seeds.push( StreamlineSeedPoint( rate, cellIdx, faceIdx ) ); + m_seeds.emplace( rate, cellIdx, faceIdx ); } } + // add any nnc connections from this cell, too + auto nncSeeds = nncCandidates( cell.mainGridCellIndex(), m_phases, direction ); + for ( auto& seed : nncSeeds ) + { + m_seeds.push( seed ); + } + + // keep adding streamlines until we have no more seeds left in our prioritized (by flow rate) list while ( !m_seeds.empty() ) { - const size_t cellIdx = m_seeds.top().m_cellIdx; - const cvf::StructGridInterface::FaceType faceIdx = m_seeds.top().m_faceIdx; + auto& seed = m_seeds.top(); + const size_t index = seed.index(); + const cvf::StructGridInterface::FaceType faceIdx = seed.face(); m_seeds.pop(); RimStreamline* streamline = new RimStreamline( simWellName ); - - growStreamline( streamline, cellIdx, faceIdx, direction ); + growStreamline( streamline, index, faceIdx, direction ); if ( direction < 0.0 ) streamline->reverse(); @@ -105,42 +119,86 @@ void RimStreamlineGenerator::generateTracer( RigCell cell, double direction, QSt //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimStreamlineGenerator::growStreamline( RimStreamline* streamline, size_t cellIdx, cvf::StructGridInterface::FaceType faceIdx, double direction ) +void RimStreamlineGenerator::growStreamline( RimStreamline* streamline, size_t index, CellFaceType faceIdx, double direction ) { - // get the cell - RigCell cell = m_dataAccess->grid()->cell( cellIdx ); - - // get rate + double rate = 0.0; RiaDefines::PhaseType dominantPhaseOut; + size_t currentCellIdx = 0; + RigCell currentCell; - double rate = m_dataAccess->combinedFaceRate( cell, faceIdx, m_phases, direction, dominantPhaseOut ); - - // if we go backwards from a producer, the rate needs to be flipped - rate *= direction; - - // grow from start cell center to face center, exiting if we reach the max length - if ( !growStreamlineFromTo( streamline, cell.center(), cell.faceCenter( faceIdx ), rate, dominantPhaseOut ) ) return; - - while ( rate >= m_flowThreshold ) + while ( true ) { - // find next cell and entry face - cell = cell.neighborCell( faceIdx ); - if ( cell.isInvalid() ) break; - faceIdx = cvf::StructGridInterface::oppositeFace( faceIdx ); + // no face? -> nnc connection + if ( faceIdx == CellFaceType::NO_FACE ) + { + const auto nncIdx = index; + RigConnection nnc = m_dataAccess->nncConnection( nncIdx ); - // grow from given face center to cell center, exiting if we reach the max length - if ( !growStreamlineFromTo( streamline, cell.faceCenter( faceIdx ), cell.center(), rate, dominantPhaseOut ) ) break; + size_t localCellIdx1 = 0; + auto localGrid1 = m_dataAccess->grid()->gridAndGridLocalIdxFromGlobalCellIdx( nnc.c1GlobIdx(), &localCellIdx1 ); + size_t localCellIdx2 = 0; + auto localGrid2 = m_dataAccess->grid()->gridAndGridLocalIdxFromGlobalCellIdx( nnc.c2GlobIdx(), &localCellIdx2 ); - const size_t cellIdx = cell.gridLocalCellIndex(); + // no support for LGRs, yet + if ( localGrid1->gridId() != 0 ) return; + if ( localGrid2->gridId() != 0 ) return; - if ( m_visitedCells.count( cellIdx ) > 0 ) break; - if ( m_wellCells.count( cellIdx ) > 0 ) break; + RigCell cell1 = m_dataAccess->grid()->cell( localCellIdx1 ); + RigCell cell2 = m_dataAccess->grid()->cell( localCellIdx2 ); - m_visitedCells.insert( cellIdx ); + // get rate + rate = m_dataAccess->combinedNNCRate( nncIdx, m_phases, direction, dominantPhaseOut ); + // if we go backwards from a producer, the rate needs to be flipped + rate *= direction; + + // grow from cell1 center to cell2 center, exiting if we reach max length + if ( !growStreamlineFromTo( streamline, cell1.center(), cell2.center(), rate, dominantPhaseOut ) ) return; + + // give up if too low rate + if ( rate < m_flowThreshold ) return; + + currentCellIdx = localCellIdx2; + currentCell = cell2; + } + else + { + // get the current cell + const auto cellIdx = index; + RigCell cell = m_dataAccess->grid()->cell( cellIdx ); + + // get rate + rate = m_dataAccess->combinedFaceRate( cell, faceIdx, m_phases, direction, dominantPhaseOut ); + + // if we go backwards from a producer, the rate needs to be flipped + rate *= direction; + + // grow from start cell center to face center, exiting if we reach the max length + if ( !growStreamlineFromTo( streamline, cell.center(), cell.faceCenter( faceIdx ), rate, dominantPhaseOut ) ) return; + + // find next cell and entry face + currentCell = cell.neighborCell( faceIdx ); + if ( currentCell.isInvalid() ) return; + faceIdx = cvf::StructGridInterface::oppositeFace( faceIdx ); + + // grow from given face center to neighbour cell center, exiting if we reach the max length + if ( !growStreamlineFromTo( streamline, currentCell.faceCenter( faceIdx ), currentCell.center(), rate, dominantPhaseOut ) ) + break; + + // give up if too low rate + if ( rate < m_flowThreshold ) return; + + currentCellIdx = currentCell.gridLocalCellIndex(); + } + + // have we been here before? + if ( m_visitedCells.count( currentCellIdx ) > 0 ) return; + if ( m_wellCells.count( currentCellIdx ) > 0 ) return; + + m_visitedCells.insert( currentCellIdx ); // find the face with max flow where we should exit the cell - cvf::StructGridInterface::FaceType exitFace = cvf::StructGridInterface::FaceType::NO_FACE; - std::map rateMap; + CellFaceType exitFace = cvf::StructGridInterface::FaceType::NO_FACE; + std::map rateMap; double maxRate = 0.0; @@ -150,7 +208,7 @@ void RimStreamlineGenerator::growStreamline( RimStreamline* streamline, size_t c if ( face == faceIdx ) continue; RiaDefines::PhaseType tempDominantFace; - double faceRate = m_dataAccess->combinedFaceRate( cell, face, m_phases, direction, tempDominantFace ); + double faceRate = m_dataAccess->combinedFaceRate( currentCell, face, m_phases, direction, tempDominantFace ); // if we go backwards from a producer, the rate needs to be flipped faceRate *= direction; @@ -160,27 +218,51 @@ void RimStreamlineGenerator::growStreamline( RimStreamline* streamline, size_t c exitFace = face; maxRate = faceRate; dominantPhaseOut = tempDominantFace; + index = currentCellIdx; } rateMap[face] = faceRate; } + // check if we have any NNC connections here + int nncId = -1; + auto nncConnections = nncCandidates( currentCellIdx, m_phases, direction ); + for ( auto& nncPoint : nncConnections ) + { + RiaDefines::PhaseType tempDominantFace; + double nncRate = m_dataAccess->combinedNNCRate( nncPoint.index(), m_phases, direction, tempDominantFace ) * direction; + if ( nncRate > maxRate ) + { + nncId = (int)nncPoint.index(); + maxRate = nncRate; + dominantPhaseOut = tempDominantFace; + exitFace = CellFaceType::NO_FACE; + } + } + // did we find an exit? - if ( exitFace == cvf::StructGridInterface::FaceType::NO_FACE ) break; + if ( exitFace == cvf::StructGridInterface::FaceType::NO_FACE ) + { + if ( nncId < 0 ) return; + index = (size_t)nncId; + + for ( auto& nncPoint : nncConnections ) + { + if ( nncPoint.index() == index ) continue; + m_seeds.push( nncPoint ); + } + } // add seeds for other faces with flow > threshold for ( auto& kvp : rateMap ) { if ( kvp.first == exitFace ) continue; - if ( kvp.second >= m_flowThreshold ) m_seeds.push( StreamlineSeedPoint( kvp.second, cell.gridLocalCellIndex(), kvp.first ) ); + if ( kvp.second >= m_flowThreshold ) + m_seeds.push( StreamlineSeedPoint( kvp.second, currentCell.gridLocalCellIndex(), kvp.first ) ); } - rate = maxRate; - - // grow from cell center to exit face center, stopping if we reach the max point limit - if ( !growStreamlineFromTo( streamline, cell.center(), cell.faceCenter( exitFace ), rate, dominantPhaseOut ) ) break; - + rate = maxRate; faceIdx = exitFace; } } @@ -218,3 +300,31 @@ bool RimStreamlineGenerator::growStreamlineFromTo( RimStreamline* streaml return true; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::list RimStreamlineGenerator::nncCandidates( size_t cellIdx, std::list phases, double direction ) +{ + std::list foundCells; + + auto mainGrid = m_dataAccess->grid(); + + if ( mainGrid->nncData() == nullptr ) return foundCells; + + auto& connections = mainGrid->nncData()->allConnections(); + for ( size_t i = 0; i < connections.size(); i++ ) + { + if ( connections[i].c1GlobIdx() == cellIdx ) + { + RiaDefines::PhaseType domPhase; + double rate = m_dataAccess->combinedNNCRate( i, phases, direction, domPhase ) * direction; + if ( rate > m_flowThreshold ) + { + foundCells.emplace_back( rate, i, cvf::StructGridInterface::FaceType::NO_FACE ); + } + } + } + + return foundCells; +} diff --git a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.h b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.h index d556015f48..c89ffbff18 100644 --- a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.h +++ b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineGenerator.h @@ -27,6 +27,7 @@ #include #include #include +#include class RigCell; class RimStreamline; @@ -34,6 +35,9 @@ class StreamlineSeedPoint; class RimStreamlineGenerator : public RimStreamlineGeneratorBase { +public: + using CellFaceType = cvf::StructGridInterface::FaceType; + public: RimStreamlineGenerator( std::set& wellCells ); ~RimStreamlineGenerator(); @@ -41,9 +45,11 @@ public: void generateTracer( RigCell cell, double direction, QString simWellName, std::list& outStreamlines ) override; protected: - void growStreamline( RimStreamline* streamline, size_t cellIdx, cvf::StructGridInterface::FaceType faceIdx, double direction ); + void growStreamline( RimStreamline* streamline, size_t index, CellFaceType faceIdx, double direction ); bool growStreamlineFromTo( RimStreamline* streamline, cvf::Vec3d startPos, cvf::Vec3d endpos, double rate, RiaDefines::PhaseType dominantPhase ); + std::list nncCandidates( size_t cellIdx, std::list phases, double direction ); + std::priority_queue m_seeds; }; diff --git a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineInViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineInViewCollection.cpp index 2c0ba908fd..ae76798ce0 100644 --- a/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineInViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineInViewCollection.cpp @@ -436,6 +436,9 @@ void RimStreamlineInViewCollection::updateStreamlines() auto eclView = firstAncestorOrThisOfType(); if ( !eclView ) return; + auto mainGrid = eclView->mainGrid(); + if ( !mainGrid ) return; + if ( m_shouldGenerateTracers && isActive() ) { // reset generated streamlines @@ -452,8 +455,8 @@ void RimStreamlineInViewCollection::updateStreamlines() // set up the data access helper RimStreamlineDataAccess dataAccess; - bool accessOk = - dataAccess.setupDataAccess( eclipseCase()->eclipseCaseData()->mainGrid(), eclipseCase()->eclipseCaseData(), phases(), timeIdx ); + + bool accessOk = dataAccess.setupDataAccess( mainGrid, eclipseCase()->eclipseCaseData(), phases(), timeIdx ); // did we find the data we needed? if ( accessOk ) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Summary/CMakeLists_files.cmake index bd4be4102e..e482069563 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Summary/CMakeLists_files.cmake @@ -54,6 +54,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimSummaryAddressSelector.h ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleCrossPlotStatisticsCase.h ${CMAKE_CURRENT_LIST_DIR}/RimSummaryEnsembleTools.h + ${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotReadOut.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -112,18 +113,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimSummaryAddressSelector.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleCrossPlotStatisticsCase.cpp ${CMAKE_CURRENT_LIST_DIR}/RimSummaryEnsembleTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotReadOut.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotManager.h -) - -source_group( - "ProjectDataModel\\Summary" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.cpp index 3137395d92..eb72f6ca21 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.cpp @@ -18,16 +18,18 @@ #include "RiaQDateTimeTools.h" +#include "Summary/RiaSummaryTools.h" + #include "SummaryPlotCommands/RicNewDerivedEnsembleFeature.h" +#include "RifSummaryReaderInterface.h" + #include "RimDeltaSummaryCase.h" #include "RimDeltaSummaryEnsemble.h" #include "RimProject.h" #include "RimSummaryCaseMainCollection.h" #include "RimSummaryEnsemble.h" -#include "RifSummaryReaderInterface.h" - #include "cafPdmUiCheckBoxEditor.h" #include "cafPdmUiPushButtonEditor.h" #include "cafPdmUiTreeSelectionEditor.h" @@ -87,7 +89,7 @@ RimDeltaSummaryEnsemble::RimDeltaSummaryEnsemble() m_fixedTimeStepIndex.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() ); m_fixedTimeStepIndex.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); - setName( "Delta Ensemble" ); + setNameTemplate( "Delta Ensemble" ); setAsEnsemble( true ); @@ -107,7 +109,8 @@ RimDeltaSummaryEnsemble::~RimDeltaSummaryEnsemble() void RimDeltaSummaryEnsemble::setEnsemble1( RimSummaryEnsemble* ensemble ) { m_ensemble1 = ensemble; - updateAutoName(); + + RiaSummaryTools::updateSummaryEnsembleNames(); } //-------------------------------------------------------------------------------------------------- @@ -116,7 +119,8 @@ void RimDeltaSummaryEnsemble::setEnsemble1( RimSummaryEnsemble* ensemble ) void RimDeltaSummaryEnsemble::setEnsemble2( RimSummaryEnsemble* ensemble ) { m_ensemble2 = ensemble; - updateAutoName(); + + RiaSummaryTools::updateSummaryEnsembleNames(); } //-------------------------------------------------------------------------------------------------- @@ -211,6 +215,35 @@ bool RimDeltaSummaryEnsemble::discardMissingOrIncompleteRealizations() const return m_discardMissingOrIncompleteRealizations(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RimDeltaSummaryEnsemble::nameKeys() const +{ + QString nameCase1 = "None"; + + if ( m_ensemble1 ) + { + nameCase1 = m_ensemble1->name(); + } + + QString nameCase2 = "None"; + if ( m_ensemble2 ) + { + nameCase2 = m_ensemble2->name(); + } + + return std::make_pair( nameCase1.toStdString(), nameCase2.toStdString() ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimDeltaSummaryEnsemble::nameTemplateText() const +{ + return "Delta: " + RiaDefines::key1VariableName() + " - " + RiaDefines::key2VariableName(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -242,7 +275,6 @@ void RimDeltaSummaryEnsemble::onLoadDataAndUpdate() { updateDerivedEnsembleCases(); updateReferringCurveSets(); - updateAutoName(); updateConnectedEditors(); } @@ -299,26 +331,27 @@ QList RimDeltaSummaryEnsemble::calculateValueOptions( co //-------------------------------------------------------------------------------------------------- void RimDeltaSummaryEnsemble::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { - RimSummaryEnsemble::defineUiOrdering( uiConfigName, uiOrdering ); + auto nameGroup = uiOrdering.addNewGroup( "Name" ); + RimSummaryEnsemble::defineUiOrdering( uiConfigName, *nameGroup ); - uiOrdering.add( &m_caseCount ); - uiOrdering.add( &m_ensemble1 ); - uiOrdering.add( &m_operator ); - uiOrdering.add( &m_ensemble2 ); - uiOrdering.add( &m_swapEnsemblesButton ); + auto caseGroup = uiOrdering.addNewGroup( "Delta Configuration" ); + caseGroup->add( &m_caseCount ); + caseGroup->add( &m_ensemble1 ); + caseGroup->add( &m_operator ); + caseGroup->add( &m_ensemble2 ); + caseGroup->add( &m_swapEnsemblesButton ); - uiOrdering.add( &m_useFixedTimeStep ); + caseGroup->add( &m_useFixedTimeStep ); if ( m_useFixedTimeStep() != RimDeltaSummaryEnsemble::FixedTimeStepMode::FIXED_TIME_STEP_NONE ) { - uiOrdering.add( &m_fixedTimeStepIndex ); + caseGroup->add( &m_fixedTimeStepIndex ); } - uiOrdering.add( &m_matchOnParameters ); - uiOrdering.add( &m_discardMissingOrIncompleteRealizations ); + caseGroup->add( &m_matchOnParameters ); + caseGroup->add( &m_discardMissingOrIncompleteRealizations ); uiOrdering.skipRemainingFields( true ); - updateAutoName(); if ( !isValid() ) m_caseCount = ""; } @@ -358,7 +391,7 @@ void RimDeltaSummaryEnsemble::fieldChangedByUi( const caf::PdmFieldHandle* chang if ( doUpdate ) { - updateAutoName(); + RiaSummaryTools::updateSummaryEnsembleNames(); if ( doUpdateCases ) { @@ -472,74 +505,6 @@ std::vector RimDeltaSummaryEnsemble::allDerivedCases( bool return activeCases; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimDeltaSummaryEnsemble::updateAutoName() -{ - QString timeStepString; - { - RimSummaryEnsemble* sourceEnsemble = nullptr; - if ( m_useFixedTimeStep() == FixedTimeStepMode::FIXED_TIME_STEP_CASE_1 ) - { - sourceEnsemble = m_ensemble1; - } - else if ( m_useFixedTimeStep() == FixedTimeStepMode::FIXED_TIME_STEP_CASE_2 ) - { - sourceEnsemble = m_ensemble2; - } - - if ( sourceEnsemble && !sourceEnsemble->allSummaryCases().empty() ) - { - auto firstCase = sourceEnsemble->allSummaryCases().front(); - auto summaryReader = firstCase->summaryReader(); - if ( summaryReader ) - { - const std::vector& timeSteps = summaryReader->timeSteps( RifEclipseSummaryAddress() ); - if ( m_fixedTimeStepIndex >= 0 && m_fixedTimeStepIndex < static_cast( timeSteps.size() ) ) - { - time_t selectedTime = timeSteps[m_fixedTimeStepIndex]; - QDateTime dt = RiaQDateTimeTools::fromTime_t( selectedTime ); - QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { dt } ); - - timeStepString = RiaQDateTimeTools::toStringUsingApplicationLocale( dt, formatString ); - } - } - } - } - - QString nameCase1 = "None"; - - if ( m_ensemble1 ) - { - nameCase1 = m_ensemble1->name(); - if ( m_useFixedTimeStep() == FixedTimeStepMode::FIXED_TIME_STEP_CASE_1 ) nameCase1 += "@" + timeStepString; - } - - QString nameCase2 = "None"; - if ( m_ensemble2 ) - { - nameCase2 = m_ensemble2->name(); - if ( m_useFixedTimeStep() == FixedTimeStepMode::FIXED_TIME_STEP_CASE_2 ) nameCase2 += "@" + timeStepString; - } - - QString operatorText; - if ( m_operator() == DerivedSummaryOperator::DERIVED_OPERATOR_SUB ) - operatorText = "Delta"; - else if ( m_operator() == DerivedSummaryOperator::DERIVED_OPERATOR_ADD ) - operatorText = "Sum"; - - QString name = operatorText + QString( "(%1 , %2)" ).arg( nameCase1, nameCase2 ); - setName( name ); - - // If other derived ensembles are referring to this ensemble, update theirs name as well - for ( auto refering : findReferringEnsembles() ) - { - refering->updateAutoName(); - refering->updateConnectedEditors(); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -605,9 +570,9 @@ std::vector RimDeltaSummaryEnsemble::findReferringEnse auto mainColl = firstAncestorOrThisOfType(); if ( mainColl ) { - for ( auto group : mainColl->summaryCaseCollections() ) + for ( auto ensemble : mainColl->summaryEnsembles() ) { - auto derivedEnsemble = dynamic_cast( group ); + auto derivedEnsemble = dynamic_cast( ensemble ); if ( derivedEnsemble ) { if ( derivedEnsemble->m_ensemble1() == this || derivedEnsemble->m_ensemble2() == this ) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.h b/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.h index ca56819b75..a16a5e6425 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimDeltaSummaryEnsemble.h @@ -64,6 +64,9 @@ public: bool discardMissingOrIncompleteRealizations() const; + std::pair nameKeys() const override; + QString nameTemplateText() const override; + private: QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; @@ -74,7 +77,6 @@ private: void deleteCasesNoInUse(); RimDeltaSummaryCase* firstCaseNotInUse(); std::vector allDerivedCases( bool activeOnly ) const; - void updateAutoName(); void updateDerivedEnsembleCases(); bool isValid() const; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.cpp index 5eb3e07283..5c1cad3e44 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.cpp @@ -28,27 +28,32 @@ #include "RimEnsembleCurveSet.h" #include "RimObjectiveFunctionTools.h" #include "RimSummaryAddress.h" +#include "RimSummaryAddressSelector.h" #include "RimSummaryCase.h" #include "RimSummaryEnsemble.h" #include "RiuSummaryVectorSelectionDialog.h" +#include "cafCmdFeatureMenuBuilder.h" #include "cafPdmUiDoubleSliderEditor.h" #include "cafPdmUiLineEditor.h" #include "cafPdmUiPushButtonEditor.h" #include "cafPdmUiTreeSelectionEditor.h" -#include - namespace caf { template <> void caf::AppEnum::setUp() { - addItem( RimEnsembleCurveFilter::FilterMode::BY_ENSEMBLE_PARAMETER, "BY_ENSEMBLE_PARAMETER", "By Ensemble Parameter" ); - addItem( RimEnsembleCurveFilter::FilterMode::BY_OBJECTIVE_FUNCTION, "BY_OBJECTIVE_FUNCTION", "By Objective Function" ); - addItem( RimEnsembleCurveFilter::FilterMode::BY_CUSTOM_OBJECTIVE_FUNCTION, "By_CUSTOM_OBJECTIVE_FUNCTION", "By Custom Objective Function" ); - setDefault( RimEnsembleCurveFilter::FilterMode::BY_ENSEMBLE_PARAMETER ); + addItem( RimEnsembleCurveFilter::FilterMode::ENSEMBLE_PARAMETER, "ENSEMBLE_PARAMETER", "By Ensemble Parameter", { "BY_ENSEMBLE_PARAMETER" } ); + addItem( RimEnsembleCurveFilter::FilterMode::SUMMARY_VALUE, "SUMMARY_VALUE", "By Summary Value" ); + addItem( RimEnsembleCurveFilter::FilterMode::OBJECTIVE_FUNCTION, "OBJECTIVE_FUNCTION", "By Objective Function", { "BY_OBJECTIVE_FUNCTION" } ); + addItem( RimEnsembleCurveFilter::FilterMode::CUSTOM_OBJECTIVE_FUNCTION, + "CUSTOM_OBJECTIVE_FUNCTION", + "By Custom Objective Function", + { "By_CUSTOM_OBJECTIVE_FUNCTION" } ); + + setDefault( RimEnsembleCurveFilter::FilterMode::SUMMARY_VALUE ); } } // namespace caf @@ -109,6 +114,13 @@ RimEnsembleCurveFilter::RimEnsembleCurveFilter() CAF_PDM_InitFieldNoDefault( &m_realizationFilter, "RealizationFilter", "Realization Filter" ); + CAF_PDM_InitFieldNoDefault( &m_addressSelector, "AddressSelector", "" ); + m_addressSelector = new RimSummaryAddressSelector; + m_addressSelector->setShowDataSource( false ); + m_addressSelector->setShowResampling( false ); + m_addressSelector->setShowAxis( false ); + m_addressSelector.uiCapability()->setUiTreeChildrenHidden( true ); + setDeletable( true ); } @@ -186,7 +198,7 @@ QString RimEnsembleCurveFilter::filterId() const QString RimEnsembleCurveFilter::description() const { QString descriptor; - if ( m_filterMode() == FilterMode::BY_ENSEMBLE_PARAMETER ) + if ( m_filterMode() == FilterMode::ENSEMBLE_PARAMETER ) { if ( m_ensembleParameterName() == RiaDefines::summaryRealizationNumber() ) { @@ -195,7 +207,7 @@ QString RimEnsembleCurveFilter::description() const descriptor = QString( "%0" ).arg( m_ensembleParameterName() ); } - else if ( m_filterMode() == FilterMode::BY_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::OBJECTIVE_FUNCTION ) { std::vector addressVector; for ( RimSummaryAddress* address : m_objectiveValuesSummaryAddresses ) @@ -208,7 +220,7 @@ QString RimEnsembleCurveFilter::description() const .arg( QString::fromStdString( RifEclipseSummaryAddress::generateStringFromAddresses( addressVector, "+" ) ) ) .arg( addressVector.size() > 1 ? ")" : "" ); } - else if ( m_filterMode() == FilterMode::BY_CUSTOM_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::CUSTOM_OBJECTIVE_FUNCTION ) { if ( m_customObjectiveFunction() && m_customObjectiveFunction()->isValid() ) { @@ -219,7 +231,19 @@ QString RimEnsembleCurveFilter::description() const descriptor = "(Invalid Objective Function)"; } } - return QString( "%0 : %1 - %2" ).arg( descriptor ).arg( QString::number( m_minValue() ) ).arg( QString::number( m_maxValue() ) ); + else if ( m_filterMode() == FilterMode::SUMMARY_VALUE ) + { + auto adr = m_addressSelector->summaryAddress(); + descriptor = QString::fromStdString( adr.toEclipseTextAddress() ); + } + + char format = 'g'; + int precision = 2; + + return QString( "%0 : %1 - %2" ) + .arg( descriptor ) + .arg( QString::number( m_minValue(), format, precision ) ) + .arg( QString::number( m_maxValue(), format, precision ) ); } //-------------------------------------------------------------------------------------------------- @@ -246,9 +270,19 @@ void RimEnsembleCurveFilter::setSummaryAddresses( std::vectorsetAddress( address ); m_objectiveValuesSummaryAddresses.push_back( summaryAddress ); + + m_addressSelector->setAddress( address ); } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimEnsembleCurveFilter::FilterMode RimEnsembleCurveFilter::filterMode() const +{ + return m_filterMode(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -371,6 +405,7 @@ void RimEnsembleCurveFilter::fieldChangedByUi( const caf::PdmFieldHandle* change if ( curveSet ) { curveSet->updateAllCurves(); + curveSet->onFilterChanged(); curveSet->filterCollection()->updateConnectedEditors(); } } @@ -425,17 +460,29 @@ caf::PdmFieldHandle* RimEnsembleCurveFilter::userDescriptionField() void RimEnsembleCurveFilter::updateIcon() { QString resourceString; - if ( m_filterMode() == FilterMode::BY_ENSEMBLE_PARAMETER ) + if ( m_filterMode() == FilterMode::ENSEMBLE_PARAMETER ) { resourceString = ":/FilterParameter.svg"; } - else if ( m_filterMode() == FilterMode::BY_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::OBJECTIVE_FUNCTION ) { resourceString = ":/FilterFunction.svg"; } setUiIconFromResourceString( resourceString ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveFilter::updateCurves() +{ + if ( auto curveSet = parentCurveSet() ) + { + curveSet->updateAllCurves(); + curveSet->updateFilterLegend(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -447,11 +494,11 @@ void RimEnsembleCurveFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiO uiOrdering.add( &m_filterMode ); - if ( m_filterMode() == FilterMode::BY_ENSEMBLE_PARAMETER ) + if ( m_filterMode() == FilterMode::ENSEMBLE_PARAMETER ) { uiOrdering.add( &m_ensembleParameterName ); } - else if ( m_filterMode() == FilterMode::BY_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::OBJECTIVE_FUNCTION ) { uiOrdering.add( &m_objectiveValuesSummaryAddressesUiField ); uiOrdering.add( &m_objectiveValuesSelectSummaryAddressPushButton, { .newRow = false, .totalColumnSpan = 1, .leftLabelColumnSpan = 0 } ); @@ -462,16 +509,24 @@ void RimEnsembleCurveFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiO uiOrdering.add( &m_objectiveFunction ); } - else if ( m_filterMode() == FilterMode::BY_CUSTOM_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::CUSTOM_OBJECTIVE_FUNCTION ) { uiOrdering.add( &m_customObjectiveFunction ); } + else if ( m_filterMode() == FilterMode::SUMMARY_VALUE ) + { + if ( auto curveSet = parentCurveSet() ) + { + m_addressSelector->setEnsemble( curveSet->summaryEnsemble() ); + } + m_addressSelector->uiOrdering( uiConfigName, uiOrdering ); + } if ( m_ensembleParameterName() == RiaDefines::summaryRealizationNumber() ) { uiOrdering.add( &m_realizationFilter ); } - else if ( eParam.isNumeric() ) + else if ( eParam.isNumeric() || m_filterMode() == FilterMode::SUMMARY_VALUE ) { uiOrdering.add( &m_minValue ); uiOrdering.add( &m_maxValue ); @@ -491,21 +546,18 @@ void RimEnsembleCurveFilter::defineEditorAttribute( const caf::PdmFieldHandle* f { if ( field == &m_minValue || field == &m_maxValue ) { - caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast( attribute ); - if ( !myAttr ) + if ( auto attr = dynamic_cast( attribute ) ) { - return; + attr->m_minimum = m_lowerLimit; + attr->m_maximum = m_upperLimit; + attr->m_decimals = 2; } - - myAttr->m_minimum = m_lowerLimit; - myAttr->m_maximum = m_upperLimit; } else if ( field == &m_objectiveValuesSelectSummaryAddressPushButton ) { - caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast( attribute ); - if ( attrib ) + if ( auto attr = dynamic_cast( attribute ) ) { - attrib->m_buttonText = "..."; + attr->m_buttonText = "..."; } } } @@ -535,7 +587,7 @@ std::vector RimEnsembleCurveFilter::applyFilter( const std::vec std::set casesToRemove; for ( const auto& sumCase : allSumCases ) { - if ( m_filterMode() == FilterMode::BY_ENSEMBLE_PARAMETER ) + if ( m_filterMode() == FilterMode::ENSEMBLE_PARAMETER ) { auto eParam = ensemble->ensembleParameter( m_ensembleParameterName() ); if ( !eParam.isValid() ) continue; @@ -568,7 +620,7 @@ std::vector RimEnsembleCurveFilter::applyFilter( const std::vec } } } - else if ( m_filterMode() == FilterMode::BY_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::OBJECTIVE_FUNCTION ) { bool hasWarning = false; @@ -586,7 +638,7 @@ std::vector RimEnsembleCurveFilter::applyFilter( const std::vec casesToRemove.insert( sumCase ); } } - else if ( m_filterMode() == FilterMode::BY_CUSTOM_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::CUSTOM_OBJECTIVE_FUNCTION ) { if ( m_customObjectiveFunction() && m_customObjectiveFunction()->isValid() ) { @@ -597,15 +649,43 @@ std::vector RimEnsembleCurveFilter::applyFilter( const std::vec } } } + else if ( m_filterMode() == FilterMode::SUMMARY_VALUE ) + { + const auto [isValid, values] = sumCase->summaryReader()->values( m_addressSelector->summaryAddress() ); + + bool isInsideFilter = isValid; + + if ( isValid && !values.empty() ) + { + auto timeConfig = curveSet->objectiveFunctionTimeConfig(); + auto timeSteps = sumCase->summaryReader()->timeSteps( m_addressSelector->summaryAddress() ); + + for ( size_t i = 0; i < std::min( timeSteps.size(), values.size() ); i++ ) + { + if ( timeSteps[i] < timeConfig.m_startTimeStep || timeSteps[i] > timeConfig.m_endTimeStep ) continue; + + const double value = values[i]; + if ( value < m_minValue() || value > m_maxValue ) + { + isInsideFilter = false; + } + } + } + if ( !isInsideFilter ) + { + casesToRemove.insert( sumCase ); + } + } } std::vector filteredCases; - std::set allCasesSet( allSumCases.begin(), allSumCases.end() ); - std::set_difference( allCasesSet.begin(), - allCasesSet.end(), - casesToRemove.begin(), - casesToRemove.end(), - std::inserter( filteredCases, filteredCases.end() ) ); + for ( auto summaryCase : allSumCases ) + { + if ( !casesToRemove.contains( summaryCase ) ) + { + filteredCases.push_back( summaryCase ); + } + } return filteredCases; } @@ -616,6 +696,7 @@ void RimEnsembleCurveFilter::loadDataAndUpdate() { updateAddressesUiField(); updateMaxMinAndDefaultValues( false ); + updateCurves(); } //-------------------------------------------------------------------------------------------------- @@ -626,6 +707,26 @@ caf::PdmFieldHandle* RimEnsembleCurveFilter::objectToggleField() return &m_active; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveFilter::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) +{ + updateMaxMinAndDefaultValues( true ); + updateCurves(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveFilter::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const +{ + if ( isActive() ) + { + menuBuilder << "RicCreateEnsembleFromFilteredCasesFeature"; + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -639,10 +740,8 @@ RimEnsembleCurveSet* RimEnsembleCurveFilter::parentCurveSet() const //-------------------------------------------------------------------------------------------------- void RimEnsembleCurveFilter::onObjectionFunctionChanged( const caf::SignalEmitter* emitter ) { - updateMaxMinAndDefaultValues( true ); - - parentCurveSet()->updateAllCurves(); - parentCurveSet()->updateFilterLegend(); + updateMaxMinAndDefaultValues( false ); + updateCurves(); } //-------------------------------------------------------------------------------------------------- @@ -666,7 +765,7 @@ RimEnsembleCurveFilterCollection* RimEnsembleCurveFilter::parentCurveFilterColle //-------------------------------------------------------------------------------------------------- void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault ) { - if ( m_filterMode() == FilterMode::BY_ENSEMBLE_PARAMETER ) + if ( m_filterMode() == FilterMode::ENSEMBLE_PARAMETER ) { if ( !selectedEnsembleParameter().isValid() ) { @@ -703,7 +802,7 @@ void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault ) } } } - else if ( m_filterMode() == FilterMode::BY_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::OBJECTIVE_FUNCTION ) { auto objectiveFunction = m_objectiveFunction(); std::vector addresses; @@ -727,7 +826,7 @@ void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault ) m_maxValue.uiCapability()->setUiName( QString( "Max (%1)" ).arg( m_upperLimit ) ); } } - else if ( m_filterMode() == FilterMode::BY_CUSTOM_OBJECTIVE_FUNCTION ) + else if ( m_filterMode() == FilterMode::CUSTOM_OBJECTIVE_FUNCTION ) { if ( m_customObjectiveFunction() && m_customObjectiveFunction()->isValid() ) { @@ -739,6 +838,23 @@ void RimEnsembleCurveFilter::updateMaxMinAndDefaultValues( bool forceDefault ) if ( forceDefault || m_minValue < m_lowerLimit || m_minValue > m_upperLimit ) m_minValue = m_lowerLimit; if ( forceDefault || m_maxValue < m_lowerLimit || m_maxValue > m_upperLimit ) m_maxValue = m_upperLimit; + m_minValue.uiCapability()->setUiName( QString( "Min (%1)" ).arg( m_lowerLimit ) ); + m_maxValue.uiCapability()->setUiName( QString( "Max (%1)" ).arg( m_upperLimit ) ); + } + } + else if ( m_filterMode() == FilterMode::SUMMARY_VALUE ) + { + if ( parentCurveSet() && parentCurveSet()->summaryEnsemble() ) + { + auto ensemble = parentCurveSet()->summaryEnsemble(); + + auto minMaxValues = ensemble->minMax( m_addressSelector->summaryAddress() ); + m_lowerLimit = minMaxValues.first; + m_upperLimit = minMaxValues.second; + + if ( forceDefault || m_minValue < m_lowerLimit || m_minValue > m_upperLimit ) m_minValue = m_lowerLimit; + if ( forceDefault || m_maxValue < m_lowerLimit || m_maxValue > m_upperLimit ) m_maxValue = m_upperLimit; + m_minValue.uiCapability()->setUiName( QString( "Min (%1)" ).arg( m_lowerLimit ) ); m_maxValue.uiCapability()->setUiName( QString( "Max (%1)" ).arg( m_upperLimit ) ); } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.h b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.h index cddc4ea4d3..b77edd0889 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilter.h @@ -18,8 +18,6 @@ #pragma once -#include "RimObjectiveFunction.h" - #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" #include "cafPdmField.h" @@ -27,6 +25,7 @@ #include "cafPdmProxyValueField.h" #include "cafPdmPtrField.h" +class RifEclipseSummaryAddress; class RigEnsembleParameter; class RimEnsembleCurveSet; class RimSummaryCase; @@ -34,6 +33,8 @@ class RimSummaryAddress; class RimSummaryPlot; class RimEnsembleCurveFilterCollection; class RimCustomObjectiveFunction; +class RimSummaryAddressSelector; +class RimObjectiveFunction; //================================================================================================== /// @@ -45,9 +46,10 @@ class RimEnsembleCurveFilter : public caf::PdmObject public: enum class FilterMode { - BY_ENSEMBLE_PARAMETER = 0, - BY_OBJECTIVE_FUNCTION, - BY_CUSTOM_OBJECTIVE_FUNCTION + ENSEMBLE_PARAMETER, + OBJECTIVE_FUNCTION, + CUSTOM_OBJECTIVE_FUNCTION, + SUMMARY_VALUE }; RimEnsembleCurveFilter(); @@ -63,32 +65,36 @@ public: QString description() const; std::vector summaryAddresses() const; void setSummaryAddresses( std::vector addresses ); - - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; - void updateAddressesUiField(); - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; - caf::PdmFieldHandle* userDescriptionField() override; - void updateIcon(); - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + FilterMode filterMode() const; + RigEnsembleParameter selectedEnsembleParameter() const; std::vector applyFilter( const std::vector& allSumCases ); - void loadDataAndUpdate(); - RigEnsembleParameter selectedEnsembleParameter() const; - RimEnsembleCurveSet* parentCurveSet() const; - void onObjectionFunctionChanged( const caf::SignalEmitter* emitter ); void updateMaxMinAndDefaultValuesFromParent(); -protected: - caf::PdmFieldHandle* objectToggleField() override; + void loadDataAndUpdate(); + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; private: + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + caf::PdmFieldHandle* userDescriptionField() override; + caf::PdmFieldHandle* objectToggleField() override; + void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override; + void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override; + + void onObjectionFunctionChanged( const caf::SignalEmitter* emitter ); + RimEnsembleCurveFilterCollection* parentCurveFilterCollection() const; void updateMaxMinAndDefaultValues( bool forceDefault ); + void updateAddressesUiField(); + void updateIcon(); + void updateCurves(); + private: caf::PdmProxyValueField m_filterTitle; caf::PdmField m_active; @@ -101,6 +107,8 @@ private: caf::PdmChildField m_objectiveFunction; caf::PdmPtrField m_customObjectiveFunction; + caf::PdmChildField m_addressSelector; + caf::PdmField m_minValue; caf::PdmField m_maxValue; caf::PdmField> m_categories; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilterCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilterCollection.cpp index dd8ea5da0e..46bd7ada16 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilterCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveFilterCollection.cpp @@ -242,18 +242,9 @@ QString RimEnsembleCurveFilterCollection::filterDescriptions() const RiuTextContentFrame* RimEnsembleCurveFilterCollection::makeFilterDescriptionFrame() const { QString descriptions = filterDescriptions(); - descriptions.replace( "+", "\n+" ); // A size of -1 use default plot font int fontSize = -1; - - auto plotWindow = firstAncestorOrThisOfType(); - if ( plotWindow ) - { - const double scalingFactor = 1.4; - fontSize = scalingFactor * plotWindow->fontSize(); - } - return new RiuTextContentFrame( nullptr, QString( "Active curve filters:" ), descriptions, fontSize ); } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp index 880da03297..33062d9861 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp @@ -25,10 +25,9 @@ #include "RiaQDateTimeTools.h" #include "RiaResultNames.h" #include "RiaTimeTTools.h" -#include "Summary/RiaSummaryAddressAnalyzer.h" #include "Summary/RiaSummaryCurveDefinition.h" +#include "Summary/RiaSummaryPlotTools.h" -#include "RimSummaryCalculationCollection.h" #include "SummaryPlotCommands/RicSummaryPlotEditorUi.h" #include "RimCustomObjectiveFunction.h" @@ -48,7 +47,6 @@ #include "RimRegularLegendConfig.h" #include "RimSummaryAddress.h" #include "RimSummaryAddressSelector.h" -#include "RimSummaryCalculationCollection.h" #include "RimSummaryCase.h" #include "RimSummaryCurve.h" #include "RimSummaryCurveAutoName.h" @@ -66,6 +64,7 @@ #include "RiuSummaryVectorSelectionDialog.h" #include "RiuTextContentFrame.h" +#include "cafCmdFeatureMenuBuilder.h" #include "cafPdmObject.h" #include "cafPdmUiColorEditor.h" #include "cafPdmUiDateEditor.h" @@ -77,7 +76,6 @@ #include "cafPdmUiTreeAttributes.h" #include "cafPdmUiTreeOrdering.h" #include "cafPdmUiTreeSelectionEditor.h" -#include "cafTitledOverlayFrame.h" #include #include @@ -112,6 +110,25 @@ int statisticsCurveSymbolSize( RiuPlotCurveSymbo CAF_PDM_SOURCE_INIT( RimEnsembleCurveSet, "RimEnsembleCurveSet" ); +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveSet::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const +{ + if ( isFiltered() ) + { + menuBuilder << "RicCreateEnsembleFromFilteredCasesFeature"; + } + + menuBuilder << "RicNewSummaryEnsembleCurveSetFeature"; + menuBuilder << "Separator"; + menuBuilder << "RicSetSourceSteppingEnsembleCurveSetFeature"; + menuBuilder << "RicClearSourceSteppingEnsembleCurveSetFeature"; + menuBuilder << "Separator"; + menuBuilder << "RicNewEnsembleCurveFilterFeature"; + menuBuilder << "RicCreateRegressionAnalysisCurveFeature"; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -124,6 +141,9 @@ RimEnsembleCurveSet::RimEnsembleCurveSet() CAF_PDM_InitFieldNoDefault( &m_curves, "EnsembleCurveSet", "Ensemble Curve Set" ); m_curves.uiCapability()->setUiTreeChildrenHidden( false ); + // The summary curves are always recreated in loadDataAndUpdate(), so we can disable IO for curves. This will reduce the size of the + // project files. + m_curves.xmlCapability()->disableIO(); CAF_PDM_InitField( &m_showCurves, "IsActive", true, "Show Curves" ); m_showCurves.uiCapability()->setUiHidden( true ); @@ -395,7 +415,15 @@ void RimEnsembleCurveSet::reattachPlotCurves() { for ( RimSummaryCurve* curve : m_curves ) { - curve->reattach(); + bool updateParentPlot = false; + curve->reattach( updateParentPlot ); + } + + if ( !m_curves.empty() ) + { + auto firstCurve = m_curves[0]; + + firstCurve->replotParentPlot(); } } @@ -494,6 +522,50 @@ std::pair RimEnsembleCurveSet::selectedTimeStepRange() const return { selectedMin, selectedMax }; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveSet::appendTimeGroup( caf::PdmUiOrdering& uiOrdering ) +{ + std::vector timeFields; + + if ( ( m_colorMode == ColorMode::BY_OBJECTIVE_FUNCTION && m_objectiveFunction()->functionType() == RimObjectiveFunction::FunctionType::F1 ) || + ( m_colorMode == ColorMode::BY_CUSTOM_OBJECTIVE_FUNCTION && m_customObjectiveFunction() && + m_customObjectiveFunction()->weightContainsFunctionType( RimObjectiveFunction::FunctionType::F1 ) ) ) + { + timeFields.push_back( &m_minDateRange ); + timeFields.push_back( &m_minTimeSliderPosition ); + timeFields.push_back( &m_maxDateRange ); + timeFields.push_back( &m_maxTimeSliderPosition ); + } + if ( m_objectiveFunction()->functionType() == RimObjectiveFunction::FunctionType::F2 || + ( m_customObjectiveFunction() && m_customObjectiveFunction()->weightContainsFunctionType( RimObjectiveFunction::FunctionType::F2 ) ) ) + { + timeFields.push_back( &m_timeStepFilter ); + timeFields.push_back( &m_selectedTimeSteps ); + } + + for ( auto filter : m_curveFilters->filters() ) + { + if ( filter->isActive() && filter->filterMode() == RimEnsembleCurveFilter::FilterMode::SUMMARY_VALUE ) + { + timeFields.push_back( &m_minDateRange ); + timeFields.push_back( &m_minTimeSliderPosition ); + timeFields.push_back( &m_maxDateRange ); + timeFields.push_back( &m_maxTimeSliderPosition ); + } + } + + if ( !timeFields.empty() ) + { + auto timeSelectionGroup = uiOrdering.addNewGroup( "Time Selection" ); + for ( auto field : timeFields ) + { + timeSelectionGroup->add( field ); + } + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -775,6 +847,15 @@ std::vector RimEnsembleCurveSet::selectedTimeSteps() const return selectedTimeTTimeSteps; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveSet::setDefaultTimeRange() +{ + m_minTimeSliderPosition = 90; + m_maxTimeSliderPosition = 100; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -801,6 +882,15 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi updateAllCurves(); + if ( auto multiPlot = firstAncestorOrThisOfType() ) + { + multiPlot->updatePlotTitles(); + } + else + { + plot->updatePlotTitle(); + } + updateTextInPlot = true; } else if ( changedField == &m_yValuesSummaryEnsemble ) @@ -896,8 +986,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi summaryAddress->setAddress( m_yValuesSummaryAddress->address() ); m_objectiveValuesSummaryAddresses.push_back( summaryAddress ); updateAddressesUiField(); - m_minTimeSliderPosition = 0; - m_maxTimeSliderPosition = 100; + setDefaultTimeRange(); updateMaxMinAndDefaultValues(); } } @@ -991,7 +1080,16 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi loadDataAndUpdate( true ); plot->updateAxes(); - plot->updatePlotTitle(); + + if ( auto multiPlot = firstAncestorOrThisOfType() ) + { + multiPlot->updatePlotTitles(); + } + else + { + plot->updatePlotTitle(); + } + plot->updateConnectedEditors(); RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow(); @@ -1044,9 +1142,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi setTimeSteps( indices ); } - m_minTimeSliderPosition = 0; - m_maxTimeSliderPosition = 100; - + setDefaultTimeRange(); updateLegendMappingMode(); updateCurveColors(); updateTimeAnnotations(); @@ -1091,15 +1187,13 @@ void RimEnsembleCurveSet::childFieldChangedByUi( const caf::PdmFieldHandle* chan // The recommended way to trigger update in a parent object is by using caf::Signal. Here we need to update two parent classes, and // they are multiple levels away. To avoid a long signal path that is hard to debug, we use firstAncestorOrThisOfType() - auto summaryPlot = firstAncestorOrThisOfType(); - if ( summaryPlot ) + if ( auto summaryPlot = firstAncestorOrThisOfType() ) { summaryPlot->updateAll(); summaryPlot->zoomAll(); } - auto multiPlot = firstAncestorOrThisOfType(); - if ( multiPlot ) + if ( auto multiPlot = firstAncestorOrThisOfType() ) { multiPlot->updatePlotTitles(); } @@ -1149,6 +1243,7 @@ void RimEnsembleCurveSet::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde } appendColorGroup( uiOrdering ); + appendTimeGroup( uiOrdering ); { caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Curve Name" ); @@ -1296,10 +1391,7 @@ void RimEnsembleCurveSet::onColorTagClicked( const SignalEmitter* emitter, size_ //-------------------------------------------------------------------------------------------------- void RimEnsembleCurveSet::onObjectiveFunctionChanged( const caf::SignalEmitter* emitter ) { - updateCurveColors(); - updateFilterLegend(); - updateObjectiveFunctionLegend(); - updateTimeAnnotations(); + onFilterChanged(); } //-------------------------------------------------------------------------------------------------- @@ -1345,28 +1437,6 @@ void RimEnsembleCurveSet::appendColorGroup( caf::PdmUiOrdering& uiOrdering ) colorsGroup->add( &m_customObjectiveFunction ); colorsGroup->add( &m_showObjectiveFunctionFormula ); } - - { - auto timeSelectionGroup = colorsGroup->addNewGroup( "Time Selection" ); - - if ( ( m_colorMode == ColorMode::BY_OBJECTIVE_FUNCTION && - m_objectiveFunction()->functionType() == RimObjectiveFunction::FunctionType::F1 ) || - ( m_colorMode == ColorMode::BY_CUSTOM_OBJECTIVE_FUNCTION && m_customObjectiveFunction() && - m_customObjectiveFunction()->weightContainsFunctionType( RimObjectiveFunction::FunctionType::F1 ) ) ) - { - timeSelectionGroup->add( &m_minDateRange ); - timeSelectionGroup->add( &m_minTimeSliderPosition ); - timeSelectionGroup->add( &m_maxDateRange ); - timeSelectionGroup->add( &m_maxTimeSliderPosition ); - } - if ( m_objectiveFunction()->functionType() == RimObjectiveFunction::FunctionType::F2 || - ( m_customObjectiveFunction() && - m_customObjectiveFunction()->weightContainsFunctionType( RimObjectiveFunction::FunctionType::F2 ) ) ) - { - timeSelectionGroup->add( &m_timeStepFilter ); - timeSelectionGroup->add( &m_selectedTimeSteps ); - } - } } colorsGroup->add( &m_useCustomAppearance ); @@ -1784,6 +1854,17 @@ void RimEnsembleCurveSet::updateObjectiveFunctionLegend() plot->scheduleReplotIfVisible(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEnsembleCurveSet::onFilterChanged() +{ + updateCurveColors(); + updateFilterLegend(); + updateObjectiveFunctionLegend(); + updateTimeAnnotations(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1985,25 +2066,44 @@ void RimEnsembleCurveSet::updateTimeAnnotations() auto plot = firstAncestorOrThisOfTypeAsserted(); plot->removeAllTimeAnnotations(); + bool showTimeRange = false; + bool showSelectedTimeSteps = false; + if ( ( m_colorMode() == ColorMode::BY_OBJECTIVE_FUNCTION && m_objectiveFunction()->functionType() == RimObjectiveFunction::FunctionType::F1 ) || ( m_colorMode() == ColorMode::BY_CUSTOM_OBJECTIVE_FUNCTION && m_customObjectiveFunction() && m_customObjectiveFunction()->weightContainsFunctionType( RimObjectiveFunction::FunctionType::F1 ) ) ) { - auto [minTimeStep, maxTimeStep] = selectedTimeStepRange(); - plot->addTimeRangeAnnotation( minTimeStep, maxTimeStep ); + showTimeRange = true; } if ( ( m_colorMode() == ColorMode::BY_OBJECTIVE_FUNCTION && m_objectiveFunction()->functionType() == RimObjectiveFunction::FunctionType::F2 ) || ( m_colorMode() == ColorMode::BY_CUSTOM_OBJECTIVE_FUNCTION && m_customObjectiveFunction() && m_customObjectiveFunction()->weightContainsFunctionType( RimObjectiveFunction::FunctionType::F2 ) ) ) + { + showSelectedTimeSteps = true; + } + + for ( auto filter : m_curveFilters->filters() ) + { + if ( filter->isActive() && filter->filterMode() == RimEnsembleCurveFilter::FilterMode::SUMMARY_VALUE ) showTimeRange = true; + } + + if ( showTimeRange ) + { + auto [minTimeStep, maxTimeStep] = selectedTimeStepRange(); + plot->addTimeRangeAnnotation( minTimeStep, maxTimeStep ); + } + + if ( showSelectedTimeSteps ) { for ( QDateTime timeStep : m_selectedTimeSteps() ) { plot->addTimeAnnotation( RiaTimeTTools::fromQDateTime( timeStep ) ); } } + plot->updateAxes(); } @@ -2041,6 +2141,29 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vectorplotWidget() ) + { + if ( plot->legendsVisible() ) plot->plotWidget()->updateLegend(); + plot->scheduleReplotIfVisible(); + plot->updateAxes(); + plot->updatePlotInfoLabel(); + + // Always recreate the plot curve for the legend text to ensure the ordering is correct + // The ordering of legend items depends on the order the curves are added to the plot + // + // https://github.com/OPM/ResInsight/issues/12259 + // + m_plotCurveForLegendText.reset( plot->plotWidget()->createPlotCurve( nullptr, "" ) ); + + int curveThickness = 3; + m_plotCurveForLegendText->setAppearance( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID, + RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT, + curveThickness, + RiaColorTools::toQColor( m_mainEnsembleColor() ) ); + m_plotCurveForLegendText->attachToPlot( plot->plotWidget() ); + updateEnsembleLegendItem(); + } + if ( m_statistics->hideEnsembleCurves() ) return; RimSummaryAddress* addr = m_yValuesSummaryAddress(); @@ -2052,9 +2175,7 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vectorsetSummaryCaseY( sumCase ); - curve->setSummaryAddressY( addr->address() ); + auto curve = RiaSummaryPlotTools::createCurve( sumCase, addr->address() ); curve->setResampling( m_resampling() ); int lineThickness = 1; @@ -2100,27 +2221,6 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vectorsetShowInLegend( false ); } } - - if ( plot->plotWidget() ) - { - if ( plot->legendsVisible() ) plot->plotWidget()->updateLegend(); - plot->scheduleReplotIfVisible(); - plot->updateAxes(); - plot->updatePlotInfoLabel(); - - if ( !m_plotCurveForLegendText ) - { - m_plotCurveForLegendText.reset( plot->plotWidget()->createPlotCurve( nullptr, "" ) ); - - int curveThickness = 3; - m_plotCurveForLegendText->setAppearance( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID, - RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT, - curveThickness, - RiaColorTools::toQColor( m_mainEnsembleColor() ) ); - } - m_plotCurveForLegendText->attachToPlot( plot->plotWidget() ); - updateEnsembleLegendItem(); - } } updateCurveColors(); } @@ -2176,8 +2276,8 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector RiaSummaryCurveAddress { - auto xStatAddress = SAddr::ensembleStatisticsAddress( statisticsVectorName, addrX.vectorName() ); - auto yStatAddress = SAddr::ensembleStatisticsAddress( statisticsVectorName, addrY.vectorName() ); + auto xStatAddress = SAddr::ensembleStatisticsAddress( statisticsVectorName, addrX.toEclipseTextAddress() ); + auto yStatAddress = SAddr::ensembleStatisticsAddress( statisticsVectorName, addrY.toEclipseTextAddress() ); return RiaSummaryCurveAddress( xStatAddress, yStatAddress ); }; @@ -2198,7 +2298,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector RiaSummaryCurveAddress { auto xStatAddress = RifEclipseSummaryAddress::timeAddress(); - auto yStatAddress = SAddr::ensembleStatisticsAddress( statisticsVectorName, addrY.vectorName() ); + auto yStatAddress = SAddr::ensembleStatisticsAddress( statisticsVectorName, addrY.toEclipseTextAddress() ); return RiaSummaryCurveAddress( xStatAddress, yStatAddress ); }; @@ -2228,7 +2328,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vectorsetParentPlotNoReplot( plot->plotWidget() ); m_curves.push_back( curve ); curve->setColor( m_statistics->color() ); @@ -2256,8 +2356,6 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vectorsetSymbolSize( m_statisticsSymbolSize() ); } - curve->setSummaryCaseY( summaryCase ); - curve->setSummaryAddressY( address.summaryAddressY() ); curve->setLeftOrRightAxisY( axisY() ); if ( isXAxisSummaryVector() ) @@ -2297,11 +2395,6 @@ RimEnsembleCurveSet* RimEnsembleCurveSet::clone() const auto copy = copyObject(); copy->setSummaryEnsemble( m_yValuesSummaryEnsemble() ); - // Update summary case references - for ( size_t i = 0; i < m_curves.size(); i++ ) - { - copy->m_curves[i]->setSummaryCaseY( m_curves[i]->summaryCaseY() ); - } return copy; } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.h b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.h index 755b838686..e686b57582 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.h @@ -19,8 +19,6 @@ #pragma once #include "RifEclipseSummaryAddress.h" -#include "RifEclipseSummaryAddressQMetaType.h" -#include "RifSummaryReaderInterface.h" #include "RiaDateTimeDefines.h" #include "RiaPlotDefines.h" @@ -41,8 +39,6 @@ #include "cafAppEnum.h" #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" -#include "cafPdmField.h" -#include "cafPdmFieldCvfColor.h" #include "cafPdmObject.h" #include "cafPdmProxyValueField.h" #include "cafPdmPtrField.h" @@ -155,6 +151,7 @@ public: RiuDraggableOverlayFrame* legendFrame() const; void setTimeSteps( const std::vector& timeStepIndices ); std::vector selectedTimeSteps() const; + void setDefaultTimeRange(); RimEnsembleCurveSet* clone() const; void showCurves( bool show ); @@ -186,6 +183,7 @@ public: void updateFilterLegend(); void updateObjectiveFunctionLegend(); + void onFilterChanged(); ObjectiveFunctionTimeConfig objectiveFunctionTimeConfig() const; @@ -246,6 +244,10 @@ private: std::pair fullTimeStepRange() const; std::pair selectedTimeStepRange() const; + void appendTimeGroup( caf::PdmUiOrdering& uiOrdering ); + + void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override; + private: caf::PdmField m_showCurves; caf::PdmChildArrayField m_curves; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSetCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSetCollection.cpp index 61fef7f43c..95f2a497b8 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSetCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSetCollection.cpp @@ -336,4 +336,5 @@ void RimEnsembleCurveSetCollection::onChildDeleted( caf::PdmChildArrayFieldHandl //-------------------------------------------------------------------------------------------------- void RimEnsembleCurveSetCollection::onCurveSetsReordered( const SignalEmitter* emitter ) { + loadDataAndUpdate( false ); } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleStatistics.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleStatistics.cpp index 7269078402..96c53f6ec4 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleStatistics.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleStatistics.cpp @@ -45,7 +45,7 @@ RimEnsembleStatistics::RimEnsembleStatistics( RimEnsembleCurveSetInterface* pare m_showEnsembleCurves.registerGetMethod( this, &RimEnsembleStatistics::onShowEnsembleCurves ); m_showEnsembleCurves.registerSetMethod( this, &RimEnsembleStatistics::onSetShowEnsembleCurves ); - CAF_PDM_InitField( &m_basedOnFilteredCases, "BasedOnFilteredCases", false, "Based on Filtered Cases" ); + CAF_PDM_InitField( &m_basedOnFilteredCases, "BasedOnFilteredCases", true, "Based on Filtered Cases" ); CAF_PDM_InitField( &m_showP10Curve, "ShowP10Curve", true, "P10" ); CAF_PDM_InitField( &m_showP50Curve, "ShowP50Curve", false, "P50" ); CAF_PDM_InitField( &m_showP90Curve, "ShowP90Curve", true, "P90" ); @@ -74,6 +74,8 @@ RimEnsembleStatistics::RimEnsembleStatistics( RimEnsembleCurveSetInterface* pare } m_showColorField = true; + + setNotifyAllFieldsInMultiFieldChangedEvents( true ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.cpp index 705dede726..0f8651aa44 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.cpp @@ -119,9 +119,17 @@ bool RimMultiSummaryPlotNameHelper::isSegmentInTitle() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimMultiSummaryPlotNameHelper::isCompletionInTitle() const +bool RimMultiSummaryPlotNameHelper::isWellCompletionInTitle() const { - return std::any_of( m_nameHelpers.begin(), m_nameHelpers.end(), []( auto nameHelper ) { return nameHelper->isCompletionInTitle(); } ); + return std::any_of( m_nameHelpers.begin(), m_nameHelpers.end(), []( auto nameHelper ) { return nameHelper->isWellCompletionInTitle(); } ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimMultiSummaryPlotNameHelper::isConnectionInTitle() const +{ + return std::any_of( m_nameHelpers.begin(), m_nameHelpers.end(), []( auto nameHelper ) { return nameHelper->isConnectionInTitle(); } ); } //-------------------------------------------------------------------------------------------------- @@ -247,11 +255,24 @@ std::string RimMultiSummaryPlotNameHelper::titleSegment() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::string RimMultiSummaryPlotNameHelper::titleCompletion() const +std::string RimMultiSummaryPlotNameHelper::titleWellCompletion() const { for ( auto nameHelper : m_nameHelpers ) { - if ( nameHelper->isCompletionInTitle() ) return nameHelper->titleCompletion(); + if ( nameHelper->isWellCompletionInTitle() ) return nameHelper->titleWellCompletion(); + } + + return ""; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RimMultiSummaryPlotNameHelper::titleConnection() const +{ + for ( auto nameHelper : m_nameHelpers ) + { + if ( nameHelper->isConnectionInTitle() ) return nameHelper->titleConnection(); } return ""; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.h b/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.h index 652f2cbd12..827ff80379 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimMultipleSummaryPlotNameHelper.h @@ -38,7 +38,8 @@ public: bool isCaseInTitle() const override; bool isBlockInTitle() const override; bool isSegmentInTitle() const override; - bool isCompletionInTitle() const override; + bool isWellCompletionInTitle() const override; + bool isConnectionInTitle() const override; std::vector vectorNames() const override; QString caseName() const override; @@ -50,7 +51,8 @@ public: std::string titleRegion() const override; std::string titleBlock() const override; std::string titleSegment() const override; - std::string titleCompletion() const override; + std::string titleWellCompletion() const override; + std::string titleConnection() const override; size_t numberOfCases() const override; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimRftCase.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimRftCase.cpp index fde3dcab5e..6e6b3c8022 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimRftCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimRftCase.cpp @@ -84,7 +84,7 @@ void RimRftCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField, cons { auto parentCase = firstAncestorOfType(); - if ( parentCase ) RiaSummaryTools::reloadSummaryCase( parentCase ); + if ( parentCase ) RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( parentCase ); RimMainPlotCollection::current()->loadDataAndUpdateAllPlots(); } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.cpp index 19f5cc8bd8..0b450c651f 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.cpp @@ -18,6 +18,7 @@ #include "RimSummaryAddress.h" +#include "RiaLogging.h" #include "Summary/RiaSummaryDefines.h" #include @@ -37,8 +38,9 @@ void caf::AppEnum::setUp() addItem( RifAdr::SUMMARY_REGION_2_REGION, "SUMMARY_REGION_2_REGION", RiaDefines::summaryRegion2Region() ); addItem( RifAdr::SUMMARY_GROUP, "SUMMARY_WELL_GROUP", RiaDefines::summaryWellGroup() ); addItem( RifAdr::SUMMARY_WELL, "SUMMARY_WELL", RiaDefines::summaryWell() ); - addItem( RifAdr::SUMMARY_WELL_COMPLETION, "SUMMARY_WELL_COMPLETION", RiaDefines::summaryCompletion() ); - addItem( RifAdr::SUMMARY_WELL_COMPLETION_LGR, "SUMMARY_WELL_COMPLETION_LGR", RiaDefines::summaryLgrCompletion() ); + addItem( RifAdr::SUMMARY_WELL_COMPLETION, "SUMMARY_WELL_COMPLETION", RiaDefines::summaryWellCompletion() ); + addItem( RifAdr::SUMMARY_WELL_CONNECTION, "SUMMARY_WELL_CONNECTION", RiaDefines::summaryWellConnection() ); + addItem( RifAdr::SUMMARY_WELL_CONNECTION_LGR, "SUMMARY_WELL_CONNECTION_LGR", RiaDefines::summaryLgrConnection() ); addItem( RifAdr::SUMMARY_WELL_LGR, "SUMMARY_WELL_LGR", RiaDefines::summaryLgrWell() ); addItem( RifAdr::SUMMARY_WELL_SEGMENT, "SUMMARY_SEGMENT", RiaDefines::summarySegment() ); addItem( RifAdr::SUMMARY_BLOCK, "SUMMARY_BLOCK", RiaDefines::summaryBlock() ); @@ -72,22 +74,24 @@ RimSummaryAddress::RimSummaryAddress() CAF_PDM_InitFieldNoDefault( &m_cellJ, "SummaryCellJ", "J" ); CAF_PDM_InitFieldNoDefault( &m_cellK, "SummaryCellK", "K" ); CAF_PDM_InitFieldNoDefault( &m_aquiferNumber, "SummaryAquifer", "Aquifer" ); + CAF_PDM_InitFieldNoDefault( &m_wellCompletionNumber, "SummaryWellCompletionNumber", "Well Completion Number" ); CAF_PDM_InitFieldNoDefault( &m_isErrorResult, "IsErrorResult", "Is Error Result" ); CAF_PDM_InitFieldNoDefault( &m_calculationId, "CalculationId", "Calculation Id" ); CAF_PDM_InitField( &m_caseId, "CaseId", -1, "CaseId" ); CAF_PDM_InitField( &m_ensembleId, "EnsembleId", -1, "EnsembleId" ); - m_category = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID; - m_regionNumber = -1; - m_regionNumber2 = -1; - m_wellSegmentNumber = -1; - m_cellI = -1; - m_cellJ = -1; - m_cellK = -1; - m_aquiferNumber = -1; - m_isErrorResult = false; - m_calculationId = -1; + m_category = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID; + m_regionNumber = -1; + m_regionNumber2 = -1; + m_wellSegmentNumber = -1; + m_cellI = -1; + m_cellJ = -1; + m_cellK = -1; + m_aquiferNumber = -1; + m_wellCompletionNumber = -1; + m_isErrorResult = false; + m_calculationId = -1; } //-------------------------------------------------------------------------------------------------- @@ -115,17 +119,18 @@ RimSummaryAddress* //-------------------------------------------------------------------------------------------------- void RimSummaryAddress::setAddress( const RifEclipseSummaryAddress& addr ) { - m_category = addr.category(); - m_vectorName = addr.vectorName().c_str(); - m_regionNumber = addr.regionNumber(); - m_regionNumber2 = addr.regionNumber2(); - m_groupName = addr.groupName().c_str(); - m_networkName = addr.networkName().c_str(); - m_wellName = addr.wellName().c_str(); - m_wellSegmentNumber = addr.wellSegmentNumber(); - m_lgrName = addr.lgrName().c_str(); - m_aquiferNumber = addr.aquiferNumber(); - m_isErrorResult = addr.isErrorResult(); + m_category = addr.category(); + m_vectorName = addr.vectorName().c_str(); + m_regionNumber = addr.regionNumber(); + m_regionNumber2 = addr.regionNumber2(); + m_groupName = addr.groupName().c_str(); + m_networkName = addr.networkName().c_str(); + m_wellName = addr.wellName().c_str(); + m_wellSegmentNumber = addr.wellSegmentNumber(); + m_lgrName = addr.lgrName().c_str(); + m_aquiferNumber = addr.aquiferNumber(); + m_wellCompletionNumber = addr.wellCompletionNumber(); + m_isErrorResult = addr.isErrorResult(); m_cellI = addr.cellI(); m_cellJ = addr.cellJ(); @@ -154,6 +159,7 @@ RifEclipseSummaryAddress RimSummaryAddress::address() const m_cellJ(), m_cellK(), m_aquiferNumber, + m_wellCompletionNumber(), m_isErrorResult, m_calculationId ); } @@ -259,3 +265,30 @@ QString RimSummaryAddress::iconResourceText() const return ":/DataVector.svg"; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryAddress::initAfterRead() +{ + // The changes in this function is related to https://github.com/OPM/ResInsight/issues/12214 + // + // Lumped connection vectors was previously displayed as well vectors. Move them into well completions and extract the well + // completion number. + if ( m_vectorName().contains( "__" ) && m_category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL ) + { + RiaLogging::info( "Converting lumped vector with '*L__N' syntax into Well Completion." + m_vectorName() ); + + m_category = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION; + m_wellCompletionNumber = m_vectorName().split( "__" ).last().toInt(); + m_vectorName = m_vectorName().split( "__" ).first(); + } + + // Lumped connection vectors was previously displayed as well completion vectors. Move them into well completions + if ( m_vectorName().startsWith( "C" ) && m_category == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION ) + { + RiaLogging::info( "Converting completion vector starting with 'C' syntax into Well Connection." + m_vectorName() ); + + m_category = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION; + } +} diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.h index a0c10d7a82..5037a0e285 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddress.h @@ -31,7 +31,6 @@ class RifSummaryReaderInterface; class RimSummaryCase; class RimSummaryFilter_OBSOLETE; class RiuQwtPlotCurve; -class RimSummaryCurveAutoName; class RimSummaryAddress : public caf::PdmObject { @@ -63,6 +62,7 @@ protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; QString iconResourceText() const; + void initAfterRead() override; private: caf::PdmField> m_category; @@ -79,6 +79,7 @@ private: caf::PdmField m_cellJ; caf::PdmField m_cellK; caf::PdmField m_aquiferNumber; + caf::PdmField m_wellCompletionNumber; caf::PdmField m_isErrorResult; caf::PdmField m_calculationId; caf::PdmField m_caseId; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.cpp index 9df123f0dc..0e3986547e 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.cpp @@ -47,9 +47,10 @@ void caf::AppEnum::setUp() addItem( CollectionContentType::AQUIFER, "AQUIFER", RiaDefines::summaryAquifer() ); addItem( CollectionContentType::NETWORK, "NETWORK", RiaDefines::summaryNetwork() ); addItem( CollectionContentType::REGION_2_REGION, "REGION_2_REGION", RiaDefines::summaryRegion2Region() ); - addItem( CollectionContentType::WELL_COMPLETION, "WELL_COMPLETION", RiaDefines::summaryCompletion() ); + addItem( CollectionContentType::WELL_CONNECTION, "WELL_CONNECTION", RiaDefines::summaryWellConnection() ); + addItem( CollectionContentType::WELL_COMPLETION, "WELL_COMPLETION", RiaDefines::summaryWellCompletion() ); addItem( CollectionContentType::WELL_LGR, "WELL_LGR", RiaDefines::summaryLgrWell() ); - addItem( CollectionContentType::WELL_COMPLETION_LGR, "WELL_COMPLETION_LGR", RiaDefines::summaryLgrCompletion() ); + addItem( CollectionContentType::WELL_CONNECTION_LGR, "WELL_CONNECTION_LGR", RiaDefines::summaryLgrConnection() ); addItem( CollectionContentType::WELL_SEGMENT, "WELL_SEGMENT", RiaDefines::summaryWellSegment() ); addItem( CollectionContentType::BLOCK_LGR, "BLOCK_LGR", RiaDefines::summaryLgrBlock() ); addItem( CollectionContentType::CALCULATED, "CALCULATED", RiaDefines::summaryCalculated() ); @@ -82,12 +83,12 @@ RifEclipseSummaryAddressDefines::SummaryCategory RimSummaryAddressCollection::co return SummaryCategory::SUMMARY_NETWORK; case CollectionContentType::REGION_2_REGION: return SummaryCategory::SUMMARY_REGION_2_REGION; - case CollectionContentType::WELL_COMPLETION: - return SummaryCategory::SUMMARY_WELL_COMPLETION; + case CollectionContentType::WELL_CONNECTION: + return SummaryCategory::SUMMARY_WELL_CONNECTION; case CollectionContentType::WELL_LGR: return SummaryCategory::SUMMARY_WELL_LGR; - case CollectionContentType::WELL_COMPLETION_LGR: - return SummaryCategory::SUMMARY_WELL_COMPLETION_LGR; + case CollectionContentType::WELL_CONNECTION_LGR: + return SummaryCategory::SUMMARY_WELL_CONNECTION_LGR; case CollectionContentType::WELL_SEGMENT: return SummaryCategory::SUMMARY_WELL_SEGMENT; case CollectionContentType::BLOCK: @@ -192,18 +193,16 @@ void RimSummaryAddressCollection::addToSubfolder( QString //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryAddressCollection::addToSubfolderTree( std::vector folders, - CollectionContentType folderType, - const RifEclipseSummaryAddress& address, - int caseId, - int ensembleId ) +void RimSummaryAddressCollection::addToSubfolderTree( std::vector> folders, + const RifEclipseSummaryAddress& address, + int caseId, + int ensembleId ) { RimSummaryAddressCollection* thefolder = this; - for ( auto& subfoldername : folders ) + for ( auto& [subfoldername, folderType] : folders ) { thefolder = thefolder->getOrCreateSubfolder( subfoldername, folderType ); } - thefolder->setContentType( folderType ); thefolder->addAddress( address, caseId, ensembleId ); } @@ -214,21 +213,22 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set sortedAddresses; @@ -252,6 +252,7 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::setaddToSubfolder( QString::fromStdString( address.wellName() ), CollectionContentType::WELL, address, caseId, ensembleId ); break; + case SummaryCategory::SUMMARY_WELL_CONNECTION: + wellConnection->addToSubfolderTree( { { QString::fromStdString( address.wellName() ), CollectionContentType::WELL }, + { QString::fromStdString( address.connectionAsString() ), + CollectionContentType::WELL_CONNECTION } }, + address, + caseId, + ensembleId ); + break; + case SummaryCategory::SUMMARY_WELL_COMPLETION: - completion->addToSubfolderTree( { QString::fromStdString( address.wellName() ), - QString::fromStdString( address.blockAsString() ) }, - CollectionContentType::WELL_COMPLETION, - address, - caseId, - ensembleId ); + wellCompletions->addToSubfolderTree( { { QString::fromStdString( address.wellName() ), CollectionContentType::WELL }, + { QString::number( address.wellCompletionNumber() ), + CollectionContentType::WELL_COMPLETION } }, + address, + caseId, + ensembleId ); break; case SummaryCategory::SUMMARY_WELL_SEGMENT: - segment->addToSubfolderTree( { QString::fromStdString( address.wellName() ), QString::number( address.wellSegmentNumber() ) }, - CollectionContentType::WELL_SEGMENT, + segment->addToSubfolderTree( { { QString::fromStdString( address.wellName() ), CollectionContentType::WELL }, + { QString::number( address.wellSegmentNumber() ), CollectionContentType::WELL_SEGMENT } }, address, caseId, ensembleId ); @@ -321,26 +331,25 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::setaddToSubfolderTree( { QString::fromStdString( address.lgrName() ), QString::fromStdString( address.wellName() ) }, - CollectionContentType::WELL_LGR, + lgrwell->addToSubfolderTree( { { QString::fromStdString( address.lgrName() ), CollectionContentType::WELL_LGR }, + { QString::fromStdString( address.wellName() ), CollectionContentType::WELL } }, address, caseId, ensembleId ); break; - case SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: - lgrcompletion->addToSubfolderTree( { QString::fromStdString( address.lgrName() ), - QString::fromStdString( address.wellName() ), - QString::fromStdString( address.blockAsString() ) }, - CollectionContentType::WELL_COMPLETION_LGR, + case SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: + lgrConnection->addToSubfolderTree( { { QString::fromStdString( address.lgrName() ), CollectionContentType::WELL_LGR }, + { QString::fromStdString( address.wellName() ), CollectionContentType::WELL }, + { QString::fromStdString( address.blockAsString() ), CollectionContentType::BLOCK } }, address, caseId, ensembleId ); break; case SummaryCategory::SUMMARY_BLOCK_LGR: - lgrblock->addToSubfolderTree( { QString::fromStdString( address.lgrName() ), QString::fromStdString( address.blockAsString() ) }, - CollectionContentType::BLOCK_LGR, + lgrblock->addToSubfolderTree( { { QString::fromStdString( address.lgrName() ), CollectionContentType::WELL_LGR }, + { QString::fromStdString( address.blockAsString() ), CollectionContentType::BLOCK } }, address, caseId, ensembleId ); @@ -556,6 +565,8 @@ QString RimSummaryAddressCollection::iconResourceText() const return ":/summary/components/images/misc.svg"; case RimSummaryAddressCollection::CollectionContentType::WELL_FOLDER: return ":/summary/components/images/well.svg"; + case RimSummaryAddressCollection::CollectionContentType::WELL_COMPLETION: + return ":/summary/components/images/well-completion-01.svg"; case RimSummaryAddressCollection::CollectionContentType::GROUP_FOLDER: return ":/summary/components/images/group.svg"; case RimSummaryAddressCollection::CollectionContentType::NETWORK_FOLDER: @@ -572,12 +583,12 @@ QString RimSummaryAddressCollection::iconResourceText() const return ":/summary/components/images/network.svg"; case RimSummaryAddressCollection::CollectionContentType::REGION_2_REGION: return ":/summary/components/images/region-region.svg"; - case RimSummaryAddressCollection::CollectionContentType::WELL_COMPLETION: - return ":/summary/components/images/well-completion.svg"; + case RimSummaryAddressCollection::CollectionContentType::WELL_CONNECTION: + return ":/summary/components/images/block.svg"; case RimSummaryAddressCollection::CollectionContentType::WELL_LGR: return ":/summary/components/images/well.svg"; - case RimSummaryAddressCollection::CollectionContentType::WELL_COMPLETION_LGR: - return ":/summary/components/images/well-completion.svg"; + case RimSummaryAddressCollection::CollectionContentType::WELL_CONNECTION_LGR: + return ":/summary/components/images/block.svg"; case RimSummaryAddressCollection::CollectionContentType::WELL_SEGMENT: return ":/summary/components/images/segment.svg"; case RimSummaryAddressCollection::CollectionContentType::BLOCK_LGR: diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.h index ee54ad5301..6db9f127e0 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressCollection.h @@ -53,8 +53,9 @@ public: NETWORK, REGION_2_REGION, WELL_COMPLETION, + WELL_CONNECTION, WELL_LGR, - WELL_COMPLETION_LGR, + WELL_CONNECTION_LGR, WELL_SEGMENT, BLOCK_LGR, CALCULATED, @@ -106,11 +107,10 @@ private: int caseId, int ensembleId = -1 ); - void addToSubfolderTree( std::vector folders, - CollectionContentType folderType, - const RifEclipseSummaryAddress& address, - int caseId, - int ensembleId = -1 ); + void addToSubfolderTree( std::vector> folders, + const RifEclipseSummaryAddress& address, + int caseId, + int ensembleId = -1 ); QString iconResourceText() const; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.cpp index 1ec2735d8e..cd990de383 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.cpp @@ -45,6 +45,7 @@ RimSummaryAddressSelector::RimSummaryAddressSelector() : addressChanged( this ) , m_showDataSource( true ) , m_showResampling( true ) + , m_showAxis( true ) , m_plotAxisOrientation( RimPlotAxisProperties::Orientation::ANY ) { @@ -57,8 +58,9 @@ RimSummaryAddressSelector::RimSummaryAddressSelector() m_summaryCaseCollection.uiCapability()->setAutoAddingOptionFromValue( false ); CAF_PDM_InitFieldNoDefault( &m_summaryAddressUiField, "summaryAddressUiField", "Vector" ); - m_summaryAddressUiField.xmlCapability()->disableIO(); m_summaryAddressUiField.uiCapability()->setUiEditorTypeName( caf::PdmUiLineEditor::uiEditorTypeName() ); + m_summaryAddressUiField.registerSetMethod( this, &RimSummaryAddressSelector::setAddress ); + m_summaryAddressUiField.registerGetMethod( this, &RimSummaryAddressSelector::summaryAddress ); CAF_PDM_InitFieldNoDefault( &m_summaryAddress, "SummaryAddress", "Summary Address" ); m_summaryAddress.uiCapability()->setUiTreeChildrenHidden( true ); @@ -130,6 +132,14 @@ void RimSummaryAddressSelector::setShowResampling( bool enable ) m_showResampling = enable; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryAddressSelector::setShowAxis( bool enable ) +{ + m_showAxis = enable; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -356,7 +366,10 @@ void RimSummaryAddressSelector::defineUiOrdering( QString uiConfigName, caf::Pdm uiOrdering.add( &m_resamplingPeriod, { .newRow = true, .totalColumnSpan = 3, .leftLabelColumnSpan = 1 } ); } - uiOrdering.add( &m_plotAxisProperties, { .newRow = true, .totalColumnSpan = 3, .leftLabelColumnSpan = 1 } ); + if ( m_showAxis ) + { + uiOrdering.add( &m_plotAxisProperties, { .newRow = true, .totalColumnSpan = 3, .leftLabelColumnSpan = 1 } ); + } uiOrdering.skipRemainingFields( true ); } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.h index 32cc8ca767..f65d050363 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryAddressSelector.h @@ -28,6 +28,7 @@ #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" +#include "cafPdmProxyValueField.h" #include "cafPdmPtrField.h" class RimSummaryCase; @@ -54,6 +55,7 @@ public: void setShowDataSource( bool enable ); void setShowResampling( bool enable ); + void setShowAxis( bool enable ); RimSummaryCase* summaryCase() const; RimSummaryEnsemble* ensemble() const; @@ -73,13 +75,14 @@ private: caf::PdmPtrField m_summaryCase; caf::PdmPtrField m_summaryCaseCollection; caf::PdmChildField m_summaryAddress; - caf::PdmField m_summaryAddressUiField; + caf::PdmProxyValueField m_summaryAddressUiField; caf::PdmField m_pushButtonSelectSummaryAddress; caf::PdmPtrField m_plotAxisProperties; caf::PdmField m_resamplingPeriod; bool m_showDataSource; bool m_showResampling; + bool m_showAxis; RimPlotAxisProperties::Orientation m_plotAxisOrientation; }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp index 4551c80df3..14df15cbf1 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCase.cpp @@ -256,6 +256,7 @@ void RimSummaryCase::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder, b menuBuilder << "RicImportSummaryGroupFeature"; menuBuilder << "RicImportEnsembleFeature"; menuBuilder.subMenuEnd(); + menuBuilder << "RicCreateSummaryEnsembleFeature"; menuBuilder.addSeparator(); menuBuilder << "RicNewSummaryMultiPlotFeature"; menuBuilder << "RicOpenSummaryPlotEditorFeature"; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp index 983c31468d..21d544dd4c 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp @@ -19,6 +19,7 @@ #include "RimSummaryCaseMainCollection.h" #include "RiaEclipseFileNameTools.h" +#include "RiaEnsembleNameTools.h" #include "RiaLogging.h" #include "RiaPreferencesSummary.h" #include "Summary/RiaSummaryTools.h" @@ -46,6 +47,7 @@ #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" +#include "cafPdmFieldReorderCapability.h" #include "cafProgressInfo.h" #include @@ -101,7 +103,9 @@ RimSummaryCaseMainCollection::RimSummaryCaseMainCollection() CAF_PDM_InitObject( "Summary Cases", ":/SummaryCases16x16.png" ); CAF_PDM_InitFieldNoDefault( &m_cases, "SummaryCases", "" ); - CAF_PDM_InitFieldNoDefault( &m_caseCollections, "SummaryCaseCollections", "" ); + caf::PdmFieldReorderCapability::addToField( &m_cases ); + + CAF_PDM_InitFieldNoDefault( &m_ensembles, "SummaryCaseCollections", "" ); } //-------------------------------------------------------------------------------------------------- @@ -110,7 +114,7 @@ RimSummaryCaseMainCollection::RimSummaryCaseMainCollection() RimSummaryCaseMainCollection::~RimSummaryCaseMainCollection() { m_cases.deleteChildrenAsync(); - m_caseCollections.deleteChildrenAsync(); + m_ensembles.deleteChildrenAsync(); } //-------------------------------------------------------------------------------------------------- @@ -161,9 +165,9 @@ void RimSummaryCaseMainCollection::removeCase( RimSummaryCase* summaryCase, bool std::vector derivedEnsembles; // Build a list of derived ensembles that must be updated after delete - for ( auto group : summaryCaseCollections() ) + for ( auto ensemble : summaryEnsembles() ) { - auto derEnsemble = dynamic_cast( group ); + auto derEnsemble = dynamic_cast( ensemble ); if ( derEnsemble ) { if ( derEnsemble->hasCaseReference( summaryCase ) ) @@ -175,9 +179,9 @@ void RimSummaryCaseMainCollection::removeCase( RimSummaryCase* summaryCase, bool m_cases.removeChild( summaryCase ); - for ( RimSummaryEnsemble* summaryCaseCollection : m_caseCollections ) + for ( RimSummaryEnsemble* ensemble : m_ensembles ) { - summaryCaseCollection->removeCase( summaryCase, notifyChange ); + ensemble->removeCase( summaryCase, notifyChange ); } // Update derived ensemble cases (if any) @@ -199,14 +203,27 @@ void RimSummaryCaseMainCollection::removeCases( std::vector& ca removeCase( sumCase, false ); } - for ( RimSummaryEnsemble* summaryCaseCollection : m_caseCollections ) + for ( RimSummaryEnsemble* ensemble : m_ensembles ) { - summaryCaseCollection->updateReferringCurveSetsZoomAll(); + ensemble->updateReferringCurveSetsZoomAll(); } dataSourceHasChanged.send(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryCaseMainCollection::moveCase( RimSummaryCase* summaryCase, int destinationIndex ) +{ + auto currentIndex = m_cases.indexOf( summaryCase ); + if ( currentIndex < m_cases.size() ) + { + m_cases.erase( currentIndex ); + m_cases.insertAt( std::min( destinationIndex, (int)m_cases.size() ), summaryCase ); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -215,13 +232,13 @@ RimSummaryEnsemble* RimSummaryCaseMainCollection::addEnsemble( const std::vector bool isEnsemble, std::function allocator ) { - RimSummaryEnsemble* summaryCaseCollection = allocator(); - if ( !collectionName.isEmpty() ) summaryCaseCollection->setName( collectionName ); + RimSummaryEnsemble* ensemble = allocator(); + if ( !collectionName.isEmpty() ) ensemble->setNameTemplate( collectionName ); - if ( summaryCaseCollection->ensembleId() == -1 ) + if ( ensemble->ensembleId() == -1 ) { RimProject* project = RimProject::current(); - project->assignIdToEnsemble( summaryCaseCollection ); + project->assignIdToEnsemble( ensemble ); } for ( RimSummaryCase* summaryCase : summaryCases ) @@ -236,29 +253,31 @@ RimSummaryEnsemble* RimSummaryCaseMainCollection::addEnsemble( const std::vector m_cases.removeChild( summaryCase ); } - summaryCaseCollection->addCase( summaryCase ); + ensemble->addCase( summaryCase ); if ( isEnsemble ) { summaryCase->setDisplayNameOption( RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME ); } } - summaryCaseCollection->setAsEnsemble( isEnsemble ); + ensemble->setAsEnsemble( isEnsemble ); - summaryCaseCollection->caseNameChanged.connect( this, &RimSummaryCaseMainCollection::onCaseNameChanged ); - m_caseCollections.push_back( summaryCaseCollection ); + ensemble->caseNameChanged.connect( this, &RimSummaryCaseMainCollection::onCaseNameChanged ); + m_ensembles.push_back( ensemble ); dataSourceHasChanged.send(); - return summaryCaseCollection; + return ensemble; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCaseMainCollection::removeCaseCollection( RimSummaryEnsemble* caseCollection ) +void RimSummaryCaseMainCollection::removeEnsemble( RimSummaryEnsemble* ensemble ) { - m_caseCollections.removeChild( caseCollection ); + m_ensembles.removeChild( ensemble ); + + RiaSummaryTools::updateSummaryEnsembleNames(); dataSourceHasChanged.send(); } @@ -270,7 +289,7 @@ void RimSummaryCaseMainCollection::addEnsemble( RimSummaryEnsemble* ensemble ) { CVF_ASSERT( ensemble ); - m_caseCollections.push_back( ensemble ); + m_ensembles.push_back( ensemble ); if ( ensemble->ensembleId() == -1 ) { @@ -306,9 +325,9 @@ std::vector RimSummaryCaseMainCollection::allSummaryCases() con if ( !m_cases.empty() ) cases.insert( cases.end(), m_cases.begin(), m_cases.end() ); - for ( auto& coll : m_caseCollections ) + for ( auto& ensemble : m_ensembles ) { - auto collCases = coll->allSummaryCases(); + auto collCases = ensemble->allSummaryCases(); if ( collCases.empty() ) continue; cases.insert( cases.end(), collCases.begin(), collCases.end() ); } @@ -332,14 +351,14 @@ std::vector RimSummaryCaseMainCollection::topLevelSummaryCases( //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RimSummaryCaseMainCollection::summaryCaseCollections() const +std::vector RimSummaryCaseMainCollection::summaryEnsembles() const { - std::vector summaryCaseCollections; - for ( const auto& caseColl : m_caseCollections ) + std::vector ensembles; + for ( const auto& ensemble : m_ensembles ) { - summaryCaseCollections.push_back( caseColl ); + ensembles.push_back( ensemble ); } - return summaryCaseCollections; + return ensembles; } //-------------------------------------------------------------------------------------------------- @@ -362,9 +381,9 @@ void RimSummaryCaseMainCollection::initAfterRead() sumCase->nameChanged.connect( this, &RimSummaryCaseMainCollection::onCaseNameChanged ); } - for ( auto caseCollection : summaryCaseCollections() ) + for ( auto ensemble : summaryEnsembles() ) { - caseCollection->caseNameChanged.connect( this, &RimSummaryCaseMainCollection::onCaseNameChanged ); + ensemble->caseNameChanged.connect( this, &RimSummaryCaseMainCollection::onCaseNameChanged ); } } @@ -526,6 +545,8 @@ RimSummaryEnsemble* RimSummaryCaseMainCollection::defaultAllocator() //-------------------------------------------------------------------------------------------------- void RimSummaryCaseMainCollection::onCaseNameChanged( const SignalEmitter* emitter ) { + RiaSummaryTools::updateSummaryEnsembleNames(); + RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection(); summaryPlotColl->updateSummaryNameHasChanged(); } @@ -699,3 +720,38 @@ void RimSummaryCaseMainCollection::onProjectBeingSaved() } } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryCaseMainCollection::updateEnsembleNames() +{ + std::set key1; + std::set key2; + + auto ensembles = summaryEnsembles(); + + for ( const auto& ensemble : ensembles ) + { + const auto keys = ensemble->nameKeys(); + key1.insert( keys.first ); + key2.insert( keys.second ); + } + + bool useKey1 = key1.size() > 1; + bool useKey2 = key2.size() > 1; + + if ( !useKey1 && !useKey2 ) + { + useKey2 = true; + } + + std::set existingNames; + for ( auto ensemble : ensembles ) + { + ensemble->setUsePathKey1( useKey1 ); + ensemble->setUsePathKey2( useKey2 ); + ensemble->updateName( existingNames ); + existingNames.insert( ensemble->name() ); + } +} diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h index a5ecf4bdc2..ebcdc9f24f 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.h @@ -49,7 +49,7 @@ public: std::vector allSummaryCases() const; std::vector topLevelSummaryCases() const; - std::vector summaryCaseCollections() const; + std::vector summaryEnsembles() const; std::vector createSummaryCasesFromFileInfos( const std::vector& summaryHeaderFileInfos, bool showProgress = false ); @@ -60,12 +60,13 @@ public: void addCase( RimSummaryCase* summaryCase ); void removeCase( RimSummaryCase* summaryCase, bool notifyChange = true ); void removeCases( std::vector& cases ); + void moveCase( RimSummaryCase* summaryCase, int destinationIndex ); RimSummaryEnsemble* addEnsemble( const std::vector& summaryCases, const QString& coolectionName, bool isEnsemble, std::function allocator = defaultAllocator ); - void removeCaseCollection( RimSummaryEnsemble* caseCollection ); + void removeEnsemble( RimSummaryEnsemble* ensemble ); void addEnsemble( RimSummaryEnsemble* ensemble ); void loadAllSummaryCaseData(); @@ -75,6 +76,8 @@ public: void updateAutoShortName(); void onProjectBeingSaved(); + void updateEnsembleNames(); + private: void initAfterRead() override; @@ -86,5 +89,5 @@ private: private: caf::PdmChildArrayField m_cases; - caf::PdmChildArrayField m_caseCollections; + caf::PdmChildArrayField m_ensembles; }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp index 5d44bf886c..83596ffaac 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp @@ -114,10 +114,6 @@ RimSummaryCurve::RimSummaryCurve() m_xValuesSummaryAddress = new RimSummaryAddress; - // Other members - CAF_PDM_InitFieldNoDefault( &m_isEnsembleCurve, "IsEnsembleCurve", "Ensemble Curve" ); - m_isEnsembleCurve.v() = caf::Tristate::State::PartiallyTrue; - CAF_PDM_InitFieldNoDefault( &m_plotAxis_OBSOLETE, "PlotAxis", "Axis" ); m_plotAxis_OBSOLETE.xmlCapability()->setIOWritable( false ); @@ -178,11 +174,6 @@ void RimSummaryCurve::setSummaryCaseY( RimSummaryCase* sumCase ) clearErrorBars(); } - bool isEnsembleCurve = false; - if ( sumCase && sumCase->ensemble() ) isEnsembleCurve = true; - - setIsEnsembleCurve( isEnsembleCurve ); - m_yValuesSummaryCase = sumCase; } @@ -446,11 +437,6 @@ RiaDefines::HorizontalAxisType RimSummaryCurve::axisTypeX() const void RimSummaryCurve::setSummaryCaseX( RimSummaryCase* sumCase ) { m_xValuesSummaryCase = sumCase; - - bool isEnsembleCurve = false; - if ( sumCase && sumCase->ensemble() ) isEnsembleCurve = true; - - setIsEnsembleCurve( isEnsembleCurve ); } //-------------------------------------------------------------------------------------------------- @@ -490,15 +476,8 @@ RiuPlotAxis RimSummaryCurve::axisY() const //-------------------------------------------------------------------------------------------------- bool RimSummaryCurve::isEnsembleCurve() const { - return m_isEnsembleCurve().isTrue(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryCurve::setIsEnsembleCurve( bool isEnsembleCurve ) -{ - m_isEnsembleCurve.v() = isEnsembleCurve ? caf::Tristate::State::True : caf::Tristate::State::False; + auto curveSet = firstAncestorOrThisOfType(); + return curveSet != nullptr; } //-------------------------------------------------------------------------------------------------- @@ -818,11 +797,6 @@ void RimSummaryCurve::initAfterRead() if ( plot ) m_yPlotAxisProperties = plot->axisPropertiesForPlotAxis( RiuPlotAxis( m_plotAxis_OBSOLETE() ) ); } - if ( m_isEnsembleCurve().isPartiallyTrue() ) - { - m_isEnsembleCurve.v() = ( summaryCaseY() && summaryCaseY()->ensemble() ) ? caf::Tristate::State::True : caf::Tristate::State::False; - } - if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2024.3" ) ) { calculateCurveInterpolationFromAddress(); @@ -1024,9 +998,9 @@ void RimSummaryCurve::updatePlotAxis() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCurve::applyCurveAutoNameSettings( const RimSummaryCurveAutoName& autoNameSettings ) +void RimSummaryCurve::enableVectorNameInCurveName( bool enable ) { - m_curveNameConfig->applySettings( autoNameSettings ); + m_curveNameConfig->enableVectorName( enable ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.h index fd36a47650..9a533d8a3d 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.h @@ -34,7 +34,6 @@ #include "RimStackablePlotCurve.h" #include "cafAppEnum.h" -#include "cafTristate.h" class RifSummaryReaderInterface; class RimSummaryCase; @@ -93,10 +92,9 @@ public: // Other bool isEnsembleCurve() const; - void setIsEnsembleCurve( bool isEnsembleCurve ); void updatePlotAxis(); - void applyCurveAutoNameSettings( const RimSummaryCurveAutoName& autoNameSettings ); + void enableVectorNameInCurveName( bool enable ); QString curveExportDescription( const RifEclipseSummaryAddress& address ) const override; void setCurveAppearanceFromCaseType(); @@ -166,9 +164,6 @@ private: caf::PdmField m_xPushButtonSelectSummaryAddress; caf::PdmPtrField m_xPlotAxisProperties; - // Other fields - caf::PdmField m_isEnsembleCurve; - caf::PdmChildField m_curveNameConfig; caf::PdmField> m_plotAxis_OBSOLETE; caf::PdmField m_isTopZWithinCategory; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp index adb58c0d92..8a486a016a 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.cpp @@ -51,6 +51,21 @@ void caf::AppEnum::set } } // namespace caf +namespace internal +{ +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuQwtPlotCurveDefines::LineStyleEnum cycledLineStyle( int index ) +{ + if ( index < 0 ) return RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID; + + return caf::AppEnum::fromIndex( + 1 + ( index % ( caf::AppEnum::size() - 1 ) ) ); +} + +} // namespace internal + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -514,7 +529,7 @@ void RimSummaryCurveAppearanceCalculator::setOneCurveAppearance( CurveAppearance m_currentCurveGradient = gradient( totalCount, appeaIdx ); break; case LINE_STYLE: - curve->setLineStyle( cycledLineStyle( appeaIdx ) ); + curve->setLineStyle( internal::cycledLineStyle( appeaIdx ) ); break; case SYMBOL: curve->setSymbol( cycledSymbol( appeaIdx ) ); @@ -585,17 +600,6 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledBrownColor( int colorInd return RiaColorTables::summaryCurveBrownPaletteColors().cycledColor3f( colorIndex ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuQwtPlotCurveDefines::LineStyleEnum RimSummaryCurveAppearanceCalculator::cycledLineStyle( int index ) -{ - if ( index < 0 ) return RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID; - - return caf::AppEnum::fromIndex( - 1 + ( index % ( caf::AppEnum::size() - 1 ) ) ); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h index 26ba4a6308..4b98a2f795 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAppearanceCalculator.h @@ -18,7 +18,6 @@ #pragma once #include "RiuPlotCurveSymbol.h" -#include "RiuQwtPlotCurveDefines.h" #include "cvfColor3.h" @@ -77,9 +76,8 @@ private: void updateApperanceIndices(); std::map mapNameToAppearanceIndex( CurveAppearanceType& appearance, const std::set& names ); - RiuQwtPlotCurveDefines::LineStyleEnum cycledLineStyle( int index ); - int cycledLineThickness( int index ); - float gradient( size_t totalCount, int index ); + int cycledLineThickness( int index ); + float gradient( size_t totalCount, int index ); cvf::Color3f gradeColor( const cvf::Color3f& color, float factor ); void assignColorByPhase( RimSummaryCurve* curve, int colorIndex ); diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp index c04fdcd076..8c344e2f1e 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.cpp @@ -51,8 +51,9 @@ RimSummaryCurveAutoName::RimSummaryCurveAutoName() CAF_PDM_InitField( &m_groupName, "WellGroupName", true, "Group Name" ); CAF_PDM_InitField( &m_wellName, "WellName", true, "Well Name" ); CAF_PDM_InitField( &m_wellSegmentNumber, "WellSegmentNumber", true, "Well Segment Number" ); + CAF_PDM_InitField( &m_wellCompletionNumber, "WellCompletionNumber", true, "Well Completion Number" ); CAF_PDM_InitField( &m_lgrName, "LgrName", true, "Lgr Name" ); - CAF_PDM_InitField( &m_completion, "Completion", true, "I, J, K" ); + CAF_PDM_InitField( &m_connection, "Completion", true, "I, J, K" ); CAF_PDM_InitField( &m_aquiferNumber, "Aquifer", true, "Aquifer Number" ); CAF_PDM_InitField( &m_caseName, "CaseName", true, "Case/Ensemble Name" ); @@ -63,6 +64,9 @@ RimSummaryCurveAutoName::RimSummaryCurveAutoName() m_longVectorName = false; m_vectorName = true; } + + // When multiple curves are selected, we need to issue fieldChanged on all curves + setNotifyAllFieldsInMultiFieldChangedEvents( true ); } //-------------------------------------------------------------------------------------------------- @@ -169,19 +173,9 @@ QString RimSummaryCurveAutoName::curveNameX( const RifEclipseSummaryAddress& sum //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryCurveAutoName::applySettings( const RimSummaryCurveAutoName& other ) +void RimSummaryCurveAutoName::enableVectorName( bool enable ) { - m_caseName = other.m_caseName; - m_vectorName = other.m_vectorName; - m_longVectorName = other.m_longVectorName; - m_unit = other.m_unit; - m_regionNumber = other.m_regionNumber; - m_groupName = other.m_groupName; - m_wellName = other.m_wellName; - m_wellSegmentNumber = other.m_wellSegmentNumber; - m_lgrName = other.m_lgrName; - m_completion = other.m_completion; - m_aquiferNumber = other.m_aquiferNumber; + m_vectorName = enable; } //-------------------------------------------------------------------------------------------------- @@ -226,25 +220,32 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress& if ( m_vectorName || m_longVectorName ) { - bool skipSubString = currentNameHelper && currentNameHelper->isPlotDisplayingSingleCurve(); - if ( !skipSubString ) + if ( currentNameHelper && currentNameHelper->vectorNames().size() > 1 ) { - if ( m_longVectorName() ) + text = summaryAddress.vectorName(); + } + else + { + bool skipSubString = currentNameHelper && currentNameHelper->isPlotDisplayingSingleCurve(); + if ( !skipSubString ) { - auto quantityName = summaryAddress.vectorName(); - if ( summaryAddress.isHistoryVector() ) quantityName = quantityName.substr( 0, quantityName.size() - 1 ); + if ( m_longVectorName() ) + { + auto quantityName = summaryAddress.vectorName(); + if ( summaryAddress.isHistoryVector() ) quantityName = quantityName.substr( 0, quantityName.size() - 1 ); - text = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( quantityName ); + text = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( quantityName ); - if ( m_vectorName ) text += " (" + summaryAddress.vectorName() + ")"; + if ( m_vectorName ) text += " (" + summaryAddress.vectorName() + ")"; - // Handle cases where longNameFromVectorName fails to produce a long name. - // This can happen for non-standard vector names. - if ( text.empty() && !summaryAddress.vectorName().empty() ) text = summaryAddress.vectorName(); - } - else - { - text = summaryAddress.vectorName(); + // Handle cases where longNameFromVectorName fails to produce a long name. + // This can happen for non-standard vector names. + if ( text.empty() && !summaryAddress.vectorName().empty() ) text = summaryAddress.vectorName(); + } + else + { + text = summaryAddress.vectorName(); + } } } @@ -356,13 +357,13 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string& appendWellName( text, summaryAddress, nameHelper ); } break; - case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION: + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION: { appendWellName( text, summaryAddress, nameHelper ); - if ( m_completion ) + if ( m_connection ) { - bool skipSubString = nameHelper && nameHelper->isCompletionInTitle(); + bool skipSubString = nameHelper && nameHelper->isConnectionInTitle(); if ( !skipSubString ) { if ( !text.empty() ) text += ":"; @@ -378,14 +379,14 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string& appendWellName( text, summaryAddress, nameHelper ); } break; - case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR: + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR: { appendLgrName( text, summaryAddress ); appendWellName( text, summaryAddress, nameHelper ); - if ( m_completion ) + if ( m_connection ) { - bool skipSubString = nameHelper && nameHelper->isCompletionInTitle(); + bool skipSubString = nameHelper && nameHelper->isConnectionInTitle(); if ( !skipSubString ) { if ( !text.empty() ) text += ":"; @@ -395,6 +396,21 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string& } } break; + case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION: + { + appendWellName( text, summaryAddress, nameHelper ); + + if ( m_wellCompletionNumber ) + { + bool skipSubString = nameHelper && nameHelper->isWellCompletionInTitle(); + if ( !skipSubString ) + { + if ( !text.empty() ) text += ":"; + text += std::to_string( summaryAddress.wellCompletionNumber() ); + } + } + } + break; case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT: { appendWellName( text, summaryAddress, nameHelper ); @@ -412,7 +428,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string& break; case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK: { - if ( m_completion ) + if ( m_connection ) { bool skipSubString = nameHelper && nameHelper->isBlockInTitle(); if ( !skipSubString ) @@ -428,7 +444,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string& { appendLgrName( text, summaryAddress ); - if ( m_completion ) + if ( m_connection ) { bool skipSubString = nameHelper && nameHelper->isBlockInTitle(); if ( !skipSubString ) @@ -496,8 +512,9 @@ void RimSummaryCurveAutoName::defineUiOrdering( QString uiConfigName, caf::PdmUi advanced.setCollapsedByDefault(); advanced.add( &m_regionNumber ); advanced.add( &m_lgrName ); - advanced.add( &m_completion ); + advanced.add( &m_connection ); advanced.add( &m_wellSegmentNumber ); + advanced.add( &m_wellCompletionNumber ); advanced.add( &m_aquiferNumber ); advanced.add( &m_unit ); diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h index 9f114709dc..c438a50807 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurveAutoName.h @@ -36,7 +36,7 @@ public: const RimSummaryNameHelper* currentNameHelper, const RimSummaryNameHelper* plotNameHelper ) const; - void applySettings( const RimSummaryCurveAutoName& other ); + void enableVectorName( bool enable ); private: QString curveNameY( const RifEclipseSummaryAddress& summaryAddress, @@ -68,8 +68,9 @@ private: caf::PdmField m_groupName; caf::PdmField m_wellName; caf::PdmField m_wellSegmentNumber; + caf::PdmField m_wellCompletionNumber; caf::PdmField m_lgrName; - caf::PdmField m_completion; + caf::PdmField m_connection; caf::PdmField m_aquiferNumber; caf::PdmField m_caseName; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.cpp index ec1e5833b2..bfe6139e4f 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.cpp @@ -27,16 +27,20 @@ namespace caf template <> void AppEnum::setUp() { - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::ENSEMBLE, "ENSEMBLE", "Ensemble" ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::SUMMARY_CASE, "SUMMARY_CASE", "Summary Case" ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::VECTOR, "VECTOR", "Vector" ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::WELL, "WELL", RiaDefines::summaryWell() ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::GROUP, "GROUP", RiaDefines::summaryWellGroup() ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::NETWORK, "NETWORK", RiaDefines::summaryNetwork() ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::REGION, "REGION", RiaDefines::summaryRegion() ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::BLOCK, "BLOCK", RiaDefines::summaryBlock() ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::AQUIFER, "AQUIFER", RiaDefines::summaryAquifer() ); - addItem( RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_SEGMENT, "WELL_SEGMENT", RiaDefines::summaryWellSegment() ); - setDefault( RimSummaryDataSourceStepping::SourceSteppingDimension::VECTOR ); + using ssd = RimSummaryDataSourceStepping::SourceSteppingDimension; + + addItem( ssd::ENSEMBLE, "ENSEMBLE", "Ensemble" ); + addItem( ssd::SUMMARY_CASE, "SUMMARY_CASE", "Summary Case" ); + addItem( ssd::VECTOR, "VECTOR", "Vector" ); + addItem( ssd::WELL, "WELL", RiaDefines::summaryWell() ); + addItem( ssd::GROUP, "GROUP", RiaDefines::summaryWellGroup() ); + addItem( ssd::NETWORK, "NETWORK", RiaDefines::summaryNetwork() ); + addItem( ssd::REGION, "REGION", RiaDefines::summaryRegion() ); + addItem( ssd::WELL_COMPLETION_NUMBER, "WELL_COMPLETION", RiaDefines::summaryWellCompletion() ); + addItem( ssd::WELL_CONNECTION, "WELL_CONNECTION", RiaDefines::summaryWellConnection() ); + addItem( ssd::BLOCK, "BLOCK", RiaDefines::summaryBlock() ); + addItem( ssd::AQUIFER, "AQUIFER", RiaDefines::summaryAquifer() ); + addItem( ssd::WELL_SEGMENT, "WELL_SEGMENT", RiaDefines::summaryWellSegment() ); + setDefault( ssd::VECTOR ); } } // namespace caf diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.h index ee01a0dd7e..49059348b6 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryDataSourceStepping.h @@ -35,9 +35,11 @@ public: NETWORK, REGION, VECTOR, + WELL_COMPLETION_NUMBER, + WELL_CONNECTION, BLOCK, AQUIFER, - WELL_SEGMENT + WELL_SEGMENT, }; public: diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.cpp index 3d503c04df..de20bb3b83 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.cpp @@ -20,9 +20,13 @@ #include "RiaEnsembleNameTools.h" #include "RiaFieldHandleTools.h" +#include "RiaFilePathTools.h" #include "RiaLogging.h" #include "RiaStatisticsTools.h" +#include "RiaStdStringTools.h" +#include "RiaTextStringTools.h" #include "Summary/RiaSummaryAddressAnalyzer.h" +#include "Summary/RiaSummaryTools.h" #include "RifSummaryReaderInterface.h" @@ -34,8 +38,11 @@ #include "RimSummaryEnsembleTools.h" #include "RimSummaryPlot.h" +#include "cafCmdFeatureMenuBuilder.h" #include "cafPdmFieldScriptingCapability.h" #include "cafPdmObjectScriptingCapability.h" +#include "cafPdmUiLineEditor.h" +#include "cafPdmUiTextEditor.h" #include "cafPdmUiTreeOrdering.h" #include @@ -57,6 +64,14 @@ RimSummaryEnsemble::RimSummaryEnsemble() CAF_PDM_InitScriptableField( &m_name, "SummaryCollectionName", QString( "Group" ), "Name" ); CAF_PDM_InitScriptableField( &m_autoName, "CreateAutoName", true, "Auto Name" ); + CAF_PDM_InitScriptableField( &m_useKey1, "UseKey1", false, "Use First Path Part" ); + CAF_PDM_InitScriptableField( &m_useKey2, "UseKey2", false, "Use Second Path Part" ); + + QString defaultText = RiaDefines::key1VariableName() + "-" + RiaDefines::key2VariableName(); + QString tooltipText = QString( "Variables in template is supported, and will be replaced to create name. Example '%1'" ).arg( defaultText ); + CAF_PDM_InitField( &m_nameTemplateString, "NameTemplateString", defaultText, "Name Template", "", tooltipText ); + + CAF_PDM_InitFieldNoDefault( &m_groupingMode, "GroupingMode", "Grouping Mode" ); CAF_PDM_InitScriptableFieldNoDefault( &m_nameAndItemCount, "NameCount", "Name" ); m_nameAndItemCount.registerGetMethod( this, &RimSummaryEnsemble::nameAndItemCount ); @@ -76,6 +91,11 @@ RimSummaryEnsemble::RimSummaryEnsemble() m_dataVectorFolders->uiCapability()->setUiTreeHidden( true ); m_dataVectorFolders.xmlCapability()->disableIO(); + CAF_PDM_InitFieldNoDefault( &m_ensembleDescription, "Description", "Description" ); + m_ensembleDescription.registerGetMethod( this, &RimSummaryEnsemble::ensembleDescription ); + m_ensembleDescription.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP ); + m_ensembleDescription.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() ); + m_commonAddressCount = 0; } @@ -170,9 +190,40 @@ RimSummaryCase* RimSummaryEnsemble::firstSummaryCase() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryEnsemble::setName( const QString& name ) +void RimSummaryEnsemble::replaceCases( const std::vector& summaryCases ) { - m_name = name; + m_cases.deleteChildrenAsync(); + + if ( summaryCases.empty() ) return; + + auto lastCase = summaryCases.back(); + + for ( auto summaryCase : summaryCases ) + { + if ( summaryCase == lastCase ) continue; + + // Do what is required to add the case, avoid updates until all cases are added + summaryCase->nameChanged.connect( this, &RimSummaryEnsemble::onCaseNameChanged ); + if ( m_cases.empty() ) + { + summaryCase->setShowVectorItemsInProjectTree( true ); + } + m_cases.push_back( summaryCase ); + } + + if ( lastCase ) + { + // Add the last case, and update connected plots + addCase( lastCase ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsemble::setNameTemplate( const QString& name ) +{ + m_nameTemplateString = name; } //-------------------------------------------------------------------------------------------------- @@ -186,24 +237,91 @@ QString RimSummaryEnsemble::name() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryEnsemble::ensureNameIsUpdated() +void RimSummaryEnsemble::updateName( const std::set& existingEnsembleNames ) { + const auto [key1, key2] = nameKeys(); + + QString templateText; if ( m_autoName ) { - QStringList fileNames; - for ( const auto& summaryCase : m_cases ) + templateText = nameTemplateText(); + } + else + { + templateText = m_nameTemplateString(); + } + + std::map keyValues = { + { RiaDefines::key1VariableName(), QString::fromStdString( key1 ) }, + { RiaDefines::key2VariableName(), QString::fromStdString( key2 ) }, + }; + + auto candidateName = RiaTextStringTools::replaceTemplateTextWithValues( templateText, keyValues ); + + if ( m_autoName ) + { + candidateName = candidateName.trimmed(); + + // When using auto name, remove leading and trailing commas that may occur if key1 or key2 is empty + if ( candidateName.startsWith( "," ) ) { - fileNames.push_back( summaryCase->summaryHeaderFilename() ); + candidateName = candidateName.mid( 1 ); + } + if ( candidateName.endsWith( "," ) ) + { + candidateName = candidateName.left( candidateName.length() - 1 ); } - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode = RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE; + // Avoid identical ensemble names by appending a number + if ( existingEnsembleNames.contains( candidateName ) ) + { + int counter = 1; + QString uniqueName; + do + { + uniqueName = QString( "%1 (subset-%2)" ).arg( candidateName ).arg( counter++ ); + } while ( existingEnsembleNames.contains( uniqueName ) ); - QString ensembleName = RiaEnsembleNameTools::findSuitableEnsembleName( fileNames, groupingMode ); - if ( m_name == ensembleName ) return; - - m_name = ensembleName; - caseNameChanged.send(); + candidateName = uniqueName; + } } + + if ( m_name == candidateName ) return; + + m_name = candidateName; + caseNameChanged.send(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsemble::setUsePathKey1( bool useKey1 ) +{ + m_useKey1 = useKey1; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsemble::setUsePathKey2( bool useKey2 ) +{ + m_useKey2 = useKey2; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsemble::setGroupingMode( RiaDefines::EnsembleGroupingMode groupingMode ) +{ + m_groupingMode = groupingMode; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefines::EnsembleGroupingMode RimSummaryEnsemble::groupingMode() const +{ + return m_groupingMode(); } //-------------------------------------------------------------------------------------------------- @@ -635,6 +753,8 @@ void RimSummaryEnsemble::updateReferringCurveSets( bool doZoomAll ) { if ( auto parentPlot = curveSet->firstAncestorOrThisOfType() ) { + // If the ensemble name has changed, make sure the name in the project tree is updated + parentPlot->updateConnectedEditors(); parentPlot->zoomAll(); } } @@ -765,6 +885,11 @@ void RimSummaryEnsemble::initAfterRead() } if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2022.06.2" ) ) m_autoName = false; + + if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2024.12.2" ) ) + { + m_nameTemplateString = m_name; + } } //-------------------------------------------------------------------------------------------------- @@ -776,14 +901,9 @@ void RimSummaryEnsemble::fieldChangedByUi( const caf::PdmFieldHandle* changedFie { updateIcon(); } - if ( changedField == &m_autoName ) + if ( changedField == &m_autoName || changedField == &m_nameTemplateString ) { - ensureNameIsUpdated(); - } - if ( changedField == &m_name ) - { - m_autoName = false; - caseNameChanged.send(); + RiaSummaryTools::updateSummaryEnsembleNames(); } } @@ -795,17 +915,59 @@ void RimSummaryEnsemble::onCaseNameChanged( const SignalEmitter* emitter ) caseNameChanged.send(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsemble::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const +{ + menuBuilder.subMenuStart( "Import" ); + menuBuilder << "RicImportSummaryCaseFeature"; + menuBuilder << "RicImportSummaryCasesFeature"; + menuBuilder << "RicImportSummaryGroupFeature"; + menuBuilder << "RicImportEnsembleFeature"; + menuBuilder.subMenuEnd(); + menuBuilder << "RicNewSummaryMultiPlotFeature"; + menuBuilder << "RicNewDerivedEnsembleFeature"; + menuBuilder << "RicOpenSummaryPlotEditorFeature"; + menuBuilder << "RicAppendSummaryCurvesForSummaryCasesFeature"; + menuBuilder << "RicAppendSummaryPlotsForSummaryCasesFeature"; + menuBuilder.addSeparator(); + menuBuilder << "RicAppendSummaryCurvesForSummaryCasesFeature"; + menuBuilder << "RicAppendSummaryPlotsForSummaryCasesFeature"; + menuBuilder << "RicCreateMultiPlotFromSelectionFeature"; + menuBuilder << "RicCreatePlotFromTemplateByShortcutFeature"; + menuBuilder.addSeparator(); + menuBuilder << "RicReloadSummaryCaseFeature"; + menuBuilder << "RicReplaceSummaryEnsembleFeature"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryEnsemble::isAutoNameChecked() const +{ + return m_autoName(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimSummaryEnsemble::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { uiOrdering.add( &m_autoName ); - uiOrdering.add( &m_name ); - if ( m_isEnsemble() ) + + if ( !m_autoName() ) { - uiOrdering.add( &m_ensembleId ); + uiOrdering.add( &m_nameTemplateString ); } + + uiOrdering.add( &m_name ); + m_name.uiCapability()->setUiReadOnly( true ); + + if ( m_isEnsemble() ) uiOrdering.add( &m_ensembleId ); + + uiOrdering.add( &m_ensembleDescription ); + uiOrdering.skipRemainingFields( true ); } @@ -833,6 +995,128 @@ void RimSummaryEnsemble::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrd } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsemble::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) +{ + if ( field == &m_nameTemplateString ) + { + if ( auto attr = dynamic_cast( attribute ) ) + { + attr->placeholderText = RiaDefines::key1VariableName() + "-" + RiaDefines::key2VariableName(); + attr->notifyWhenTextIsEdited = true; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimSummaryEnsemble::ensembleDescription() const +{ + QString txt; + + if ( !m_cases.empty() ) + { + txt += QString( "First summary file of %1 files :\n " ).arg( m_cases.size() ); + auto firstCase = m_cases[0]->summaryHeaderFilename(); + txt += firstCase; + txt += "\n"; + } + + const auto [key1, key2] = nameKeys(); + txt += "\nDetected variables that can be used when defining the text in the 'Name Template' field:\n"; + txt += QString( " %1: %2\n" ).arg( RiaDefines::key1VariableName() ).arg( QString::fromStdString( key1 ) ); + txt += QString( " %1: %2\n" ).arg( RiaDefines::key2VariableName() ).arg( QString::fromStdString( key2 ) ); + + txt += "\n"; + if ( m_groupingMode() == RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) + { + txt += "The ensemble is grouped by the file folder structure.\n"; + } + else if ( m_groupingMode() == RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ) + { + txt += "The ensemble is grouped by the FMU file folder structure.\n"; + } + + return txt; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RimSummaryEnsemble::nameKeys() const +{ + std::string key1 = "Undefined KEY1"; + std::string key2 = "Undefined KEY2"; + + if ( m_groupingMode() == RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ) + { + if ( !m_cases.empty() ) + { + auto fileNames = RiaEnsembleNameTools::groupFilePathsFmu( { m_cases[0]->summaryHeaderFilename().toStdString() } ); + if ( !fileNames.empty() ) + { + key1 = fileNames.begin()->first.first; + key2 = fileNames.begin()->first.second; + } + } + } + else if ( m_groupingMode() == RiaDefines::EnsembleGroupingMode::EVEREST_FOLDER_STRUCTURE ) + { + if ( m_cases.size() > 1 ) + { + auto name1 = RiaFilePathTools::toInternalSeparator( m_cases[0]->summaryHeaderFilename() ).toStdString(); + auto name2 = RiaFilePathTools::toInternalSeparator( m_cases[1]->summaryHeaderFilename() ).toStdString(); + + auto parts1 = RiaStdStringTools::splitString( name1, '/' ); + auto parts2 = RiaStdStringTools::splitString( name2, '/' ); + + size_t commonParts = 0; + for ( size_t i = 0; i < std::min( parts1.size(), parts2.size() ); i++ ) + { + if ( parts1[i] == parts2[i] ) + { + commonParts++; + } + else + { + break; + } + } + + if ( commonParts == 1 ) + { + key2 = parts1[commonParts - 1]; + } + else if ( commonParts > 1 ) + { + key1 = parts1[commonParts - 2]; + key2 = parts1[commonParts - 1]; + } + } + } + + return { key1, key2 }; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimSummaryEnsemble::nameTemplateText() const +{ + QString text; + if ( m_useKey1() ) text += RiaDefines::key1VariableName(); + if ( m_useKey2() ) + { + if ( !text.isEmpty() ) text += ", "; + text += RiaDefines::key2VariableName(); + } + + return text; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.h index 8e87fe4869..ff36a5c77b 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsemble.h @@ -19,6 +19,7 @@ #pragma once #include "RiaDefines.h" +#include "Summary/RiaSummaryDefines.h" #include "RifEclipseSummaryAddress.h" @@ -55,14 +56,24 @@ public: RimSummaryEnsemble(); ~RimSummaryEnsemble() override; - void removeCase( RimSummaryCase* summaryCase, bool notifyChange = true ); - void addCase( RimSummaryCase* summaryCase ); + void removeCase( RimSummaryCase* summaryCase, bool notifyChange = true ); + void addCase( RimSummaryCase* summaryCase ); + void replaceCases( const std::vector& summaryCases ); + virtual std::vector allSummaryCases() const; RimSummaryCase* firstSummaryCase() const; - void setName( const QString& name ); QString name() const; - void ensureNameIsUpdated(); + + void setNameTemplate( const QString& name ); + void updateName( const std::set& existingEnsembleNames ); + void setUsePathKey1( bool useKey1 ); + void setUsePathKey2( bool useKey2 ); + virtual std::pair nameKeys() const; + virtual QString nameTemplateText() const; + + void setGroupingMode( RiaDefines::EnsembleGroupingMode groupingMode ); + RiaDefines::EnsembleGroupingMode groupingMode() const; bool isEnsemble() const; void setAsEnsemble( bool isEnsemble ); @@ -106,33 +117,48 @@ public: void setMinMax( const RifEclipseSummaryAddress& address, double min, double max ); std::pair minMax( const RifEclipseSummaryAddress& address ); +protected: + virtual void onLoadDataAndUpdate(); + + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void buildMetaData(); + void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override; + + bool isAutoNameChecked() const; + + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + private: caf::PdmFieldHandle* userDescriptionField() override; - QString nameAndItemCount() const; - void updateIcon(); + void initAfterRead() override; + void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; + void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; + + QString nameAndItemCount() const; + void updateIcon(); void updateReferringCurveSets( bool doZoomAll ); - void initAfterRead() override; - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; - void onCaseNameChanged( const SignalEmitter* emitter ); void buildChildNodes(); void clearChildNodes(); + QString ensembleDescription() const; + protected: - virtual void onLoadDataAndUpdate(); - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; - - void buildMetaData(); - caf::PdmChildArrayField m_cases; + caf::PdmField m_name; private: - caf::PdmField m_name; - caf::PdmField m_autoName; + caf::PdmField m_nameTemplateString; + caf::PdmField m_autoName; + caf::PdmField m_useKey1; + caf::PdmField m_useKey2; + caf::PdmProxyValueField m_ensembleDescription; + + caf::PdmField> m_groupingMode; + caf::PdmProxyValueField m_nameAndItemCount; caf::PdmField m_isEnsemble; caf::PdmChildField m_dataVectorFolders; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp index 49142e9525..0da54b9cb1 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.cpp @@ -33,6 +33,7 @@ #include "RimSummaryPlot.h" #include "RiuPlotMainWindow.h" +#include "RiuQwtPlotWidget.h" #include "cafPdmUiTreeView.h" @@ -349,26 +350,54 @@ bool RimSummaryEnsembleTools::isEnsembleCurve( RimPlotCurve* sourceCurve ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryEnsembleTools::highlightCurvesForSameRealization( RimPlotCurve* sourceCurve ) +std::vector RimSummaryEnsembleTools::summaryCasesFromCurves( const std::vector& sourceCurves ) { - auto sourceSummaryCurve = dynamic_cast( sourceCurve ); - if ( !sourceSummaryCurve ) return; + std::vector sourceCases; - auto ensembleCurveSet = sourceSummaryCurve->firstAncestorOfType(); - if ( !ensembleCurveSet ) return; - - auto sourceCase = sourceSummaryCurve->summaryCaseY(); - if ( !sourceCase ) return; - - // Select the realization object in Data Sources Tree view - if ( auto mainWindow = RiuPlotMainWindow::instance() ) + for ( auto sourceCurve : sourceCurves ) { - if ( auto treeView = mainWindow->getTreeViewWithItem( sourceCase ) ) - { - treeView->selectAsCurrentItem( sourceCase ); - } + auto sourceSummaryCurve = dynamic_cast( sourceCurve ); + if ( !sourceSummaryCurve ) continue; + + auto ensembleCurveSet = sourceSummaryCurve->firstAncestorOfType(); + if ( !ensembleCurveSet ) continue; + + auto sourceCase = sourceSummaryCurve->summaryCaseY(); + if ( !sourceCase ) continue; + + sourceCases.push_back( sourceCase ); } + return sourceCases; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsembleTools::selectSummaryCasesInProjectTree( const std::vector& sourceCases ) +{ + if ( sourceCases.empty() ) return; + + if ( auto mainWindow = RiuPlotMainWindow::instance() ) + { + if ( auto treeView = mainWindow->getTreeViewWithItem( sourceCases.front() ) ) + { + std::vector sourceItems; + for ( auto sourceCase : sourceCases ) + { + sourceItems.push_back( sourceCase ); + } + + treeView->selectItems( sourceItems ); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryEnsembleTools::highlightCurvesForSummaryCases( const std::vector& sourceCases ) +{ auto summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection(); for ( auto multiPlot : summaryPlotColl->multiPlots() ) @@ -378,27 +407,35 @@ void RimSummaryEnsembleTools::highlightCurvesForSameRealization( RimPlotCurve* s auto plotWidget = dynamic_cast( plot->plotWidget() ); if ( !plotWidget ) continue; - auto summaryCurves = plot->summaryAndEnsembleCurves(); + // Do nothing if no curve sets are present, as this will cause the single curve highlight to be removed + if ( plot->curveSets().empty() ) continue; - std::vector curvesForSameRealization; - - for ( auto curve : summaryCurves ) + std::vector curvesForSameRealization; + for ( const auto& curveSet : plot->curveSets() ) { - if ( sourceCase == curve->summaryCaseY() ) + for ( auto ensembleCurve : curveSet->curves() ) { - curvesForSameRealization.push_back( curve ); + auto summaryCaseY = ensembleCurve->summaryCaseY(); + if ( std::find( sourceCases.begin(), sourceCases.end(), summaryCaseY ) != sourceCases.end() ) + { + curvesForSameRealization.push_back( ensembleCurve ); + } } } + bool updateCurveOrder = false; + plotWidget->resetPlotItemHighlighting( updateCurveOrder ); + if ( !curvesForSameRealization.empty() ) { - bool updateCurveOrder = false; - plotWidget->resetPlotItemHighlighting( updateCurveOrder ); + std::sort( curvesForSameRealization.begin(), curvesForSameRealization.end() ); + curvesForSameRealization.erase( std::unique( curvesForSameRealization.begin(), curvesForSameRealization.end() ), + curvesForSameRealization.end() ); - std::set realizationCurvesSet( curvesForSameRealization.begin(), curvesForSameRealization.end() ); - plotWidget->highlightCurvesUpdateOrder( realizationCurvesSet ); - plotWidget->replot(); + plotWidget->highlightCurvesUpdateOrder( curvesForSameRealization ); } + + plotWidget->replot(); } } } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h index 5974b668b4..9e198a92ee 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryEnsembleTools.h @@ -38,8 +38,10 @@ std::vector createVariationSortedEnsembleParameters( const size_t calculateEnsembleParametersIntersectionHash( const std::vector& summaryCases ); -bool isEnsembleCurve( RimPlotCurve* sourceCurve ); -void highlightCurvesForSameRealization( RimPlotCurve* sourceCurve ); -void resetHighlightAllPlots(); +bool isEnsembleCurve( RimPlotCurve* sourceCurve ); +std::vector summaryCasesFromCurves( const std::vector& sourceCurves ); +void selectSummaryCasesInProjectTree( const std::vector& sourceCases ); +void highlightCurvesForSummaryCases( const std::vector& sourceCases ); +void resetHighlightAllPlots(); } // namespace RimSummaryEnsembleTools diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.cpp index e73f05834d..deb6fb7359 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.cpp @@ -21,21 +21,23 @@ #include "RiaApplication.h" #include "RiaNumericalTools.h" #include "RiaPlotDefines.h" +#include "RiaPreferences.h" +#include "RiaQDateTimeTools.h" +#include "RiaTimeTTools.h" #include "Summary/RiaSummaryAddressAnalyzer.h" #include "Summary/RiaSummaryAddressModifier.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryStringTools.h" #include "PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.h" #include "PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.h" #include "PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" - -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "RifEclEclipseSummary.h" #include "RifEclipseRftAddress.h" #include "RifEclipseSummaryAddress.h" +#include "RimAnnotationLineAppearance.h" #include "RimEnsembleCurveSet.h" #include "RimMainPlotCollection.h" #include "RimMultiPlotCollection.h" @@ -50,10 +52,12 @@ #include "RimSummaryPlot.h" #include "RimSummaryPlotControls.h" #include "RimSummaryPlotNameHelper.h" +#include "RimSummaryPlotReadOut.h" #include "RimSummaryPlotSourceStepping.h" #include "RimSummaryTimeAxisProperties.h" #include "RiuPlotMainWindowTools.h" +#include "RiuQwtPlotWidget.h" #include "RiuSummaryMultiPlotBook.h" #include "RiuSummaryVectorSelectionUi.h" @@ -62,6 +66,7 @@ #include "cafPdmUiPushButtonEditor.h" #include "cafPdmUiTreeOrdering.h" #include "cafPdmUiTreeSelectionEditor.h" +#include "cafSelectionManager.h" #include "qwt_scale_engine.h" @@ -146,6 +151,10 @@ RimSummaryMultiPlot::RimSummaryMultiPlot() CAF_PDM_InitField( &m_allow3DSelectionLink, "Allow3DSelectionLink", true, "Allow Well Selection from 3D View" ); caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_allow3DSelectionLink ); + CAF_PDM_InitFieldNoDefault( &m_readOutSettings, "ReadOutSettings", "Read Out Settings" ); + m_readOutSettings = new RimSummaryPlotReadOut; + m_readOutSettings.uiCapability()->setUiTreeChildrenHidden( true ); + CAF_PDM_InitFieldNoDefault( &m_axisRangeAggregation, "AxisRangeAggregation", "Y Axis Range" ); CAF_PDM_InitField( &m_hidePlotsWithValuesBelow, "HidePlotsWithValuesBelow", false, "" ); @@ -200,7 +209,6 @@ void RimSummaryMultiPlot::insertPlot( RimPlot* plot, size_t index ) { sumPlot->axisChanged.connect( this, &RimSummaryMultiPlot::onSubPlotAxisChanged ); sumPlot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged ); - sumPlot->plotZoomedByUser.connect( this, &RimSummaryMultiPlot::onSubPlotZoomed ); sumPlot->titleChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged ); sumPlot->axisChangedReloadRequired.connect( this, &RimSummaryMultiPlot::onSubPlotAxisReloadRequired ); sumPlot->autoTitleChanged.connect( this, &RimSummaryMultiPlot::onSubPlotAutoTitleChanged ); @@ -216,9 +224,6 @@ void RimSummaryMultiPlot::insertPlot( RimPlot* plot, size_t index ) RimMultiPlot::insertPlot( plot, index ); } - - if ( summaryPlots().size() == 1 ) m_disableWheelZoom = false; - if ( summaryPlots().size() == 2 ) m_disableWheelZoom = true; } //-------------------------------------------------------------------------------------------------- @@ -389,6 +394,9 @@ void RimSummaryMultiPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde axesGroup->add( &m_linkTimeAxis ); axesGroup->add( &m_autoAdjustAppearance ); + auto readOutGroup = uiOrdering.addNewGroup( "Mouse Cursor Readout" ); + m_readOutSettings->uiOrdering( uiConfigName, *readOutGroup ); + auto plotVisibilityFilterGroup = uiOrdering.addNewGroup( "Plot Visibility Filter" ); plotVisibilityFilterGroup->add( &m_plotFilterYAxisThreshold ); plotVisibilityFilterGroup->add( &m_hidePlotsWithValuesBelow ); @@ -441,7 +449,20 @@ void RimSummaryMultiPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFi { updateTimeAxisRangesFromFirstTimePlot(); } - else if ( changedField == &m_linkSubPlotAxes || changedField == &m_axisRangeAggregation || changedField == &m_linkTimeAxis ) + else if ( changedField == &m_linkSubPlotAxes ) + { + if ( m_linkSubPlotAxes() ) + { + // Set the range aggregation to all sub plots when linking. This will ensure that the ZoomAll operation works on all sub plots. + m_axisRangeAggregation = AxisRangeAggregation::SUB_PLOTS; + } + + setAutoValueStates(); + syncAxisRanges(); + analyzePlotsAndAdjustAppearanceSettings(); + zoomAll(); + } + else if ( changedField == &m_axisRangeAggregation ) { setAutoValueStates(); syncAxisRanges(); @@ -498,6 +519,17 @@ void RimSummaryMultiPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFi RimMultiPlot::fieldChangedByUi( changedField, oldValue, newValue ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryMultiPlot::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) +{ + if ( changedChildField == &m_readOutSettings ) + { + updateReadOutSettings(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -706,7 +738,6 @@ void RimSummaryMultiPlot::initAfterRead() { plot->axisChanged.connect( this, &RimSummaryMultiPlot::onSubPlotAxisChanged ); plot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged ); - plot->plotZoomedByUser.connect( this, &RimSummaryMultiPlot::onSubPlotZoomed ); plot->titleChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged ); plot->axisChangedReloadRequired.connect( this, &RimSummaryMultiPlot::onSubPlotAxisReloadRequired ); plot->autoTitleChanged.connect( this, &RimSummaryMultiPlot::onSubPlotAutoTitleChanged ); @@ -722,7 +753,10 @@ void RimSummaryMultiPlot::onLoadDataAndUpdate() RimMultiPlot::onLoadDataAndUpdate(); updatePlotTitles(); - analyzePlotsAndAdjustAppearanceSettings(); + for ( auto p : summaryPlots() ) + { + p->updateAxes(); + } } //-------------------------------------------------------------------------------------------------- @@ -732,29 +766,23 @@ void RimSummaryMultiPlot::zoomAll() { setAutoValueStates(); - if ( m_linkSubPlotAxes() ) - { - // Reset zoom to make sure the complete range for min/max is available - RimMultiPlot::zoomAll(); - - if ( !summaryPlots().empty() ) - { - onSubPlotAxisChanged( nullptr, summaryPlots().front() ); - } - - updateZoom(); - - updateTimeAxisRangesFromFirstTimePlot(); - - return; - } - // Reset zoom to make sure the complete range for min/max is available RimMultiPlot::zoomAll(); syncAxisRanges(); updateTimeAxisRangesFromFirstTimePlot(); + + if ( m_linkSubPlotAxes() ) + { + // Disable auto scaling for Y axis, use the axis values from the first plot + setAutoScaleYEnabled( false ); + + if ( !summaryPlots().empty() ) + { + onSubPlotAxisChanged( nullptr, summaryPlots().front() ); + } + } } //-------------------------------------------------------------------------------------------------- @@ -796,7 +824,15 @@ void RimSummaryMultiPlot::setDefaultRangeAggregationSteppingDimension() } auto stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::VECTOR; - if ( analyzer.wellNames().size() == 1 ) + if ( analyzer.regionNumbers().size() == 1 ) + { + stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::REGION; + } + else if ( analyzer.groupNames().size() == 1 ) + { + stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::GROUP; + } + else if ( analyzer.wellNames().size() == 1 ) { auto wellName = *( analyzer.wellNames().begin() ); @@ -804,23 +840,23 @@ void RimSummaryMultiPlot::setDefaultRangeAggregationSteppingDimension() { stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_SEGMENT; } + else if ( analyzer.wellCompletionNumbers( wellName ).size() == 1 ) + { + stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_COMPLETION_NUMBER; + } + else if ( analyzer.wellConnections( wellName ).size() == 1 ) + { + stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_CONNECTION; + } else { stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::WELL; } } - else if ( analyzer.groupNames().size() == 1 ) - { - stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::GROUP; - } else if ( analyzer.networkNames().size() == 1 ) { stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::NETWORK; } - else if ( analyzer.regionNumbers().size() == 1 ) - { - stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::REGION; - } else if ( analyzer.aquifers().size() == 1 ) { stepDimension = RimSummaryDataSourceStepping::SourceSteppingDimension::AQUIFER; @@ -832,12 +868,12 @@ void RimSummaryMultiPlot::setDefaultRangeAggregationSteppingDimension() m_sourceStepping->setStepDimension( stepDimension ); - // Previously, when the stepping dimension was set to 'well' for range aggregation, it was based on all wells. If one of the wells had - // extreme values and was not visible, it would set the y-range to match the extreme value, making some curves invisible. We have now - // changed the default setting to use visible subplots to determine the y-range aggregation. + // Previously, when the stepping dimension was set to 'well' for range aggregation, it was based on all wells. If one of the wells + // had extreme values and was not visible, it would set the y-range to match the extreme value, making some curves invisible. We + // have now changed the default setting to use visible subplots to determine the y-range aggregation. // https://github.com/OPM/ResInsight/issues/10543 - m_axisRangeAggregation = AxisRangeAggregation::SUB_PLOTS; + m_axisRangeAggregation = AxisRangeAggregation::NONE; setAutoValueStates(); } @@ -847,11 +883,6 @@ void RimSummaryMultiPlot::setDefaultRangeAggregationSteppingDimension() //-------------------------------------------------------------------------------------------------- void RimSummaryMultiPlot::syncAxisRanges() { - if ( m_linkSubPlotAxes() ) - { - return; - } - if ( m_axisRangeAggregation() == AxisRangeAggregation::NONE ) { return; @@ -1254,8 +1285,11 @@ void RimSummaryMultiPlot::analyzePlotsAndAdjustAppearanceSettings() { if ( m_autoAdjustAppearance ) { - // Required to sync axis ranges before computing the auto scale - syncAxisRanges(); + if ( !m_linkSubPlotAxes ) + { + // Required to sync axis ranges before computing the auto scale + syncAxisRanges(); + } RiaSummaryAddressAnalyzer analyzer; @@ -1382,14 +1416,6 @@ void RimSummaryMultiPlot::onSubPlotChanged( const caf::SignalEmitter* emitter ) applyPlotWindowTitleToWidgets(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryMultiPlot::onSubPlotZoomed( const caf::SignalEmitter* emitter ) -{ - m_axisRangeAggregation = AxisRangeAggregation::NONE; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1397,22 +1423,21 @@ void RimSummaryMultiPlot::onSubPlotAxisChanged( const caf::SignalEmitter* emitte { syncTimeAxisRanges( summaryPlot ); - if ( !m_linkSubPlotAxes() ) + if ( m_linkSubPlotAxes() ) { - syncAxisRanges(); - return; - } - - for ( auto plot : summaryPlots() ) - { - if ( plot != summaryPlot ) + for ( auto plot : summaryPlots() ) { - plot->copyMatchingAxisPropertiesFromOther( *summaryPlot ); - plot->updateAll(); + if ( plot != summaryPlot ) + { + plot->copyMatchingAxisPropertiesFromOther( *summaryPlot ); + plot->updateAll(); + } } } - - syncAxisRanges(); + else + { + syncAxisRanges(); + } } //-------------------------------------------------------------------------------------------------- @@ -1455,6 +1480,29 @@ void RimSummaryMultiPlot::updateReadOnlyState() m_axisRangeAggregation.uiCapability()->setUiReadOnly( m_linkSubPlotAxes() ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryMultiPlot::updateReadOutSettings() +{ + for ( auto plot : summaryPlots() ) + { + if ( !m_readOutSettings->enableVerticalLine() ) plot->removeAllTimeAnnotations(); + + if ( !m_readOutSettings->enableHorizontalLine() ) + { + if ( auto axis = plot->axisPropertiesForPlotAxis( RiuPlotAxis::defaultLeft() ) ) + { + axis->removeAllAnnotations(); + } + } + + plot->enableCurvePointTracking( m_readOutSettings->enableCurvePointTracking() ); + + plot->updateAxes(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1494,32 +1542,59 @@ QWidget* RimSummaryMultiPlot::createViewWidget( QWidget* mainWindowParent ) } recreatePlotWidgets(); + updateReadOutSettings(); + return m_viewer; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryMultiPlot::onPlotAdditionOrRemoval() +{ + m_disableWheelZoom = ( summaryPlots().size() > 1 ); + + RimMultiPlot::onPlotAdditionOrRemoval(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimSummaryMultiPlot::appendSubPlotByStepping( int direction ) { - if ( summaryPlots().empty() ) return; + std::vector plotsForStepping; - // find matching plots - std::vector plots = m_sourceStepping->plotsMatchingStepSettings( summaryPlots() ); - if ( plots.empty() ) return; - - // duplicate them - auto newPlots = RicSummaryPlotBuilder::duplicatePlots( plots ); - if ( newPlots.empty() ) return; - - for ( auto plot : newPlots ) + bool isMultiPlotSelected = ( caf::SelectionManager::instance()->selectedItemOfType() != nullptr ); + if ( isMultiPlotSelected ) { - RimSummaryPlot* newPlot = dynamic_cast( plot ); - if ( newPlot == nullptr ) continue; + duplicate(); - addPlot( newPlot ); - newPlot->resolveReferencesRecursively(); + // The duplicate operation selects duplicated plot by default. Select this as current item to continue stepping on this plot + RiuPlotMainWindowTools::selectAsCurrentItem( this ); + plotsForStepping = summaryPlots(); + } + else + { + std::vector plots = m_sourceStepping->plotsMatchingStepSettings( summaryPlots() ); + if ( !plots.empty() ) + { + auto newPlots = RiaSummaryPlotTools::duplicatePlots( plots ); + for ( auto plot : newPlots ) + { + if ( RimSummaryPlot* newPlot = dynamic_cast( plot ) ) + { + addPlot( newPlot ); + newPlot->resolveReferencesRecursively(); + + plotsForStepping.push_back( newPlot ); + } + } + } + } + + for ( auto newPlot : plotsForStepping ) + { if ( m_sourceStepping()->stepDimension() == RimSummaryDataSourceStepping::SourceSteppingDimension::SUMMARY_CASE ) { RimSummaryCase* newCase = m_sourceStepping()->stepCase( direction ); @@ -1560,7 +1635,11 @@ void RimSummaryMultiPlot::appendSubPlotByStepping( int direction ) loadDataAndUpdate(); updateConnectedEditors(); - RiuPlotMainWindowTools::selectAsCurrentItem( newPlots.back() ); + if ( !isMultiPlotSelected && !summaryPlots().empty() ) + { + // Select the last plot in the list as the current item to be able to append plots for the next object type (well, region, etc.) + RiuPlotMainWindowTools::selectAsCurrentItem( summaryPlots().back() ); + } updateSourceStepper(); RiuPlotMainWindowTools::refreshToolbars(); @@ -1672,3 +1751,95 @@ void RimSummaryMultiPlot::selectWell( QString wellName ) if ( m_sourceStepping->stepDimension() != SourceSteppingDimension::WELL ) return; m_sourceStepping->setStep( wellName ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryMultiPlot::updateReadOutLines( double qwtTimeValue, double yValue ) +{ + if ( !m_readOutSettings->enableVerticalLine() && !m_readOutSettings->enableHorizontalLine() ) return; + + const auto timeTValue = RiaTimeTTools::fromDouble( qwtTimeValue ); + const QString dateFormatString = RiaQDateTimeTools::dateFormatString( RiaPreferences::current()->dateFormat(), + RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY ); + + for ( auto plot : summaryPlots() ) + { + if ( m_readOutSettings->enableVerticalLine() && plot->timeAxisProperties() ) + { + plot->timeAxisProperties()->removeAllAnnotations(); + + auto anno = new RimTimeAxisAnnotation; + + anno->setTime( timeTValue, dateFormatString ); + + auto lineAppearance = m_readOutSettings->lineAppearance(); + + Qt::PenStyle style = lineAppearance->isDashed() ? Qt::PenStyle::DashLine : Qt::PenStyle::SolidLine; + anno->setPenStyle( style ); + anno->setColor( lineAppearance->color() ); + anno->setAlignment( m_readOutSettings->verticalLineLabelAlignment() ); + + plot->timeAxisProperties()->appendAnnotation( anno ); + } + + if ( m_readOutSettings->enableHorizontalLine() ) + { + std::vector summaryCurves; + + // 1. Check if any curves are highlighted + if ( auto plotWidget = dynamic_cast( plot->plotWidget() ) ) + { + for ( auto highlightCurve : plotWidget->highlightedCurves() ) + { + if ( auto summaryCurve = dynamic_cast( highlightCurve ) ) + { + summaryCurves.push_back( summaryCurve ); + } + } + } + + // 2. If no curves are highlighted, use summary curves from single realizations + if ( summaryCurves.empty() ) + { + summaryCurves = plot->summaryCurves(); + } + + auto annotationAxis = dynamic_cast( plot->axisPropertiesForPlotAxis( RiuPlotAxis::defaultLeft() ) ); + if ( !summaryCurves.empty() ) + { + auto firstCurve = summaryCurves.front(); + yValue = firstCurve->yValueAtTimeT( timeTValue ); + annotationAxis = dynamic_cast( plot->axisPropertiesForPlotAxis( firstCurve->axisY() ) ); + } + + if ( annotationAxis ) + { + annotationAxis->removeAllAnnotations(); + + auto anno = new RimPlotAxisAnnotation(); + anno->setAnnotationType( RimPlotAxisAnnotation::AnnotationType::LINE ); + + anno->setValue( yValue ); + + auto scaledValue = yValue / annotationAxis->scaleFactor(); + auto valueText = RiaNumberFormat::valueToText( scaledValue, RiaNumberFormat::NumberFormatType::FIXED, 2 ); + + anno->setName( valueText ); + + auto lineAppearance = m_readOutSettings->lineAppearance(); + + Qt::PenStyle style = lineAppearance->isDashed() ? Qt::PenStyle::DashLine : Qt::PenStyle::SolidLine; + anno->setPenStyle( style ); + anno->setColor( lineAppearance->color() ); + anno->setAlignment( m_readOutSettings->horizontalLineLabelAlignment() ); + + annotationAxis->appendAnnotation( anno ); + } + } + + // Calling plot->updateAxes() does not work for the first plot in a multiplot. Use fine grained update of annotation objects. + plot->updateAnnotationsInPlotWidget(); + plot->updatePlotWidgetFromAxisRanges(); + } +} diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.h index 5797a0fbec..0b957899b2 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlot.h @@ -35,6 +35,7 @@ class RimSummaryPlotSourceStepping; class RimSummaryPlotNameHelper; class RimSummaryNameHelper; class RimPlotAxisProperties; +class RimSummaryPlotReadOut; //================================================================================================== /// @@ -113,6 +114,8 @@ public: void selectWell( QString wellName ); + void updateReadOutLines( double qwtTimeValue, double yValue ); + protected: bool handleGlobalKeyEvent( QKeyEvent* keyEvent ) override; bool handleGlobalWheelEvent( QWheelEvent* wheelEvent ) override; @@ -122,11 +125,15 @@ protected: QWidget* createViewWidget( QWidget* mainWindowParent ) override; + void onPlotAdditionOrRemoval() override; + private: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override; + void populateNameHelper( RimSummaryPlotNameHelper* nameHelper ); void computeAggregatedAxisRange(); @@ -142,7 +149,6 @@ private: void appendCurveByStepping( int direction ); void onSubPlotChanged( const caf::SignalEmitter* emitter ); - void onSubPlotZoomed( const caf::SignalEmitter* emitter ); void onSubPlotAxisChanged( const caf::SignalEmitter* emitter, RimSummaryPlot* summaryPlot ); void onSubPlotAxisReloadRequired( const caf::SignalEmitter* emitter, RimSummaryPlot* summaryPlot ); void onSubPlotAutoTitleChanged( const caf::SignalEmitter* emitter, bool isEnabled ); @@ -151,6 +157,8 @@ private: void updateReadOnlyState(); + void updateReadOutSettings(); + std::pair adjustedMinMax( const RimPlotAxisProperties* axis, double min, double max ) const; private: @@ -163,6 +171,8 @@ private: caf::PdmField m_autoAdjustAppearance; caf::PdmField m_allow3DSelectionLink; + caf::PdmChildField m_readOutSettings; + caf::PdmField m_hidePlotsWithValuesBelow; caf::PdmField m_plotFilterYAxisThreshold; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp index 039413268e..6ef469c9ea 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp @@ -144,10 +144,13 @@ void RimSummaryMultiPlotCollection::summaryPlotItemInfos( QListdescription(); + for ( RimSummaryPlot* plot : multiPlot->summaryPlots() ) { - QString displayName = plot->userDescriptionField()->uiCapability()->uiValue().toString(); - optionInfos->push_back( caf::PdmOptionItemInfo( displayName, plot, false, plot->uiCapability()->uiIconProvider() ) ); + QString displayName = mainPlotName + " : "; + displayName += plot->userDescriptionField()->uiCapability()->uiValue().toString(); + optionInfos->push_back( caf::PdmOptionItemInfo( displayName, plot, false, plot->uiIconProvider() ) ); } } } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.cpp index dd94cf104c..c3cf7ef14b 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.cpp @@ -78,11 +78,18 @@ QString RimSummaryNameHelper::aggregatedPlotTitle( const RimSummaryNameHelper& o title += "Segment : " + QString::fromStdString( segment ); } - auto completion = titleCompletion(); - if ( !other.isCompletionInTitle() && !completion.empty() ) + auto wellCompletion = titleWellCompletion(); + if ( !other.isWellCompletionInTitle() && !wellCompletion.empty() ) { if ( !title.isEmpty() ) title += ", "; - title += "Completion : " + QString::fromStdString( completion ); + title += "Well Completion : " + QString::fromStdString( wellCompletion ); + } + + auto connection = titleConnection(); + if ( !other.isConnectionInTitle() && !connection.empty() ) + { + if ( !title.isEmpty() ) title += ", "; + title += "Connection : " + QString::fromStdString( connection ); } auto vectorName = titleVectorName(); @@ -90,6 +97,19 @@ QString RimSummaryNameHelper::aggregatedPlotTitle( const RimSummaryNameHelper& o { if ( !title.isEmpty() ) title += ", "; title += QString::fromStdString( RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( vectorName, true ) ); + + // https://github.com/OPM/ResInsight/issues/12157 + size_t pos = vectorName.find( '_' ); + if ( pos != std::string::npos ) + { + // For calculated curves, the name vector name is often created using underscore. Check if the vector name already is + // present in the title. + auto qtVectorName = QString::fromStdString( vectorName ); + if ( title.indexOf( qtVectorName ) == -1 ) + { + title += QString( " (%1)" ).arg( QString::fromStdString( vectorName ) ); + } + } } return title; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.h index 9ad9456b43..7e48fa6df9 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryNameHelper.h @@ -46,19 +46,21 @@ public: virtual bool isCaseInTitle() const = 0; virtual bool isBlockInTitle() const = 0; virtual bool isSegmentInTitle() const = 0; - virtual bool isCompletionInTitle() const = 0; + virtual bool isConnectionInTitle() const = 0; + virtual bool isWellCompletionInTitle() const = 0; virtual std::vector vectorNames() const = 0; virtual QString caseName() const = 0; - virtual std::string titleVectorName() const = 0; - virtual std::string titleWellName() const = 0; - virtual std::string titleGroupName() const = 0; - virtual std::string titleNetwork() const = 0; - virtual std::string titleRegion() const = 0; - virtual std::string titleBlock() const = 0; - virtual std::string titleSegment() const = 0; - virtual std::string titleCompletion() const = 0; + virtual std::string titleVectorName() const = 0; + virtual std::string titleWellName() const = 0; + virtual std::string titleGroupName() const = 0; + virtual std::string titleNetwork() const = 0; + virtual std::string titleRegion() const = 0; + virtual std::string titleBlock() const = 0; + virtual std::string titleSegment() const = 0; + virtual std::string titleWellCompletion() const = 0; + virtual std::string titleConnection() const = 0; virtual size_t numberOfCases() const = 0; }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index a72481c1a9..c12a2bd557 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -20,6 +20,7 @@ #include "RiaColorTables.h" #include "RiaColorTools.h" +#include "RiaCurveMerger.h" #include "RiaDefines.h" #include "RiaLogging.h" #include "RiaPlotDefines.h" @@ -29,11 +30,11 @@ #include "RiaStdStringTools.h" #include "Summary/RiaSummaryCurveDefinition.h" #include "Summary/RiaSummaryDefines.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" #include "RifEclipseSummaryAddressDefines.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "SummaryPlotCommands/RicSummaryPlotEditorUi.h" #include "RimAsciiDataCurve.h" @@ -48,6 +49,7 @@ #include "RimSummaryCalculationCollection.h" #include "RimSummaryCase.h" #include "RimSummaryCurve.h" +#include "RimSummaryCurveAppearanceCalculator.h" #include "RimSummaryCurveCollection.h" #include "RimSummaryCurvesData.h" #include "RimSummaryEnsemble.h" @@ -55,12 +57,14 @@ #include "RimSummaryPlotControls.h" #include "RimSummaryPlotNameHelper.h" #include "RimSummaryTimeAxisProperties.h" +#include "Tools/RimPlotAxisTools.h" #include "RiuPlotAxis.h" #include "RiuPlotMainWindow.h" #include "RiuPlotMainWindowTools.h" #include "RiuQwtPlotCurve.h" #include "RiuQwtPlotItem.h" +#include "RiuQwtPlotWidget.h" #include "RiuSummaryQwtPlot.h" #ifdef USE_QTCHARTS @@ -114,7 +118,6 @@ struct RimSummaryPlot::CurveInfo RimSummaryPlot::RimSummaryPlot() : curvesChanged( this ) , axisChanged( this ) - , plotZoomedByUser( this ) , titleChanged( this ) , m_isValid( true ) , axisChangedReloadRequired( this ) @@ -210,18 +213,7 @@ void RimSummaryPlot::updateAxes() updateNumericalAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); updateNumericalAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ); - if ( m_summaryPlot ) m_summaryPlot->clearAnnotationObjects(); - - if ( timeAxisProperties() && plotWidget() ) - { - m_summaryPlot->updateAnnotationObjects( timeAxisProperties() ); - } - - RimPlotAxisPropertiesInterface* leftYAxisProperties = axisPropertiesForPlotAxis( RiuPlotAxis::defaultLeft() ); - if ( leftYAxisProperties && plotWidget() ) - { - m_summaryPlot->updateAnnotationObjects( leftYAxisProperties ); - } + updateAnnotationsInPlotWidget(); updateNumericalAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ); updateNumericalAxis( RiaDefines::PlotAxis::PLOT_AXIS_TOP ); @@ -230,6 +222,26 @@ void RimSummaryPlot::updateAxes() updatePlotWidgetFromAxisRanges(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlot::updateAnnotationsInPlotWidget() +{ + if ( m_summaryPlot ) m_summaryPlot->clearAnnotationObjects(); + + if ( !plotWidget() ) return; + + if ( timeAxisProperties() ) + { + m_summaryPlot->updateAnnotationObjects( timeAxisProperties() ); + } + + if ( auto leftYAxisProperties = axisPropertiesForPlotAxis( RiuPlotAxis::defaultLeft() ) ) + { + m_summaryPlot->updateAnnotationObjects( leftYAxisProperties ); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -456,23 +468,6 @@ RimSummaryCurveCollection* RimSummaryPlot::summaryCurveCollection() const return m_summaryCurveCollection(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RimSummaryPlot::visibleStackedSummaryCurvesForAxis( RiuPlotAxis plotAxis ) -{ - auto visibleCurves = visibleSummaryCurvesForAxis( plotAxis ); - - std::vector visibleStackedCurves; - - std::copy_if( visibleCurves.begin(), - visibleCurves.end(), - std::back_inserter( visibleStackedCurves ), - []( RimSummaryCurve* curve ) { return curve->isStacked(); } ); - - return visibleStackedCurves; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -639,7 +634,7 @@ void RimSummaryPlot::setLegendPosition( RiuPlotWidget::Legend position ) void RimSummaryPlot::setPlotInfoLabel( const QString& label ) { auto qwtText = QwtText( label ); - qwtText.setRenderFlags( Qt::AlignBottom | Qt::AlignRight ); + qwtText.setRenderFlags( Qt::AlignTop | Qt::AlignRight ); QFont font; font.setBold( true ); @@ -921,6 +916,7 @@ void RimSummaryPlot::updateTimeAxis( RimSummaryTimeAxisProperties* timeAxisPrope } plotWidget()->enableAxis( RimSummaryPlot::plotAxisForTime(), true ); + plotWidget()->enableAxisNumberLabels( RimSummaryPlot::plotAxisForTime(), timeAxisProperties->showLabels() ); { Qt::AlignmentFlag alignment = Qt::AlignCenter; @@ -935,7 +931,7 @@ void RimSummaryPlot::updateTimeAxis( RimSummaryTimeAxisProperties* timeAxisPrope true, alignment ); plotWidget()->setAxisTitleText( RimSummaryPlot::plotAxisForTime(), timeAxisProperties->title() ); - plotWidget()->setAxisTitleEnabled( RimSummaryPlot::plotAxisForTime(), timeAxisProperties->showTitle ); + plotWidget()->setAxisTitleEnabled( RimSummaryPlot::plotAxisForTime(), timeAxisProperties->showTitle() ); if ( timeAxisProperties->tickmarkType() == RimSummaryTimeAxisProperties::TickmarkType::TICKMARK_COUNT ) { @@ -1117,6 +1113,27 @@ bool RimSummaryPlot::isOnlyWaterCutCurvesVisible( RiuPlotAxis plotAxis ) return ( waterCutCurveCount == curves.size() ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlot::enableCurvePointTracking( bool enable ) +{ + m_summaryPlot->enableCurvePointTracking( enable ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::any RimSummaryPlot::valueForKey( std::string key ) const +{ + if ( key == "TimeStampZoomOperation" ) + { + return m_lastZoomTime; + } + + return {}; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1336,8 +1353,9 @@ RimTimeAxisAnnotation* RimSummaryPlot::addTimeAnnotation( time_t time ) RimSummaryTimeAxisProperties* axisProps = timeAxisProperties(); CAF_ASSERT( axisProps ); - auto* annotation = new RimTimeAxisAnnotation; - annotation->setTime( time ); + auto* annotation = new RimTimeAxisAnnotation; + const QString formatString; + annotation->setTime( time, formatString ); annotation->setDefaultColor(); axisProps->appendAnnotation( annotation ); @@ -1546,6 +1564,8 @@ void RimSummaryPlot::addGridTimeHistoryCurve( RimGridTimeHistoryCurve* curve ) CVF_ASSERT( curve ); m_gridTimeHistoryCurves.push_back( curve ); + connectCurveSignals( curve ); + if ( plotWidget() ) { curve->setParentPlotAndReplot( plotWidget() ); @@ -1553,20 +1573,6 @@ void RimSummaryPlot::addGridTimeHistoryCurve( RimGridTimeHistoryCurve* curve ) } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::addGridTimeHistoryCurveNoUpdate( RimGridTimeHistoryCurve* curve ) -{ - CVF_ASSERT( curve ); - - m_gridTimeHistoryCurves.push_back( curve ); - if ( plotWidget() ) - { - curve->setParentPlotNoReplot( plotWidget() ); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1601,6 +1607,17 @@ caf::PdmFieldHandle* RimSummaryPlot::userDescriptionField() return &m_description; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlot::zoomAllForMultiPlot() +{ + if ( auto multiPlot = firstAncestorOrThisOfType() ) + { + multiPlot->zoomAll(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1712,58 +1729,86 @@ bool RimSummaryPlot::updateStackedCurveDataForRelevantAxes() //-------------------------------------------------------------------------------------------------- bool RimSummaryPlot::updateStackedCurveDataForAxis( RiuPlotAxis plotAxis ) { - auto stackedCurves = visibleStackedSummaryCurvesForAxis( plotAxis ); - if ( stackedCurves.empty() ) return false; + // See RimWellLogTrack::updateStackedCurveData() for vertical plots + struct CurveStackingItem + { + RimStackablePlotCurve* curve; + RiaDefines::PhaseType phase; + std::vector xValues; + std::vector yValues; + }; + + std::vector stackingItems; + + for ( auto summaryCurve : visibleSummaryCurvesForAxis( plotAxis ) ) + { + if ( summaryCurve->isStacked() ) + { + auto xValues = RiuPlotCurve::fromTime_t( summaryCurve->timeStepsY() ); + auto yValues = summaryCurve->valuesY(); + + if ( !xValues.empty() && xValues.size() == yValues.size() ) + { + stackingItems.push_back( { summaryCurve, summaryCurve->phaseType(), xValues, yValues } ); + } + } + } + + // Add stack data for time history curves + for ( auto gridCurve : gridTimeHistoryCurves() ) + { + if ( gridCurve->yAxis() == plotAxis && gridCurve->isStacked() && gridCurve->isChecked() ) + { + auto xValues = RiuPlotCurve::fromTime_t( gridCurve->timeStepValues() ); + auto yValues = gridCurve->yValues(); + + if ( !xValues.empty() && xValues.size() == yValues.size() ) + { + stackingItems.push_back( { gridCurve, gridCurve->phaseType(), xValues, yValues } ); + } + } + } + + if ( stackingItems.empty() ) return true; + + RiaCurveMerger curveMerger; std::map curvePhaseCount; - for ( RimSummaryCurve* curve : stackedCurves ) - { - curve->loadDataAndUpdate( false ); - curvePhaseCount[curve->phaseType()]++; + for ( auto stackingItem : stackingItems ) + { + curveMerger.addCurveData( stackingItem.xValues, stackingItem.yValues ); + curvePhaseCount[stackingItem.phase]++; } + curveMerger.computeInterpolatedValues( true ); + std::vector allXValues = curveMerger.allXValues(); + std::vector allStackedValues( allXValues.size(), 0.0 ); + + // Z-position of curve, to draw them in correct order + double zPos = -10000.0; + + for ( size_t index = 0; index < stackingItems.size(); index++ ) { - // Z-position of curve, to draw them in correct order - double zPos = -10000.0; - - std::vector allTimeSteps; - for ( RimSummaryCurve* curve : stackedCurves ) + auto yValues = curveMerger.interpolatedYValuesForAllXValues( index ); + for ( size_t i = 0; i < allXValues.size(); ++i ) { - auto timeSteps = curve->timeStepsY(); - if ( !timeSteps.empty() ) + double value = yValues[i]; + if ( value != std::numeric_limits::infinity() ) { - // https://github.com/OPM/ResInsight/issues/10438 - allTimeSteps.insert( allTimeSteps.end(), timeSteps.begin(), timeSteps.end() ); + allStackedValues[i] += value; } } - std::sort( allTimeSteps.begin(), allTimeSteps.end() ); - allTimeSteps.erase( std::unique( allTimeSteps.begin(), allTimeSteps.end() ), allTimeSteps.end() ); - std::vector allStackedValues( allTimeSteps.size(), 0.0 ); - - size_t stackIndex = 0u; - for ( RimSummaryCurve* curve : stackedCurves ) + auto curve = stackingItems[index].curve; + curve->setSamplesFromXYValues( allXValues, allStackedValues, false ); + curve->setZOrder( zPos ); + if ( curve->isStackedWithPhaseColors() ) { - for ( size_t i = 0; i < allTimeSteps.size(); ++i ) - { - double value = curve->yValueAtTimeT( allTimeSteps[i] ); - if ( value != std::numeric_limits::infinity() ) - { - allStackedValues[i] += value; - } - } - - curve->setOverrideCurveDataY( allTimeSteps, allStackedValues ); - curve->setZOrder( zPos ); - if ( curve->isStackedWithPhaseColors() ) - { - curve->assignStackColor( stackIndex, curvePhaseCount[curve->phaseType()] ); - } - zPos -= 1.0; + curve->assignStackColor( index, curvePhaseCount[curve->phaseType()] ); } + zPos -= 1.0; } - return true; } @@ -1953,7 +1998,7 @@ void RimSummaryPlot::deletePlotCurvesAndPlotWidget() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::connectCurveSignals( RimSummaryCurve* curve ) +void RimSummaryPlot::connectCurveSignals( RimStackablePlotCurve* curve ) { curve->dataChanged.connect( this, &RimSummaryPlot::curveDataChanged ); curve->visibilityChanged.connect( this, &RimSummaryPlot::curveVisibilityChanged ); @@ -1965,7 +2010,7 @@ void RimSummaryPlot::connectCurveSignals( RimSummaryCurve* curve ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::disconnectCurveSignals( RimSummaryCurve* curve ) +void RimSummaryPlot::disconnectCurveSignals( RimStackablePlotCurve* curve ) { curve->dataChanged.disconnect( this ); curve->visibilityChanged.disconnect( this ); @@ -2183,9 +2228,18 @@ void RimSummaryPlot::axisPositionChanged( const caf::SignalEmitter* emitter, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSummaryPlot::deleteAllGridTimeHistoryCurves() +void RimSummaryPlot::deleteUnlockedGridTimeHistoryCurves() { - m_gridTimeHistoryCurves.deleteChildren(); + auto allGridCurves = m_gridTimeHistoryCurves.childrenByType(); + for ( auto c : allGridCurves ) + { + if ( c->isLocked() ) continue; + + disconnectCurveSignals( c ); + + m_gridTimeHistoryCurves.removeChild( c ); + delete c; + } } //-------------------------------------------------------------------------------------------------- @@ -2271,7 +2325,7 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleEnsembleDrop( RimSummaryEnsemble { if ( ensembles.count( ensemble ) > 0 ) continue; - auto curveSet = RicSummaryPlotBuilder::addNewEnsembleCurve( this, addr, ensemble ); + auto curveSet = RiaSummaryPlotTools::addNewEnsembleCurve( this, addr, ensemble ); curveSetsToUpdate.push_back( curveSet ); newCurves++; } @@ -2373,7 +2427,7 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar auto addresses = curveDef.ensemble()->ensembleSummaryAddresses(); if ( addresses.find( curveDef.summaryAddressY() ) != addresses.end() ) { - auto curveSet = RicSummaryPlotBuilder::addNewEnsembleCurve( this, curveDef.summaryCurveAddress(), curveDef.ensemble() ); + auto curveSet = RiaSummaryPlotTools::addNewEnsembleCurve( this, curveDef.summaryCurveAddress(), curveDef.ensemble() ); curveSetsToUpdate.push_back( curveSet ); newCurves++; } @@ -2444,11 +2498,10 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleSummaryAddressDrop( RimSummaryAd if ( !skipAddress ) { - auto curveSet = - RicSummaryPlotBuilder::addNewEnsembleCurve( this, - RiaSummaryCurveAddress( RifEclipseSummaryAddress::timeAddress(), - droppedAddress ), - ensemble ); + auto curveSet = RiaSummaryPlotTools::addNewEnsembleCurve( this, + RiaSummaryCurveAddress( RifEclipseSummaryAddress::timeAddress(), + droppedAddress ), + ensemble ); curveSetsToUpdate.push_back( curveSet ); newCurves++; @@ -2551,12 +2604,10 @@ RimSummaryCurve* RimSummaryPlot::addNewCurve( const RifEclipseSummaryAddress& ad const RifEclipseSummaryAddress& addressX, RimSummaryCase* summaryCaseX ) { - auto* newCurve = new RimSummaryCurve(); - newCurve->setSummaryCaseY( summaryCase ); - newCurve->setSummaryAddressY( address ); + auto newCurve = RiaSummaryPlotTools::createCurve( summaryCase, address ); - // This address is RifEclipseSummaryAddress::time() if the curve is a time plot. Otherwise it is the address of the summary vector used - // for the x-axis + // This address is RifEclipseSummaryAddress::time() if the curve is a time plot. Otherwise it is the address of the summary vector + // used for the x-axis if ( addressX.category() != RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_TIME ) { newCurve->setAxisTypeX( RiaDefines::HorizontalAxisType::SUMMARY_VECTOR ); @@ -2584,13 +2635,13 @@ void RimSummaryPlot::onPlotZoomed() p->enableAutoValueMinMax( false ); } - plotZoomedByUser.send(); - updateAxisRangesFromPlotWidget(); timeAxisSettingsChanged( nullptr ); axisChanged.send( this ); + + m_lastZoomTime = std::chrono::steady_clock::now(); } //-------------------------------------------------------------------------------------------------- @@ -2768,7 +2819,10 @@ void RimSummaryPlot::initAfterRead() connectCurveSignals( curve ); } - updateStackedCurveData(); + for ( auto curve : gridTimeHistoryCurves() ) + { + connectCurveSignals( curve ); + } } //-------------------------------------------------------------------------------------------------- @@ -3099,7 +3153,9 @@ void RimSummaryPlot::assignYPlotAxis( RimSummaryCurve* curve ) { if ( c == curve ) continue; - if ( c->summaryAddressY().vectorName() == curve->summaryAddressY().vectorName() ) + auto incomingAxisText = RimPlotAxisTools::axisTextForAddress( curve->summaryAddressY() ); + auto currentAxisText = RimPlotAxisTools::axisTextForAddress( c->summaryAddressY() ); + if ( incomingAxisText == currentAxisText ) { curve->setLeftOrRightAxisY( c->axisY() ); return; @@ -3171,11 +3227,8 @@ void RimSummaryPlot::assignYPlotAxis( RimSummaryCurve* curve ) if ( plotWidget() && plotWidget()->isMultiAxisSupported() ) { - QString axisObjectName = "New Axis"; - if ( !curve->summaryAddressY().uiText().empty() ) axisObjectName = QString::fromStdString( curve->summaryAddressY().uiText() ); - auto newPlotAxis = plotWidget()->createNextPlotAxis( plotAxisType ); - addNewAxisProperties( newPlotAxis, axisObjectName ); + addNewAxisProperties( newPlotAxis, "New Axis" ); curve->setLeftOrRightAxisY( newPlotAxis ); return; @@ -3230,7 +3283,9 @@ void RimSummaryPlot::assignXPlotAxis( RimSummaryCurve* curve ) { if ( c == curve ) continue; - if ( c->summaryAddressX().vectorName() == curve->summaryAddressX().vectorName() ) + auto incomingAxisText = RimPlotAxisTools::axisTextForAddress( curve->summaryAddressY() ); + auto currentAxisText = RimPlotAxisTools::axisTextForAddress( c->summaryAddressY() ); + if ( incomingAxisText == currentAxisText ) { curve->setTopOrBottomAxisX( c->axisX() ); return; @@ -3302,11 +3357,8 @@ void RimSummaryPlot::assignXPlotAxis( RimSummaryCurve* curve ) RiuPlotAxis newPlotAxis = RiuPlotAxis::defaultBottomForSummaryVectors(); if ( plotWidget() && plotWidget()->isMultiAxisSupported() ) { - QString axisObjectName = "New Axis"; - if ( !curve->summaryAddressX().uiText().empty() ) axisObjectName = QString::fromStdString( curve->summaryAddressX().uiText() ); - newPlotAxis = plotWidget()->createNextPlotAxis( plotAxisType ); - addNewAxisProperties( newPlotAxis, axisObjectName ); + addNewAxisProperties( newPlotAxis, "New Axis" ); } } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.h index 2c8962f73e..4e4a853f38 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.h @@ -25,7 +25,7 @@ #include "RimPlotAxisProperties.h" #include "RimSummaryDataSourceStepping.h" -#include "RiuQwtPlotWidget.h" +#include "RiuPlotWidget.h" #include "RiuSummaryPlot.h" #include "cafPdmChildArrayField.h" @@ -63,6 +63,7 @@ class RimTimeAxisAnnotation; class RiaSummaryCurveDefinition; class RifEclipseSummaryAddress; class RiaSummaryCurveAddress; +class RimStackablePlotCurve; class QwtInterval; class QwtPlotCurve; @@ -82,7 +83,6 @@ class RimSummaryPlot : public RimPlot, public RimSummaryDataSourceStepping public: caf::Signal<> curvesChanged; caf::Signal axisChanged; - caf::Signal<> plotZoomedByUser; caf::Signal<> titleChanged; caf::Signal axisChangedReloadRequired; caf::Signal autoTitleChanged; @@ -108,12 +108,11 @@ public: void deleteCurves( const std::vector& curves ); void deleteCurvesAssosiatedWithCase( RimSummaryCase* summaryCase ); - void deleteAllGridTimeHistoryCurves(); RimEnsembleCurveSetCollection* ensembleCurveSetCollection() const; void addGridTimeHistoryCurve( RimGridTimeHistoryCurve* curve ); - void addGridTimeHistoryCurveNoUpdate( RimGridTimeHistoryCurve* curve ); + void deleteUnlockedGridTimeHistoryCurves(); std::vector gridTimeHistoryCurves() const; @@ -129,6 +128,7 @@ public: RimTimeAxisAnnotation* addTimeRangeAnnotation( time_t startTime, time_t endTime ); void removeTimeAnnotation( RimTimeAxisAnnotation* annotation ); void removeAllTimeAnnotations(); + void updateAnnotationsInPlotWidget(); void updateAxes() override; @@ -209,6 +209,9 @@ public: RimSummaryPlotSourceStepping* sourceStepper(); void scheduleReplotIfVisible(); + void enableCurvePointTracking( bool enable ); + std::any valueForKey( std::string key ) const override; + public: // RimViewWindow overrides void deleteViewWidget() override; @@ -220,6 +223,8 @@ public: caf::PdmFieldHandle* userDescriptionField() override; + void zoomAllForMultiPlot() override; + private: RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override; @@ -257,7 +262,6 @@ private: std::vector visibleTimeHistoryCurvesForAxis( RiuPlotAxis plotAxis ) const; std::vector visibleAsciiDataCurvesForAxis( RiuPlotAxis plotAxis ) const; bool hasVisibleCurvesForAxis( RiuPlotAxis plotAxis ) const; - std::vector visibleStackedSummaryCurvesForAxis( RiuPlotAxis plotAxis ); void updateNumericalAxis( RiaDefines::PlotAxis plotAxis ); void updateZoomForAxis( RimPlotAxisPropertiesInterface* axisProperties ); @@ -270,8 +274,8 @@ private: void deletePlotCurvesAndPlotWidget(); - void connectCurveSignals( RimSummaryCurve* curve ); - void disconnectCurveSignals( RimSummaryCurve* curve ); + void connectCurveSignals( RimStackablePlotCurve* curve ); + void disconnectCurveSignals( RimStackablePlotCurve* curve ); void curveDataChanged( const caf::SignalEmitter* emitter ); void curveVisibilityChanged( const caf::SignalEmitter* emitter, bool visible ); @@ -349,4 +353,6 @@ private: bool m_isValid; RiuPlotWidget::Legend m_legendPosition; + + std::chrono::steady_clock::time_point m_lastZoomTime; }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp index 84ce16d034..d357bd0b5a 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp @@ -32,6 +32,7 @@ #include "Tools/RimPlotAxisTools.h" #include "RiuQtChartsPlotWidget.h" +#include "RiuQwtPlotWidget.h" #include "RiuSummaryQuantityNameInfoProvider.h" #include "RiuSummaryQwtPlot.h" @@ -144,7 +145,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const if ( sumAddress.isCalculated() ) { - titleText = shortCalculationName( quantityName ); + titleText = RimPlotAxisTools::shortCalculationName( quantityName ); } else { @@ -279,36 +280,17 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const //-------------------------------------------------------------------------------------------------- QString RimSummaryPlotAxisFormatter::createAxisObjectName() const { - std::set vectorNames; - - auto addVectorNames = [&]( const RifEclipseSummaryAddress& sumAddress ) - { - size_t cutPos = sumAddress.vectorName().find( ':' ); - if ( cutPos == std::string::npos ) cutPos = -1; - - std::string name; - const std::string& quantityName = sumAddress.vectorName().substr( cutPos + 1 ); - - if ( sumAddress.isCalculated() ) - { - name = shortCalculationName( quantityName ); - } - else - { - name = quantityName; - } - vectorNames.insert( name ); - }; + std::set vectorNames; for ( RimSummaryCurve* rimCurve : m_summaryCurves ) { if ( rimCurve->axisY() == m_axisProperties->plotAxis() ) { - addVectorNames( rimCurve->summaryAddressY() ); + vectorNames.insert( RimPlotAxisTools::axisTextForAddress( rimCurve->summaryAddressY() ) ); } else if ( rimCurve->axisX() == m_axisProperties->plotAxis() ) { - addVectorNames( rimCurve->summaryAddressX() ); + vectorNames.insert( RimPlotAxisTools::axisTextForAddress( rimCurve->summaryAddressX() ) ); } } @@ -316,11 +298,11 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const { if ( m_axisProperties->plotAxis().isVertical() ) { - addVectorNames( curveDef.summaryAddressY() ); + vectorNames.insert( RimPlotAxisTools::axisTextForAddress( curveDef.summaryAddressY() ) ); } else { - addVectorNames( curveDef.summaryAddressX() ); + vectorNames.insert( RimPlotAxisTools::axisTextForAddress( curveDef.summaryAddressX() ) ); } } @@ -328,7 +310,7 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const for ( const auto& vectorName : vectorNames ) { - assembledAxisObjectName += QString::fromStdString( vectorName ) + " "; + assembledAxisObjectName += vectorName + " "; } if ( !m_timeHistoryCurveQuantities.empty() ) @@ -351,19 +333,3 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const return assembledAxisObjectName; } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::string RimSummaryPlotAxisFormatter::shortCalculationName( const std::string& calculationName ) -{ - QString calculationShortName = QString::fromStdString( calculationName ); - - int indexOfFirstSpace = calculationShortName.indexOf( ' ' ); - if ( indexOfFirstSpace > -1 && indexOfFirstSpace < calculationShortName.size() ) - { - calculationShortName = calculationShortName.left( indexOfFirstSpace ); - } - - return calculationShortName.toStdString(); -} diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.h index 32d452e074..b0b3806503 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.h @@ -44,8 +44,6 @@ private: QString autoAxisTitle() const; QString createAxisObjectName() const; - static std::string shortCalculationName( const std::string& calculationName ); - private: RimPlotAxisProperties* m_axisProperties; const std::vector m_summaryCurves; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp index a13716691f..bc627db8df 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp @@ -21,6 +21,8 @@ #include "RiaStdStringTools.h" #include "RiaStringListSerializer.h" #include "RiaTextStringTools.h" +#include "Summary/RiaSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryStringTools.h" #include "Summary/RiaSummaryTools.h" @@ -39,7 +41,6 @@ #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" #include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" #include "RiuPlotMainWindowTools.h" @@ -405,13 +406,13 @@ void RimSummaryPlotManager::createNewPlot() } } - RicSummaryPlotBuilder plotBuilder; + RiaSummaryPlotBuilder plotBuilder; plotBuilder.setAddresses( filteredAddressesFromSource ); plotBuilder.setDataSources( summaryCases, ensembles ); - RicSummaryPlotBuilder::RicGraphCurveGrouping grouping = RicSummaryPlotBuilder::RicGraphCurveGrouping::NONE; - if ( m_individualPlotPerVector ) grouping = RicSummaryPlotBuilder::RicGraphCurveGrouping::SINGLE_CURVES; - if ( m_individualPlotPerObject ) grouping = RicSummaryPlotBuilder::RicGraphCurveGrouping::CURVES_FOR_OBJECT; + RiaSummaryPlotBuilder::RicGraphCurveGrouping grouping = RiaSummaryPlotBuilder::RicGraphCurveGrouping::NONE; + if ( m_individualPlotPerVector ) grouping = RiaSummaryPlotBuilder::RicGraphCurveGrouping::SINGLE_CURVES; + if ( m_individualPlotPerObject ) grouping = RiaSummaryPlotBuilder::RicGraphCurveGrouping::CURVES_FOR_OBJECT; plotBuilder.setGrouping( grouping ); plotBuilder.setIndividualPlotPerDataSource( m_individualPlotPerDataSource ); @@ -419,13 +420,13 @@ void RimSummaryPlotManager::createNewPlot() auto summaryPlots = plotBuilder.createPlots(); if ( m_createMultiPlot ) { - RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( summaryPlots ); + RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( summaryPlots ); } else { for ( auto plot : summaryPlots ) { - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( plot ); plot->loadDataAndUpdate(); } } @@ -491,11 +492,11 @@ std::set RimSummaryPlotManager::filteredAddresses() std::set nativeAddresses; if ( !summaryCases.empty() ) { - nativeAddresses = RicSummaryPlotBuilder::addressesForSource( summaryCases.front() ); + nativeAddresses = RiaSummaryPlotTools::addressesForSource( summaryCases.front() ); } else if ( !ensembles.empty() ) { - nativeAddresses = RicSummaryPlotBuilder::addressesForSource( ensembles.front() ); + nativeAddresses = RiaSummaryPlotTools::addressesForSource( ensembles.front() ); } if ( nativeAddresses.empty() ) return {}; @@ -517,7 +518,7 @@ void RimSummaryPlotManager::appendCurvesToPlot( RimSummaryPlot* destinationPlot findFilteredSummaryCasesAndEnsembles( summaryCases, ensembles ); std::set filteredAddressesFromSource = filteredAddresses(); - RicSummaryPlotBuilder::appendCurvesToPlot( destinationPlot, filteredAddressesFromSource, summaryCases, ensembles ); + RiaSummaryPlotTools::appendCurvesToPlot( destinationPlot, filteredAddressesFromSource, summaryCases, ensembles ); destinationPlot->applyDefaultCurveAppearances(); destinationPlot->loadDataAndUpdate(); diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.cpp index 03dccca25a..adfbd2c60c 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.cpp @@ -184,9 +184,17 @@ bool RimSummaryPlotNameHelper::isSegmentInTitle() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimSummaryPlotNameHelper::isCompletionInTitle() const +bool RimSummaryPlotNameHelper::isWellCompletionInTitle() const { - return !m_titleCompletion.empty(); + return !m_titleWellCompletion.empty(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryPlotNameHelper::isConnectionInTitle() const +{ + return !m_titleConnection.empty(); } //-------------------------------------------------------------------------------------------------- @@ -264,9 +272,17 @@ std::string RimSummaryPlotNameHelper::titleSegment() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::string RimSummaryPlotNameHelper::titleCompletion() const +std::string RimSummaryPlotNameHelper::titleWellCompletion() const { - return m_titleCompletion; + return m_titleWellCompletion; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RimSummaryPlotNameHelper::titleConnection() const +{ + return m_titleConnection; } //-------------------------------------------------------------------------------------------------- @@ -289,7 +305,8 @@ void RimSummaryPlotNameHelper::clearTitleSubStrings() m_titleRegion.clear(); m_titleBlock.clear(); m_titleSegment.clear(); - m_titleCompletion.clear(); + m_titleConnection.clear(); + m_titleWellCompletion.clear(); m_titleCaseName.clear(); } @@ -325,10 +342,18 @@ void RimSummaryPlotNameHelper::extractPlotTitleSubStrings() } { - auto completions = m_analyzer->wellCompletions( m_titleWellName ); - if ( completions.size() == 1 ) + auto wellCompletionNumbers = m_analyzer->wellCompletionNumbers( m_titleWellName ); + if ( wellCompletionNumbers.size() == 1 ) { - m_titleCompletion = *( completions.begin() ); + m_titleWellCompletion = std::to_string( *( wellCompletionNumbers.begin() ) ); + } + } + + { + auto connections = m_analyzer->wellConnections( m_titleWellName ); + if ( connections.size() == 1 ) + { + m_titleConnection = *( connections.begin() ); } } } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.h index 6ea4c419df..ce8165fbdb 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotNameHelper.h @@ -59,7 +59,8 @@ public: bool isCaseInTitle() const override; bool isBlockInTitle() const override; bool isSegmentInTitle() const override; - bool isCompletionInTitle() const override; + bool isConnectionInTitle() const override; + bool isWellCompletionInTitle() const override; std::vector vectorNames() const override; QString caseName() const override; @@ -71,7 +72,8 @@ public: std::string titleRegion() const override; std::string titleBlock() const override; std::string titleSegment() const override; - std::string titleCompletion() const override; + std::string titleConnection() const override; + std::string titleWellCompletion() const override; size_t numberOfCases() const override; @@ -95,7 +97,8 @@ private: std::string m_titleRegion; std::string m_titleBlock; std::string m_titleSegment; - std::string m_titleCompletion; + std::string m_titleConnection; + std::string m_titleWellCompletion; QString m_titleCaseName; }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotReadOut.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotReadOut.cpp new file mode 100644 index 0000000000..39090c0d53 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotReadOut.cpp @@ -0,0 +1,124 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimSummaryPlotReadOut.h" + +#include "RimAnnotationLineAppearance.h" + +#include "cafPdmUiCheckBoxEditor.h" + +CAF_PDM_SOURCE_INIT( RimSummaryPlotReadOut, "RimSummaryPlotReadOut" ); + +template <> +void caf::AppEnum::setUp() +{ + addItem( RimSummaryPlotReadOut::ReadOutType::NONE, "NONE", "None" ); + addItem( RimSummaryPlotReadOut::ReadOutType::SNAP_TO_POINT, "SNAP_TO_POINT", "Snap to Closest Curve Point" ); + addItem( RimSummaryPlotReadOut::ReadOutType::TIME_TRACKING, "TIME_TRACKING", "Time Tracking" ); + addItem( RimSummaryPlotReadOut::ReadOutType::TIME_VALUE_TRACKING, "TIME_VALUE_TRACKING", "Time and Value Tracking" ); + + setDefault( RimSummaryPlotReadOut::ReadOutType::SNAP_TO_POINT ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSummaryPlotReadOut::RimSummaryPlotReadOut() +{ + CAF_PDM_InitObject( "Summary Plot Read Out", "" ); + + CAF_PDM_InitFieldNoDefault( &m_readOutType, "ReadOutType", "Readout Mode" ); + m_readOutType = ReadOutType::SNAP_TO_POINT; + + CAF_PDM_InitFieldNoDefault( &m_lineAppearance, "LineAppearance", "" ); + m_lineAppearance = new RimAnnotationLineAppearance; + m_lineAppearance->configureForSummaryAnnotations(); + m_lineAppearance.uiCapability()->setUiTreeChildrenHidden( true ); + + CAF_PDM_InitFieldNoDefault( &m_verticalLineLabelAlignment, "VerticalLineLabelAlignment", "Vertical Label Alignment" ); + m_verticalLineLabelAlignment = RiaDefines::TextAlignment::LEFT; + + CAF_PDM_InitFieldNoDefault( &m_horizontalLineLabelAlignment, "HorizontalLineLabelAlignment", "Horizontal Label Alignment" ); + m_horizontalLineLabelAlignment = RiaDefines::TextAlignment::LEFT; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryPlotReadOut::enableCurvePointTracking() const +{ + return m_readOutType() == ReadOutType::SNAP_TO_POINT; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryPlotReadOut::enableHorizontalLine() const +{ + return m_readOutType() == ReadOutType::TIME_VALUE_TRACKING; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryPlotReadOut::enableVerticalLine() const +{ + return ( ( m_readOutType() == ReadOutType::TIME_TRACKING ) || ( m_readOutType() == ReadOutType::TIME_VALUE_TRACKING ) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimAnnotationLineAppearance* RimSummaryPlotReadOut::lineAppearance() const +{ + return m_lineAppearance(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefines::TextAlignment RimSummaryPlotReadOut::verticalLineLabelAlignment() const +{ + return m_verticalLineLabelAlignment(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiaDefines::TextAlignment RimSummaryPlotReadOut::horizontalLineLabelAlignment() const +{ + return m_horizontalLineLabelAlignment(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlotReadOut::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( &m_readOutType ); + + if ( enableVerticalLine() ) uiOrdering.add( &m_verticalLineLabelAlignment ); + if ( enableHorizontalLine() ) uiOrdering.add( &m_horizontalLineLabelAlignment ); + + if ( enableVerticalLine() || enableHorizontalLine() ) + { + m_lineAppearance->uiOrdering( uiConfigName, uiOrdering ); + } + + uiOrdering.skipRemainingFields(); +} diff --git a/ApplicationLibCode/ProjectDataModel/RimStatisticsContourMap.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotReadOut.h similarity index 50% rename from ApplicationLibCode/ProjectDataModel/RimStatisticsContourMap.h rename to ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotReadOut.h index ae4100e801..cbc33907b9 100644 --- a/ApplicationLibCode/ProjectDataModel/RimStatisticsContourMap.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotReadOut.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2024- Equinor ASA +// Copyright (C) 2025 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,42 +18,49 @@ #pragma once +#include "RiaPlotDefines.h" + #include "cafPdmField.h" #include "cafPdmObject.h" +#include "cafPdmUiItem.h" -#include "RimContourMapProjection.h" - -class RimEclipseCase; -class RimEclipseResultDefinition; +class RimAnnotationLineAppearance; //================================================================================================== -// -// -// +/// +/// //================================================================================================== -class RimStatisticsContourMap : public caf::PdmObject +class RimSummaryPlotReadOut : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimStatisticsContourMap(); + enum class ReadOutType + { + NONE, + SNAP_TO_POINT, + TIME_TRACKING, + TIME_VALUE_TRACKING + }; - void setEclipseCase( RimEclipseCase* eclipseCase ); +public: + RimSummaryPlotReadOut(); -protected: - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; - void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; - void initAfterRead() override; - QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + bool enableCurvePointTracking() const; + bool enableHorizontalLine() const; + bool enableVerticalLine() const; + RimAnnotationLineAppearance* lineAppearance() const; + RiaDefines::TextAlignment verticalLineLabelAlignment() const; + RiaDefines::TextAlignment horizontalLineLabelAlignment() const; private: - void computeStatistics(); + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; - caf::PdmField m_relativeSampleSpacing; - caf::PdmField m_resultAggregation; - caf::PdmField m_timeStep; +private: + caf::PdmField> m_readOutType; - caf::PdmChildField m_resultDefinition; - caf::PdmField m_computeStatisticsButton; + caf::PdmChildField m_lineAppearance; + + caf::PdmField> m_verticalLineLabelAlignment; + caf::PdmField> m_horizontalLineLabelAlignment; }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp index dcb7023069..1fe88cd0b4 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp @@ -25,6 +25,8 @@ #include "Summary/RiaSummaryAddressModifier.h" #include "Summary/RiaSummaryCurveDefinition.h" +#include "RifEclipseSummaryTools.h" + #include "RimDataSourceSteppingTools.h" #include "RimEnsembleCurveSet.h" #include "RimEnsembleCurveSetCollection.h" @@ -79,8 +81,9 @@ RimSummaryPlotSourceStepping::RimSummaryPlotSourceStepping() CAF_PDM_InitFieldNoDefault( &m_cellBlock, "CellBlock", "Block" ); CAF_PDM_InitFieldNoDefault( &m_wellSegment, "Segment", "Segment" ); - CAF_PDM_InitFieldNoDefault( &m_completion, "Completion", "Completion" ); + CAF_PDM_InitFieldNoDefault( &m_connection, "Connection", "Connection" ); CAF_PDM_InitFieldNoDefault( &m_aquifer, "Aquifer", "Aquifer" ); + CAF_PDM_InitFieldNoDefault( &m_wellCompletionNumber, "WellCompletion", "Well Completion" ); CAF_PDM_InitFieldNoDefault( &m_ensemble, "Ensemble", "Ensemble" ); @@ -274,11 +277,16 @@ QList RimSummaryPlotSourceStepping::calculateValueOption secondaryIdentifier = m_wellName().toStdString(); category = SummaryCategory::SUMMARY_WELL_SEGMENT; } - else if ( fieldNeedingOptions == &m_completion ) + else if ( fieldNeedingOptions == &m_wellCompletionNumber ) { secondaryIdentifier = m_wellName().toStdString(); category = SummaryCategory::SUMMARY_WELL_COMPLETION; } + else if ( fieldNeedingOptions == &m_connection ) + { + secondaryIdentifier = m_wellName().toStdString(); + category = SummaryCategory::SUMMARY_WELL_CONNECTION; + } else if ( fieldNeedingOptions == &m_aquifer ) { category = SummaryCategory::SUMMARY_AQUIFER; @@ -480,14 +488,18 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle* { summaryCategoryToModify = SummaryCategory::SUMMARY_WELL_SEGMENT; } - else if ( changedField == &m_completion ) + else if ( changedField == &m_connection ) { - summaryCategoryToModify = SummaryCategory::SUMMARY_WELL_COMPLETION; + summaryCategoryToModify = SummaryCategory::SUMMARY_WELL_CONNECTION; } else if ( changedField == &m_aquifer ) { summaryCategoryToModify = SummaryCategory::SUMMARY_AQUIFER; } + else if ( changedField == &m_wellCompletionNumber ) + { + summaryCategoryToModify = SummaryCategory::SUMMARY_WELL_COMPLETION; + } if ( summaryCategoryToModify != SummaryCategory::SUMMARY_INVALID ) { @@ -590,6 +602,12 @@ caf::PdmValueField* RimSummaryPlotSourceStepping::fieldToModify() case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_SEGMENT: return &m_wellSegment; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_COMPLETION_NUMBER: + return &m_wellCompletionNumber; + + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_CONNECTION: + return &m_connection; + default: break; } @@ -840,12 +858,12 @@ std::vector RimSummaryPlotSourceStepping::activeFieldsForD fieldsCommonForAllCurves.push_back( &m_cellBlock ); } - if ( analyzer.wellCompletions( m_wellName().toStdString() ).size() == 1 ) + if ( analyzer.wellConnections( m_wellName().toStdString() ).size() == 1 ) { - QString txt = QString::fromStdString( *( analyzer.wellCompletions( m_wellName().toStdString() ).begin() ) ); - m_completion = txt; + QString txt = QString::fromStdString( *( analyzer.wellConnections( m_wellName().toStdString() ).begin() ) ); + m_connection = txt; - fieldsCommonForAllCurves.push_back( &m_completion ); + fieldsCommonForAllCurves.push_back( &m_connection ); } if ( analyzer.aquifers().size() == 1 ) @@ -855,6 +873,13 @@ std::vector RimSummaryPlotSourceStepping::activeFieldsForD fieldsCommonForAllCurves.push_back( &m_aquifer ); } + if ( analyzer.wellCompletionNumbers( m_wellName().toStdString() ).size() == 1 ) + { + m_wellCompletionNumber = *( analyzer.wellCompletionNumbers( m_wellName().toStdString() ).begin() ); + + fieldsCommonForAllCurves.push_back( &m_wellCompletionNumber ); + } + if ( !analyzer.quantityNameForTitle().empty() ) { QString txt = QString::fromStdString( analyzer.quantityNameForTitle() ); @@ -1057,9 +1082,13 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu ids.push_back( it->second ); } - auto searchString = QString::fromStdString( addr.vectorName() ); - auto found = getIdIterator( ids, searchString ); - if ( found != ids.end() ) addr.setVectorName( ( *found ).toStdString() ); + const auto [vectorName, suffix] = RifEclipseSummaryTools::splitVectorNameAndSuffix( addr.vectorName() ); + auto found = getIdIterator( ids, QString::fromStdString( vectorName ) ); + if ( found != ids.end() ) + { + auto fullName = ( *found ).toStdString() + suffix; + addr.setVectorName( fullName ); + } } break; @@ -1081,6 +1110,15 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu } break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_COMPLETION_NUMBER: + { + auto ids = analyzer.identifierTexts( SummaryCategory::SUMMARY_WELL_COMPLETION, "" ); + auto searchString = QString::number( addr.wellCompletionNumber() ); + auto found = getIdIterator( ids, searchString ); + if ( found != ids.end() ) addr.setWellCompletionNumber( ( *found ).toInt() ); + } + break; + default: break; } @@ -1130,10 +1168,18 @@ void RimSummaryPlotSourceStepping::syncWithStepper( RimSummaryPlotSourceStepping m_aquifer = other->m_aquifer(); break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_COMPLETION_NUMBER: + m_wellCompletionNumber = other->m_wellCompletionNumber(); + break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_SEGMENT: m_wellSegment = other->m_wellSegment(); break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_CONNECTION: + m_connection = other->m_connection(); + break; + default: break; } @@ -1168,6 +1214,10 @@ void RimSummaryPlotSourceStepping::setStep( QString stepIdentifier ) m_cellBlock.setValueWithFieldChanged( stepIdentifier ); break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_CONNECTION: + m_connection.setValueWithFieldChanged( stepIdentifier ); + break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::AQUIFER: case RimSummaryDataSourceStepping::SourceSteppingDimension::REGION: case RimSummaryDataSourceStepping::SourceSteppingDimension::ENSEMBLE: @@ -1199,8 +1249,8 @@ std::map RimSummaryPlotSourceStepping::optionsForQuantity( std auto subset = RiaSummaryAddressAnalyzer::addressesForCategory( addresses, category ); quantityAnalyzer.appendAddresses( subset ); - auto quantities = quantityAnalyzer.quantities(); - for ( const auto& s : quantities ) + auto nativeVectorNames = RifEclipseSummaryTools::nativeVectorNames( quantityAnalyzer.quantities() ); + for ( const auto& s : nativeVectorNames ) { QString valueString = QString::fromStdString( s ); @@ -1230,7 +1280,10 @@ std::map RimSummaryPlotSourceStepping::optionsForQuantity( Ria { auto vectorNames = analyzser->vectorNamesForCategory( category ); - for ( const auto& s : vectorNames ) + std::vector setNamesVec( vectorNames.begin(), vectorNames.end() ); + auto nativeVectorNames = RifEclipseSummaryTools::nativeVectorNames( setNamesVec ); + + for ( const auto& s : nativeVectorNames ) { QString valueString = QString::fromStdString( s ); @@ -1407,7 +1460,9 @@ std::vector RimSummaryPlotSourceStepping::plotsMatchingStepSettings( s int regionToMatch = -1; std::string vectorToMatch; std::string blockToMatch; - int aquiferToMatch = -1; + std::string connectionToMatch; + int aquiferToMatch = -1; + int wellCompletionNumberToMatch = -1; switch ( m_stepDimension() ) { @@ -1447,6 +1502,14 @@ std::vector RimSummaryPlotSourceStepping::plotsMatchingStepSettings( s aquiferToMatch = m_aquifer(); break; + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_COMPLETION_NUMBER: + wellCompletionNumberToMatch = m_wellCompletionNumber(); + break; + + case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL_CONNECTION: + connectionToMatch = m_connection().toStdString(); + break; + default: break; } @@ -1505,6 +1568,14 @@ std::vector RimSummaryPlotSourceStepping::plotsMatchingStepSettings( s { isMatching = true; } + else if ( wellCompletionNumberToMatch != -1 && a.wellCompletionNumber() == wellCompletionNumberToMatch ) + { + isMatching = true; + } + else if ( !connectionToMatch.empty() && a.connectionAsString() == connectionToMatch ) + { + isMatching = true; + } } } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h index 0e85aff560..e1195df1d0 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h @@ -121,9 +121,10 @@ private: caf::PdmField m_cellBlock; caf::PdmField m_wellSegment; - caf::PdmField m_completion; + caf::PdmField m_connection; caf::PdmField m_aquifer; + caf::PdmField m_wellCompletionNumber; caf::PdmField m_includeEnsembleCasesForCaseStepping; caf::PdmField m_autoUpdateAppearance; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp index 4e9ce633e0..857b036b0b 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp @@ -74,9 +74,13 @@ RimSummaryTable::RimSummaryTable() m_case.uiCapability()->setUiTreeChildrenHidden( true ); CAF_PDM_InitFieldNoDefault( &m_vector, "Vector", "Vector" ); m_vector.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() ); - CAF_PDM_InitFieldNoDefault( &m_category, "Categories", "Category" ); + + CAF_PDM_InitField( &m_category, "Categories", RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL, "Category" ); m_category.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() ); - m_category = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL; + caf::AppEnum::setEnumSubset( &m_category, + { RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL, + RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP, + RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION } ); CAF_PDM_InitFieldNoDefault( &m_resamplingSelection, "ResamplingSelection", "Date Resampling" ); m_resamplingSelection.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() ); @@ -104,7 +108,13 @@ RimSummaryTable::RimSummaryTable() m_legendConfig->setAutomaticRanges( 0.0, 100.0, 0.0, 100.0 ); m_legendConfig->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::HEAT_MAP ) ); - CAF_PDM_InitFieldNoDefault( &m_mappingType, "MappingType", "Mapping Type" ); + CAF_PDM_InitField( &m_mappingType, "MappingType", RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS, "Mapping Type" ); + caf::AppEnum::setEnumSubset( &m_mappingType, + { RimRegularLegendConfig::MappingType::LINEAR_DISCRETE, + RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS, + RimRegularLegendConfig::MappingType::LOG10_CONTINUOUS, + RimRegularLegendConfig::MappingType::LOG10_DISCRETE } ); + CAF_PDM_InitFieldNoDefault( &m_rangeType, "RangeType", "Range Type" ); CAF_PDM_InitField( &m_filterTimeSteps, "FilterTimeSteps", false, "Filter Time Steps" ); @@ -398,18 +408,6 @@ QList RimSummaryTable::calculateValueOptions( const caf: options.push_back( caf::PdmOptionItemInfo( summaryCase->displayCaseName(), summaryCase, false, summaryCase->uiIconProvider() ) ); } } - else if ( fieldNeedingOptions == &m_category ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( - RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL ), - RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL ) ); - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( - RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP ), - RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP ) ); - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( - RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION ), - RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION ) ); - } else if ( fieldNeedingOptions == &m_vector && m_case ) { auto* summaryReader = m_case->summaryReader(); @@ -435,17 +433,6 @@ QList RimSummaryTable::calculateValueOptions( const caf: { options = caf::FontTools::relativeSizeValueOptions( RiaPreferences::current()->defaultPlotFontSize() ); } - else if ( fieldNeedingOptions == &m_mappingType ) - { - std::vector mappingTypes = { RimRegularLegendConfig::MappingType::LINEAR_DISCRETE, - RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS, - RimRegularLegendConfig::MappingType::LOG10_CONTINUOUS, - RimRegularLegendConfig::MappingType::LOG10_DISCRETE }; - for ( const auto mappingType : mappingTypes ) - { - options.push_back( caf::PdmOptionItemInfo( caf::AppEnum::uiText( mappingType ), mappingType ) ); - } - } return options; } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp index 5338521b65..fab9ed2bc1 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.cpp @@ -95,8 +95,9 @@ RimSummaryTimeAxisProperties::RimSummaryTimeAxisProperties() CAF_PDM_InitField( &m_isActive, "Active", true, "Active" ); m_isActive.uiCapability()->setUiHidden( true ); - CAF_PDM_InitField( &showTitle, "ShowTitle", false, "Show Title " ); - CAF_PDM_InitField( &title, "Title", QString( "Time" ), "Title " ); + CAF_PDM_InitField( &m_showTitle, "ShowTitle", false, "Show Title " ); + CAF_PDM_InitField( &m_title, "Title", QString( "Time" ), "Title " ); + CAF_PDM_InitField( &m_showLabels, "ShowLabels", true, "Show Labels" ); CAF_PDM_InitField( &m_isAutoZoom, "AutoZoom", true, "Set Range Automatically" ); CAF_PDM_InitFieldNoDefault( &m_timeMode, "TimeMode", "Time Mode" ); @@ -152,6 +153,30 @@ RimSummaryTimeAxisProperties::RimSummaryTimeAxisProperties() m_annotations.uiCapability()->setUiTreeChildrenHidden( true ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryTimeAxisProperties::showTitle() const +{ + return m_showTitle(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimSummaryTimeAxisProperties::title() const +{ + return m_title(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSummaryTimeAxisProperties::showLabels() const +{ + return m_showLabels(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -571,7 +596,7 @@ void RimSummaryTimeAxisProperties::enableAutoValueForMajorTickmarkCount( bool en //-------------------------------------------------------------------------------------------------- const QString RimSummaryTimeAxisProperties::objectName() const { - return title(); + return m_title(); } //-------------------------------------------------------------------------------------------------- @@ -579,7 +604,7 @@ const QString RimSummaryTimeAxisProperties::objectName() const //-------------------------------------------------------------------------------------------------- const QString RimSummaryTimeAxisProperties::axisTitleText() const { - return title(); + return m_title(); } //-------------------------------------------------------------------------------------------------- @@ -787,16 +812,17 @@ const QString& RimSummaryTimeAxisProperties::timeFormat() const void RimSummaryTimeAxisProperties::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { caf::PdmUiGroup& titleGroup = *( uiOrdering.addNewGroup( "Axis Title" ) ); - titleGroup.add( &showTitle ); - titleGroup.add( &title ); - title.uiCapability()->setUiReadOnly( !showTitle() ); - if ( showTitle() ) + titleGroup.add( &m_showTitle ); + titleGroup.add( &m_title ); + m_title.uiCapability()->setUiReadOnly( !m_showTitle() ); + if ( m_showTitle() ) { titleGroup.add( &m_titlePositionEnum ); titleGroup.add( &m_titleFontSize ); } caf::PdmUiGroup* timeGroup = uiOrdering.addNewGroup( "Time Values" ); + timeGroup->add( &m_showLabels ); timeGroup->add( &m_timeMode ); if ( m_timeMode() == DATE ) { @@ -916,7 +942,7 @@ void RimSummaryTimeAxisProperties::fieldChangedByUi( const caf::PdmFieldHandle* requestLoadDataAndUpdate.send(); return; } - else if ( changedField == &m_timeUnit || changedField == &m_dateFormat || changedField == &m_timeFormat ) + else if ( changedField == &m_timeUnit || changedField == &m_dateFormat || changedField == &m_timeFormat || changedField == &m_showLabels ) { // Changing these settings requires a full update of the plot requestLoadDataAndUpdate.send(); diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h index c8268f5026..326039584a 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTimeAxisProperties.h @@ -82,8 +82,9 @@ public: public: RimSummaryTimeAxisProperties(); - caf::PdmField title; - caf::PdmField showTitle; + bool showTitle() const; + QString title() const; + bool showLabels() const; RiuPlotAxis plotAxis() const override; AxisTitlePositionType titlePosition() const override; @@ -158,6 +159,10 @@ private: void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; private: + caf::PdmField m_title; + caf::PdmField m_showTitle; + caf::PdmField m_showLabels; + caf::PdmField> m_timeMode; caf::PdmField> m_timeUnit; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.cpp b/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.cpp index c6b091b078..0fbb131f88 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.cpp @@ -62,21 +62,6 @@ void RimSummaryEnsembleSumo::setSumoDataSource( RimSummarySumoDataSource* sumoDa m_sumoDataSource = sumoDataSource; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryEnsembleSumo::updateName() -{ - if ( m_sumoDataSource() ) - { - setName( m_sumoDataSource()->name() ); - } - else - { - setName( "No Sumo Data Source" ); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -103,6 +88,19 @@ std::set RimSummaryEnsembleSumo::allResultAddresses() return m_resultAddresses; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::pair RimSummaryEnsembleSumo::nameKeys() const +{ + if ( m_sumoDataSource() ) + { + return { m_sumoDataSource()->name().toStdString(), "" }; + } + + return { "Sumo Data Source", "" }; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -456,8 +454,10 @@ void RimSummaryEnsembleSumo::defineUiOrdering( QString uiConfigName, caf::PdmUiO { uiOrdering.add( &m_sumoDataSource ); - auto group = uiOrdering.addNewGroup( "General" ); - RimSummaryEnsemble::defineUiOrdering( uiConfigName, *group ); + auto nameGroup = uiOrdering.addNewGroup( "Name" ); + RimSummaryEnsemble::defineUiOrdering( uiConfigName, *nameGroup ); + + uiOrdering.skipRemainingFields(); } //-------------------------------------------------------------------------------------------------- @@ -482,16 +482,18 @@ QList RimSummaryEnsembleSumo::calculateValueOptions( con //-------------------------------------------------------------------------------------------------- void RimSummaryEnsembleSumo::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) { + RimSummaryEnsemble::fieldChangedByUi( changedField, oldValue, newValue ); + if ( changedField == &m_sumoDataSource ) { clearCachedData(); updateResultAddresses(); - updateName(); + RiaSummaryTools::updateSummaryEnsembleNames(); buildMetaData(); updateConnectedEditors(); - RiaSummaryTools::reloadSummaryEnsemble( this ); + RiaSummaryTools::updateConnectedPlots( this ); } } @@ -553,7 +555,7 @@ void RimSummaryEnsembleSumo::onLoadDataAndUpdate() } } - updateName(); + RiaSummaryTools::updateSummaryEnsembleNames(); updateResultAddresses(); buildMetaData(); diff --git a/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.h b/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.h index 1cd828cda4..f1f230b40a 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.h +++ b/ApplicationLibCode/ProjectDataModel/Summary/Sumo/RimSummaryEnsembleSumo.h @@ -61,13 +61,14 @@ public: RimSummaryEnsembleSumo(); void setSumoDataSource( RimSummarySumoDataSource* sumoDataSource ); - void updateName(); void loadSummaryData( const RifEclipseSummaryAddress& resultAddress ); std::string unitName( const RifEclipseSummaryAddress& resultAddress ); RiaDefines::EclipseUnitSystem unitSystem() const; std::set allResultAddresses() const; + std::pair nameKeys() const override; + protected: void onLoadDataAndUpdate() override; diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Surfaces/CMakeLists_files.cmake index bc2b29ee77..c39fc34973 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/CMakeLists_files.cmake @@ -9,6 +9,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleSurface.h ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleStatisticsSurface.h ${CMAKE_CURRENT_LIST_DIR}/RimDepthSurface.h + ${CMAKE_CURRENT_LIST_DIR}/RimFractureSurface.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -22,14 +23,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleSurface.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEnsembleStatisticsSurface.cpp ${CMAKE_CURRENT_LIST_DIR}/RimDepthSurface.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimFractureSurface.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\Surface" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.cpp index 6cdce72d8e..1b3baa8fdc 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.cpp +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.cpp @@ -20,12 +20,14 @@ #include "RiaPreferences.h" -#include "RifSurfaceImporter.h" - -#include "RigGocadData.h" -#include "RigSurface.h" #include "RimSurfaceCollection.h" +#include "RifSurfaceImporter.h" +#include "RifVtkSurfaceImporter.h" + +#include "RigSurface.h" +#include "RigTriangleMeshData.h" + #include "cafPdmFieldScriptingCapability.h" #include "cafPdmObjectScriptingCapability.h" @@ -133,13 +135,13 @@ bool RimFileSurface::updateSurfaceData() surface->setTriangleData( tringleIndices, vertices ); } - if ( m_gocadData ) + if ( m_triangleMeshData ) { - auto propertyNames = m_gocadData->propertyNames(); + auto propertyNames = m_triangleMeshData->propertyNames(); for ( const auto& name : propertyNames ) { - auto values = m_gocadData->propertyValues( name ); - surface->addVerticeResult( name, values ); + auto values = m_triangleMeshData->propertyValues( name ); + surface->addVertexResult( name, values ); } } @@ -171,11 +173,17 @@ bool RimFileSurface::loadDataFromFile() } else if ( filePath.endsWith( "ts", Qt::CaseInsensitive ) ) { - m_gocadData = std::make_unique(); + m_triangleMeshData = std::make_unique(); - RifSurfaceImporter::readGocadFile( filePath, m_gocadData.get() ); + RifSurfaceImporter::readGocadFile( filePath, m_triangleMeshData.get() ); - surface = m_gocadData->gocadGeometry(); + surface = m_triangleMeshData->geometry(); + } + else if ( filePath.endsWith( "vtu", Qt::CaseInsensitive ) ) + { + m_triangleMeshData = RifVtkSurfaceImporter::importFromFile( filePath.toStdString() ); + + surface = m_triangleMeshData->geometry(); } else if ( filePath.endsWith( "dat", Qt::CaseInsensitive ) || filePath.endsWith( "xyz", Qt::CaseInsensitive ) ) { diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.h b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.h index 2ad4af6b08..d7586b1b88 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.h +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFileSurface.h @@ -22,7 +22,7 @@ #include -class RigGocadData; +class RigTriangleMeshData; class RimFileSurface : public RimSurface { @@ -53,5 +53,5 @@ private: std::vector m_tringleIndices; std::vector m_vertices; - std::unique_ptr m_gocadData; + std::unique_ptr m_triangleMeshData; }; diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimFractureSurface.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFractureSurface.cpp new file mode 100644 index 0000000000..d1b432a5d6 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFractureSurface.cpp @@ -0,0 +1,266 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimFractureSurface.h" + +#include "RiaLogging.h" + +#include "RigStatisticsMath.h" +#include "RigSurface.h" +#include "RigTriangleMeshData.h" + +#include "RimRegularLegendConfig.h" +#include "RimSurfaceCollection.h" + +#include "RifSurfaceImporter.h" +#include "RifVtkSurfaceImporter.h" + +#include "cafPdmObjectScriptingCapability.h" + +CAF_PDM_SOURCE_INIT( RimFractureSurface, "RimFractureSurface" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFractureSurface::RimFractureSurface() +{ + CAF_PDM_InitScriptableObject( "Surface", ":/ReservoirSurface16x16.png" ); + + CAF_PDM_InitFieldNoDefault( &m_surfaceDefinitionFilePath, "SurfaceFilePath", "File" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFractureSurface::~RimFractureSurface() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFractureSurface::setSurfaceFilePath( const QString& filePath ) +{ + m_surfaceDefinitionFilePath = filePath; + + clearCachedNativeData(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimFractureSurface::surfaceFilePath() +{ + return m_surfaceDefinitionFilePath().path(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimFractureSurface::onLoadData() +{ + return updateSurfaceData(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimSurface* RimFractureSurface::createCopy() +{ + auto newSurface = copyObject(); + if ( !newSurface->onLoadData() ) + { + delete newSurface; + return nullptr; + } + + return newSurface; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFractureSurface::loadSurfaceDataForTimeStep( int timeStep ) +{ + if ( m_surfacePerTimeStep.empty() ) + { + loadDataFromFile(); + } + + if ( timeStep >= static_cast( m_surfacePerTimeStep.size() ) ) + { + QString message = + QString( "Failed to load surface data for time step: %1. Available time steps: %2" ).arg( timeStep ).arg( m_surfacePerTimeStep.size() ); + RiaLogging::warning( message ); + setSurfaceData( nullptr ); + return; + } + + auto surface = new RigSurface; + + auto triangleMeshData = m_surfacePerTimeStep[timeStep].get(); + const auto& [coordinates, indices] = triangleMeshData->geometry(); + + surface->setTriangleData( indices, coordinates ); + auto propertyNames = triangleMeshData->propertyNames(); + for ( const auto& name : propertyNames ) + { + auto values = triangleMeshData->propertyValues( name ); + surface->addVertexResult( name, values ); + } + setSurfaceData( surface ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimFractureSurface::timeStepCount() const +{ + return m_surfacePerTimeStep.size(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector> RimFractureSurface::valuesForProperty( const QString& propertyName ) const +{ + std::vector> values; + for ( const auto& allTimeStepValues : m_surfacePerTimeStep ) + { + const auto& [coordinates, indices] = allTimeStepValues->geometry(); + + auto valuesOneTimeStep = allTimeStepValues->propertyValues( propertyName ); + + // convert to double vector + std::vector valuesOneTimeStepDouble( valuesOneTimeStep.begin(), valuesOneTimeStep.end() ); + + values.push_back( valuesOneTimeStepDouble ); + } + + return values; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFractureSurface::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) +{ + RimSurface::fieldChangedByUi( changedField, oldValue, newValue ); + + if ( changedField == &m_surfaceDefinitionFilePath ) + { + clearCachedNativeData(); + updateSurfaceData(); + + auto surfColl = firstAncestorOrThisOfTypeAsserted(); + surfColl->updateViews( { this } ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// Regenerate the surface geometry, using the offset specified. +/// If the surface data hasn't been loaded from file yet, load it. +/// Returns false for fatal failure +//-------------------------------------------------------------------------------------------------- +bool RimFractureSurface::updateSurfaceData() +{ + loadSurfaceDataForTimeStep( 0 ); + + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFractureSurface::clearCachedNativeData() +{ + m_secondsSinceSimulationStart.clear(); + m_surfacePerTimeStep.clear(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimFractureSurface::loadDataFromFile() +{ + std::filesystem::path filepath = m_surfaceDefinitionFilePath().path().toLocal8Bit().constData(); + auto surfaceInfo = RifVtkSurfaceImporter::parsePvdDatasets( filepath ); + + for ( const auto& s : surfaceInfo ) + { + if ( auto triangleMeshData = RifVtkSurfaceImporter::importFromFile( s.filepath ) ) + { + m_secondsSinceSimulationStart.push_back( s.timestep ); + m_surfacePerTimeStep.push_back( std::move( triangleMeshData ) ); + } + } + + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFractureSurface::updateMinMaxValues( RimRegularLegendConfig* legendConfig, const QString& propertyName, int currentTimeStep ) const +{ + double localMin = 0.0; + double localMax = 0.0; + double localPosClosestToZero = 0.0; + double localNegClosestToZero = 0.0; + + auto valuesForTimeSteps = valuesForProperty( propertyName ); + + MinMaxAccumulator minMaxAccumulator; + PosNegAccumulator posNegAccumulator; + + for ( size_t timeIndex = 0; timeIndex < valuesForTimeSteps.size(); timeIndex++ ) + { + auto values = valuesForTimeSteps[timeIndex]; + minMaxAccumulator.addData( values ); + posNegAccumulator.addData( values ); + + if ( static_cast( timeIndex ) == currentTimeStep ) + { + MinMaxAccumulator localMinMaxAccumulator; + PosNegAccumulator localPosNegAccumulator; + localMinMaxAccumulator.addData( values ); + localPosNegAccumulator.addData( values ); + + localPosClosestToZero = localPosNegAccumulator.pos; + localNegClosestToZero = localPosNegAccumulator.neg; + localMin = localMinMaxAccumulator.min; + localMax = localMinMaxAccumulator.max; + } + } + + double globalPosClosestToZero = posNegAccumulator.pos; + double globalNegClosestToZero = posNegAccumulator.neg; + double globalMin = minMaxAccumulator.min; + double globalMax = minMaxAccumulator.max; + + legendConfig->setClosestToZeroValues( globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero ); + legendConfig->setAutomaticRanges( globalMin, globalMax, localMin, localMax ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimFractureSurface::isMeshLinesEnabledDefault() const +{ + return true; +} diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimFractureSurface.h b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFractureSurface.h new file mode 100644 index 0000000000..05eff3bfa8 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimFractureSurface.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimSurface.h" + +class RigTriangleMeshData; + +class RimFractureSurface : public RimSurface +{ + CAF_PDM_HEADER_INIT; + +public: + RimFractureSurface(); + ~RimFractureSurface() override; + + void setSurfaceFilePath( const QString& filePath ); + QString surfaceFilePath(); + + bool onLoadData() override; + RimSurface* createCopy() override; + + void loadSurfaceDataForTimeStep( int timeStep ) override; + size_t timeStepCount() const override; + + std::vector> valuesForProperty( const QString& propertyName ) const; + + void updateMinMaxValues( RimRegularLegendConfig* legend, const QString& propertyName, int currentTimeStep ) const override; + bool isMeshLinesEnabledDefault() const override; + +protected: + bool updateSurfaceData() override; + void clearCachedNativeData() override; + +private: + bool loadDataFromFile(); + +private: + void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; + + caf::PdmField m_surfaceDefinitionFilePath; + + std::vector m_secondsSinceSimulationStart; + std::vector> m_surfacePerTimeStep; +}; diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.cpp index d6bc2bcabd..eba8c4c517 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.cpp +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.cpp @@ -19,14 +19,15 @@ #include "RimSurface.h" #include "RiaApplication.h" + #include "RimCase.h" #include "RimProject.h" +#include "RimRegularLegendConfig.h" #include "RimSurfaceCollection.h" +#include "RigStatisticsMath.h" #include "RigSurface.h" -#include "RifSurfaceImporter.h" - #include "cafPdmFieldScriptingCapability.h" #include "cafPdmObjectScriptingCapability.h" #include "cafPdmUiDoubleSliderEditor.h" @@ -221,6 +222,21 @@ RigSurface* RimSurface::surfaceData() return m_surfaceData.p(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSurface::loadSurfaceDataForTimeStep( int timeStep ) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RimSurface::timeStepCount() const +{ + return 1; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -315,3 +331,35 @@ void RimSurface::defineEditorAttribute( const caf::PdmFieldHandle* field, QStrin } } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSurface::updateMinMaxValues( RimRegularLegendConfig* legend, const QString& propertyName, int currentTimeStep ) const +{ + if ( !m_surfaceData.isNull() ) + { + MinMaxAccumulator minMaxAccumulator; + PosNegAccumulator posNegAccumulator; + + auto values = m_surfaceData->propertyValues( propertyName ); + minMaxAccumulator.addData( values ); + posNegAccumulator.addData( values ); + + double globalPosClosestToZero = posNegAccumulator.pos; + double globalNegClosestToZero = posNegAccumulator.neg; + double globalMin = minMaxAccumulator.min; + double globalMax = minMaxAccumulator.max; + + legend->setClosestToZeroValues( globalPosClosestToZero, globalNegClosestToZero, globalPosClosestToZero, globalNegClosestToZero ); + legend->setAutomaticRanges( globalMin, globalMax, globalMin, globalMax ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSurface::isMeshLinesEnabledDefault() const +{ + return false; +} diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.h b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.h index 1177f402cf..df5c1d9b05 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.h +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurface.h @@ -28,6 +28,7 @@ #include +class RimRegularLegendConfig; class RigSurface; class RimSurface : public caf::PdmObject @@ -60,6 +61,9 @@ public: QString userDescription(); void setUserDescription( const QString& description ); + virtual void loadSurfaceDataForTimeStep( int timeStep ); + virtual size_t timeStepCount() const; + virtual QString fullName() const; virtual bool onLoadData() = 0; virtual RimSurface* createCopy() = 0; @@ -67,6 +71,10 @@ public: void loadDataIfRequired(); void reloadData(); + virtual void updateMinMaxValues( RimRegularLegendConfig* legend, const QString& propertyName, int currentTimeStep ) const; + + virtual bool isMeshLinesEnabledDefault() const; + protected: void setSurfaceData( RigSurface* surface ); @@ -89,6 +97,7 @@ protected: caf::PdmField m_color; caf::PdmField m_enableOpacity; + caf::PdmField m_showMeshLines; caf::PdmField m_opacity; cvf::ref m_surfaceData; diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceCollection.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceCollection.cpp index 0e668da9b1..205d559b0a 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceCollection.cpp @@ -26,6 +26,7 @@ #include "RimCase.h" #include "RimEnsembleSurface.h" #include "RimFileSurface.h" +#include "RimFractureSurface.h" #include "RimGridCaseSurface.h" #include "RimGridView.h" #include "RimProject.h" @@ -35,9 +36,8 @@ #include "RimSurfaceInView.h" #include "RimSurfaceResultDefinition.h" -#include "cafPdmFieldReorderCapability.h" - #include "cafCmdFeatureMenuBuilder.h" +#include "cafPdmFieldReorderCapability.h" #include "cafPdmFieldScriptingCapability.h" #include "cafPdmObjectScriptingCapability.h" @@ -142,14 +142,26 @@ RimSurface* RimSurfaceCollection::importSurfacesFromFiles( const QStringList& fi for ( const QString& newFileName : fileNames ) { - RimFileSurface* newSurface = new RimFileSurface; + RimSurface* newSurface = nullptr; + + if ( newFileName.endsWith( ".pvd" ) ) + { + RimFractureSurface* fractureSurface = new RimFractureSurface; + fractureSurface->setSurfaceFilePath( newFileName ); + + newSurface = fractureSurface; + } + else + { + RimFileSurface* fileSurface = new RimFileSurface; + + fileSurface->setSurfaceFilePath( newFileName ); + newSurface = fileSurface; + } auto newColor = RiaColorTables::categoryPaletteColors().cycledColor3f( existingSurfCount + newSurfCount ); - - newSurface->setSurfaceFilePath( newFileName ); - newSurface->setUserDescription( QFileInfo( newFileName ).fileName() ); - newSurface->setColor( newColor ); + newSurface->setUserDescription( QFileInfo( newFileName ).fileName() ); if ( !newSurface->onLoadData() ) { diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.cpp index 9451addc1c..ac63bf368e 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.cpp @@ -18,7 +18,8 @@ #include "RimSurfaceInView.h" -#include "RigFemPartCollection.h" +#include "RiaLogging.h" + #include "RigSurface.h" #include "RimEclipseView.h" @@ -32,8 +33,6 @@ #include "RivSurfacePartMgr.h" -#include "cafPdmUiDoubleSliderEditor.h" - CAF_PDM_SOURCE_INIT( RimSurfaceInView, "SurfaceInView" ); //-------------------------------------------------------------------------------------------------- @@ -50,6 +49,8 @@ RimSurfaceInView::RimSurfaceInView() CAF_PDM_InitFieldNoDefault( &m_surface, "SurfaceRef", "Surface" ); m_surface.uiCapability()->setUiHidden( true ); + CAF_PDM_InitField( &m_showMeshLines, "ShowMeshLines", false, "Show Mesh Lines" ); + CAF_PDM_InitFieldNoDefault( &m_resultDefinition, "ResultDefinition", "Result Definition" ); m_resultDefinition.uiCapability()->setUiTreeChildrenHidden( true ); m_resultDefinition = new RimSurfaceResultDefinition; @@ -102,7 +103,7 @@ void RimSurfaceInView::setSurface( RimSurface* surf ) m_resultDefinition->assignDefaultProperty(); } - m_resultDefinition->updateMinMaxValues(); + m_resultDefinition->updateMinMaxValues( -1 ); } //-------------------------------------------------------------------------------------------------- @@ -113,6 +114,22 @@ bool RimSurfaceInView::isNativeSurfaceResultsActive() const return m_resultDefinition->isChecked(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimSurfaceInView::isMeshLinesEnabled() const +{ + return m_showMeshLines(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSurfaceInView::setMeshLinesEnabled( bool meshLinesEnabled ) +{ + m_showMeshLines = meshLinesEnabled; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -166,11 +183,24 @@ const RivIntersectionGeometryGeneratorInterface* RimSurfaceInView::intersectionG //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSurfaceInView::loadDataAndUpdate() +void RimSurfaceInView::loadDataAndUpdate( int timeStep ) { if ( surface() ) { surface()->loadDataIfRequired(); + surface()->loadSurfaceDataForTimeStep( timeStep ); + + if ( surface()->surfaceData() ) + { + auto ownerView = firstAncestorOrThisOfTypeAsserted(); + if ( ownerView->timeStepCount() != surface()->timeStepCount() ) + { + QString message = QString( "Surface has different number of time steps. Expected %1, but found %2." ) + .arg( ownerView->timeStepCount() ) + .arg( surface()->timeStepCount() ); + RiaLogging::warning( message ); + } + } if ( surface()->surfaceData() && surface()->surfaceData()->propertyNames().empty() ) { @@ -183,7 +213,7 @@ void RimSurfaceInView::loadDataAndUpdate() m_resultDefinition->setCheckState( true ); } - m_resultDefinition->updateMinMaxValues(); + m_resultDefinition->updateMinMaxValues( timeStep ); } } @@ -225,7 +255,7 @@ void RimSurfaceInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField scheduleRedraw = true; } - if ( changedField == &m_showInactiveCells ) + if ( changedField == &m_showInactiveCells || changedField == &m_showMeshLines ) { clearGeometry(); scheduleRedraw = true; diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.h b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.h index a94dbd5ca7..51dd61d9ba 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.h +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInView.h @@ -56,10 +56,13 @@ public: RivSurfacePartMgr* nativeSurfacePartMgr(); const RivIntersectionGeometryGeneratorInterface* intersectionGeometryGenerator() const override; - void loadDataAndUpdate(); + void loadDataAndUpdate( int timeStep ); void updateLegendRangesTextAndVisibility( RiuViewer* nativeOrOverrideViewer, bool isUsingOverrideViewer ); + void setMeshLinesEnabled( bool meshLinesEnabled ); + bool isMeshLinesEnabled() const; + protected: void initAfterRead() override; @@ -72,6 +75,7 @@ private: caf::PdmProxyValueField m_name; caf::PdmPtrField m_surface; + caf::PdmField m_showMeshLines; caf::PdmChildField m_resultDefinition; diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.cpp index 85dd50db06..3caf81e4a4 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.cpp @@ -215,6 +215,8 @@ void RimSurfaceInViewCollection::syncSurfacesWithView() newSurfInView->setActive( false ); } + newSurfInView->setMeshLinesEnabled( surf->isMeshLinesEnabledDefault() ); + orderedSurfs.push_back( newSurfInView ); } else @@ -243,18 +245,18 @@ void RimSurfaceInViewCollection::updateFromSurfaceCollection() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSurfaceInViewCollection::loadData() +void RimSurfaceInViewCollection::loadData( int timeStep ) { for ( RimSurfaceInViewCollection* coll : m_collectionsInView ) { - coll->loadData(); + coll->loadData( timeStep ); } for ( RimSurfaceInView* surf : m_surfacesInView ) { if ( surf->isActive() ) { - surf->loadDataAndUpdate(); + surf->loadDataAndUpdate( timeStep ); } } } diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.h b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.h index 494b772867..34b502dbc2 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceInViewCollection.h @@ -54,7 +54,7 @@ public: void setSurfaceCollection( RimSurfaceCollection* surfcoll ); void updateFromSurfaceCollection(); - void loadData(); + void loadData( int timeStep ); void clearGeometry(); void appendPartsToModel( cvf::ModelBasicList* surfaceVizModel, cvf::Transform* scaleTransform, bool onlyNativeParts = false ); diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.cpp b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.cpp index 9c037d37db..7841b0b5f6 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.cpp +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.cpp @@ -18,10 +18,8 @@ #include "RimSurfaceResultDefinition.h" -#include "RiaDefines.h" #include "RiaResultNames.h" -#include "RigStatisticsMath.h" #include "RigSurface.h" #include "Rim3dView.h" @@ -87,34 +85,13 @@ RimRegularLegendConfig* RimSurfaceResultDefinition::legendConfig() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimSurfaceResultDefinition::updateMinMaxValues() +void RimSurfaceResultDefinition::updateMinMaxValues( int currentTimeStep ) { - RigSurface* surfData = surfaceData(); - if ( surfData ) - { - double globalMin = 0.0; - double globalMax = 0.0; - double globalPosClosestToZero = 0.0; - double globalNegClosestToZero = 0.0; + if ( !m_surfaceInView ) return; - { - MinMaxAccumulator minMaxAccumulator; - PosNegAccumulator posNegAccumulator; + if ( currentTimeStep < 0 ) currentTimeStep = 0; - auto values = surfData->propertyValues( m_propertyName ); - minMaxAccumulator.addData( values ); - posNegAccumulator.addData( values ); - - globalPosClosestToZero = posNegAccumulator.pos; - globalNegClosestToZero = posNegAccumulator.neg; - globalMin = minMaxAccumulator.min; - globalMax = minMaxAccumulator.max; - } - - m_legendConfig->setClosestToZeroValues( globalPosClosestToZero, globalNegClosestToZero, globalPosClosestToZero, globalNegClosestToZero ); - - m_legendConfig->setAutomaticRanges( globalMin, globalMax, globalMin, globalMax ); - } + if ( auto surface = m_surfaceInView->surface() ) surface->updateMinMaxValues( m_legendConfig, m_propertyName, currentTimeStep ); } //-------------------------------------------------------------------------------------------------- @@ -122,12 +99,12 @@ void RimSurfaceResultDefinition::updateMinMaxValues() //-------------------------------------------------------------------------------------------------- void RimSurfaceResultDefinition::assignDefaultProperty() { - if ( m_surfaceInView->surface() && m_surfaceInView->surface()->surfaceData() ) + if ( auto surface = surfaceData() ) { - auto propNames = m_surfaceInView->surface()->surfaceData()->propertyNames(); + auto propNames = surface->propertyNames(); if ( !propNames.empty() ) { - m_propertyName = m_surfaceInView->surface()->surfaceData()->propertyNames().front(); + m_propertyName = propNames.front(); } } } @@ -139,7 +116,7 @@ void RimSurfaceResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch { if ( changedField == &m_propertyName ) { - updateMinMaxValues(); + updateMinMaxValues( -1 ); } auto view = firstAncestorOrThisOfType(); diff --git a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.h b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.h index 26ed90bf5b..7c59e61e71 100644 --- a/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.h +++ b/ApplicationLibCode/ProjectDataModel/Surfaces/RimSurfaceResultDefinition.h @@ -24,8 +24,6 @@ #include "cafPdmObject.h" #include "cafPdmPtrField.h" -#include "cvfObject.h" - class RimRegularLegendConfig; class RimSurfaceInView; class RigSurface; @@ -46,7 +44,7 @@ public: RimRegularLegendConfig* legendConfig(); - void updateMinMaxValues(); + void updateMinMaxValues( int currentTimeStep ); void assignDefaultProperty(); private: diff --git a/ApplicationLibCode/ProjectDataModel/Tools/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/Tools/CMakeLists_files.cmake index a4f5e2686c..4933928184 100644 --- a/ApplicationLibCode/ProjectDataModel/Tools/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/Tools/CMakeLists_files.cmake @@ -1,15 +1,14 @@ -set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaVariableMapper.h - ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisTools.h +set(SOURCE_GROUP_HEADER_FILES + ${CMAKE_CURRENT_LIST_DIR}/RiaVariableMapper.h + ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisTools.h + ${CMAKE_CURRENT_LIST_DIR}/RimAutomationSettings.h ) -set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaVariableMapper.cpp - ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisTools.cpp +set(SOURCE_GROUP_SOURCE_FILES + ${CMAKE_CURRENT_LIST_DIR}/RiaVariableMapper.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimAutomationSettings.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "Tools" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/Tools/RimAutomationSettings.cpp b/ApplicationLibCode/ProjectDataModel/Tools/RimAutomationSettings.cpp new file mode 100644 index 0000000000..1032c760f3 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModel/Tools/RimAutomationSettings.cpp @@ -0,0 +1,114 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimAutomationSettings.h" + +#include "Summary/RiaSummaryTools.h" + +#include "RimSummaryMultiPlotCollection.h" +#include "Summary/RimSummaryPlot.h" + +#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" +#include "RiuPlotMainWindowTools.h" + +#include "RimSummaryMultiPlot.h" + +CAF_PDM_SOURCE_INIT( RimAutomationSettings, "RimAutomationSettings" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimAutomationSettings::RimAutomationSettings() +{ + CAF_PDM_InitObject( "Automation Settings", ":/gear.svg" ); + + CAF_PDM_InitFieldNoDefault( &m_cellSelectionDestination, + "CellSelectionDestination", + "Cell Selection Destination", + "", + "Add curves to the selected Summary Plot when clicking on cells in a 3D view." ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimAutomationSettings::summaryPlots() const +{ + if ( auto summaryPlot = dynamic_cast( m_cellSelectionDestination() ) ) + { + return { summaryPlot }; + } + + if ( auto multiSummaryPlot = dynamic_cast( m_cellSelectionDestination() ) ) + { + return multiSummaryPlot->summaryPlots(); + } + + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimAutomationSettings::setDestinationPlot( RimPlotWindow* plotWindow ) +{ + m_cellSelectionDestination = plotWindow; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimAutomationSettings::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + auto group = uiOrdering.addNewGroup( "Destination Plot for Cell Selection" ); + + group->add( &m_cellSelectionDestination ); + m_cellSelectionDestination.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList RimAutomationSettings::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + QList options; + + if ( fieldNeedingOptions == &m_cellSelectionDestination ) + { + if ( auto summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection() ) + { + for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() ) + { + auto mainPlotName = multiPlot->description(); + + options.push_back( caf::PdmOptionItemInfo( mainPlotName, multiPlot, false, multiPlot->uiIconProvider() ) ); + + for ( RimSummaryPlot* plot : multiPlot->summaryPlots() ) + { + QString displayName = mainPlotName + " : "; + displayName += plot->userDescriptionField()->uiCapability()->uiValue().toString(); + options.push_back( caf::PdmOptionItemInfo( displayName, plot, false, plot->uiIconProvider() ) ); + } + } + } + + options.push_back( caf::PdmOptionItemInfo( "None", nullptr ) ); + } + + return options; +} diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFractureCollection.h b/ApplicationLibCode/ProjectDataModel/Tools/RimAutomationSettings.h similarity index 62% rename from ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFractureCollection.h rename to ApplicationLibCode/ProjectDataModel/Tools/RimAutomationSettings.h index d262139bca..10c50e3779 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimSimWellFractureCollection.h +++ b/ApplicationLibCode/ProjectDataModel/Tools/RimAutomationSettings.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////////// // -// Copyright (C) 2016- Statoil ASA +// Copyright (C) 2025 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,26 +18,32 @@ #pragma once -#include "cafPdmChildArrayField.h" #include "cafPdmField.h" #include "cafPdmObject.h" +#include "cafPdmPtrField.h" -class RimSimWellFracture; +class RimPlotWindow; +class RimSummaryPlot; //================================================================================================== /// /// //================================================================================================== -class RimSimWellFractureCollection : public caf::PdmObject +class RimAutomationSettings : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimSimWellFractureCollection(); + RimAutomationSettings(); - caf::PdmChildArrayField simwellFractures; + std::vector summaryPlots() const; - void deleteFractures(); + void setDestinationPlot( RimPlotWindow* plotWindow ); - void recomputeSimWellCenterlines(); +private: + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + +private: + caf::PdmPtrField m_cellSelectionDestination; }; diff --git a/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.cpp b/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.cpp index 3d21295c39..897aa5ef22 100644 --- a/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.cpp @@ -18,6 +18,8 @@ #include "RimPlotAxisTools.h" +#include "RifEclipseSummaryAddress.h" + #include "RimPlotAxisLogRangeCalculator.h" #include "RimPlotAxisProperties.h" #include "RimPlotCurve.h" @@ -225,4 +227,40 @@ QString scaleFactorText( const RimPlotAxisProperties* const axisProperties ) return {}; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString axisTextForAddress( RifEclipseSummaryAddress address ) +{ + if ( address.isCalculated() ) + { + auto shortName = shortCalculationName( address.uiText() ); + return QString::fromStdString( shortName ); + } + + auto candidate = QString::fromStdString( address.vectorName() ); + + // Strip text starting with _ to avoid duplicate axis names + auto index = candidate.indexOf( "_" ); + if ( index != -1 ) candidate = candidate.left( index ); + + return candidate; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string shortCalculationName( const std::string& calculationName ) +{ + QString calculationShortName = QString::fromStdString( calculationName ); + + int indexOfFirstSpace = calculationShortName.indexOf( ' ' ); + if ( indexOfFirstSpace > -1 && indexOfFirstSpace < calculationShortName.size() ) + { + calculationShortName = calculationShortName.left( indexOfFirstSpace ); + } + + return calculationShortName.toStdString(); +} + } // namespace RimPlotAxisTools diff --git a/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.h b/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.h index 227712b5ee..fcdec286af 100644 --- a/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.h +++ b/ApplicationLibCode/ProjectDataModel/Tools/RimPlotAxisTools.h @@ -22,6 +22,7 @@ class RimPlotAxisProperties; class RimPlotCurve; class RiuPlotAxis; class RiuPlotWidget; +class RifEclipseSummaryAddress; #include #include @@ -36,7 +37,9 @@ void updatePlotWidgetFromAxisProperties( RiuPlotWidget* const QString& axisTitle, const std::vector& plotCurves ); -void applyAxisScaleDraw( RiuPlotWidget* plotWidget, RiuPlotAxis axis, const RimPlotAxisProperties* const axisProperties ); -QString scaleFactorText( const RimPlotAxisProperties* const axisProperties ); +void applyAxisScaleDraw( RiuPlotWidget* plotWidget, RiuPlotAxis axis, const RimPlotAxisProperties* const axisProperties ); +QString scaleFactorText( const RimPlotAxisProperties* const axisProperties ); +QString axisTextForAddress( RifEclipseSummaryAddress address ); +std::string shortCalculationName( const std::string& calculationName ); }; // namespace RimPlotAxisTools diff --git a/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/CMakeLists_files.cmake index e16cacc4e9..570cdd351b 100644 --- a/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/CMakeLists_files.cmake @@ -18,8 +18,3 @@ set(SOURCE_GROUP_SOURCE_FILES list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "VFP Plots" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/WellLog/CMakeLists_files.cmake index 6022f3d169..e29bd9244c 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/WellLog/CMakeLists_files.cmake @@ -75,13 +75,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RimOsduWellLogDataLoader.h) - -source_group( - "ProjectDataModel\\WellLog" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp index 890a869fc8..02ab375424 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp @@ -23,6 +23,8 @@ #include "RiaOptionItemFactory.h" #include "RiaResultNames.h" +#include "Formations/RimFormationNames.h" +#include "Formations/RimFormationNamesCollection.h" #include "RimEnsembleCurveFilter.h" #include "RimEnsembleCurveFilterCollection.h" #include "RimEnsembleCurveSet.h" @@ -31,8 +33,6 @@ #include "RimEnsembleWellLogStatisticsCurve.h" #include "RimEnsembleWellLogs.h" #include "RimEnsembleWellLogsCollection.h" -#include "RimFormationNames.h" -#include "RimFormationNamesCollection.h" #include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimProject.h" diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp index c6adb07a5e..4787111a16 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp @@ -231,7 +231,7 @@ RimWellLogTrack::RimWellLogTrack() CAF_PDM_InitField( &m_showRegionLabels, "ShowFormationLabels", true, "Show Labels" ); - caf::FontTools::RelativeSizeEnum regionLabelFontSizeDefault = caf::FontTools::RelativeSize::XSmall; + caf::FontTools::RelativeSizeEnum regionLabelFontSizeDefault = caf::FontTools::RelativeSize::Small; CAF_PDM_InitField( &m_regionLabelFontSize, "RegionLabelFontSize", regionLabelFontSizeDefault, "Font Size" ); CAF_PDM_InitFieldNoDefault( &m_formationSource, "FormationSource", "Source" ); @@ -2692,6 +2692,8 @@ std::vector RimWellLogTrack::formationNamesVector( RimCase* rimCase ) //-------------------------------------------------------------------------------------------------- void RimWellLogTrack::updateStackedCurveData() { + // See RimSummaryPlot::updateStackedCurveDataForAxis() horizontal plots + RimDepthTrackPlot* wellLogPlot = firstAncestorOrThisOfTypeAsserted(); RimWellLogPlot::DepthTypeEnum depthType = wellLogPlot->depthType(); diff --git a/ApplicationLibCode/ProjectDataModel/WellMeasurement/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/WellMeasurement/CMakeLists_files.cmake index cc215728d6..914e1cc8d3 100644 --- a/ApplicationLibCode/ProjectDataModel/WellMeasurement/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/WellMeasurement/CMakeLists_files.cmake @@ -19,11 +19,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModel\\WellMeasurement" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/WellPath/CMakeLists_files.cmake index f84f4f9c8b..4ed1a4b86a 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModel/WellPath/CMakeLists_files.cmake @@ -45,15 +45,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RimOsduWellPathDataLoader.h -) - -source_group( - "ProjectDataModel\\WellPath" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/RimFileWellPath.cpp b/ApplicationLibCode/ProjectDataModel/WellPath/RimFileWellPath.cpp index 1fefa61819..98c61e2bf9 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/RimFileWellPath.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellPath/RimFileWellPath.cpp @@ -300,7 +300,6 @@ void RimFileWellPath::ensureWellPathStartAtSeaLevel( RigWellPath* wellPath ) // first point in the read well path. std::vector newPoints = { cvf::Vec3d( firstPoint.x(), firstPoint.y(), 0.0 ) }; newPoints.insert( newPoints.end(), wellPathPoints.begin(), wellPathPoints.end() ); - wellPath->setWellPathPoints( newPoints ); // Use rkbDiff as MD for the point at sea level double mdAtSeaLevel = 0.0; @@ -316,7 +315,7 @@ void RimFileWellPath::ensureWellPathStartAtSeaLevel( RigWellPath* wellPath ) std::vector newMeasuredDepths = { mdAtSeaLevel }; newMeasuredDepths.insert( newMeasuredDepths.end(), measuredDepths.begin(), measuredDepths.end() ); - wellPath->setMeasuredDepths( newMeasuredDepths ); + wellPath->setWellPathPoints( newPoints, newMeasuredDepths ); } } diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathCollection.cpp b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathCollection.cpp index 78a2bc5326..d62b576014 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathCollection.cpp @@ -185,7 +185,7 @@ bool RimWellPathCollection::loadDataAndUpdate() { if ( auto osduConnector = RiaApplication::instance()->makeOsduConnector() ) { - osduConnector->requestTokenBlocking(); + osduConnector->requestTokenWithCancelButton(); } } diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.cpp b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.cpp index 4763184f2e..fb5dceb767 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.cpp @@ -294,8 +294,7 @@ cvf::ref measuredDepths.push_back( md + startMD ); } } - wellPathGeometry->setWellPathPoints( wellPathPoints ); - wellPathGeometry->setMeasuredDepths( measuredDepths ); + wellPathGeometry->setWellPathPoints( wellPathPoints, measuredDepths ); if ( m_airGap != 0.0 ) { diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.h b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.h index f9fa54693b..b89ea59d77 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.h +++ b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPathGeometryDef.h @@ -77,6 +77,7 @@ public: const RimWellPathTarget* firstActiveTarget() const; const RimWellPathTarget* lastActiveTarget() const; std::vector activeWellTargets() const; + std::vector activeWellTargets( bool useAutoGeneratedTargetAtSeaLevel ) const; void enableTargetPointPicking( bool isEnabling ); void updateWellPathVisualization( bool fullUpdate ); @@ -93,7 +94,6 @@ public: double wellTargetScalingFactor() const; protected: - std::vector activeWellTargets( bool useAutoGeneratedTargetAtSeaLevel ) const; cvf::ref createWellPathGeometry( bool useAutoGeneratedTargetAtSeaLevel, double offsetMd, bool updateTargets ) const; void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override; diff --git a/ApplicationLibCode/ProjectDataModelCommands/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModelCommands/CMakeLists_files.cmake index d41f7fd953..57573884ce 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModelCommands/CMakeLists_files.cmake @@ -27,6 +27,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RimcEclipseStatisticsCase.h ${CMAKE_CURRENT_LIST_DIR}/RimcIdenticalGridCaseGroup.h ${CMAKE_CURRENT_LIST_DIR}/RimcPressureTable.h + ${CMAKE_CURRENT_LIST_DIR}/RimcFishbonesCollection.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -58,14 +59,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimcEclipseStatisticsCase.cpp ${CMAKE_CURRENT_LIST_DIR}/RimcIdenticalGridCaseGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/RimcPressureTable.cpp + ${CMAKE_CURRENT_LIST_DIR}/RimcFishbonesCollection.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModelCommands" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModelCommands/CommandRouter/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModelCommands/CommandRouter/CMakeLists_files.cmake index d7fc5659af..70987707c7 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/CommandRouter/CMakeLists_files.cmake +++ b/ApplicationLibCode/ProjectDataModelCommands/CommandRouter/CMakeLists_files.cmake @@ -7,11 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RimCommandRouter.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ProjectDataModelCommands\\CommandRouter" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcFishbonesCollection.cpp b/ApplicationLibCode/ProjectDataModelCommands/RimcFishbonesCollection.cpp new file mode 100644 index 0000000000..ffa56dc167 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcFishbonesCollection.cpp @@ -0,0 +1,185 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RimcFishbonesCollection.h" + +#include "RiaLogging.h" + +#include "RimFishbones.h" +#include "RimFishbonesCollection.h" +#include "RimWellPath.h" + +#include "cafPdmAbstractFieldScriptingCapability.h" +#include "cafPdmFieldScriptingCapability.h" + +CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimFishbonesCollection, RimcFishbonesCollection_appendFishbones, "AppendFishbones" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimcFishbonesCollection_appendFishbones::RimcFishbonesCollection_appendFishbones( caf::PdmObjectHandle* self ) + : caf::PdmObjectMethod( self ) +{ + CAF_PDM_InitObject( "Append Fishbones", "", "", "Append Fishbones" ); + + CAF_PDM_InitScriptableFieldNoDefault( &m_subLocations, "SubLocations", "SubLocations" ); + CAF_PDM_InitScriptableField( &m_drillingType, "DrillingType", RimFishbonesDefines::DrillingType::STANDARD, "DrillingType" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmObjectHandle* RimcFishbonesCollection_appendFishbones::execute() +{ + auto fishbonesCollection = self(); + if ( !fishbonesCollection ) return nullptr; + + if ( m_subLocations().empty() ) + { + RiaLogging::error( + "Sub locations are empty, expected list of float values defining measured depths. Cannot create fishbones object." ); + return nullptr; + } + + auto* fishbonesObject = fishbonesCollection->appendFishbonesSubsAtLocations( m_subLocations(), m_drillingType() ); + + if ( auto wellPath = fishbonesCollection->firstAncestorOfType() ) + { + wellPath->updateAllRequiredEditors(); + } + + return fishbonesObject; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcFishbonesCollection_appendFishbones::resultIsPersistent() const +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RimcFishbonesCollection_appendFishbones::defaultResult() const +{ + return std::unique_ptr( new RimFishbones ); +} + +CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimFishbonesCollection, RimcFishbonesCollection_setFixedStartLocation, "SetFixedStartLocation" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimcFishbonesCollection_setFixedStartLocation::RimcFishbonesCollection_setFixedStartLocation( caf::PdmObjectHandle* self ) + : caf::PdmObjectMethod( self ) +{ + CAF_PDM_InitObject( "Set Fixed Start Location", "", "", "" ); + + CAF_PDM_InitScriptableField( &m_location, "Location", 0.0, "Location" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmObjectHandle* RimcFishbonesCollection_setFixedStartLocation::execute() +{ + auto fishbonesCollection = self(); + if ( fishbonesCollection ) + { + fishbonesCollection->setFixedStartMD( m_location() ); + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcFishbonesCollection_setFixedStartLocation::resultIsPersistent() const +{ + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RimcFishbonesCollection_setFixedStartLocation::defaultResult() const +{ + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcFishbonesCollection_setFixedStartLocation::isNullptrValidResult() const +{ + return true; +} + +CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimFishbonesCollection, RimcFishbonesCollection_setFixedEndLocation, "SetFixedEndLocation" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimcFishbonesCollection_setFixedEndLocation::RimcFishbonesCollection_setFixedEndLocation( caf::PdmObjectHandle* self ) + : caf::PdmObjectMethod( self ) +{ + CAF_PDM_InitObject( "Set Fixed End Location", "", "", "" ); + + CAF_PDM_InitScriptableField( &m_location, "Location", 0.0, "Location" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmObjectHandle* RimcFishbonesCollection_setFixedEndLocation::execute() +{ + auto fishbonesCollection = self(); + if ( fishbonesCollection ) + { + fishbonesCollection->setFixedEndMD( m_location() ); + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcFishbonesCollection_setFixedEndLocation::resultIsPersistent() const +{ + return false; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RimcFishbonesCollection_setFixedEndLocation::defaultResult() const +{ + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcFishbonesCollection_setFixedEndLocation::isNullptrValidResult() const +{ + return true; +} diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcFishbonesCollection.h b/ApplicationLibCode/ProjectDataModelCommands/RimcFishbonesCollection.h new file mode 100644 index 0000000000..56e1b682f9 --- /dev/null +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcFishbonesCollection.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RimFishbonesDefines.h" + +#include "cafPdmField.h" +#include "cafPdmObjectHandle.h" +#include "cafPdmObjectMethod.h" + +//================================================================================================== +/// +//================================================================================================== +class RimcFishbonesCollection_appendFishbones : public caf::PdmObjectMethod +{ + CAF_PDM_HEADER_INIT; + +public: + RimcFishbonesCollection_appendFishbones( caf::PdmObjectHandle* self ); + + caf::PdmObjectHandle* execute() override; + bool resultIsPersistent() const override; + std::unique_ptr defaultResult() const override; + +private: + caf::PdmField> m_subLocations; + caf::PdmField> m_drillingType; +}; + +//================================================================================================== +/// +//================================================================================================== +class RimcFishbonesCollection_setFixedStartLocation : public caf::PdmObjectMethod +{ + CAF_PDM_HEADER_INIT; + +public: + RimcFishbonesCollection_setFixedStartLocation( caf::PdmObjectHandle* self ); + + caf::PdmObjectHandle* execute() override; + bool resultIsPersistent() const override; + std::unique_ptr defaultResult() const override; + + bool isNullptrValidResult() const override; + +private: + caf::PdmField m_location; +}; + +//================================================================================================== +/// +//================================================================================================== +class RimcFishbonesCollection_setFixedEndLocation : public caf::PdmObjectMethod +{ + CAF_PDM_HEADER_INIT; + +public: + RimcFishbonesCollection_setFixedEndLocation( caf::PdmObjectHandle* self ); + + caf::PdmObjectHandle* execute() override; + bool resultIsPersistent() const override; + std::unique_ptr defaultResult() const override; + + bool isNullptrValidResult() const override; + +private: + caf::PdmField m_location; +}; diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcSummaryPlotCollection.cpp b/ApplicationLibCode/ProjectDataModelCommands/RimcSummaryPlotCollection.cpp index d7d915fcd9..17dc9a8694 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/RimcSummaryPlotCollection.cpp +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcSummaryPlotCollection.cpp @@ -18,7 +18,7 @@ #include "RimcSummaryPlotCollection.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" +#include "Summary/RiaSummaryPlotTools.h" #include "SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.h" #include "SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h" #include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h" @@ -84,7 +84,7 @@ caf::PdmObjectHandle* RimcSummaryPlotCollection_newSummaryPlot::execute() if ( newPlot ) { newPlot->loadDataAndUpdate(); - RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot ); + RiaSummaryPlotTools::createAndAppendSingleSummaryMultiPlot( newPlot ); } return newPlot; diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp b/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp index d7a2000e1a..0493f5aabb 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.cpp @@ -23,6 +23,9 @@ #include "RimEclipseCase.h" #include "RimEclipseCaseTools.h" +#include "RimFishbones.h" +#include "RimFishbonesCollection.h" +#include "RimFishbonesDefines.h" #include "RimMswCompletionParameters.h" #include "RimPerforationCollection.h" #include "RimPerforationInterval.h" @@ -281,3 +284,70 @@ std::unique_ptr RimcWellPath_multiSegmentWellSettings::def { return std::unique_ptr( new RimMswCompletionParameters ); } + +CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimWellPath, RimcWellPath_appendFishbones, "AppendFishbones" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimcWellPath_appendFishbones::RimcWellPath_appendFishbones( caf::PdmObjectHandle* self ) + : caf::PdmObjectMethod( self ) +{ + CAF_PDM_InitObject( "Append Fishbones", "", "", "Append Fishbones" ); + + CAF_PDM_InitScriptableFieldNoDefault( &m_subLocations, "SubLocations", "SubLocations" ); + auto defaultDrillingType = RimFishbonesDefines::DrillingType::STANDARD; + CAF_PDM_InitScriptableField( &m_drillingType, "DrillingType", defaultDrillingType, "DrillingType" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmObjectHandle* RimcWellPath_appendFishbones::execute() +{ + auto wellPath = self(); + + if ( m_subLocations().empty() ) + { + RiaLogging::error( + "Sub locations are empty, expected list of float values defining measured depths. Cannot create fishbones object." ); + return nullptr; + } + + if ( auto fishbonesCollection = wellPath->fishbonesCollection() ) + { + auto* fishbonesObject = fishbonesCollection->appendFishbonesSubsAtLocations( m_subLocations(), m_drillingType() ); + + wellPath->updateAllRequiredEditors(); + + return fishbonesObject; + } + + RiaLogging::error( "No fishbones collection object found, cannot create fishbones object." ); + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcWellPath_appendFishbones::resultIsPersistent() const +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RimcWellPath_appendFishbones::isNullptrValidResult() const +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr RimcWellPath_appendFishbones::defaultResult() const +{ + return std::unique_ptr( new RimFishbones ); +} diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.h b/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.h index 277741e9df..b3c8375b99 100644 --- a/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.h +++ b/ApplicationLibCode/ProjectDataModelCommands/RimcWellPath.h @@ -18,6 +18,8 @@ #pragma once +#include "RimFishbonesDefines.h" + #include "cafPdmField.h" #include "cafPdmObjectHandle.h" #include "cafPdmObjectMethod.h" @@ -106,3 +108,23 @@ public: bool isNullptrValidResult() const override; std::unique_ptr defaultResult() const override; }; + +//================================================================================================== +/// +//================================================================================================== +class RimcWellPath_appendFishbones : public caf::PdmObjectMethod +{ + CAF_PDM_HEADER_INIT; + +public: + RimcWellPath_appendFishbones( caf::PdmObjectHandle* self ); + + caf::PdmObjectHandle* execute() override; + bool resultIsPersistent() const override; + bool isNullptrValidResult() const override; + std::unique_ptr defaultResult() const override; + +private: + caf::PdmField> m_subLocations; + caf::PdmField> m_drillingType; +}; diff --git a/ApplicationLibCode/ReservoirDataModel/CMakeLists_files.cmake b/ApplicationLibCode/ReservoirDataModel/CMakeLists_files.cmake index a8fe60820b..0a077a2acb 100644 --- a/ApplicationLibCode/ReservoirDataModel/CMakeLists_files.cmake +++ b/ApplicationLibCode/ReservoirDataModel/CMakeLists_files.cmake @@ -13,9 +13,6 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RigCellFaceGeometryTools.h ${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.h ${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.h - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.h - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapGrid.h - ${CMAKE_CURRENT_LIST_DIR}/RigContourPolygonsTools.h ${CMAKE_CURRENT_LIST_DIR}/RigConvexHull.h ${CMAKE_CURRENT_LIST_DIR}/RigEclipseAllanFaultsStatCalc.h ${CMAKE_CURRENT_LIST_DIR}/RigEclipseCaseData.h @@ -44,7 +41,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RigFractureCell.h ${CMAKE_CURRENT_LIST_DIR}/RigFractureGrid.h ${CMAKE_CURRENT_LIST_DIR}/RigGeoMechBoreHoleStressCalculator.h - ${CMAKE_CURRENT_LIST_DIR}/RigGocadData.h + ${CMAKE_CURRENT_LIST_DIR}/RigTriangleMeshData.h ${CMAKE_CURRENT_LIST_DIR}/RigGridBase.h ${CMAKE_CURRENT_LIST_DIR}/RigGridCrossPlotCurveGrouping.h ${CMAKE_CURRENT_LIST_DIR}/RigGriddedPart3d.h @@ -83,11 +80,9 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RigVisibleCategoriesCalculator.h ${CMAKE_CURRENT_LIST_DIR}/RigWbsParameter.h ${CMAKE_CURRENT_LIST_DIR}/RigWeightedMeanCalc.h - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.h - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapProjection.h - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapTrianglesGenerator.h - ${CMAKE_CURRENT_LIST_DIR}/RigEclipseContourMapProjection.h - ${CMAKE_CURRENT_LIST_DIR}/RigGeoMechContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RigPolygonTools.h + ${CMAKE_CURRENT_LIST_DIR}/RigFloodingSettings.h + ${CMAKE_CURRENT_LIST_DIR}/RigHydrocarbonFlowTools.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -104,9 +99,6 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RigCellFaceGeometryTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RigCellGeometryTools.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapGrid.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourPolygonsTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RigConvexHull.cpp ${CMAKE_CURRENT_LIST_DIR}/RigDeclineCurveCalculator.cpp ${CMAKE_CURRENT_LIST_DIR}/RigEclipseAllanFaultsStatCalc.cpp @@ -134,7 +126,7 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RigFractureCell.cpp ${CMAKE_CURRENT_LIST_DIR}/RigFractureGrid.cpp ${CMAKE_CURRENT_LIST_DIR}/RigGeoMechBoreHoleStressCalculator.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigGocadData.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigTriangleMeshData.cpp ${CMAKE_CURRENT_LIST_DIR}/RigGridBase.cpp ${CMAKE_CURRENT_LIST_DIR}/RigGriddedPart3d.cpp ${CMAKE_CURRENT_LIST_DIR}/RigGridManager.cpp @@ -171,21 +163,10 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RigVisibleCategoriesCalculator.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWbsParameter.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWeightedMeanCalc.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapGrid.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourPolygonsTools.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapProjection.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigContourMapTrianglesGenerator.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigEclipseContourMapProjection.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigGeoMechContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigPolygonTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigFloodingSettings.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigHydrocarbonFlowTools.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ReservoirDataModel" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake b/ApplicationLibCode/ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake index a1b77ac296..baef7d0a3b 100644 --- a/ApplicationLibCode/ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake +++ b/ApplicationLibCode/ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake @@ -13,11 +13,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ReservoirDataModel2" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_filesNotToUnitTest.cmake -) diff --git a/ApplicationLibCode/ReservoirDataModel/Completions/CMakeLists_files.cmake b/ApplicationLibCode/ReservoirDataModel/Completions/CMakeLists_files.cmake index c11644d6c9..14cd9652d2 100644 --- a/ApplicationLibCode/ReservoirDataModel/Completions/CMakeLists_files.cmake +++ b/ApplicationLibCode/ReservoirDataModel/Completions/CMakeLists_files.cmake @@ -25,11 +25,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ReservoirDataModel\\Completions" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ReservoirDataModel/Completions/RigWellPathStimplanIntersector.cpp b/ApplicationLibCode/ReservoirDataModel/Completions/RigWellPathStimplanIntersector.cpp index 0c85fc3245..6d433df5c1 100644 --- a/ApplicationLibCode/ReservoirDataModel/Completions/RigWellPathStimplanIntersector.cpp +++ b/ApplicationLibCode/ReservoirDataModel/Completions/RigWellPathStimplanIntersector.cpp @@ -25,7 +25,6 @@ #include "RimFracture.h" #include "RimFractureTemplate.h" -#include "RimSimWellFracture.h" #include "RimStimPlanFractureTemplate.h" #include "cvfMath.h" diff --git a/ApplicationLibCode/ReservoirDataModel/ContourMap/CMakeLists_files.cmake b/ApplicationLibCode/ReservoirDataModel/ContourMap/CMakeLists_files.cmake new file mode 100644 index 0000000000..1cbcc15edf --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/CMakeLists_files.cmake @@ -0,0 +1,26 @@ +set(SOURCE_GROUP_HEADER_FILES + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.h + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapGrid.h + ${CMAKE_CURRENT_LIST_DIR}/RigContourPolygonsTools.h + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.h + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapTrianglesGenerator.h + ${CMAKE_CURRENT_LIST_DIR}/RigEclipseContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RigGeoMechContourMapProjection.h + ${CMAKE_CURRENT_LIST_DIR}/RigStatisticsContourMapProjection.h +) + +set(SOURCE_GROUP_SOURCE_FILES + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapGrid.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigContourPolygonsTools.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapCalculator.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigContourMapTrianglesGenerator.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigEclipseContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigGeoMechContourMapProjection.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigStatisticsContourMapProjection.cpp +) + +list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) +list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapCalculator.cpp similarity index 84% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapCalculator.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapCalculator.cpp index 3d435cc8b1..65918234a7 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigContourMapCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapCalculator.cpp @@ -24,7 +24,9 @@ #include "RigContourMapGrid.h" +#include "RigCellGeometryTools.h" #include "RigContourMapProjection.h" +#include "RigPolyLinesData.h" #include #include @@ -54,11 +56,13 @@ double RigContourMapCalculator::calculateValueInMapCell( const RigContourMapProj return calculateMaxValue( contourMapProjection, matchingCells, gridCellValues ); case MIN_VALUE: return calculateMinValue( contourMapProjection, matchingCells, gridCellValues ); - case VOLUME_SUM: case SUM: case OIL_COLUMN: case GAS_COLUMN: case HYDROCARBON_COLUMN: + case MOBILE_OIL_COLUMN: + case MOBILE_GAS_COLUMN: + case MOBILE_HYDROCARBON_COLUMN: return calculateSum( contourMapProjection, matchingCells, gridCellValues ); default: { @@ -221,43 +225,70 @@ double RigContourMapCalculator::calculateSum( const RigContourMapProjection& return sum; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigContourMapCalculator::isPointInsidePolygons( cvf::Vec2d point, const std::vector>& polygons ) +{ + cvf::Vec3d pos3D( point ); + + bool bIncludesCell = false; + + for ( auto p : polygons ) + { + if ( !bIncludesCell && RigCellGeometryTools::pointInsidePolygon2D( pos3D, p ) ) + { + bIncludesCell = true; + } + } + + return bIncludesCell; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- std::vector>> - RigContourMapCalculator::generateGridMapping( RigContourMapProjection& contourMapProjection, - const RigContourMapGrid& contourMapGrid, - ResultAggregationType resultAggregation, - const std::vector& weightingResultValues ) + RigContourMapCalculator::generateGridMapping( RigContourMapProjection& contourMapProjection, + const RigContourMapGrid& contourMapGrid, + ResultAggregationType resultAggregation, + const std::vector& weightingResultValues, + const std::set& kLayers, + const std::vector>& limitToPolygons ) { int nCells = contourMapGrid.numberOfCells(); std::vector>> projected3dGridIndices( nCells ); - if ( RigContourMapCalculator::isStraightSummationResult( resultAggregation ) ) - { -#pragma omp parallel for - for ( int index = 0; index < nCells; ++index ) - { - cvf::Vec2ui ij = contourMapGrid.ijFromCellIndex( index ); + const bool isSummationResult = RigContourMapCalculator::isStraightSummationResult( resultAggregation ); + const bool usePolygonLimits = limitToPolygons.size() > 0; - cvf::Vec2d globalPos = contourMapGrid.cellCenterPosition( ij.x(), ij.y() ) + contourMapGrid.origin2d(); +#pragma omp parallel for + for ( int index = 0; index < nCells; ++index ) + { + cvf::Vec2ui ij = contourMapGrid.ijFromCellIndex( index ); + + cvf::Vec2d globalPos = contourMapGrid.cellCenterPosition( ij.x(), ij.y() ) + contourMapGrid.origin2d(); + + if ( usePolygonLimits ) + { + if ( !isPointInsidePolygons( globalPos, limitToPolygons ) ) + { + projected3dGridIndices[index] = {}; + continue; + } + } + + if ( isSummationResult ) + { projected3dGridIndices[index] = - cellRayIntersectionAndResults( contourMapProjection, contourMapGrid, globalPos, weightingResultValues ); + cellRayIntersectionAndResults( contourMapProjection, contourMapGrid, globalPos, weightingResultValues, kLayers ); + } + else + { + projected3dGridIndices[index] = + cellOverlapVolumesAndResults( contourMapProjection, contourMapGrid, globalPos, weightingResultValues, kLayers ); } } - else - { -#pragma omp parallel for - for ( int index = 0; index < nCells; ++index ) - { - cvf::Vec2ui ij = contourMapGrid.ijFromCellIndex( index ); - - cvf::Vec2d globalPos = contourMapGrid.cellCenterPosition( ij.x(), ij.y() ) + contourMapGrid.origin2d(); - projected3dGridIndices[index] = - cellOverlapVolumesAndResults( contourMapProjection, contourMapGrid, globalPos, weightingResultValues ); - } - } - return projected3dGridIndices; } @@ -268,7 +299,8 @@ std::vector RigContourMapCalculator::cellOverlapVolumesAndResults( const RigContourMapProjection& contourMapProjection, const RigContourMapGrid& contourMapGrid, const cvf::Vec2d& globalPos2d, - const std::vector& weightingResultValues ) + const std::vector& weightingResultValues, + const std::set& kLayers ) { const cvf::BoundingBox& expandedBoundingBox = contourMapGrid.expandedBoundingBox(); cvf::Vec3d top2dElementCentroid( globalPos2d, expandedBoundingBox.max().z() ); @@ -302,6 +334,11 @@ std::vector { if ( cellGridIdxVisibility.isNull() || ( *cellGridIdxVisibility )[globalCellIdx] ) { + auto k = contourMapProjection.kLayer( globalCellIdx ); + if ( !kLayers.empty() ) + { + if ( !kLayers.contains( (int)k ) ) continue; + } kLayerCellIndexVector[contourMapProjection.kLayer( globalCellIdx )].push_back( globalCellIdx ); } } @@ -334,7 +371,8 @@ std::vector RigContourMapCalculator::cellRayIntersectionAndResults( const RigContourMapProjection& contourMapProjection, const RigContourMapGrid& contourMapGrid, const cvf::Vec2d& globalPos2d, - const std::vector& weightingResultValues ) + const std::vector& weightingResultValues, + const std::set& kLayers ) { std::vector> matchingVisibleCellsAndWeight; @@ -362,7 +400,12 @@ std::vector { if ( cellGridIdxVisibility.isNull() || ( *cellGridIdxVisibility )[globalCellIdx] ) { - kLayerIndexMap[contourMapProjection.kLayer( globalCellIdx )].push_back( globalCellIdx ); + auto k = contourMapProjection.kLayer( globalCellIdx ); + if ( !kLayers.empty() ) + { + if ( !kLayers.contains( (int)k ) ) continue; + } + kLayerIndexMap[k].push_back( globalCellIdx ); } } @@ -394,7 +437,8 @@ std::vector //-------------------------------------------------------------------------------------------------- bool RigContourMapCalculator::isColumnResult( ResultAggregationType aggregationType ) { - return aggregationType == OIL_COLUMN || aggregationType == GAS_COLUMN || aggregationType == HYDROCARBON_COLUMN; + return aggregationType == OIL_COLUMN || aggregationType == GAS_COLUMN || aggregationType == HYDROCARBON_COLUMN || + isMobileColumnResult( aggregationType ); } //-------------------------------------------------------------------------------------------------- @@ -410,5 +454,13 @@ bool RigContourMapCalculator::isMeanResult( ResultAggregationType aggregationTyp //-------------------------------------------------------------------------------------------------- bool RigContourMapCalculator::isStraightSummationResult( ResultAggregationType aggregationType ) { - return aggregationType == OIL_COLUMN || aggregationType == GAS_COLUMN || aggregationType == HYDROCARBON_COLUMN || aggregationType == SUM; + return isColumnResult( aggregationType ) || aggregationType == SUM; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigContourMapCalculator::isMobileColumnResult( ResultAggregationType aggregationType ) +{ + return aggregationType == MOBILE_OIL_COLUMN || aggregationType == MOBILE_GAS_COLUMN || aggregationType == MOBILE_HYDROCARBON_COLUMN; } diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapCalculator.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapCalculator.h similarity index 81% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapCalculator.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapCalculator.h index b89a155d36..eb3636b88c 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigContourMapCalculator.h +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapCalculator.h @@ -19,12 +19,15 @@ #pragma once #include "cvfVector2.h" +#include "cvfVector3.h" +#include #include #include class RigContourMapGrid; class RigContourMapProjection; +class RigPolyLinesData; //================================================================================================== /// @@ -43,17 +46,22 @@ public: HARMONIC_MEAN, MIN_VALUE, MAX_VALUE, - VOLUME_SUM, SUM, OIL_COLUMN, GAS_COLUMN, - HYDROCARBON_COLUMN + HYDROCARBON_COLUMN, + MOBILE_OIL_COLUMN, + MOBILE_GAS_COLUMN, + MOBILE_HYDROCARBON_COLUMN }; - static std::vector>> generateGridMapping( RigContourMapProjection& contourMapProjection, - const RigContourMapGrid& contourMapGrid, - ResultAggregationType resultAggregation, - const std::vector& weightingResultValues ); + static std::vector>> + generateGridMapping( RigContourMapProjection& contourMapProjection, + const RigContourMapGrid& contourMapGrid, + ResultAggregationType resultAggregation, + const std::vector& weightingResultValues, + const std::set& kLayers, + const std::vector>& limitToPolygons ); static double calculateValueInMapCell( const RigContourMapProjection& contourMapProjection, const std::vector>& matchingCells, @@ -63,16 +71,19 @@ public: static std::vector cellOverlapVolumesAndResults( const RigContourMapProjection& contourMapProjection, const RigContourMapGrid& contourMapGrid, const cvf::Vec2d& globalPos2d, - const std::vector& weightingResultValues ); + const std::vector& weightingResultValues, + const std::set& kLayers ); static std::vector cellRayIntersectionAndResults( const RigContourMapProjection& contourMapProjection, const RigContourMapGrid& contourMapGrid, const cvf::Vec2d& globalPos2d, - const std::vector& weightingResultValues ); + const std::vector& weightingResultValues, + const std::set& kLayers ); static bool isColumnResult( ResultAggregationType aggregationType ); static bool isMeanResult( ResultAggregationType aggregationType ); static bool isStraightSummationResult( ResultAggregationType aggregationType ); + static bool isMobileColumnResult( ResultAggregationType aggregationType ); private: static double calculateTopValue( const RigContourMapProjection& contourMapProjection, @@ -97,4 +108,6 @@ private: static double calculateSum( const RigContourMapProjection& contourMapProjection, const std::vector>& matchingCells, const std::vector& gridCellValues ); + + static bool isPointInsidePolygons( cvf::Vec2d point, const std::vector>& polygons ); }; diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapGrid.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapGrid.cpp similarity index 100% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapGrid.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapGrid.cpp diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapGrid.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapGrid.h similarity index 90% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapGrid.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapGrid.h index 89cc155d50..c310715239 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigContourMapGrid.h +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapGrid.h @@ -33,13 +33,21 @@ public: RigContourMapGrid( const cvf::BoundingBox& originalBoundingBox, double sampleSpacing ); RigContourMapGrid( const cvf::BoundingBox& originalBoundingBox, const cvf::BoundingBox& expandedBoundingBox, double sampleSpacing ); + // Copy constructor + RigContourMapGrid( const RigContourMapGrid& other ) + : m_sampleSpacing( other.m_sampleSpacing ) + , m_mapSize( other.m_mapSize ) + , m_expandedBoundingBox( other.m_expandedBoundingBox ) + , m_originalBoundingBox( other.m_originalBoundingBox ) + { + } + double sampleSpacing() const; cvf::Vec2ui numberOfElementsIJ() const; cvf::Vec2ui numberOfVerticesIJ() const; cvf::uint numberOfCells() const; - cvf::uint numberOfValidCells() const; size_t numberOfVertices() const; cvf::Vec3d origin3d() const; diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapProjection.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapProjection.cpp similarity index 88% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapProjection.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapProjection.cpp index 39859fd777..191a9280c4 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigContourMapProjection.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapProjection.cpp @@ -45,9 +45,12 @@ RigContourMapProjection::RigContourMapProjection( const RigContourMapGrid& conto //-------------------------------------------------------------------------------------------------- std::vector>> RigContourMapProjection::generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation, - const std::vector& weights ) + const std::vector& weights, + const std::set& kLayers, + const std::vector>& limitToPolygons ) { - m_projected3dGridIndices = RigContourMapCalculator::generateGridMapping( *this, m_contourMapGrid, resultAggregation, weights ); + m_projected3dGridIndices = + RigContourMapCalculator::generateGridMapping( *this, m_contourMapGrid, resultAggregation, weights, kLayers, limitToPolygons ); return m_projected3dGridIndices; } @@ -108,6 +111,14 @@ cvf::Vec2ui RigContourMapProjection::numberOfVerticesIJ() const return m_contourMapGrid.numberOfVerticesIJ(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigContourMapProjection::vertexIndex( unsigned int i, unsigned int j ) const +{ + return m_contourMapGrid.vertexIndexFromIJ( i, j ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -187,6 +198,14 @@ cvf::Vec3d RigContourMapProjection::origin3d() const return m_contourMapGrid.expandedBoundingBox().min(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigContourMapProjection::topDepthBoundingBox() const +{ + return m_contourMapGrid.expandedBoundingBox().max().z(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -259,6 +278,22 @@ void RigContourMapProjection::generateVertexResults() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigContourMapProjection::setValueFilter( std::optional> valueFilter ) +{ + m_valueFilter = valueFilter; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::optional> RigContourMapProjection::valueFilter() const +{ + return m_valueFilter; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -422,8 +457,21 @@ const std::vector& RigContourMapProjection::aggregatedResults() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const std::vector& RigContourMapProjection::aggregatedVertexResults() const +std::vector RigContourMapProjection::aggregatedVertexResultsFiltered() const { + if ( m_valueFilter ) + { + std::vector filteredResults = m_aggregatedVertexResults; + std::transform( filteredResults.begin(), + filteredResults.end(), + filteredResults.begin(), + [this]( double value ) { + return ( value < m_valueFilter->first || value > m_valueFilter->second ) ? std::numeric_limits::infinity() + : value; + } ); + return filteredResults; + } + return m_aggregatedVertexResults; } diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapProjection.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapProjection.h similarity index 82% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapProjection.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapProjection.h index 1a702f5971..5e23f33828 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigContourMapProjection.h +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapProjection.h @@ -25,9 +25,13 @@ #include "cvfBoundingBox.h" #include "cvfVector2.h" +#include +#include + class RigContourMapGrid; class RimGridView; class RimRegularLegendConfig; +class RigPolyLinesData; //================================================================================================== /// @@ -43,7 +47,9 @@ public: void clearResults(); void clearGridMapping(); - void generateVertexResults(); + void generateVertexResults(); + void setValueFilter( std::optional> valueFilter ); + std::optional> valueFilter() const; double maxValue() const; double minValue() const; @@ -54,6 +60,7 @@ public: cvf::Vec2ui numberOfElementsIJ() const; cvf::Vec2ui numberOfVerticesIJ() const; + size_t vertexIndex( unsigned int i, unsigned int j ) const; double valueAtVertex( unsigned int i, unsigned int j ) const; unsigned int numberOfCells() const; @@ -62,6 +69,7 @@ public: bool checkForMapIntersection( const cvf::Vec3d& domainPoint3d, cvf::Vec2d* contourMapPoint, double* valueAtPoint ) const; cvf::Vec3d origin3d() const; + double topDepthBoundingBox() const; std::vector xVertexPositions() const; std::vector yVertexPositions() const; @@ -80,17 +88,20 @@ public: void setCellVisibility( cvf::ref cellVisibility ); cvf::ref getCellVisibility() const; - std::vector>> - generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation, const std::vector& weights ); + virtual std::vector>> + generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation, + const std::vector& weights, + const std::set& kLayers, + const std::vector>& limitToPolygons ); double interpolateValue( const cvf::Vec2d& gridPosition2d ) const; const std::vector& aggregatedResults() const; - const std::vector& aggregatedVertexResults() const; + std::vector aggregatedVertexResultsFiltered() const; const std::vector>>& projected3dGridIndices() const; // Cell index and position conversion - std::vector cellsAtIJ( unsigned int i, unsigned int j ) const; + virtual std::vector cellsAtIJ( unsigned int i, unsigned int j ) const; static double maxValue( const std::vector& aggregatedResults ); static double minValue( const std::vector& aggregatedResults ); @@ -115,5 +126,7 @@ protected: int m_currentResultTimestep; std::vector m_mapCellVisibility; + std::optional> m_valueFilter; + const RigContourMapGrid& m_contourMapGrid; }; diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapTrianglesGenerator.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTrianglesGenerator.cpp similarity index 97% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapTrianglesGenerator.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTrianglesGenerator.cpp index bf750d553b..230ba8fc52 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigContourMapTrianglesGenerator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTrianglesGenerator.cpp @@ -23,6 +23,7 @@ #include "RigCellGeometryTools.h" #include "RigContourMapGrid.h" #include "RigContourMapProjection.h" +#include "RigPolygonTools.h" #include "cvfGeometryUtils.h" @@ -64,7 +65,7 @@ std::vector std::vector>> threadTriangles( numberOfThreads ); - const std::vector& aggregatedVertexResults = contourMapProjection.aggregatedVertexResults(); + auto aggregatedVertexResults = contourMapProjection.aggregatedVertexResultsFiltered(); #pragma omp parallel { @@ -297,7 +298,8 @@ std::pair, std::ve simplifyEpsilon *= 4.0; } - const std::vector& aggregatedVertexResults = contourMapProjection.aggregatedVertexResults(); + auto aggregatedVertexResults = contourMapProjection.aggregatedVertexResultsFiltered(); + if ( aggregatedVertexResults.empty() ) return {}; std::vector unorderedLineSegmentsPerLevel = caf::ContourLines::create( aggregatedVertexResults, @@ -322,7 +324,7 @@ std::pair, std::ve for ( RigContourPolygonsTools::ContourPolygon& polygon : contourPolygons[i] ) { - RigCellGeometryTools::simplifyPolygon( &polygon.vertices, simplifyEpsilon ); + RigPolygonTools::simplifyPolygon( polygon.vertices, simplifyEpsilon ); } } diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourMapTrianglesGenerator.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTrianglesGenerator.h similarity index 100% rename from ApplicationLibCode/ReservoirDataModel/RigContourMapTrianglesGenerator.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourMapTrianglesGenerator.h diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourPolygonsTools.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourPolygonsTools.cpp similarity index 100% rename from ApplicationLibCode/ReservoirDataModel/RigContourPolygonsTools.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourPolygonsTools.cpp diff --git a/ApplicationLibCode/ReservoirDataModel/RigContourPolygonsTools.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourPolygonsTools.h similarity index 100% rename from ApplicationLibCode/ReservoirDataModel/RigContourPolygonsTools.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigContourPolygonsTools.h diff --git a/ApplicationLibCode/ReservoirDataModel/RigEclipseContourMapProjection.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigEclipseContourMapProjection.cpp similarity index 67% rename from ApplicationLibCode/ReservoirDataModel/RigEclipseContourMapProjection.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigEclipseContourMapProjection.cpp index d47bfae6a4..d0af14c3da 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigEclipseContourMapProjection.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigEclipseContourMapProjection.cpp @@ -27,6 +27,7 @@ #include "RigEclipseCaseData.h" #include "RigEclipseResultAddress.h" #include "RigHexIntersectionTools.h" +#include "RigHydrocarbonFlowTools.h" #include "RigMainGrid.h" #include @@ -60,10 +61,11 @@ RigEclipseContourMapProjection::~RigEclipseContourMapProjection() //-------------------------------------------------------------------------------------------------- void RigEclipseContourMapProjection::generateAndSaveResults( const RigEclipseResultAddress& resultAddress, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ) + int timeStep, + RigFloodingSettings& floodingSettings ) { std::tie( m_useActiveCellInfo, m_aggregatedResults ) = - generateResults( *this, m_contourMapGrid, m_resultData, resultAddress, resultAggregation, timeStep ); + generateResults( *this, m_contourMapGrid, m_resultData, resultAddress, resultAggregation, timeStep, floodingSettings ); } //-------------------------------------------------------------------------------------------------- @@ -71,10 +73,11 @@ void RigEclipseContourMapProjection::generateAndSaveResults( const RigEclipseRes //-------------------------------------------------------------------------------------------------- std::vector RigEclipseContourMapProjection::generateResults( const RigEclipseResultAddress& resultAddress, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ) const + int timeStep, + RigFloodingSettings& floodingSettings ) const { std::pair> result = - generateResults( *this, m_contourMapGrid, m_resultData, resultAddress, resultAggregation, timeStep ); + generateResults( *this, m_contourMapGrid, m_resultData, resultAddress, resultAggregation, timeStep, floodingSettings ); return result.second; } @@ -87,7 +90,8 @@ std::pair> RigCaseCellResultsData& resultData, const RigEclipseResultAddress& resultAddress, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ) + int timeStep, + RigFloodingSettings& floodingSettings ) { size_t nCells = contourMapProjection.numberOfCells(); @@ -107,24 +111,20 @@ std::pair> std::vector gridResultValues; if ( RigContourMapCalculator::isColumnResult( resultAggregation ) ) { - resultData.ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) ); - resultData.ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); - resultData.ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); - if ( resultAggregation == RigContourMapCalculator::OIL_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN ) + bool missingResults = false; + + for ( const auto& resAddr : neededResults( resultAggregation, floodingSettings ) ) { - resultData.ensureKnownResultLoaded( - RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) ); + missingResults = missingResults || !resultData.ensureKnownResultLoaded( resAddr ); } - if ( resultAggregation == RigContourMapCalculator::GAS_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN ) + + if ( !missingResults ) { - resultData.ensureKnownResultLoaded( - RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) ); + gridResultValues = calculateColumnResult( resultData, resultAggregation, timeStep, floodingSettings ); } - gridResultValues = calculateColumnResult( resultData, resultAggregation, timeStep ); } else { - // TODO: this was RimEclipseCellColors->hasStaticResult() if ( resultAddress.resultCatType() == RiaDefines::ResultCatType::STATIC_NATIVE && timeStep > 0 ) timeStep = 0; resultData.ensureKnownResultLoaded( resultAddress ); @@ -152,28 +152,14 @@ std::pair> return { useActiveCellInfo, aggregatedResults }; } -std::vector RigEclipseContourMapProjection::calculateColumnResult( RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ) const -{ - return calculateColumnResult( m_resultData, resultAggregation, timeStep ); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- std::vector RigEclipseContourMapProjection::calculateColumnResult( RigCaseCellResultsData& resultData, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ) + int timeStep, + RigFloodingSettings& floodingSettings ) { - bool hasPoroResult = resultData.hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ) ); - bool hasNtgResult = resultData.hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) ); - bool hasDzResult = resultData.hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ) ); - - if ( !( hasPoroResult && hasNtgResult && hasDzResult ) ) - { - return std::vector(); - } - const std::vector& poroResults = resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ), 0 ); const std::vector& ntgResults = @@ -183,38 +169,53 @@ std::vector RigEclipseContourMapProjection::calculateColumnResult( RigCa CVF_ASSERT( poroResults.size() == ntgResults.size() && ntgResults.size() == dzResults.size() ); - std::vector resultValues( poroResults.size(), 0.0 ); + const auto nSamples = poroResults.size(); - if ( resultAggregation == RigContourMapCalculator::OIL_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN ) + auto mapToFlowResultType = []( RigContourMapCalculator::ResultAggregationType t1 ) + { + if ( t1 == RigContourMapCalculator::ResultAggregationType::MOBILE_OIL_COLUMN ) + return RigHydrocarbonFlowTools::ResultType::MOBILE_OIL; + if ( t1 == RigContourMapCalculator::ResultAggregationType::MOBILE_GAS_COLUMN ) + return RigHydrocarbonFlowTools::ResultType::MOBILE_GAS; + if ( t1 == RigContourMapCalculator::ResultAggregationType::MOBILE_HYDROCARBON_COLUMN ) + return RigHydrocarbonFlowTools::ResultType::MOBILE_HYDROCARBON; + return RigHydrocarbonFlowTools::ResultType::NONE; + }; + auto flowResultType = mapToFlowResultType( resultAggregation ); + std::vector residualOil = RigHydrocarbonFlowTools::residualOilData( resultData, flowResultType, floodingSettings, nSamples ); + std::vector residualGas = RigHydrocarbonFlowTools::residualGasData( resultData, flowResultType, floodingSettings, nSamples ); + + std::vector resultValues( nSamples, 0.0 ); + + if ( ( resultAggregation == RigContourMapCalculator::OIL_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN ) || + ( resultAggregation == RigContourMapCalculator::MOBILE_OIL_COLUMN || + resultAggregation == RigContourMapCalculator::MOBILE_HYDROCARBON_COLUMN ) ) { const std::vector& soilResults = resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ), timeStep ); - for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx ) + for ( size_t n = 0; n < nSamples; n++ ) { - resultValues[cellResultIdx] = soilResults[cellResultIdx]; + resultValues[n] = std::max( soilResults[n] - residualOil[n], 0.0 ); } } - if ( resultAggregation == RigContourMapCalculator::GAS_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN ) + if ( ( resultAggregation == RigContourMapCalculator::GAS_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN ) || + ( resultAggregation == RigContourMapCalculator::MOBILE_GAS_COLUMN || + resultAggregation == RigContourMapCalculator::MOBILE_HYDROCARBON_COLUMN ) ) { - bool hasGasResult = - resultData.hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) ); - if ( hasGasResult ) + const std::vector& sgasResults = + resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ), + timeStep ); + for ( size_t n = 0; n < nSamples; n++ ) { - const std::vector& sgasResults = - resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ), - timeStep ); - for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx ) - { - resultValues[cellResultIdx] += sgasResults[cellResultIdx]; - } + resultValues[n] += std::max( sgasResults[n] - residualGas[n], 0.0 ); } } - for ( size_t cellResultIdx = 0; cellResultIdx < resultValues.size(); ++cellResultIdx ) + for ( size_t n = 0; n < nSamples; n++ ) { - resultValues[cellResultIdx] *= poroResults[cellResultIdx] * ntgResults[cellResultIdx] * dzResults[cellResultIdx]; + resultValues[n] *= poroResults[n] * ntgResults[n] * dzResults[n]; } return resultValues; @@ -331,3 +332,58 @@ std::vector RigEclipseContourMapProjection::getMapCellVisibility( int { return std::vector( numberOfCells(), true ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RigEclipseContourMapProjection::neededResults( RigContourMapCalculator::ResultAggregationType resultAggregation, + RigFloodingSettings& floodingSettings ) +{ + std::set results; + + if ( RigContourMapCalculator::isColumnResult( resultAggregation ) ) + { + results.emplace( RiaDefines::ResultCatType::STATIC_NATIVE, "PORO" ); + results.emplace( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ); + results.emplace( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ" ); + + if ( resultAggregation == RigContourMapCalculator::OIL_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN || + resultAggregation == RigContourMapCalculator::MOBILE_OIL_COLUMN || + resultAggregation == RigContourMapCalculator::MOBILE_HYDROCARBON_COLUMN ) + { + results.emplace( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ); + } + if ( resultAggregation == RigContourMapCalculator::GAS_COLUMN || resultAggregation == RigContourMapCalculator::HYDROCARBON_COLUMN || + resultAggregation == RigContourMapCalculator::MOBILE_GAS_COLUMN || + resultAggregation == RigContourMapCalculator::MOBILE_HYDROCARBON_COLUMN ) + { + results.emplace( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ); + } + } + + if ( RigContourMapCalculator::isMobileColumnResult( resultAggregation ) ) + { + if ( ( resultAggregation == RigContourMapCalculator::ResultAggregationType::MOBILE_OIL_COLUMN ) || + ( resultAggregation == RigContourMapCalculator::ResultAggregationType::MOBILE_HYDROCARBON_COLUMN ) ) + { + if ( floodingSettings.oilFlooding() == RigFloodingSettings::FloodingType::WATER_FLOODING ) + { + results.emplace( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::sowcr() ); + } + else if ( floodingSettings.oilFlooding() == RigFloodingSettings::FloodingType::GAS_FLOODING ) + { + results.emplace( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::sogcr() ); + } + } + if ( ( resultAggregation == RigContourMapCalculator::ResultAggregationType::MOBILE_GAS_COLUMN ) || + ( resultAggregation == RigContourMapCalculator::ResultAggregationType::MOBILE_HYDROCARBON_COLUMN ) ) + { + if ( floodingSettings.gasFlooding() == RigFloodingSettings::FloodingType::GAS_FLOODING ) + { + results.emplace( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::sgcr() ); + } + } + } + + return results; +} diff --git a/ApplicationLibCode/ReservoirDataModel/RigEclipseContourMapProjection.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigEclipseContourMapProjection.h similarity index 81% rename from ApplicationLibCode/ReservoirDataModel/RigEclipseContourMapProjection.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigEclipseContourMapProjection.h index 0e825b7abe..0332ff8c9f 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigEclipseContourMapProjection.h +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigEclipseContourMapProjection.h @@ -20,16 +20,19 @@ #include "RigContourMapCalculator.h" #include "RigContourMapProjection.h" +#include "RigEclipseResultAddress.h" +#include "RigFloodingSettings.h" #include "cvfBoundingBox.h" +#include + class RigActiveCellInfo; class RigMainGrid; class RigContourMapGrid; class RigResultAccessor; class RigEclipseCaseData; class RigCaseCellResultsData; -class RigEclipseResultAddress; //================================================================================================== /// @@ -45,18 +48,21 @@ public: void generateAndSaveResults( const RigEclipseResultAddress& resultAddress, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ); + int timeStep, + RigFloodingSettings& floodingSettings ); std::vector generateResults( const RigEclipseResultAddress& resultAddress, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ) const; + int timeStep, + RigFloodingSettings& floodingSettings ) const; static std::pair> generateResults( const RigEclipseContourMapProjection& contourMapProjection, const RigContourMapGrid& contourMapGrid, RigCaseCellResultsData& resultData, const RigEclipseResultAddress& resultAddress, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ); + int timeStep, + RigFloodingSettings& floodingSettings ); std::vector getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationType resultAggregation ) override; @@ -71,12 +77,13 @@ protected: double getParameterWeightForCell( size_t cellResultIdx, const std::vector& parameterWeights ) const override; size_t gridResultIndex( size_t globalCellIdx ) const override; - // Eclipse implementation specific data generation methods - std::vector calculateColumnResult( RigContourMapCalculator::ResultAggregationType resultAggregation, int timeStep ) const; - static std::vector calculateColumnResult( RigCaseCellResultsData& resultData, RigContourMapCalculator::ResultAggregationType resultAggregation, - int timeStep ); + int timeStep, + RigFloodingSettings& floodingSettings ); + + static std::set neededResults( RigContourMapCalculator::ResultAggregationType resultAggregation, + RigFloodingSettings& floodingSettings ); protected: RigEclipseCaseData& m_eclipseCaseData; diff --git a/ApplicationLibCode/ReservoirDataModel/RigGeoMechContourMapProjection.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigGeoMechContourMapProjection.cpp similarity index 100% rename from ApplicationLibCode/ReservoirDataModel/RigGeoMechContourMapProjection.cpp rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigGeoMechContourMapProjection.cpp diff --git a/ApplicationLibCode/ReservoirDataModel/RigGeoMechContourMapProjection.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigGeoMechContourMapProjection.h similarity index 100% rename from ApplicationLibCode/ReservoirDataModel/RigGeoMechContourMapProjection.h rename to ApplicationLibCode/ReservoirDataModel/ContourMap/RigGeoMechContourMapProjection.h diff --git a/ApplicationLibCode/ReservoirDataModel/ContourMap/RigStatisticsContourMapProjection.cpp b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigStatisticsContourMapProjection.cpp new file mode 100644 index 0000000000..fc9959061d --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigStatisticsContourMapProjection.cpp @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigStatisticsContourMapProjection.h" + +#include "RigContourMapCalculator.h" +#include "RigContourMapGrid.h" + +#include "cafAssert.h" + +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigStatisticsContourMapProjection::RigStatisticsContourMapProjection( const RigContourMapGrid& contourMapGrid ) + : RigContourMapProjection( contourMapGrid ) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigStatisticsContourMapProjection::~RigStatisticsContourMapProjection() +{ +} + +std::vector>> + RigStatisticsContourMapProjection::generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation, + const std::vector& weights, + const std::set& kLayers, + const std::vector>& limitToPolygons ) +{ + // The grid mapping is usually necessary to produce the data. For the statistics projection + // the data is already available, so we can just ignore it. + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigStatisticsContourMapProjection::generateAndSaveResults( const std::vector& result ) +{ + m_aggregatedResults = result; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigStatisticsContourMapProjection::findIntersectingCells( const cvf::BoundingBox& bbox ) const +{ + CAF_ASSERT( false ); + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigStatisticsContourMapProjection::kLayer( size_t globalCellIdx ) const +{ + CAF_ASSERT( false ); + return 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RigStatisticsContourMapProjection::kLayers() const +{ + CAF_ASSERT( false ); + return 0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigStatisticsContourMapProjection::calculateOverlapVolume( size_t globalCellIdx, const cvf::BoundingBox& bbox ) const +{ + CAF_ASSERT( false ); + return 0.0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigStatisticsContourMapProjection::calculateRayLengthInCell( size_t globalCellIdx, + const cvf::Vec3d& highestPoint, + const cvf::Vec3d& lowestPoint ) const +{ + CAF_ASSERT( false ); + return 0.0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigStatisticsContourMapProjection::getParameterWeightForCell( size_t cellResultIdx, const std::vector& cellWeights ) const +{ + return 1.0; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigStatisticsContourMapProjection::getMapCellVisibility( int viewStepIndex, + RigContourMapCalculator::ResultAggregationType resultAggregation ) + +{ + return std::vector( numberOfCells(), true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector> RigStatisticsContourMapProjection::cellsAtIJ( unsigned int i, unsigned int j ) const +{ + size_t cellIndex = m_contourMapGrid.cellIndexFromIJ( i, j ); + if ( cellIndex < m_aggregatedResults.size() && !std::isinf( m_aggregatedResults[cellIndex] ) && + !std::isnan( m_aggregatedResults[cellIndex] ) ) + { + return { std::make_pair( cellIndex, m_aggregatedResults[cellIndex] ) }; + } + + return std::vector>(); +} diff --git a/ApplicationLibCode/ReservoirDataModel/ContourMap/RigStatisticsContourMapProjection.h b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigStatisticsContourMapProjection.h new file mode 100644 index 0000000000..e2408bb4ea --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/ContourMap/RigStatisticsContourMapProjection.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RigContourMapCalculator.h" +#include "RigContourMapProjection.h" + +#include "cvfBoundingBox.h" + +class RigContourMapGrid; + +//================================================================================================== +/// +/// +//================================================================================================== +class RigStatisticsContourMapProjection : public RigContourMapProjection +{ +public: + RigStatisticsContourMapProjection( const RigContourMapGrid& contourMapGrid ); + virtual ~RigStatisticsContourMapProjection(); + + std::vector> cellsAtIJ( unsigned int i, unsigned int j ) const override; + + void generateAndSaveResults( const std::vector& results ); + + std::vector>> + generateGridMapping( RigContourMapCalculator::ResultAggregationType resultAggregation, + const std::vector& weights, + const std::set& kLayers, + const std::vector>& limitToPolygons ) override; + + std::vector getMapCellVisibility( int viewStepIndex, RigContourMapCalculator::ResultAggregationType resultAggregation ) override; + +protected: + using CellIndexAndResult = RigContourMapProjection::CellIndexAndResult; + + std::vector findIntersectingCells( const cvf::BoundingBox& bbox ) const override; + size_t kLayer( size_t globalCellIdx ) const override; + size_t kLayers() const override; + double calculateOverlapVolume( size_t globalCellIdx, const cvf::BoundingBox& bbox ) const override; + double calculateRayLengthInCell( size_t globalCellIdx, const cvf::Vec3d& highestPoint, const cvf::Vec3d& lowestPoint ) const override; + double getParameterWeightForCell( size_t cellResultIdx, const std::vector& parameterWeights ) const override; +}; diff --git a/ApplicationLibCode/ReservoirDataModel/ResultAccessors/CMakeLists_files.cmake b/ApplicationLibCode/ReservoirDataModel/ResultAccessors/CMakeLists_files.cmake index feefb2ebb1..18001d7583 100644 --- a/ApplicationLibCode/ReservoirDataModel/ResultAccessors/CMakeLists_files.cmake +++ b/ApplicationLibCode/ReservoirDataModel/ResultAccessors/CMakeLists_files.cmake @@ -27,9 +27,3 @@ set(SOURCE_GROUP_SOURCE_FILES list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ReservoirDataModel\\ResultAccessors" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/CMakeLists_files.cmake b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/CMakeLists_files.cmake index eec6b78e88..ece6f3a190 100644 --- a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/CMakeLists_files.cmake +++ b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/CMakeLists_files.cmake @@ -25,11 +25,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ReservoirDataModel\\ResultCalculators" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigMobilePoreVolumeResultCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigMobilePoreVolumeResultCalculator.cpp index 461b91f294..8f275961c9 100644 --- a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigMobilePoreVolumeResultCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigMobilePoreVolumeResultCalculator.cpp @@ -64,8 +64,10 @@ void RigMobilePoreVolumeResultCalculator::calculate( const RigEclipseResultAddre const std::vector* swcrResults = nullptr; const std::vector* multpvResults = nullptr; - porvResults = - RigCaseCellResultsData::getResultIndexableStaticResult( m_resultsData->activeCellInfo(), m_resultsData, "PORV", porvDataTemp ); + porvResults = RigCaseCellResultsData::getResultIndexableStaticResult( m_resultsData->activeCellInfo(), + m_resultsData, + RiaResultNames::porv(), + porvDataTemp ); if ( !porvResults || porvResults->empty() ) { RiaLogging::error( "Assumed PORV, but not data was found." ); diff --git a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigPorvSoilSgasResultCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigPorvSoilSgasResultCalculator.cpp index 64895f8284..85ebb7323f 100644 --- a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigPorvSoilSgasResultCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigPorvSoilSgasResultCalculator.cpp @@ -56,20 +56,25 @@ void RigPorvSoilSgasResultCalculator::calculate( const RigEclipseResultAddress& { RigEclipseResultAddress soilAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ); RigEclipseResultAddress sgasAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ); - RigEclipseResultAddress porvAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORV" ); + RigEclipseResultAddress porvAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::porv() ); if ( resVarAddr.resultName() == RiaResultNames::riPorvSoil() ) { + if ( !m_resultsData->hasResultEntry( porvAddress ) || !m_resultsData->hasResultEntry( soilAddress ) ) return; + calculateProduct( porvAddress, soilAddress, resVarAddr ); } else if ( resVarAddr.resultName() == RiaResultNames::riPorvSgas() ) { + if ( !m_resultsData->hasResultEntry( porvAddress ) || !m_resultsData->hasResultEntry( sgasAddress ) ) return; + calculateProduct( porvAddress, sgasAddress, resVarAddr ); } else if ( resVarAddr.resultName() == RiaResultNames::riPorvSoilSgas() ) { RigEclipseResultAddress soilAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSoil() ); RigEclipseResultAddress sgasAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSgas() ); + if ( !m_resultsData->hasResultEntry( soilAddress ) || !m_resultsData->hasResultEntry( sgasAddress ) ) return; calculateSum( soilAddress, sgasAddress, resVarAddr ); } diff --git a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp index e70c2c0b5d..c0c875ada7 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -1125,7 +1125,7 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() // Mobile Pore Volume { - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORV" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::porv() ) ) ) { if ( !hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::mobilePoreVolumeName() ) ) ) { @@ -1141,7 +1141,7 @@ void RigCaseCellResultsData::createPlaceholderResultEntries() findOrCreateScalarResultIndex( RiaResultNames::staticIntegerAddress( RiaResultNames::indexKResultName() ), needsToBeStored ); } - if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORV" ) ) ) + if ( hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::porv() ) ) ) { bool hasSgas = hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) ); bool hasSoil = hasResultEntry( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ) ); diff --git a/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp b/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp index ab46f6fda0..9ba69214bb 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCellFaceGeometryTools.cpp @@ -16,10 +16,11 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RiaLogging.h" - #include "RigCellFaceGeometryTools.h" +#include "RiaLogging.h" +#include "RiaPreferencesSystem.h" + #include "RigActiveCellInfo.h" #include "RigCell.h" #include "RigMainGrid.h" @@ -63,7 +64,7 @@ cvf::StructGridInterface::FaceType RigCellFaceGeometryTools::calculateCellFaceOv isPossibleNeighborInDirection[cvf::StructGridInterface::POS_J] + isPossibleNeighborInDirection[cvf::StructGridInterface::NEG_J] + isPossibleNeighborInDirection[cvf::StructGridInterface::POS_K] + isPossibleNeighborInDirection[cvf::StructGridInterface::NEG_K]; - // If cell 2 is not adjancent with respect to any of the six ijk directions, + // If cell 2 is not adjacent with respect to any of the six ijk directions, // assume that we have no overlapping area. if ( !hasNeighbourInAnyDirection ) @@ -133,6 +134,8 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain // by Eclipse. Use faults as basis for subset of cells to find NNC connection for. The imported connections from // Eclipse are located at the beginning of the connections vector. + const bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RigCellFaceGeometryTools" ); + std::set> nativeCellPairs; for ( size_t i = 0; i < nativeConnections.size(); ++i ) @@ -146,7 +149,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain QString message = QString( "Nnc connection imported from Eclipse are not unique\nNNC count : %1\nUnique : %2" ) .arg( nativeConnections.size() ) .arg( nativeCellPairs.size() ); - RiaLogging::warning( message ); + if ( isLoggingEnabled ) RiaLogging::warning( message ); } const cvf::Collection& faults = mainGrid->faults(); @@ -202,7 +205,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain "inactive cells can be managed from Preferences->Eclipse Grid->Include Inactive Cells" ) .arg( otherConnections.size() ) .arg( nncCountWarningThreshold ); - RiaLogging::warning( txt ); + if ( isLoggingEnabled ) RiaLogging::warning( txt ); } otherConnections.remove_duplicates(); diff --git a/ApplicationLibCode/ReservoirDataModel/RigCellGeometryTools.cpp b/ApplicationLibCode/ReservoirDataModel/RigCellGeometryTools.cpp index 0f36b5cbb8..954f0dd456 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCellGeometryTools.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCellGeometryTools.cpp @@ -233,50 +233,6 @@ void RigCellGeometryTools::createPolygonFromLineSegments( std::list* vertices, double epsilon ) -{ - CVF_ASSERT( vertices ); - if ( vertices->size() < 3 ) return; - - std::pair maxDistPoint( 0u, 0.0 ); - - for ( size_t i = 1; i < vertices->size() - 1; ++i ) - { - cvf::Vec3d v = vertices->at( i ); - double u; - cvf::Vec3d v_proj = cvf::GeometryTools::projectPointOnLine( vertices->front(), vertices->back(), v, &u ); - double distance = ( v_proj - v ).length(); - if ( distance > maxDistPoint.second ) - { - maxDistPoint = std::make_pair( i, distance ); - } - } - - if ( maxDistPoint.second > epsilon ) - { - std::vector newVertices1( vertices->begin(), vertices->begin() + maxDistPoint.first + 1 ); - std::vector newVertices2( vertices->begin() + maxDistPoint.first, vertices->end() ); - - // Recurse - simplifyPolygon( &newVertices1, epsilon ); - simplifyPolygon( &newVertices2, epsilon ); - - std::vector newVertices( newVertices1.begin(), newVertices1.end() - 1 ); - newVertices.insert( newVertices.end(), newVertices2.begin(), newVertices2.end() ); - *vertices = newVertices; - } - else - { - std::vector newVertices = { vertices->front(), vertices->back() }; - *vertices = newVertices; - } -} - //================================================================================================== /// //================================================================================================== @@ -703,7 +659,7 @@ double RigCellGeometryTools::getLengthOfPolygonAlongLine( const std::pair>& intersectionLineSegments, std::vector>& polygons, double tolerance = 1.0e-4 ); - static void simplifyPolygon( std::vector* vertices, double epsilon ); static void findCellLocalXYZ( const std::array& hexCorners, cvf::Vec3d& localXdirection, diff --git a/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp b/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp index 67a1fb691c..96994353cc 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.cpp @@ -15,10 +15,13 @@ // for more details. // ///////////////////////////////////////////////////////////////////////////////// + #include "RigEclipseCrossPlotDataExtractor.h" #include "RiaQDateTimeTools.h" +#include "RimEclipseResultDefinition.h" + #include "RigActiveCellInfo.h" #include "RigActiveCellsResultAccessor.h" #include "RigCaseCellResultsData.h" @@ -33,44 +36,42 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigEclipseCrossPlotResult RigEclipseCrossPlotDataExtractor::extract( RigEclipseCaseData* caseData, - int resultTimeStep, - const RigEclipseResultAddress& xAddress, - const RigEclipseResultAddress& yAddress, - RigGridCrossPlotCurveGrouping groupingType, - const RigEclipseResultAddress& groupAddress, - std::map timeStepCellVisibilityMap ) +RigEclipseCrossPlotResult RigEclipseCrossPlotDataExtractor::extract( RigEclipseCaseData* caseData, + int resultTimeStep, + const RimEclipseResultDefinition& xAddress, + const RimEclipseResultDefinition& yAddress, + RigGridCrossPlotCurveGrouping groupingType, + const RimEclipseResultDefinition& groupAddress, + std::map timeStepCellVisibilityMap ) { RigEclipseCrossPlotResult result; - RigCaseCellResultsData* resultData = caseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - if ( !resultData ) return result; - - const std::vector>* catValuesForAllSteps = nullptr; - - if ( xAddress.isValid() && yAddress.isValid() ) + if ( xAddress.eclipseResultAddress().isValid() && yAddress.eclipseResultAddress().isValid() ) { - RigActiveCellInfo* activeCellInfo = resultData->activeCellInfo(); - const RigMainGrid* mainGrid = caseData->mainGrid(); - - if ( !resultData->ensureKnownResultLoaded( xAddress ) ) + RigCaseCellResultsData* xResultData = caseData->results( xAddress.porosityModel() ); + if ( !xResultData->ensureKnownResultLoaded( xAddress.eclipseResultAddress() ) ) { return result; } - if ( !resultData->ensureKnownResultLoaded( yAddress ) ) + RigCaseCellResultsData* yResultData = caseData->results( yAddress.porosityModel() ); + if ( !yResultData->ensureKnownResultLoaded( yAddress.eclipseResultAddress() ) ) { return result; } - const std::vector>& xValuesForAllSteps = resultData->cellScalarResults( xAddress ); - const std::vector>& yValuesForAllSteps = resultData->cellScalarResults( yAddress ); + const std::vector>& xValuesForAllSteps = xResultData->cellScalarResults( xAddress.eclipseResultAddress() ); + const std::vector>& yValuesForAllSteps = yResultData->cellScalarResults( yAddress.eclipseResultAddress() ); - if ( groupingType == GROUP_BY_RESULT && groupAddress.isValid() ) + RigCaseCellResultsData* groupResultData = nullptr; + const std::vector>* catValuesForAllSteps = nullptr; + + if ( groupingType == GROUP_BY_RESULT && groupAddress.eclipseResultAddress().isValid() ) { - if ( resultData->ensureKnownResultLoaded( groupAddress ) ) + groupResultData = caseData->results( groupAddress.porosityModel() ); + if ( groupResultData->ensureKnownResultLoaded( groupAddress.eclipseResultAddress() ) ) { - catValuesForAllSteps = &resultData->cellScalarResults( groupAddress ); + catValuesForAllSteps = &groupResultData->cellScalarResults( groupAddress.eclipseResultAddress() ); } } @@ -104,17 +105,20 @@ RigEclipseCrossPlotResult RigEclipseCrossPlotDataExtractor::extract( RigEclipseC int xIndex = timeStep >= (int)xValuesForAllSteps.size() ? 0 : timeStep; int yIndex = timeStep >= (int)yValuesForAllSteps.size() ? 0 : timeStep; - RigActiveCellsResultAccessor xAccessor( mainGrid, &xValuesForAllSteps[xIndex], activeCellInfo ); - RigActiveCellsResultAccessor yAccessor( mainGrid, &yValuesForAllSteps[yIndex], activeCellInfo ); + const RigMainGrid* mainGrid = caseData->mainGrid(); + + RigActiveCellsResultAccessor xAccessor( mainGrid, &xValuesForAllSteps[xIndex], xResultData->activeCellInfo() ); + RigActiveCellsResultAccessor yAccessor( mainGrid, &yValuesForAllSteps[yIndex], yResultData->activeCellInfo() ); std::unique_ptr catAccessor; if ( catValuesForAllSteps ) { int catIndex = timeStep >= (int)catValuesForAllSteps->size() ? 0 : timeStep; - catAccessor = - std::make_unique( mainGrid, &( catValuesForAllSteps->at( catIndex ) ), activeCellInfo ); + catAccessor = std::make_unique( mainGrid, + &( catValuesForAllSteps->at( catIndex ) ), + groupResultData->activeCellInfo() ); } - for ( size_t globalCellIdx = 0; globalCellIdx < activeCellInfo->reservoirCellCount(); ++globalCellIdx ) + for ( size_t globalCellIdx = 0; globalCellIdx < xResultData->activeCellInfo()->reservoirCellCount(); ++globalCellIdx ) { if ( cellVisibility && !( *cellVisibility )[globalCellIdx] ) continue; @@ -132,8 +136,7 @@ RigEclipseCrossPlotResult RigEclipseCrossPlotDataExtractor::extract( RigEclipseC } else if ( groupingType == GROUP_BY_FORMATION ) { - const RigFormationNames* activeFormationNames = resultData->activeFormationNames(); - + const RigFormationNames* activeFormationNames = xResultData->activeFormationNames(); if ( activeFormationNames ) { int category = 0; diff --git a/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.h b/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.h index e507f35032..a53bfb0ff0 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.h +++ b/ApplicationLibCode/ReservoirDataModel/RigEclipseCrossPlotDataExtractor.h @@ -26,7 +26,7 @@ #include class RigEclipseCaseData; -class RigEclipseResultAddress; +class RimEclipseResultDefinition; class QString; @@ -41,11 +41,11 @@ struct RigEclipseCrossPlotResult class RigEclipseCrossPlotDataExtractor { public: - static RigEclipseCrossPlotResult extract( RigEclipseCaseData* eclipseCase, - int resultTimeStep, - const RigEclipseResultAddress& xAddress, - const RigEclipseResultAddress& yAddress, - RigGridCrossPlotCurveGrouping groupingType, - const RigEclipseResultAddress& groupAddress, - std::map timeStepCellVisibilityMap ); + static RigEclipseCrossPlotResult extract( RigEclipseCaseData* eclipseCase, + int resultTimeStep, + const RimEclipseResultDefinition& xAddress, + const RimEclipseResultDefinition& yAddress, + RigGridCrossPlotCurveGrouping groupingType, + const RimEclipseResultDefinition& groupAddress, + std::map timeStepCellVisibilityMap ); }; diff --git a/ApplicationLibCode/ReservoirDataModel/RigFloodingSettings.cpp b/ApplicationLibCode/ReservoirDataModel/RigFloodingSettings.cpp new file mode 100644 index 0000000000..6f428b0501 --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/RigFloodingSettings.cpp @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigFloodingSettings.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFloodingSettings::RigFloodingSettings( FloodingType oilFloodingType, + double userDefFloodingOil, + FloodingType gasFloodingType, + double userDefFloodingGas ) +{ + m_gasFloodingType = gasFloodingType; + m_oilFloodingType = oilFloodingType; + m_userDefFloodingGas = userDefFloodingGas; + m_userDefFloodingOil = userDefFloodingOil; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFloodingSettings::~RigFloodingSettings() +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFloodingSettings::FloodingType RigFloodingSettings::oilFlooding() const +{ + return m_oilFloodingType; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigFloodingSettings::FloodingType RigFloodingSettings::gasFlooding() const +{ + return m_gasFloodingType; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigFloodingSettings::oilUserDefFlooding() const +{ + return m_userDefFloodingOil; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigFloodingSettings::gasUserDefFlooding() const +{ + return m_userDefFloodingGas; +} diff --git a/ApplicationLibCode/ReservoirDataModel/RigFloodingSettings.h b/ApplicationLibCode/ReservoirDataModel/RigFloodingSettings.h new file mode 100644 index 0000000000..ed217cca6f --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/RigFloodingSettings.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +class RigFloodingSettings +{ +public: + enum class FloodingType + { + WATER_FLOODING, + GAS_FLOODING, + USER_DEFINED + }; + +public: + RigFloodingSettings( FloodingType oilFloodingType, double userDefFloodingOil, FloodingType gasFloodingType, double userDefFloodingGas ); + ~RigFloodingSettings(); + + FloodingType oilFlooding() const; + FloodingType gasFlooding() const; + double oilUserDefFlooding() const; + double gasUserDefFlooding() const; + +protected: + FloodingType m_oilFloodingType; + double m_userDefFloodingOil; + + FloodingType m_gasFloodingType; + double m_userDefFloodingGas; +}; \ No newline at end of file diff --git a/ApplicationLibCode/ReservoirDataModel/RigFormationNames.cpp b/ApplicationLibCode/ReservoirDataModel/RigFormationNames.cpp index 4b7b9a534e..9bdd150c27 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigFormationNames.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigFormationNames.cpp @@ -18,6 +18,8 @@ #include "RigFormationNames.h" +#include + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -137,3 +139,22 @@ void RigFormationNames::appendFormationRangeWithColor( const QString& name, cvf: m_formationColors.push_back( color ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::set RigFormationNames::findKLayers( std::vector formationNames ) +{ + std::set foundK; + + for ( int k = 1; k < (int)m_nameIndexPrKLayer.size(); k++ ) + { + auto layerName = formationNameFromKLayerIdx( k ); + if ( std::find( formationNames.begin(), formationNames.end(), layerName ) != formationNames.end() ) + { + foundK.insert( k ); + } + } + + return foundK; +} diff --git a/ApplicationLibCode/ReservoirDataModel/RigFormationNames.h b/ApplicationLibCode/ReservoirDataModel/RigFormationNames.h index 1b32fdc14d..5c16e140ce 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigFormationNames.h +++ b/ApplicationLibCode/ReservoirDataModel/RigFormationNames.h @@ -21,6 +21,7 @@ #include "cvfObject.h" #include +#include #include #include "cvfColor3.h" @@ -50,6 +51,8 @@ public: void appendFormationRange( const QString& name, cvf::Color3f color, int kStartIdx, int kEndIdx ); void appendFormationRangeHeight( const QString& name, cvf::Color3f color, int kLayerCount ); + std::set findKLayers( std::vector formationNames ); + private: static cvf::Color3f undefinedColor(); void appendFormationRangeWithColor( const QString& name, cvf::Color3f color, int kStartIdx, int kEndIdx ); diff --git a/ApplicationLibCode/ReservoirDataModel/RigGridBase.cpp b/ApplicationLibCode/ReservoirDataModel/RigGridBase.cpp index fe38e3c80d..2e27a34617 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigGridBase.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigGridBase.cpp @@ -246,20 +246,6 @@ std::optional RigGridBase::ijkFromCellIndex( size_t cellIndex ) con return std::nullopt; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::optional RigGridBase::ijkFromCellIndexOneBased( size_t cellIndex ) const -{ - size_t i, j, k; - if ( ijkFromCellIndex( cellIndex, &i, &j, &k ) ) - { - return caf::VecIjk( ++i, ++j, ++k ); - } - - return std::nullopt; -} - //-------------------------------------------------------------------------------------------------- /// This version does no if-guarding. Check that all dimensions of the grid are non-zero before using. /// Useful for running in a loop after doing the sanity check once. diff --git a/ApplicationLibCode/ReservoirDataModel/RigGridBase.h b/ApplicationLibCode/ReservoirDataModel/RigGridBase.h index db5fb1da1c..771c88f328 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigGridBase.h +++ b/ApplicationLibCode/ReservoirDataModel/RigGridBase.h @@ -99,7 +99,6 @@ public: virtual void ijkFromCellIndexUnguarded( size_t cellIndex, size_t* i, size_t* j, size_t* k ) const; std::optional ijkFromCellIndex( size_t cellIndex ) const; - std::optional ijkFromCellIndexOneBased( size_t cellIndex ) const; bool cellIJKFromCoordinate( const cvf::Vec3d& coord, size_t* i, size_t* j, size_t* k ) const override; // unused void cellMinMaxCordinates( size_t cellIndex, cvf::Vec3d* minCoordinate, cvf::Vec3d* maxCoordinate ) const override; // unused diff --git a/ApplicationLibCode/ReservoirDataModel/RigHydrocarbonFlowTools.cpp b/ApplicationLibCode/ReservoirDataModel/RigHydrocarbonFlowTools.cpp new file mode 100644 index 0000000000..8967dceb72 --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/RigHydrocarbonFlowTools.cpp @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigHydrocarbonFlowTools.h" + +#include "RiaDefines.h" +#include "RiaResultNames.h" + +#include "RigCaseCellResultsData.h" +#include "RigEclipseResultAddress.h" +#include "RigFloodingSettings.h" + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigHydrocarbonFlowTools::residualOilData( RigCaseCellResultsData& resultData, + RigHydrocarbonFlowTools::ResultType resultType, + const RigFloodingSettings& floodingSettings, + std::size_t nSamples ) +{ + std::vector residualOil; + + if ( ( resultType == RigHydrocarbonFlowTools::ResultType::MOBILE_OIL ) || + ( resultType == RigHydrocarbonFlowTools::ResultType::MOBILE_HYDROCARBON ) ) + { + if ( floodingSettings.oilFlooding() == RigFloodingSettings::FloodingType::GAS_FLOODING ) + { + residualOil = + resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::sogcr() ), 0 ); + } + else if ( floodingSettings.oilFlooding() == RigFloodingSettings::FloodingType::WATER_FLOODING ) + { + residualOil = + resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::sowcr() ), 0 ); + } + else + { + residualOil.resize( nSamples, floodingSettings.oilUserDefFlooding() ); + } + } + + if ( residualOil.empty() ) residualOil.resize( nSamples, 0.0 ); + + return residualOil; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigHydrocarbonFlowTools::residualGasData( RigCaseCellResultsData& resultData, + RigHydrocarbonFlowTools::ResultType resultType, + const RigFloodingSettings& floodingSettings, + std::size_t nSamples ) +{ + std::vector residualGas; + if ( ( resultType == RigHydrocarbonFlowTools::ResultType::MOBILE_GAS ) || + ( resultType == RigHydrocarbonFlowTools::ResultType::MOBILE_HYDROCARBON ) ) + { + if ( floodingSettings.gasFlooding() == RigFloodingSettings::FloodingType::GAS_FLOODING ) + { + residualGas = + resultData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::sgcr() ), 0 ); + } + else if ( floodingSettings.gasFlooding() == RigFloodingSettings::FloodingType::USER_DEFINED ) + { + residualGas.resize( nSamples, floodingSettings.gasUserDefFlooding() ); + } + } + if ( residualGas.empty() ) residualGas.resize( nSamples, 0.0 ); + + return residualGas; +} diff --git a/ApplicationLibCode/ReservoirDataModel/RigHydrocarbonFlowTools.h b/ApplicationLibCode/ReservoirDataModel/RigHydrocarbonFlowTools.h new file mode 100644 index 0000000000..7f2ef78200 --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/RigHydrocarbonFlowTools.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include + +class RigCaseCellResultsData; +class RigFloodingSettings; + +class RigHydrocarbonFlowTools +{ +public: + enum class ResultType + { + NONE, + MOBILE_OIL, + MOBILE_GAS, + MOBILE_HYDROCARBON + }; + + static std::vector residualOilData( RigCaseCellResultsData& resultData, + RigHydrocarbonFlowTools::ResultType resultType, + const RigFloodingSettings& floodingSettings, + std::size_t nSamples ); + + static std::vector residualGasData( RigCaseCellResultsData& resultData, + RigHydrocarbonFlowTools::ResultType resultType, + const RigFloodingSettings& floodingSettings, + std::size_t nSamples ); +}; diff --git a/ApplicationLibCode/ReservoirDataModel/RigNNCData.cpp b/ApplicationLibCode/ReservoirDataModel/RigNNCData.cpp index e03dddef46..6433d74238 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigNNCData.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigNNCData.cpp @@ -19,12 +19,13 @@ #include "RigNNCData.h" +#include "RiaLogging.h" +#include "RiaPreferencesSystem.h" + #include "RigCellFaceGeometryTools.h" #include "RigEclipseResultAddress.h" #include "RigMainGrid.h" -#include "RiaLogging.h" - #include "cafProgressInfo.h" #include "cvfGeometryTools.h" @@ -198,7 +199,8 @@ bool RigNNCData::ensureAllConnectionDataIsProcessed() { caf::ProgressInfo progressInfo( 3, "Computing NNC Data" ); - RiaLogging::info( "NNC geometry computation - starting process" ); + bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RigNNCData" ); + if ( isLoggingEnabled ) RiaLogging::info( "NNC geometry computation - starting process" ); buildPolygonsForEclipseConnections(); progressInfo.incrementProgress(); @@ -210,25 +212,28 @@ bool RigNNCData::ensureAllConnectionDataIsProcessed() m_mainGrid->distributeNNCsToFaults(); - QStringList noCommonAreaText; - const size_t maxItemCount = 20; - - size_t noCommonAreaCount = connectionsWithNoCommonArea( noCommonAreaText, maxItemCount ); - - RiaLogging::info( "NNC geometry computation - completed process" ); - - RiaLogging::info( QString( "Native NNC count : %1" ).arg( eclipseConnectionCount() ) ); - RiaLogging::info( QString( "Computed NNC count : %1" ).arg( m_connections.size() ) ); - - RiaLogging::info( QString( "NNCs with no common area count : %1" ).arg( noCommonAreaCount ) ); - - if ( !noCommonAreaText.isEmpty() ) + if ( isLoggingEnabled ) { - RiaLogging::info( QString( "Listing first %1 NNCs with no common area " ).arg( noCommonAreaText.size() ) ); + QStringList noCommonAreaText; + const size_t maxItemCount = 20; - for ( const auto& s : noCommonAreaText ) + size_t noCommonAreaCount = connectionsWithNoCommonArea( noCommonAreaText, maxItemCount ); + + RiaLogging::info( "NNC geometry computation - completed process" ); + + RiaLogging::info( QString( "Native NNC count : %1" ).arg( eclipseConnectionCount() ) ); + RiaLogging::info( QString( "Computed NNC count : %1" ).arg( m_connections.size() ) ); + + RiaLogging::info( QString( "NNCs with no common area count : %1" ).arg( noCommonAreaCount ) ); + + if ( !noCommonAreaText.isEmpty() ) { - RiaLogging::info( s ); + RiaLogging::info( QString( "Listing first %1 NNCs with no common area " ).arg( noCommonAreaText.size() ) ); + + for ( const auto& s : noCommonAreaText ) + { + RiaLogging::info( s ); + } } } } diff --git a/ApplicationLibCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp index a31e6475e7..4d30046f04 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigNumberOfFloodedPoreVolumesCalculator.cpp @@ -56,7 +56,10 @@ RigNumberOfFloodedPoreVolumesCalculator::RigNumberOfFloodedPoreVolumesCalculator // PORV const std::vector* porvResults = nullptr; std::vector porvActiveCellsResultStorage; - porvResults = RigCaseCellResultsData::getResultIndexableStaticResult( actCellInfo, gridCellResults, "PORV", porvActiveCellsResultStorage ); + porvResults = RigCaseCellResultsData::getResultIndexableStaticResult( actCellInfo, + gridCellResults, + RiaResultNames::porv(), + porvActiveCellsResultStorage ); progress.incrementProgress(); diff --git a/ApplicationLibCode/ReservoirDataModel/RigPolygonTools.cpp b/ApplicationLibCode/ReservoirDataModel/RigPolygonTools.cpp new file mode 100644 index 0000000000..01edc3bf81 --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/RigPolygonTools.cpp @@ -0,0 +1,409 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigPolygonTools.h" + +#include "cvfGeometryTools.h" + +#include +#include +#include + +namespace RigPolygonTools +{ +namespace internal +{ + // Function to check if a point is valid and within bounds + bool isValid( int x, int y, int rows, int cols, const IntegerImage& image, const IntegerImage& visited ) + { + return x >= 0 && x < rows && y >= 0 && y < cols && image[x][y] == 1 && !visited[x][y]; + } + + bool isValidImage( const IntegerImage& image ) + { + if ( image.empty() ) return false; + auto rowSize = image[0].size(); + for ( const auto& row : image ) + { + if ( row.size() != rowSize ) return false; + } + + return true; + } + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void floodFill( IntegerImage& image, int x, int y, int oldColor, int newColor ) + { + if ( !isValidImage( image ) ) return; + + auto rows = static_cast( image.size() ); + auto cols = static_cast( image[0].size() ); + std::stack stack; + stack.push( { x, y } ); + + while ( !stack.empty() ) + { + auto [cx, cy] = stack.top(); + stack.pop(); + + if ( cx < 0 || cy < 0 || cx >= rows || cy >= cols || image[cx][cy] != oldColor ) continue; + + image[cx][cy] = newColor; + + stack.push( { cx + 1, cy } ); + stack.push( { cx - 1, cy } ); + stack.push( { cx, cy + 1 } ); + stack.push( { cx, cy - 1 } ); + } + } + + // Function to check if a point is on a line segment (edge of the polygon) + bool isOnSegment( Point p, Point p1, Point p2 ) + { + int x = p.first, y = p.second; + int x1 = p1.first, y1 = p1.second; + int x2 = p2.first, y2 = p2.second; + + // Check if the point (x, y) lies between (x1, y1) and (x2, y2) + return ( ( x >= std::min( x1, x2 ) && x <= std::max( x1, x2 ) ) && ( y >= std::min( y1, y2 ) && y <= std::max( y1, y2 ) ) && + ( ( x2 - x1 ) * ( y - y1 ) == ( y2 - y1 ) * ( x - x1 ) ) ); // Collinearity check + } + + // Check if a point is inside a polygon using the Ray-Casting Algorithm + bool isInsidePolygon( const Point& p, const std::vector& polygon ) + { + int n = static_cast( polygon.size() ); + int count = 0; + for ( int i = 0; i < n; i++ ) + { + auto p1 = polygon[i]; + auto p2 = polygon[( i + 1 ) % n]; // Next vertex (looping back to first at end) + + // Check if point is exactly on an edge + if ( isOnSegment( p, p1, p2 ) ) return true; + + // Check if point is between y-bounds of edge + if ( ( p1.second > p.second ) != ( p2.second > p.second ) ) + { + // Compute intersection point of the edge with horizontal line at p.y + double xIntersect = p1.first + (double)( p.second - p1.second ) * ( p2.first - p1.first ) / ( p2.second - p1.second ); + if ( p.first < xIntersect ) + { + count++; + } + } + } + return ( count % 2 ) == 1; // Odd count means inside, even means outside + } + +}; // namespace internal + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +IntegerImage erode( IntegerImage image, int kernelSize ) +{ + if ( !internal::isValidImage( image ) ) return {}; + if ( kernelSize <= 0 ) return {}; + + auto rows = static_cast( image.size() ); + auto cols = static_cast( image[0].size() ); + int offset = kernelSize / 2; + IntegerImage eroded( rows, std::vector( cols, 0 ) ); + + for ( int i = offset; i < rows - offset; ++i ) + { + for ( int j = offset; j < cols - offset; ++j ) + { + bool erodePixel = true; + for ( int ki = -offset; ki <= offset; ++ki ) + { + for ( int kj = -offset; kj <= offset; ++kj ) + { + if ( image[i + ki][j + kj] == 0 ) + { + erodePixel = false; + break; + } + } + if ( !erodePixel ) break; + } + eroded[i][j] = erodePixel ? 1 : 0; + } + } + + return eroded; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +IntegerImage dilate( IntegerImage image, int kernelSize ) +{ + if ( !internal::isValidImage( image ) ) return {}; + if ( kernelSize <= 0 ) return {}; + + auto rows = static_cast( image.size() ); + auto cols = static_cast( image[0].size() ); + int offset = kernelSize / 2; + IntegerImage dilated( rows, std::vector( cols, 0 ) ); + + for ( int i = offset; i < rows - offset; ++i ) + { + for ( int j = offset; j < cols - offset; ++j ) + { + bool dilatePixel = false; + for ( int ki = -offset; ki <= offset; ++ki ) + { + for ( int kj = -offset; kj <= offset; ++kj ) + { + if ( image[i + ki][j + kj] == 1 ) + { + dilatePixel = true; + break; + } + } + if ( dilatePixel ) break; + } + dilated[i][j] = dilatePixel ? 1 : 0; + } + } + + return dilated; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +IntegerImage fillInterior( IntegerImage sourceImage ) +{ + if ( !internal::isValidImage( sourceImage ) ) return {}; + + auto image = sourceImage; + auto rows = static_cast( image.size() ); + auto cols = static_cast( image[0].size() ); + + // Flood fill the exterior (starting from the borders) + for ( int i = 0; i < rows; ++i ) + { + if ( image[i][0] == 0 ) internal::floodFill( image, i, 0, 0, -1 ); + if ( image[i][cols - 1] == 0 ) internal::floodFill( image, i, cols - 1, 0, -1 ); + } + for ( int j = 0; j < cols; ++j ) + { + if ( image[0][j] == 0 ) internal::floodFill( image, 0, j, 0, -1 ); + if ( image[rows - 1][j] == 0 ) internal::floodFill( image, rows - 1, j, 0, -1 ); + } + + // Fill interior holes (remaining 0s) + for ( int i = 0; i < rows; ++i ) + { + for ( int j = 0; j < cols; ++j ) + { + if ( image[i][j] == 0 ) image[i][j] = 1; + } + } + + // Restore the exterior + for ( int i = 0; i < rows; ++i ) + { + for ( int j = 0; j < cols; ++j ) + { + if ( image[i][j] == -1 ) image[i][j] = 0; + } + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector boundary( const IntegerImage& image ) +{ + if ( !internal::isValidImage( image ) ) return {}; + + std::vector boundaries; + + // Get dimensions of the image + int rows = static_cast( image.size() ); + int cols = static_cast( image[0].size() ); + + // Direction vectors for clockwise search (8-connectivity) + const std::vector directions = { { -1, 0 }, { -1, 1 }, { 0, 1 }, { 1, 1 }, { 1, 0 }, { 1, -1 }, { 0, -1 }, { -1, -1 } }; + + // Helper lambda to check if a pixel is a valid boundary pixel + auto isBoundaryPixel = [&]( int x, int y ) + { + if ( x < 0 || x >= rows || y < 0 || y >= cols || image[x][y] == 0 ) return false; + // Check if it's adjacent to a background pixel + for ( const auto& [dx, dy] : directions ) + { + int nx = x + dx, ny = y + dy; + if ( nx < 0 || nx >= rows || ny < 0 || ny >= cols || image[nx][ny] == 0 ) + { + return true; + } + } + return false; + }; + + // Find the starting boundary pixel + Point start( -1, -1 ); + for ( int row = 0; row < rows; ++row ) + { + for ( int col = 0; col < cols; ++col ) + { + if ( isBoundaryPixel( row, col ) ) + { + start = { row, col }; + break; + } + } + if ( start.first != -1 ) break; + } + + if ( start.first == -1 ) return boundaries; // No boundary found + + // Contour following algorithm + Point current = start; + int direction = 0; // Start search direction (arbitrary) + do + { + boundaries.push_back( current ); + bool foundNext = false; + + // Look for the next boundary pixel in a clockwise direction + for ( int i = 0; i < 8; ++i ) + { + int newDir = ( direction + i ) % 8; + int nx = current.first + directions[newDir].first; + int ny = current.second + directions[newDir].second; + + if ( isBoundaryPixel( nx, ny ) ) + { + current = { nx, ny }; + direction = ( newDir + 6 ) % 8; // Adjust direction for next search + foundNext = true; + break; + } + } + + // If no next pixel is found, the boundary is invalid or incomplete + if ( !foundNext ) break; + + } while ( current != start ); // Stop when we loop back to the start + + return boundaries; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigPolygonTools::IntegerImage assignValueInsidePolygon( IntegerImage image, const std::vector& polygon, int value ) +{ + if ( !internal::isValidImage( image ) ) return {}; + + auto rows = static_cast( image.size() ); + auto cols = static_cast( image[0].size() ); + + for ( int i = 0; i < rows; ++i ) + { + for ( int j = 0; j < cols; ++j ) + { + if ( internal::isInsidePolygon( { i, j }, polygon ) ) + { + image[i][j] = value; + } + } + } + + return image; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double area( const std::vector& polygon ) +{ + int n = static_cast( polygon.size() ); + if ( n < 3 ) return 0.0; // A polygon must have at least 3 points + + double area = 0.0; + for ( int i = 0; i < n; i++ ) + { + int j = ( i + 1 ) % n; // Next vertex, wrapping around at the end + area += polygon[i].first * polygon[j].second; + area -= polygon[j].first * polygon[i].second; + } + + return std::fabs( area ) / 2.0; +} + +//-------------------------------------------------------------------------------------------------- +/// Ramer-Douglas-Peucker simplification algorithm +/// +/// https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm +//-------------------------------------------------------------------------------------------------- +void simplifyPolygon( std::vector& vertices, double epsilon ) +{ + // If the polygon has fewer than 3 vertices, it cannot be simplified. + if ( vertices.size() < 3 ) return; + + // Find the point with the maximum perpendicular distance from the line connecting the endpoints. + std::optional> maxDistPoint; + + for ( size_t i = 1; i < vertices.size() - 1; ++i ) + { + const cvf::Vec3d& point = vertices[i]; + cvf::Vec3d projected = cvf::GeometryTools::projectPointOnLine( vertices.front(), vertices.back(), point ); + double distance = ( projected - point ).length(); + + if ( !maxDistPoint || distance > maxDistPoint->second ) + { + maxDistPoint = std::make_pair( i, distance ); + } + } + + // If the maximum distance exceeds epsilon, split and simplify recursively. + if ( maxDistPoint && maxDistPoint->second > epsilon ) + { + size_t splitIndex = maxDistPoint->first; + + // Divide the vertices into two segments. + std::vector segment1( vertices.begin(), vertices.begin() + splitIndex + 1 ); + std::vector segment2( vertices.begin() + splitIndex, vertices.end() ); + + // Recursively simplify both segments. + simplifyPolygon( segment1, epsilon ); + simplifyPolygon( segment2, epsilon ); + + // Combine the simplified segments, avoiding duplication at the split point. + vertices = std::move( segment1 ); + vertices.pop_back(); // Remove duplicate at the split point. + vertices.insert( vertices.end(), segment2.begin(), segment2.end() ); + } + else + { + // If no point exceeds the threshold, reduce to endpoints. + vertices = { vertices.front(), vertices.back() }; + } +} +} // namespace RigPolygonTools diff --git a/ApplicationLibCode/ReservoirDataModel/RigPolygonTools.h b/ApplicationLibCode/ReservoirDataModel/RigPolygonTools.h new file mode 100644 index 0000000000..98a7f9a4ad --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/RigPolygonTools.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfVector3.h" + +#include + +namespace RigPolygonTools +{ +// Integer images are assumed to be 2D arrays of integers, where 0 is background and 1 is foreground. +using IntegerImage = std::vector>; +using Point = std::pair; + +IntegerImage erode( IntegerImage image, int kernelSize ); +IntegerImage dilate( IntegerImage image, int kernelSize ); +IntegerImage fillInterior( IntegerImage sourceImage ); + +std::vector> boundary( const IntegerImage& image ); +IntegerImage assignValueInsidePolygon( IntegerImage image, const std::vector& polygon, int value ); +double area( const std::vector& polygon ); + +// Recursive function modifying the incoming vertices +void simplifyPolygon( std::vector& vertices, double epsilon ); + +} // namespace RigPolygonTools diff --git a/ApplicationLibCode/ReservoirDataModel/RigReservoirBuilder.cpp b/ApplicationLibCode/ReservoirDataModel/RigReservoirBuilder.cpp index 2cd54ed601..8c6a867196 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigReservoirBuilder.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigReservoirBuilder.cpp @@ -79,22 +79,18 @@ void RigReservoirBuilder::createGridsAndCells( RigEclipseCaseData* eclipseCase ) size_t totalCellCount = mainGridCellCount; - size_t lgrIdx; - for ( lgrIdx = 0; lgrIdx < m_localGridRefinements.size(); lgrIdx++ ) + for ( size_t lgrIdx = 0; lgrIdx < m_localGridRefinements.size(); lgrIdx++ ) { LocalGridRefinement& lgr = m_localGridRefinements[lgrIdx]; // Compute all global cell indices to be replaced by local grid refinement std::vector mainGridIndicesWithSubGrid; { - size_t i; - for ( i = lgr.m_mainGridMinCellPosition.x(); i <= lgr.m_mainGridMaxCellPosition.x(); i++ ) + for ( size_t i = lgr.m_mainGridMinCellPosition.x(); i <= lgr.m_mainGridMaxCellPosition.x(); i++ ) { - size_t j; - for ( j = lgr.m_mainGridMinCellPosition.y(); j <= lgr.m_mainGridMaxCellPosition.y(); j++ ) + for ( size_t j = lgr.m_mainGridMinCellPosition.y(); j <= lgr.m_mainGridMaxCellPosition.y(); j++ ) { - size_t k; - for ( k = lgr.m_mainGridMinCellPosition.z(); k <= lgr.m_mainGridMaxCellPosition.z(); k++ ) + for ( size_t k = lgr.m_mainGridMinCellPosition.z(); k <= lgr.m_mainGridMaxCellPosition.z(); k++ ) { mainGridIndicesWithSubGrid.push_back( cellIndexFromIJK( i, j, k ) ); } @@ -122,14 +118,12 @@ void RigReservoirBuilder::createGridsAndCells( RigEclipseCaseData* eclipseCase ) localGrid->setGridPointDimensions( gridPointDimensions ); cvf::BoundingBox bb; - size_t cellIdx; - for ( cellIdx = 0; cellIdx < mainGridIndicesWithSubGrid.size(); cellIdx++ ) + for ( size_t cellIdx = 0; cellIdx < mainGridIndicesWithSubGrid.size(); cellIdx++ ) { RigCell& cell = eclipseCase->mainGrid()->cell( mainGridIndicesWithSubGrid[cellIdx] ); std::array& indices = cell.cornerIndices(); - int nodeIdx; - for ( nodeIdx = 0; nodeIdx < 8; nodeIdx++ ) + for ( int nodeIdx = 0; nodeIdx < 8; nodeIdx++ ) { bb.add( eclipseCase->mainGrid()->nodes()[indices[nodeIdx]] ); } @@ -203,18 +197,15 @@ void RigReservoirBuilder::appendNodes( const cvf::Vec3d& min, const cvf::Vec3d& double zPos = min.z(); - size_t k; - for ( k = 0; k < cubeDimension.z(); k++ ) + for ( size_t k = 0; k < cubeDimension.z(); k++ ) { double yPos = min.y(); - size_t j; - for ( j = 0; j < cubeDimension.y(); j++ ) + for ( size_t j = 0; j < cubeDimension.y(); j++ ) { double xPos = min.x(); - size_t i; - for ( i = 0; i < cubeDimension.x(); i++ ) + for ( size_t i = 0; i < cubeDimension.x(); i++ ) { cvf::Vec3d cornerA( xPos, yPos, zPos ); cvf::Vec3d cornerB( xPos + dx, yPos + dy, zPos + dz ); diff --git a/ApplicationLibCode/ReservoirDataModel/RigSurface.cpp b/ApplicationLibCode/ReservoirDataModel/RigSurface.cpp index 1ca3c64758..579fd8a390 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigSurface.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigSurface.cpp @@ -60,9 +60,9 @@ void RigSurface::setTriangleData( const std::vector& tringleIndices, c //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigSurface::addVerticeResult( const QString resultName, const std::vector& resultValues ) +void RigSurface::addVertexResult( const QString resultName, const std::vector& resultValues ) { - m_verticeResults[resultName] = resultValues; + m_vertexResults[resultName] = resultValues; } //-------------------------------------------------------------------------------------------------- @@ -70,8 +70,8 @@ void RigSurface::addVerticeResult( const QString resultName, const std::vector RigSurface::propertyValues( const QString& propertyName ) const { - auto it = m_verticeResults.find( propertyName ); - if ( it != m_verticeResults.end() ) + auto it = m_vertexResults.find( propertyName ); + if ( it != m_vertexResults.end() ) { return it->second; } @@ -86,7 +86,7 @@ std::vector RigSurface::propertyNames() const { std::vector names; - for ( const auto& propertyResult : m_verticeResults ) + for ( const auto& propertyResult : m_vertexResults ) { names.push_back( propertyResult.first ); } diff --git a/ApplicationLibCode/ReservoirDataModel/RigSurface.h b/ApplicationLibCode/ReservoirDataModel/RigSurface.h index 3d53081dcd..3694467514 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigSurface.h +++ b/ApplicationLibCode/ReservoirDataModel/RigSurface.h @@ -41,7 +41,7 @@ public: const std::vector& vertices() const; void setTriangleData( const std::vector& tringleIndices, const std::vector& vertices ); - void addVerticeResult( const QString resultName, const std::vector& resultValues ); + void addVertexResult( const QString resultName, const std::vector& resultValues ); std::vector propertyValues( const QString& propertyName ) const; std::vector propertyNames() const; @@ -58,7 +58,7 @@ private: private: std::vector m_triangleIndices; std::vector m_vertices; - std::map> m_verticeResults; + std::map> m_vertexResults; cvf::ref m_surfaceBoundingBoxTree; diff --git a/ApplicationLibCode/ReservoirDataModel/RigSurfaceStatisticsCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/RigSurfaceStatisticsCalculator.cpp index d895597635..e445a098a1 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigSurfaceStatisticsCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigSurfaceStatisticsCalculator.cpp @@ -104,12 +104,12 @@ cvf::ref RigSurfaceStatisticsCalculator::computeStatistics( const st auto enumToText = []( auto statisticsType ) { return caf::AppEnum::text( statisticsType ); }; - statSurface->addVerticeResult( enumToText( StatisticsType::MEAN ), meanValues ); - statSurface->addVerticeResult( enumToText( StatisticsType::MIN ), minValues ); - statSurface->addVerticeResult( enumToText( StatisticsType::MAX ), maxValues ); - statSurface->addVerticeResult( enumToText( StatisticsType::P10 ), p10Values ); - statSurface->addVerticeResult( enumToText( StatisticsType::P50 ), p50Values ); - statSurface->addVerticeResult( enumToText( StatisticsType::P90 ), p90Values ); + statSurface->addVertexResult( enumToText( StatisticsType::MEAN ), meanValues ); + statSurface->addVertexResult( enumToText( StatisticsType::MIN ), minValues ); + statSurface->addVertexResult( enumToText( StatisticsType::MAX ), maxValues ); + statSurface->addVertexResult( enumToText( StatisticsType::P10 ), p10Values ); + statSurface->addVertexResult( enumToText( StatisticsType::P50 ), p50Values ); + statSurface->addVertexResult( enumToText( StatisticsType::P90 ), p90Values ); return statSurface; } diff --git a/ApplicationLibCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp index a9e6b7cf0b..b31406bd86 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigTofAccumulatedPhaseFractionsCalculator.cpp @@ -57,8 +57,10 @@ RigTofAccumulatedPhaseFractionsCalculator::RigTofAccumulatedPhaseFractionsCalcul RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas(), timestep ); - const std::vector* porvResults = - eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL, RiaDefines::ResultCatType::STATIC_NATIVE, "PORV", 0 ); + const std::vector* porvResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL, + RiaDefines::ResultCatType::STATIC_NATIVE, + RiaResultNames::porv(), + 0 ); RimFlowDiagSolution* flowDiagSolution = caseToApply->defaultFlowDiagSolution(); diff --git a/ApplicationLibCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp index d5012f837a..0e3636ac47 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp @@ -61,8 +61,10 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe RigFlowDiagResults* flowDiagResults = flowDiagSolution->flowDiagResults(); CVF_ASSERT( flowDiagResults ); - const std::vector* porvResults = - eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL, RiaDefines::ResultCatType::STATIC_NATIVE, "PORV", 0 ); + const std::vector* porvResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL, + RiaDefines::ResultCatType::STATIC_NATIVE, + RiaResultNames::porv(), + 0 ); if ( !porvResults ) { return; diff --git a/ApplicationLibCode/ReservoirDataModel/RigGocadData.cpp b/ApplicationLibCode/ReservoirDataModel/RigTriangleMeshData.cpp similarity index 72% rename from ApplicationLibCode/ReservoirDataModel/RigGocadData.cpp rename to ApplicationLibCode/ReservoirDataModel/RigTriangleMeshData.cpp index ea8e00c7e3..4fc13cdf5f 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigGocadData.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigTriangleMeshData.cpp @@ -16,26 +16,26 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RigGocadData.h" +#include "RigTriangleMeshData.h" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigGocadData::RigGocadData() +RigTriangleMeshData::RigTriangleMeshData() { } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RigGocadData::~RigGocadData() +RigTriangleMeshData::~RigTriangleMeshData() { } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RigGocadData::propertyNames() +std::vector RigTriangleMeshData::propertyNames() const { return m_propertyNames; } @@ -43,7 +43,7 @@ std::vector RigGocadData::propertyNames() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::pair, std::vector> RigGocadData::gocadGeometry() +std::pair, std::vector> RigTriangleMeshData::geometry() const { return std::make_pair( m_vertices, m_tringleIndices ); } @@ -51,7 +51,7 @@ std::pair, std::vector> RigGocadData::gocadGeo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RigGocadData::propertyValues( const QString& property ) +std::vector RigTriangleMeshData::propertyValues( const QString& property ) const { for ( size_t propertyIdx = 0; propertyIdx < m_propertyNames.size(); propertyIdx++ ) { @@ -67,7 +67,7 @@ std::vector RigGocadData::propertyValues( const QString& property ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigGocadData::setGeometryData( const std::vector& nodeCoord, const std::vector& connectivities ) +void RigTriangleMeshData::setGeometryData( const std::vector& nodeCoord, const std::vector& connectivities ) { m_vertices = nodeCoord; m_tringleIndices = connectivities; @@ -76,8 +76,17 @@ void RigGocadData::setGeometryData( const std::vector& nodeCoord, co //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigGocadData::addPropertyData( const std::vector& propertyNames, std::vector>& propertyValues ) +void RigTriangleMeshData::setPropertyData( const std::vector& propertyNames, std::vector>& propertyValues ) { m_propertyNames = propertyNames; m_propertyValues = propertyValues; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigTriangleMeshData::addPropertyData( const QString& propertyName, std::vector& propertyValues ) +{ + m_propertyNames.push_back( propertyName ); + m_propertyValues.push_back( propertyValues ); +} diff --git a/ApplicationLibCode/ReservoirDataModel/RigGocadData.h b/ApplicationLibCode/ReservoirDataModel/RigTriangleMeshData.h similarity index 77% rename from ApplicationLibCode/ReservoirDataModel/RigGocadData.h rename to ApplicationLibCode/ReservoirDataModel/RigTriangleMeshData.h index 0b862058c3..b458e387d5 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigGocadData.h +++ b/ApplicationLibCode/ReservoirDataModel/RigTriangleMeshData.h @@ -23,18 +23,19 @@ #include "cvfVector3.h" -class RigGocadData +class RigTriangleMeshData { public: - RigGocadData(); - ~RigGocadData(); + RigTriangleMeshData(); + ~RigTriangleMeshData(); - std::vector propertyNames(); - std::pair, std::vector> gocadGeometry(); - std::vector propertyValues( const QString& property ); + std::vector propertyNames() const; + std::pair, std::vector> geometry() const; + std::vector propertyValues( const QString& property ) const; void setGeometryData( const std::vector& nodeCoord, const std::vector& connectivities ); - void addPropertyData( const std::vector& propertyNames, std::vector>& propertyValues ); + void setPropertyData( const std::vector& propertyNames, std::vector>& propertyValues ); + void addPropertyData( const QString& propertyName, std::vector& propertyValues ); private: std::vector m_vertices; diff --git a/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.cpp index 9c95cd0725..ad177c32df 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.cpp @@ -97,33 +97,35 @@ std::set RigVisibleCategoriesCalculator::visibleAllanCategories( RimEcli //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::set RigVisibleCategoriesCalculator::visibleCategories( RimEclipseView* eclView ) +std::set RigVisibleCategoriesCalculator::visibleCategories( RimEclipseView* cellVisibilityView, + const RimEclipseResultDefinition* categoryResult ) { + if ( !cellVisibilityView || !categoryResult ) return {}; + std::set visibleCategoryValues; { // Visible eclipse grid cells - RimEclipseResultDefinition* resDef = eclView->cellResult(); + RigEclipseNativeVisibleCellsStatCalc calc( categoryResult->currentGridCellResults(), + categoryResult->eclipseResultAddress(), + cellVisibilityView->currentTotalCellVisibility().p() ); - RigEclipseNativeVisibleCellsStatCalc calc( resDef->currentGridCellResults(), - resDef->eclipseResultAddress(), - eclView->currentTotalCellVisibility().p() ); - - calc.uniqueValues( eclView->currentTimeStep(), visibleCategoryValues ); + calc.uniqueValues( cellVisibilityView->currentTimeStep(), visibleCategoryValues ); } { // Visible cells in faults and intersections std::set visibleReservoirCells; - RigVisibleCategoriesCalculator::appendVisibleFaultCells( eclView, visibleReservoirCells ); - RigVisibleCategoriesCalculator::appendVisibleIntersectionCells( eclView, visibleReservoirCells ); - - RimEclipseResultDefinition* resDef = eclView->cellResult(); + RigVisibleCategoriesCalculator::appendVisibleFaultCells( cellVisibilityView, visibleReservoirCells ); + RigVisibleCategoriesCalculator::appendVisibleIntersectionCells( cellVisibilityView, visibleReservoirCells ); cvf::ref resultAccessor = - RigResultAccessorFactory::createFromResultDefinition( eclView->eclipseCase()->eclipseCaseData(), 0, eclView->currentTimeStep(), resDef ); + RigResultAccessorFactory::createFromResultDefinition( cellVisibilityView->eclipseCase()->eclipseCaseData(), + 0, + cellVisibilityView->currentTimeStep(), + categoryResult ); if ( resultAccessor.notNull() ) { @@ -173,6 +175,8 @@ std::set RigVisibleCategoriesCalculator::visibleNncConnectionIndices( Ri //-------------------------------------------------------------------------------------------------- void RigVisibleCategoriesCalculator::appendVisibleFaultCells( RimEclipseView* eclView, std::set& visibleCells ) { + if ( eclView->faultCollection()->shouldApplyCellFiltersToFaults() ) return; + if ( eclView->faultCollection() && eclView->faultCollection()->isActive() && !eclView->faultResultSettings()->showCustomFaultResult() ) { for ( const auto& f : eclView->faultCollection()->faults() ) diff --git a/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.h b/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.h index 7199c0f0bf..9e651eda5a 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.h +++ b/ApplicationLibCode/ReservoirDataModel/RigVisibleCategoriesCalculator.h @@ -24,6 +24,7 @@ class RimEclipseView; class RigFlowDiagResults; class RigFlowDiagResultAddress; +class RimEclipseResultDefinition; //================================================================================================== /// @@ -37,7 +38,7 @@ public: size_t timeStepIndex ); static std::set visibleAllanCategories( RimEclipseView* eclView ); - static std::set visibleCategories( RimEclipseView* eclView ); + static std::set visibleCategories( RimEclipseView* cellVisibilityView, const RimEclipseResultDefinition* categoryResult ); private: static std::set visibleNncConnectionIndices( RimEclipseView* eclView ); diff --git a/ApplicationLibCode/ReservoirDataModel/Well/CMakeLists_files.cmake b/ApplicationLibCode/ReservoirDataModel/Well/CMakeLists_files.cmake index 0085e14890..eadaaf1e6b 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/CMakeLists_files.cmake +++ b/ApplicationLibCode/ReservoirDataModel/Well/CMakeLists_files.cmake @@ -23,7 +23,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RigWellResultBranch.h ${CMAKE_CURRENT_LIST_DIR}/RigWellResultFrame.h ${CMAKE_CURRENT_LIST_DIR}/RigWellResultPoint.h - ${CMAKE_CURRENT_LIST_DIR}/RigWellTargetCandidatesGenerator.h + ${CMAKE_CURRENT_LIST_DIR}/RigWellTargetMapping.h ${CMAKE_CURRENT_LIST_DIR}/RigWellLogData.h ${CMAKE_CURRENT_LIST_DIR}/RigWellLogLasFile.h ${CMAKE_CURRENT_LIST_DIR}/RigWellLogCsvFile.h @@ -52,18 +52,11 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RigWellResultBranch.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWellResultFrame.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWellResultPoint.cpp - ${CMAKE_CURRENT_LIST_DIR}/RigWellTargetCandidatesGenerator.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigWellTargetMapping.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWellLogData.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWellLogLasFile.cpp ${CMAKE_CURRENT_LIST_DIR}/RigWellLogCsvFile.cpp ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "ReservoirDataModel" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.cpp index 7d1e39aeb4..c3d5ac26d2 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.cpp @@ -99,7 +99,7 @@ std::vector /// //-------------------------------------------------------------------------------------------------- std::pair>, std::vector>> - RigSimulationWellCenterLineCalculator::extractBranchData( const std::vector simulationBranch ) + RigSimulationWellCenterLineCalculator::extractBranchData( const std::vector& simulationBranch ) { std::vector> pipeBranchesCLCoords; std::vector> pipeBranchesCellIds; diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.h b/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.h index d2b8257634..5dc2d1f72e 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.h +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigSimulationWellCenterLineCalculator.h @@ -46,7 +46,7 @@ public: bool useAllCellCenters ); static std::pair>, std::vector>> - extractBranchData( const std::vector simulationBranch ); + extractBranchData( const std::vector& simulationBranch ); private: static void calculateWellPipeStaticCenterline( const RimSimWellInView* rimWell, diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.cpp b/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.cpp index cb8132afeb..6ea2cdddc9 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.cpp +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.cpp @@ -124,32 +124,19 @@ std::vector RigWellPath::trueVerticalDepths() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigWellPath::setWellPathPoints( const std::vector& wellPathPoints ) +void RigWellPath::setWellPathPoints( const std::vector& wellPathPoints, const std::vector& measuredDepths ) { + CVF_ASSERT( wellPathPoints.size() == measuredDepths.size() ); m_wellPathPoints = wellPathPoints; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigWellPath::setMeasuredDepths( const std::vector& measuredDepths ) -{ m_measuredDepths = measuredDepths; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigWellPath::addWellPathPoint( const cvf::Vec3d& wellPathPoint ) +void RigWellPath::addWellPathPoint( const cvf::Vec3d& wellPathPoint, double measuredDepth ) { m_wellPathPoints.push_back( wellPathPoint ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigWellPath::addMeasuredDepth( double measuredDepth ) -{ m_measuredDepths.push_back( measuredDepth ); } diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.h b/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.h index 6bc5bbc412..6bbc8ac956 100644 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.h +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellPath.h @@ -49,11 +49,8 @@ public: const std::vector& measuredDepths() const; std::vector trueVerticalDepths() const; - void setWellPathPoints( const std::vector& wellPathPoints ); - void setMeasuredDepths( const std::vector& measuredDepths ); - - void addWellPathPoint( const cvf::Vec3d& wellPathPoint ); - void addMeasuredDepth( double measuredDepth ); + void setWellPathPoints( const std::vector& wellPathPoints, const std::vector& measuredDepths ); + void addWellPathPoint( const cvf::Vec3d& wellPathPoint, double measuredDepth ); void setDatumElevation( double value ); bool hasDatumElevation() const; diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp deleted file mode 100644 index 718512f32f..0000000000 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.cpp +++ /dev/null @@ -1,604 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2024- 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RigWellTargetCandidatesGenerator.h" - -#include "RiaLogging.h" -#include "RiaPorosityModel.h" -#include "RiaResultNames.h" -#include "RiaWeightedMeanCalculator.h" - -#include "RigActiveCellInfo.h" -#include "RigCaseCellResultsData.h" -#include "RigEclipseResultAddress.h" -#include "RigMainGrid.h" - -#include "RimEclipseCase.h" -#include "RimEclipseCaseEnsemble.h" -#include "RimEclipseView.h" -#include "RimProject.h" -#include "RimPropertyFilterCollection.h" -#include "RimTools.h" - -#include "cafVecIjk.h" - -#include "cvfMath.h" -#include "cvfStructGrid.h" - -#include -#include - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigWellTargetCandidatesGenerator::generateCandidates( RimEclipseCase* eclipseCase, - size_t timeStepIdx, - VolumeType volumeType, - VolumesType volumesType, - VolumeResultType volumeResultType, - const ClusteringLimits& limits ) -{ - auto activeCellCount = getActiveCellCount( eclipseCase ); - if ( !activeCellCount ) - { - RiaLogging::error( "No active cells found" ); - return; - } - - auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - if ( !resultsData ) return; - - std::vector volume = getVolumeVector( *resultsData, volumeType, volumesType, volumeResultType, timeStepIdx ); - if ( volume.empty() ) - { - RiaLogging::error( "Unable to produce volume vector." ); - return; - } - - RigEclipseResultAddress pressureAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ); - resultsData->ensureKnownResultLoaded( pressureAddress ); - const std::vector& pressure = resultsData->cellScalarResults( pressureAddress, timeStepIdx ); - - RigEclipseResultAddress permeabilityXAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ); - resultsData->ensureKnownResultLoaded( permeabilityXAddress ); - const std::vector& permeabilityX = resultsData->cellScalarResults( permeabilityXAddress, 0 ); - - RigEclipseResultAddress permeabilityYAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ); - resultsData->ensureKnownResultLoaded( permeabilityYAddress ); - const std::vector& permeabilityY = resultsData->cellScalarResults( permeabilityYAddress, 0 ); - - RigEclipseResultAddress permeabilityZAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ); - resultsData->ensureKnownResultLoaded( permeabilityZAddress ); - const std::vector& permeabilityZ = resultsData->cellScalarResults( permeabilityZAddress, 0 ); - - RigEclipseResultAddress transmissibilityXAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ); - resultsData->ensureKnownResultLoaded( transmissibilityXAddress ); - const std::vector& transmissibilityX = resultsData->cellScalarResults( transmissibilityXAddress, 0 ); - - RigEclipseResultAddress transmissibilityYAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ); - resultsData->ensureKnownResultLoaded( transmissibilityYAddress ); - const std::vector& transmissibilityY = resultsData->cellScalarResults( transmissibilityYAddress, 0 ); - - RigEclipseResultAddress transmissibilityZAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ); - resultsData->ensureKnownResultLoaded( transmissibilityZAddress ); - const std::vector& transmissibilityZ = resultsData->cellScalarResults( transmissibilityZAddress, 0 ); - - std::vector clusters( activeCellCount.value(), 0 ); - auto start = std::chrono::high_resolution_clock::now(); - int numClusters = limits.maxClusters; - int maxIterations = limits.maxIterations; - int numClustersFound = 0; - for ( int clusterId = 1; clusterId <= numClusters; clusterId++ ) - { - std::optional startCell = findStartCell( eclipseCase, - timeStepIdx, - limits, - volume, - pressure, - permeabilityX, - permeabilityY, - permeabilityZ, - transmissibilityX, - transmissibilityY, - transmissibilityZ, - clusters ); - - if ( startCell.has_value() ) - { - RiaLogging::info( QString( "Cluster %1 start cell: [%2 %3 %4] " ) - .arg( clusterId ) - .arg( startCell->i() + 1 ) - .arg( startCell->j() + 1 ) - .arg( startCell->k() + 1 ) ); - - growCluster( eclipseCase, - startCell.value(), - limits, - volume, - pressure, - permeabilityX, - permeabilityY, - permeabilityZ, - transmissibilityX, - transmissibilityY, - transmissibilityZ, - clusters, - clusterId, - timeStepIdx, - maxIterations ); - numClustersFound++; - } - else - { - RiaLogging::error( "No suitable starting cell found" ); - break; - } - } - - RiaLogging::info( QString( "Found %1 clusters." ).arg( numClustersFound ) ); - - auto finish = std::chrono::high_resolution_clock::now(); - - auto milliseconds = std::chrono::duration_cast( finish - start ); - RiaLogging::info( QString( "Time spent: %1 ms" ).arg( milliseconds.count() ) ); - - QString resultName = "CLUSTERS_NUM"; - createResultVector( *eclipseCase, resultName, clusters ); - - // Update views and property filters - RimProject* proj = RimProject::current(); - proj->scheduleCreateDisplayModelAndRedrawAllViews(); - for ( auto view : eclipseCase->reservoirViews() ) - { - if ( auto eclipseView = dynamic_cast( view ) ) - { - eclipseView->scheduleReservoirGridGeometryRegen(); - eclipseView->propertyFilterCollection()->updateConnectedEditors(); - } - } - - std::vector statistics = - generateStatistics( eclipseCase, pressure, permeabilityX, permeabilityY, permeabilityZ, numClustersFound, timeStepIdx, resultName ); - for ( auto s : statistics ) - { - RiaLogging::info( QString( "Cluster #%1 Statistics" ).arg( s.id ) ); - RiaLogging::info( QString( "Number of cells: %1" ).arg( s.numCells ) ); - RiaLogging::info( QString( "Total PORV*SOIL: %1" ).arg( s.totalPorvSoil ) ); - RiaLogging::info( QString( "Total PORV*SGAS: %1" ).arg( s.totalPorvSgas ) ); - RiaLogging::info( QString( "Total PORV*(SOIL+SGAS): %1" ).arg( s.totalPorvSoilAndSgas ) ); - RiaLogging::info( QString( "Total FIPOIL: %1" ).arg( s.totalFipOil ) ); - RiaLogging::info( QString( "Total FIPGAS: %1" ).arg( s.totalFipGas ) ); - RiaLogging::info( QString( "Average Permeability: %1" ).arg( s.permeability ) ); - RiaLogging::info( QString( "Average Pressure: %1" ).arg( s.pressure ) ); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::optional RigWellTargetCandidatesGenerator::findStartCell( RimEclipseCase* eclipseCase, - size_t timeStepIdx, - const ClusteringLimits& limits, - const std::vector& volume, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - const std::vector& transmissibilityX, - const std::vector& transmissibilityY, - const std::vector& transmissibilityZ, - const std::vector& clusters ) -{ - auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - if ( !resultsData ) - { - RiaLogging::error( "No results data found for eclipse case" ); - return {}; - } - - size_t startCell = std::numeric_limits::max(); - double maxVolume = -std::numeric_limits::max(); - const size_t numReservoirCells = resultsData->activeCellInfo()->reservoirCellCount(); - for ( size_t reservoirCellIdx = 0; reservoirCellIdx < numReservoirCells; reservoirCellIdx++ ) - { - size_t resultIndex = resultsData->activeCellInfo()->cellResultIndex( reservoirCellIdx ); - if ( resultIndex != cvf::UNDEFINED_SIZE_T && clusters[resultIndex] == 0 ) - { - const double cellVolume = volume[resultIndex]; - const double cellPressure = pressure[resultIndex]; - - const double cellPermeabiltyX = permeabilityX[resultIndex]; - const double cellPermeabiltyY = permeabilityY[resultIndex]; - const double cellPermeabiltyZ = permeabilityZ[resultIndex]; - const bool permeabilityValidInAnyDirection = ( cellPermeabiltyX >= limits.permeability || cellPermeabiltyY >= limits.permeability || - cellPermeabiltyZ >= limits.permeability ); - - if ( cellVolume > maxVolume && cellVolume >= limits.volume && cellPressure >= limits.pressure && permeabilityValidInAnyDirection ) - { - maxVolume = cellVolume; - startCell = reservoirCellIdx; - } - } - } - - if ( startCell == std::numeric_limits::max() ) return {}; - - return eclipseCase->mainGrid()->ijkFromCellIndex( startCell ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigWellTargetCandidatesGenerator::growCluster( RimEclipseCase* eclipseCase, - const caf::VecIjk& startCell, - const ClusteringLimits& limits, - const std::vector& volume, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - const std::vector& transmissibilityX, - const std::vector& transmissibilityY, - const std::vector& transmissibilityZ, - std::vector& clusters, - int clusterId, - size_t timeStepIdx, - int maxIterations ) -{ - auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - - // Initially only the start cell is found - size_t reservoirCellIdx = eclipseCase->mainGrid()->cellIndexFromIJK( startCell.i(), startCell.j(), startCell.k() ); - std::vector foundCells = { reservoirCellIdx }; - assignClusterIdToCells( *resultsData->activeCellInfo(), foundCells, clusters, clusterId ); - - for ( int i = 0; i < maxIterations; i++ ) - { - foundCells = findCandidates( *eclipseCase, - foundCells, - limits, - volume, - pressure, - permeabilityX, - permeabilityY, - permeabilityZ, - transmissibilityX, - transmissibilityY, - transmissibilityZ, - clusters ); - if ( foundCells.empty() ) break; - assignClusterIdToCells( *resultsData->activeCellInfo(), foundCells, clusters, clusterId ); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RigWellTargetCandidatesGenerator::findCandidates( const RimEclipseCase& eclipseCase, - const std::vector& previousCells, - const ClusteringLimits& limits, - const std::vector& volume, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - const std::vector& transmissibilityX, - const std::vector& transmissibilityY, - const std::vector& transmissibilityZ, - std::vector& clusters ) -{ - std::vector candidates; - auto resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - - const std::vector faces = { - cvf::StructGridInterface::FaceType::POS_I, - cvf::StructGridInterface::FaceType::NEG_I, - cvf::StructGridInterface::FaceType::POS_J, - cvf::StructGridInterface::FaceType::NEG_J, - cvf::StructGridInterface::FaceType::POS_K, - cvf::StructGridInterface::FaceType::NEG_K, - }; - - for ( size_t cellIdx : previousCells ) - { - const RigCell& cell = eclipseCase.mainGrid()->cell( cellIdx ); - if ( cell.isInvalid() ) continue; - - RigGridBase* grid = cell.hostGrid(); - size_t gridLocalCellIndex = cell.gridLocalCellIndex(); - size_t resultIndex = resultsData->activeCellInfo()->cellResultIndex( cellIdx ); - - size_t i, j, k; - - grid->ijkFromCellIndex( gridLocalCellIndex, &i, &j, &k ); - - for ( cvf::StructGridInterface::FaceType face : faces ) - { - size_t gridLocalNeighborCellIdx; - if ( grid->cellIJKNeighbor( i, j, k, face, &gridLocalNeighborCellIdx ) ) - { - size_t neighborResvCellIdx = grid->reservoirCellIndex( gridLocalNeighborCellIdx ); - size_t neighborResultIndex = resultsData->activeCellInfo()->cellResultIndex( neighborResvCellIdx ); - if ( neighborResultIndex != cvf::UNDEFINED_SIZE_T && clusters[neighborResultIndex] == 0 ) - { - double permeability = getValueForFace( permeabilityX, permeabilityY, permeabilityZ, face, neighborResultIndex ); - double transmissibility = getTransmissibilityValueForFace( transmissibilityX, - transmissibilityY, - transmissibilityZ, - face, - resultIndex, - neighborResultIndex ); - if ( volume[neighborResultIndex] > limits.volume && pressure[neighborResultIndex] > limits.pressure && - permeability > limits.permeability && transmissibility > limits.transmissibility ) - { - candidates.push_back( neighborResvCellIdx ); - clusters[neighborResultIndex] = -1; - } - } - } - } - } - - return candidates; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigWellTargetCandidatesGenerator::assignClusterIdToCells( const RigActiveCellInfo& activeCellInfo, - const std::vector& cells, - std::vector& clusters, - int clusterId ) -{ - for ( size_t reservoirCellIdx : cells ) - { - size_t resultIndex = activeCellInfo.cellResultIndex( reservoirCellIdx ); - if ( resultIndex != cvf::UNDEFINED_SIZE_T ) clusters[resultIndex] = clusterId; - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RigWellTargetCandidatesGenerator::createResultVector( RimEclipseCase& eclipseCase, - const QString& resultName, - const std::vector& clusterIds ) -{ - RigEclipseResultAddress resultAddress( RiaDefines::ResultCatType::GENERATED, resultName ); - - auto resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - - resultsData->addStaticScalarResult( RiaDefines::ResultCatType::GENERATED, resultName, false, clusterIds.size() ); - - std::vector* resultVector = resultsData->modifiableCellScalarResult( resultAddress, 0 ); - resultVector->resize( clusterIds.size(), std::numeric_limits::infinity() ); - - std::fill( resultVector->begin(), resultVector->end(), std::numeric_limits::infinity() ); - - for ( size_t idx = 0; idx < clusterIds.size(); idx++ ) - { - if ( clusterIds[idx] > 0 ) - { - resultVector->at( idx ) = clusterIds[idx]; - } - } - - resultsData->recalculateStatistics( resultAddress ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::optional RigWellTargetCandidatesGenerator::getActiveCellCount( RimEclipseCase* eclipseCase ) -{ - auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - if ( !resultsData ) return {}; - - return resultsData->activeCellInfo()->reservoirActiveCellCount(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -double RigWellTargetCandidatesGenerator::getValueForFace( const std::vector& x, - const std::vector& y, - const std::vector& z, - cvf::StructGridInterface::FaceType face, - size_t resultIndex ) -{ - if ( face == cvf::StructGridInterface::FaceType::POS_I || face == cvf::StructGridInterface::FaceType::NEG_I ) return x[resultIndex]; - if ( face == cvf::StructGridInterface::FaceType::POS_J || face == cvf::StructGridInterface::FaceType::NEG_J ) return y[resultIndex]; - if ( face == cvf::StructGridInterface::FaceType::POS_K || face == cvf::StructGridInterface::FaceType::NEG_K ) return z[resultIndex]; - return std::numeric_limits::infinity(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -double RigWellTargetCandidatesGenerator::getTransmissibilityValueForFace( const std::vector& x, - const std::vector& y, - const std::vector& z, - cvf::StructGridInterface::FaceType face, - size_t resultIndex, - size_t neighborResultIndex ) -{ - // For negative directions (NEG_I, NEG_J, NEG_K) use the value from the neighbor cell - bool isPos = face == cvf::StructGridInterface::FaceType::POS_I || face == cvf::StructGridInterface::FaceType::POS_J || - face == cvf::StructGridInterface::FaceType::POS_K; - size_t index = isPos ? resultIndex : neighborResultIndex; - return getValueForFace( x, y, z, face, index ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector RigWellTargetCandidatesGenerator::getVolumeVector( RigCaseCellResultsData& resultsData, - VolumeType volumeType, - VolumesType volumesType, - VolumeResultType volumeResultType, - size_t timeStepIdx ) -{ - auto loadVectorByName = []( RigCaseCellResultsData& resultsData, const QString& resultName, size_t timeStepIdx ) -> std::vector - { - RigEclipseResultAddress address( RiaDefines::ResultCatType::DYNAMIC_NATIVE, resultName ); - if ( !resultsData.ensureKnownResultLoaded( address ) ) return {}; - return resultsData.cellScalarResults( address, timeStepIdx ); - }; - - auto getOilVectorName = []( VolumesType volumesType ) -> QString - { - switch ( volumesType ) - { - case VolumesType::COMPUTED_VOLUMES: - return RiaResultNames::riPorvSoil(); - case VolumesType::RESERVOIR_VOLUMES: - return "RFIPOIL"; - case VolumesType::SURFACE_VOLUMES: - return "SFIPOIL"; - default: - { - CAF_ASSERT( false ); - return ""; - } - } - }; - - auto getGasVectorName = []( VolumesType volumesType ) -> QString - { - switch ( volumesType ) - { - case VolumesType::COMPUTED_VOLUMES: - return RiaResultNames::riPorvSgas(); - case VolumesType::RESERVOIR_VOLUMES: - return "RFIPGAS"; - case VolumesType::SURFACE_VOLUMES: - return "SFIPGAS"; - default: - { - CAF_ASSERT( false ); - return ""; - } - } - }; - - std::vector volume; - - if ( volumeType == VolumeType::OIL ) - { - volume = loadVectorByName( resultsData, getOilVectorName( volumesType ), timeStepIdx ); - } - else if ( volumeType == VolumeType::GAS ) - { - volume = loadVectorByName( resultsData, getGasVectorName( volumesType ), timeStepIdx ); - } - else if ( volumeType == VolumeType::HYDROCARBON ) - { - std::vector oilVolume = loadVectorByName( resultsData, getOilVectorName( volumesType ), timeStepIdx ); - std::vector gasVolume = loadVectorByName( resultsData, getGasVectorName( volumesType ), timeStepIdx ); - if ( oilVolume.empty() || gasVolume.empty() || oilVolume.size() != gasVolume.size() ) return volume; - - volume.resize( oilVolume.size(), std::numeric_limits::infinity() ); - for ( size_t i = 0; i < oilVolume.size(); i++ ) - { - volume[i] = oilVolume[i] + gasVolume[i]; - } - } - - return volume; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -std::vector - RigWellTargetCandidatesGenerator::generateStatistics( RimEclipseCase* eclipseCase, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - int numClustersFound, - size_t timeStepIdx, - const QString& clusterResultName ) -{ - std::vector statistics( numClustersFound ); - - auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); - if ( !resultsData ) return statistics; - - RigEclipseResultAddress porvAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PORV" ); - resultsData->ensureKnownResultLoaded( porvAddress ); - const std::vector& porv = resultsData->cellScalarResults( porvAddress, 0 ); - - RigEclipseResultAddress porvSoilAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSoil() ); - resultsData->ensureKnownResultLoaded( porvSoilAddress ); - const std::vector& porvSoil = resultsData->cellScalarResults( porvSoilAddress, timeStepIdx ); - - RigEclipseResultAddress porvSgasAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSgas() ); - resultsData->ensureKnownResultLoaded( porvSgasAddress ); - const std::vector& porvSgas = resultsData->cellScalarResults( porvSgasAddress, timeStepIdx ); - - RigEclipseResultAddress porvSoilAndSgasAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSoilSgas() ); - resultsData->ensureKnownResultLoaded( porvSoilAndSgasAddress ); - const std::vector& porvSoilAndSgas = resultsData->cellScalarResults( porvSoilAndSgasAddress, timeStepIdx ); - - RigEclipseResultAddress fipOilAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FIPOIL" ); - resultsData->ensureKnownResultLoaded( fipOilAddress ); - const std::vector& fipOil = resultsData->cellScalarResults( fipOilAddress, timeStepIdx ); - - RigEclipseResultAddress fipGasAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FIPGAS" ); - resultsData->ensureKnownResultLoaded( fipGasAddress ); - const std::vector& fipGas = resultsData->cellScalarResults( fipGasAddress, timeStepIdx ); - - RigEclipseResultAddress clusterAddress( RiaDefines::ResultCatType::GENERATED, clusterResultName ); - resultsData->ensureKnownResultLoaded( clusterAddress ); - const std::vector& clusterIds = resultsData->cellScalarResults( clusterAddress, 0 ); - - std::vector> permeabilityCalculators( numClustersFound ); - std::vector> pressureCalculators( numClustersFound ); - - for ( size_t idx = 0; idx < clusterIds.size(); idx++ ) - { - if ( !std::isinf( clusterIds[idx] ) && static_cast( clusterIds[idx] ) > 0 ) - { - size_t i = clusterIds[idx] - 1; - if ( i < static_cast( numClustersFound ) ) - { - statistics[i].id = clusterIds[idx]; - statistics[i].numCells++; - statistics[i].totalPorvSoil += porvSoil[idx]; - statistics[i].totalPorvSgas += porvSgas[idx]; - statistics[i].totalPorvSoilAndSgas += porvSoilAndSgas[idx]; - statistics[i].totalFipOil += fipOil[idx]; - statistics[i].totalFipGas += fipGas[idx]; - - double meanPermeability = ( permeabilityX[idx] + permeabilityY[idx] + permeabilityZ[idx] ) / 3.0; - permeabilityCalculators[i].addValueAndWeight( meanPermeability, porv[idx] ); - - pressureCalculators[i].addValueAndWeight( pressure[idx], porv[idx] ); - } - } - } - - for ( int i = 0; i < numClustersFound; i++ ) - { - statistics[i].permeability = permeabilityCalculators[i].weightedMean(); - statistics[i].pressure = pressureCalculators[i].weightedMean(); - } - - return statistics; -} diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h deleted file mode 100644 index 0f93e9b875..0000000000 --- a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetCandidatesGenerator.h +++ /dev/null @@ -1,180 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2024- 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 -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cafVecIjk.h" - -#include "cvfStructGrid.h" - -#include - -class RigActiveCellInfo; -class RigCaseCellResultsData; -class RimEclipseCase; -//================================================================================================== -/// -/// -//================================================================================================== -class RigWellTargetCandidatesGenerator -{ -public: - enum class VolumeType - { - OIL, - GAS, - HYDROCARBON - }; - - enum class VolumeResultType - { - MOBILE, - TOTAL - }; - - enum class VolumesType - { - RESERVOIR_VOLUMES, - SURFACE_VOLUMES, - COMPUTED_VOLUMES - }; - - struct ClusteringLimits - { - double volume; - double permeability; - double pressure; - double transmissibility; - int maxClusters; - int maxIterations; - }; - - static void generateCandidates( RimEclipseCase* eclipseCase, - size_t timeStepIdx, - VolumeType volumeType, - VolumesType volumesType, - VolumeResultType volumeResultType, - const ClusteringLimits& limits ); - - static std::vector getVolumeVector( RigCaseCellResultsData& resultsData, - VolumeType volumeType, - VolumesType volumesType, - VolumeResultType volumeResultType, - size_t timeStepIdx ); - - class ClusterStatistics - { - public: - ClusterStatistics() - : id( -1 ) - , numCells( 0 ) - , totalPorvSoil( 0.0 ) - , totalPorvSgas( 0.0 ) - , totalPorvSoilAndSgas( 0.0 ) - , totalFipOil( 0.0 ) - , totalFipGas( 0.0 ) - , permeability( 0.0 ) - , pressure( 0.0 ) - { - } - - int id; - size_t numCells; - double totalPorvSoil; - double totalPorvSgas; - double totalPorvSoilAndSgas; - double totalFipOil; - double totalFipGas; - double permeability; - double pressure; - }; - -private: - static std::optional findStartCell( RimEclipseCase* eclipseCase, - size_t timeStepIdx, - const ClusteringLimits& limits, - const std::vector& volume, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - const std::vector& transmissibilityX, - const std::vector& transmissibilityY, - const std::vector& transmissibilityZ, - const std::vector& clusters ); - - static void growCluster( RimEclipseCase* eclipseCase, - const caf::VecIjk& startCell, - const ClusteringLimits& limits, - const std::vector& volume, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - const std::vector& transmissibilityX, - const std::vector& transmissibilityY, - const std::vector& transmissibilityZ, - std::vector& clusters, - int clusterId, - size_t timeStepIdx, - int maxIterations ); - - static std::vector findCandidates( const RimEclipseCase& eclipseCase, - const std::vector& previousCells, - const ClusteringLimits& limits, - const std::vector& volume, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - const std::vector& transmissibilityX, - const std::vector& transmissibilityY, - const std::vector& transmissibilityZ, - std::vector& clusters ); - - static void assignClusterIdToCells( const RigActiveCellInfo& activeCellInfo, - const std::vector& cells, - std::vector& clusters, - int clusterId ); - - static std::optional getActiveCellCount( RimEclipseCase* eclipseCase ); - - static void createResultVector( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& clusterIds ); - - static double getValueForFace( const std::vector& x, - const std::vector& y, - const std::vector& z, - cvf::StructGridInterface::FaceType face, - size_t resultIndex ); - - static double getTransmissibilityValueForFace( const std::vector& x, - const std::vector& y, - const std::vector& z, - cvf::StructGridInterface::FaceType face, - size_t resultIndex, - size_t neighborResultIndex ); - - static std::vector generateStatistics( RimEclipseCase* eclipseCase, - const std::vector& pressure, - const std::vector& permeabilityX, - const std::vector& permeabilityY, - const std::vector& permeabilityZ, - int numClustersFound, - size_t timeStepIdx, - const QString& clusterResultName ); -}; diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp new file mode 100644 index 0000000000..5c584a1d5e --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.cpp @@ -0,0 +1,1196 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigWellTargetMapping.h" + +#include "RiaDefines.h" +#include "RiaEclipseUnitTools.h" +#include "RiaLogging.h" +#include "RiaPorosityModel.h" +#include "RiaPreferencesSystem.h" +#include "RiaResultNames.h" +#include "RiaWeightedMeanCalculator.h" + +#include "RigActiveCellInfo.h" +#include "RigCaseCellResultsData.h" +#include "RigEclipseCaseData.h" +#include "RigEclipseResultAddress.h" +#include "RigFloodingSettings.h" +#include "RigHydrocarbonFlowTools.h" +#include "RigMainGrid.h" +#include "RigNNCData.h" +#include "RigStatisticsMath.h" + +#include "RimEclipseCase.h" +#include "RimEclipseCaseEnsemble.h" +#include "RimEclipseView.h" +#include "RimProject.h" +#include "RimPropertyFilterCollection.h" +#include "RimRegularGridCase.h" +#include "RimTools.h" + +#include "cafProgressInfo.h" +#include "cafVecIjk.h" + +#include "cvfBoundingBox.h" +#include "cvfMath.h" +#include "cvfStructGrid.h" + +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::generateCandidates( RimEclipseCase* eclipseCase, + size_t timeStepIdx, + VolumeType volumeType, + VolumesType volumesType, + VolumeResultType volumeResultType, + const RigFloodingSettings& floodingSettings, + const ClusteringLimits& limits, + bool skipUndefinedResults ) +{ + if ( !eclipseCase->ensureReservoirCaseIsOpen() ) return; + + bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RigWellTargetMapping" ); + + auto activeCellCount = getActiveCellCount( eclipseCase ); + if ( !activeCellCount ) + { + RiaLogging::error( "No active cells found" ); + return; + } + + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) return; + + auto caseData = eclipseCase->eclipseCaseData(); + if ( !caseData ) return; + + RiaDefines::EclipseUnitSystem unitsType = caseData->unitsType(); + + DataContainer data; + data.volume = getVolumeVector( *resultsData, unitsType, volumeType, volumesType, volumeResultType, timeStepIdx, floodingSettings ); + if ( data.volume.empty() ) + { + RiaLogging::error( "Unable to produce volume vector." ); + return; + } + + RigEclipseResultAddress soilAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ); + if ( resultsData->ensureKnownResultLoaded( soilAddress ) ) + { + data.saturationOil = resultsData->cellScalarResults( soilAddress, timeStepIdx ); + } + + RigEclipseResultAddress sgasAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ); + if ( resultsData->ensureKnownResultLoaded( sgasAddress ) ) + { + data.saturationGas = resultsData->cellScalarResults( sgasAddress, timeStepIdx ); + } + else + { + if ( volumeType == VolumeType::GAS || volumeType == VolumeType::HYDROCARBON ) + { + RiaLogging::error( "Missing SGAS result needed for well target mapping volume type: " + + caf::AppEnum::uiText( volumeType ) ); + return; + } + } + + RigEclipseResultAddress pressureAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ); + resultsData->ensureKnownResultLoaded( pressureAddress ); + data.pressure = resultsData->cellScalarResults( pressureAddress, timeStepIdx ); + + RigEclipseResultAddress permeabilityXAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ); + resultsData->ensureKnownResultLoaded( permeabilityXAddress ); + data.permeabilityX = resultsData->cellScalarResults( permeabilityXAddress, 0 ); + + RigEclipseResultAddress transmissibilityXAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANX" ); + resultsData->ensureKnownResultLoaded( transmissibilityXAddress ); + data.transmissibilityX = resultsData->cellScalarResults( transmissibilityXAddress, 0 ); + + RigEclipseResultAddress transmissibilityYAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANY" ); + resultsData->ensureKnownResultLoaded( transmissibilityYAddress ); + data.transmissibilityY = resultsData->cellScalarResults( transmissibilityYAddress, 0 ); + + RigEclipseResultAddress transmissibilityZAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "TRANZ" ); + resultsData->ensureKnownResultLoaded( transmissibilityZAddress ); + data.transmissibilityZ = resultsData->cellScalarResults( transmissibilityZAddress, 0 ); + + auto mainGrid = eclipseCase->eclipseCaseData()->mainGrid(); + if ( mainGrid != nullptr ) + { + data.transmissibilityNNC = mainGrid->nncData()->staticConnectionScalarResultByName( RiaDefines::propertyNameCombTrans() ); + } + else + { + data.transmissibilityNNC = nullptr; + } + + std::vector filterVector; + if ( !limits.filter.empty() ) + { + filterVector = limits.filter; + } + else if ( limits.filterAddress.isValid() ) + { + resultsData->ensureKnownResultLoaded( limits.filterAddress ); + filterVector = resultsData->cellScalarResults( limits.filterAddress, timeStepIdx ); + } + + // Disable filtering if not configured: set all items to 1 (which includes all cells). + if ( filterVector.empty() || filterVector.size() != data.pressure.size() ) + { + filterVector = std::vector( data.pressure.size(), 1.0 ); + } + + std::vector clusters( activeCellCount.value(), 0 ); + auto start = std::chrono::high_resolution_clock::now(); + int numClusters = limits.maxNumTargets; + int maxIterations = limits.maxIterations; + int numClustersFound = 0; + for ( int clusterId = 1; clusterId <= numClusters; clusterId++ ) + { + std::optional startCell = findStartCell( eclipseCase, timeStepIdx, volumeType, limits, data, filterVector, clusters ); + + if ( startCell.has_value() ) + { + if ( isLoggingEnabled ) + RiaLogging::info( QString( "Cluster %1 start cell: [%2 %3 %4] " ) + .arg( clusterId ) + .arg( startCell->i() + 1 ) + .arg( startCell->j() + 1 ) + .arg( startCell->k() + 1 ) ); + + growCluster( eclipseCase, startCell.value(), volumeType, limits, data, filterVector, clusters, clusterId, timeStepIdx, maxIterations ); + numClustersFound++; + } + else + { + RiaLogging::error( "No suitable starting cell found" ); + break; + } + } + + RiaLogging::info( QString( "Found %1 clusters." ).arg( numClustersFound ) ); + + auto finish = std::chrono::high_resolution_clock::now(); + + auto milliseconds = std::chrono::duration_cast( finish - start ); + RiaLogging::info( QString( "Time spent: %1 ms" ).arg( milliseconds.count() ) ); + + QString resultName = RigWellTargetMapping::wellTargetResultName(); + createResultVector( *eclipseCase, resultName, clusters ); + + // Update views and property filters + RimProject* proj = RimProject::current(); + proj->scheduleCreateDisplayModelAndRedrawAllViews(); + for ( auto view : eclipseCase->reservoirViews() ) + { + if ( auto eclipseView = dynamic_cast( view ) ) + { + eclipseView->scheduleReservoirGridGeometryRegen(); + eclipseView->propertyFilterCollection()->updateConnectedEditors(); + } + } + + std::vector statistics = + generateStatistics( eclipseCase, data.pressure, data.permeabilityX, numClustersFound, timeStepIdx, resultName ); + std::vector totalPorvSoil( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalPorvSgas( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalPorvSoilAndSgas( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalFipOil( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalFipGas( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalRfipOil( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalRfipGas( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalSfipOil( clusters.size(), std::numeric_limits::infinity() ); + std::vector totalSfipGas( clusters.size(), std::numeric_limits::infinity() ); + + auto addValuesForClusterId = []( std::vector& values, const std::vector& clusters, int clusterId, double value ) + { +#pragma omp parallel for + for ( int i = 0; i < static_cast( clusters.size() ); i++ ) + { + if ( clusters[i] == clusterId ) values[i] = value; + } + }; + + int clusterId = 1; + for ( const auto& s : statistics ) + { + if ( isLoggingEnabled ) + { + auto logIfValid = []( const QString& pattern, double value ) + { + if ( !std::isinf( value ) && !std::isnan( value ) ) RiaLogging::info( pattern.arg( value ) ); + }; + + RiaLogging::info( QString( "Cluster #%1 Statistics" ).arg( s.id ) ); + RiaLogging::info( QString( "Number of cells: %1" ).arg( s.numCells ) ); + logIfValid( "Total PORV*SOIL: %1", s.totalPorvSoil ); + logIfValid( "Total PORV*SOIL: %1", s.totalPorvSoil ); + logIfValid( "Total PORV*SGAS: %1", s.totalPorvSgas ); + logIfValid( "Total PORV*(SOIL+SGAS): %1", s.totalPorvSoilAndSgas ); + logIfValid( "Total FIPOIL: %1", s.totalFipOil ); + logIfValid( "Total FIPGAS: %1", s.totalFipGas ); + logIfValid( "Total RFIPOIL: %1", s.totalRfipOil ); + logIfValid( "Total RFIPGAS: %1", s.totalRfipGas ); + logIfValid( "Total SFIPOIL: %1", s.totalSfipOil ); + logIfValid( "Total SFIPGAS: %1", s.totalSfipGas ); + logIfValid( "Average Permeability: %1", s.permeability ); + logIfValid( "Average Pressure: %1", s.pressure ); + } + + addValuesForClusterId( totalPorvSoil, clusters, clusterId, s.totalPorvSoil ); + addValuesForClusterId( totalPorvSgas, clusters, clusterId, s.totalPorvSgas ); + addValuesForClusterId( totalPorvSoilAndSgas, clusters, clusterId, s.totalPorvSoilAndSgas ); + addValuesForClusterId( totalFipOil, clusters, clusterId, s.totalFipOil ); + addValuesForClusterId( totalFipGas, clusters, clusterId, s.totalFipGas ); + addValuesForClusterId( totalRfipOil, clusters, clusterId, s.totalRfipOil ); + addValuesForClusterId( totalRfipGas, clusters, clusterId, s.totalRfipGas ); + addValuesForClusterId( totalSfipOil, clusters, clusterId, s.totalSfipOil ); + addValuesForClusterId( totalSfipGas, clusters, clusterId, s.totalSfipGas ); + + clusterId++; + } + + if ( skipUndefinedResults ) + { + createResultVectorIfDefined( *eclipseCase, "TOTAL_PORV_SOIL", totalPorvSoil ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_PORV_SGAS", totalPorvSgas ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_PORV_SOIL_SGAS", totalPorvSoilAndSgas ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_FIPOIL", totalFipOil ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_FIPGAS", totalFipGas ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_RFIPOIL", totalRfipOil ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_RFIPGAS", totalRfipGas ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_SFIPOIL", totalSfipOil ); + createResultVectorIfDefined( *eclipseCase, "TOTAL_SFIPGAS", totalSfipGas ); + } + else + { + createResultVector( *eclipseCase, "TOTAL_PORV_SOIL", totalPorvSoil ); + createResultVector( *eclipseCase, "TOTAL_PORV_SGAS", totalPorvSgas ); + createResultVector( *eclipseCase, "TOTAL_PORV_SOIL_SGAS", totalPorvSoilAndSgas ); + createResultVector( *eclipseCase, "TOTAL_FIPOIL", totalFipOil ); + createResultVector( *eclipseCase, "TOTAL_FIPGAS", totalFipGas ); + createResultVector( *eclipseCase, "TOTAL_RFIPOIL", totalRfipOil ); + createResultVector( *eclipseCase, "TOTAL_RFIPGAS", totalRfipGas ); + createResultVector( *eclipseCase, "TOTAL_SFIPOIL", totalSfipOil ); + createResultVector( *eclipseCase, "TOTAL_SFIPGAS", totalSfipGas ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::optional RigWellTargetMapping::findStartCell( RimEclipseCase* eclipseCase, + size_t timeStepIdx, + const VolumeType volumeType, + const ClusteringLimits& limits, + const DataContainer& data, + const std::vector& filterVector, + const std::vector& clusters ) +{ + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) + { + RiaLogging::error( "No results data found for eclipse case" ); + return {}; + } + + size_t startCell = std::numeric_limits::max(); + double maxVolume = -std::numeric_limits::max(); + const size_t numReservoirCells = resultsData->activeCellInfo()->reservoirCellCount(); + for ( size_t reservoirCellIdx = 0; reservoirCellIdx < numReservoirCells; reservoirCellIdx++ ) + { + size_t resultIndex = resultsData->activeCellInfo()->cellResultIndex( reservoirCellIdx ); + if ( resultIndex != cvf::UNDEFINED_SIZE_T && clusters[resultIndex] == 0 ) + { + const double cellVolume = data.volume[resultIndex]; + const double cellPressure = data.pressure[resultIndex]; + + const bool isSaturationValid = isSaturationSufficient( volumeType, data, limits, resultIndex ); + + const double cellPermeabiltyX = data.permeabilityX[resultIndex]; + const bool permeabilityValid = ( cellPermeabiltyX >= limits.permeability ); + + const bool filterValue = !std::isinf( filterVector[resultIndex] ) && filterVector[resultIndex] > 0.0; + + if ( cellVolume > maxVolume && cellPressure >= limits.pressure && permeabilityValid && filterValue && isSaturationValid ) + { + maxVolume = cellVolume; + startCell = reservoirCellIdx; + } + } + } + + if ( startCell == std::numeric_limits::max() ) return {}; + + return eclipseCase->mainGrid()->ijkFromCellIndex( startCell ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::growCluster( RimEclipseCase* eclipseCase, + const caf::VecIjk& startCell, + const VolumeType volumeType, + const ClusteringLimits& limits, + const DataContainer& data, + const std::vector& filterVector, + std::vector& clusters, + int clusterId, + size_t timeStepIdx, + int maxIterations ) +{ + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + + // Initially only the start cell is found + size_t reservoirCellIdx = eclipseCase->mainGrid()->cellIndexFromIJK( startCell.i(), startCell.j(), startCell.k() ); + std::vector foundCells = { reservoirCellIdx }; + assignClusterIdToCells( *resultsData->activeCellInfo(), foundCells, clusters, clusterId ); + + for ( int i = 0; i < maxIterations; i++ ) + { + foundCells = findCandidates( eclipseCase, foundCells, volumeType, limits, data, filterVector, clusters ); + if ( foundCells.empty() ) break; + assignClusterIdToCells( *resultsData->activeCellInfo(), foundCells, clusters, clusterId ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigWellTargetMapping::findCandidates( RimEclipseCase* eclipseCase, + const std::vector& previousCells, + const VolumeType volumeType, + const ClusteringLimits& limits, + const DataContainer& data, + const std::vector& filterVector, + std::vector& clusters ) +{ + std::vector candidates; + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + auto mainGrid = eclipseCase->eclipseCaseData()->mainGrid(); + + const std::vector faces = { + cvf::StructGridInterface::FaceType::POS_I, + cvf::StructGridInterface::FaceType::NEG_I, + cvf::StructGridInterface::FaceType::POS_J, + cvf::StructGridInterface::FaceType::NEG_J, + cvf::StructGridInterface::FaceType::POS_K, + cvf::StructGridInterface::FaceType::NEG_K, + }; + + for ( size_t cellIdx : previousCells ) + { + const RigCell& cell = mainGrid->cell( cellIdx ); + if ( cell.isInvalid() ) continue; + + RigGridBase* grid = cell.hostGrid(); + size_t gridLocalCellIndex = cell.gridLocalCellIndex(); + size_t resultIndex = resultsData->activeCellInfo()->cellResultIndex( cellIdx ); + + size_t i, j, k; + + grid->ijkFromCellIndex( gridLocalCellIndex, &i, &j, &k ); + + for ( CellFaceType face : faces ) + { + size_t gridLocalNeighborCellIdx; + if ( grid->cellIJKNeighbor( i, j, k, face, &gridLocalNeighborCellIdx ) ) + { + size_t neighborResvCellIdx = grid->reservoirCellIndex( gridLocalNeighborCellIdx ); + size_t neighborResultIndex = resultsData->activeCellInfo()->cellResultIndex( neighborResvCellIdx ); + if ( neighborResultIndex != cvf::UNDEFINED_SIZE_T && clusters[neighborResultIndex] == 0 ) + { + double permeability = data.permeabilityX[neighborResultIndex]; + double transmissibility = getTransmissibilityValueForFace( data.transmissibilityX, + data.transmissibilityY, + data.transmissibilityZ, + face, + resultIndex, + neighborResultIndex ); + bool filterValue = !std::isinf( filterVector[neighborResultIndex] ) && filterVector[neighborResultIndex] > 0.0; + + const bool isSaturationValid = isSaturationSufficient( volumeType, data, limits, neighborResultIndex ); + + if ( data.pressure[neighborResultIndex] > limits.pressure && permeability > limits.permeability && + transmissibility > limits.transmissibility && filterValue && isSaturationValid ) + { + candidates.push_back( neighborResvCellIdx ); + clusters[neighborResultIndex] = -1; + } + } + } + } + + if ( data.transmissibilityNNC != nullptr ) + { + auto nncCells = nncConnectionCellAndResult( cellIdx, mainGrid ); + for ( auto& [cellInfo, nncResultIdx] : nncCells ) + { + auto& [otherCellIdx, face] = cellInfo; + double transmissibility = data.transmissibilityNNC->at( nncResultIdx ); + + size_t otherResultIndex = resultsData->activeCellInfo()->cellResultIndex( otherCellIdx ); + + double permeability = data.permeabilityX[otherResultIndex]; + + bool filterValue = !std::isinf( filterVector[otherResultIndex] ) && filterVector[otherResultIndex] > 0.0; + + const bool isSaturationValid = isSaturationSufficient( volumeType, data, limits, otherResultIndex ); + + if ( data.pressure[otherResultIndex] > limits.pressure && permeability > limits.permeability && + transmissibility > limits.transmissibility && filterValue && isSaturationValid ) + { + candidates.push_back( otherCellIdx ); + clusters[otherResultIndex] = -1; + } + } + } + } + + return candidates; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::assignClusterIdToCells( const RigActiveCellInfo& activeCellInfo, + const std::vector& cells, + std::vector& clusters, + int clusterId ) +{ + for ( size_t reservoirCellIdx : cells ) + { + size_t resultIndex = activeCellInfo.cellResultIndex( reservoirCellIdx ); + if ( resultIndex != cvf::UNDEFINED_SIZE_T ) clusters[resultIndex] = clusterId; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::createResultVector( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& clusterIds ) +{ + RigEclipseResultAddress resultAddress( RiaDefines::ResultCatType::GENERATED, resultName ); + + auto resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + + resultsData->addStaticScalarResult( RiaDefines::ResultCatType::GENERATED, resultName, false, clusterIds.size() ); + + std::vector* resultVector = resultsData->modifiableCellScalarResult( resultAddress, 0 ); + resultVector->resize( clusterIds.size(), std::numeric_limits::infinity() ); + + std::fill( resultVector->begin(), resultVector->end(), std::numeric_limits::infinity() ); + + for ( size_t idx = 0; idx < clusterIds.size(); idx++ ) + { + if ( clusterIds[idx] > 0 ) + { + resultVector->at( idx ) = clusterIds[idx]; + } + } + + resultsData->recalculateStatistics( resultAddress ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::createResultVectorIfDefined( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& values ) +{ + // Avoid creating the result vector if all values are inf/nan + if ( std::all_of( values.begin(), values.end(), []( auto v ) { return std::isinf( v ) || std::isnan( v ); } ) ) return; + + createResultVector( eclipseCase, resultName, values ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::createResultVector( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& values ) +{ + RigEclipseResultAddress resultAddress( RiaDefines::ResultCatType::GENERATED, resultName ); + + auto resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + + resultsData->addStaticScalarResult( RiaDefines::ResultCatType::GENERATED, resultName, false, values.size() ); + + std::vector* resultVector = resultsData->modifiableCellScalarResult( resultAddress, 0 ); + resultVector->resize( values.size(), std::numeric_limits::infinity() ); + + std::copy( values.begin(), values.end(), resultVector->begin() ); + + resultsData->recalculateStatistics( resultAddress ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::createResultVector( RimEclipseCase& eclipseCase, + const QString& resultName, + const std::vector& clusterIds, + double value ) +{ + RigEclipseResultAddress resultAddress( RiaDefines::ResultCatType::GENERATED, resultName ); + + auto resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + + resultsData->addStaticScalarResult( RiaDefines::ResultCatType::GENERATED, resultName, false, clusterIds.size() ); + + std::vector* resultVector = resultsData->modifiableCellScalarResult( resultAddress, 0 ); + resultVector->resize( clusterIds.size(), std::numeric_limits::infinity() ); + + std::fill( resultVector->begin(), resultVector->end(), std::numeric_limits::infinity() ); + + for ( size_t idx = 0; idx < clusterIds.size(); idx++ ) + { + if ( clusterIds[idx] > 0 ) + { + resultVector->at( idx ) = value; + } + } + + resultsData->recalculateStatistics( resultAddress ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::optional RigWellTargetMapping::getActiveCellCount( RimEclipseCase* eclipseCase ) +{ + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) return {}; + + return resultsData->activeCellInfo()->reservoirActiveCellCount(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigWellTargetMapping::getValueForFace( const std::vector& x, + const std::vector& y, + const std::vector& z, + CellFaceType face, + size_t resultIndex ) +{ + if ( face == cvf::StructGridInterface::FaceType::POS_I || face == cvf::StructGridInterface::FaceType::NEG_I ) return x[resultIndex]; + if ( face == cvf::StructGridInterface::FaceType::POS_J || face == cvf::StructGridInterface::FaceType::NEG_J ) return y[resultIndex]; + if ( face == cvf::StructGridInterface::FaceType::POS_K || face == cvf::StructGridInterface::FaceType::NEG_K ) return z[resultIndex]; + return std::numeric_limits::infinity(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double RigWellTargetMapping::getTransmissibilityValueForFace( const std::vector& x, + const std::vector& y, + const std::vector& z, + CellFaceType face, + size_t resultIndex, + size_t neighborResultIndex ) +{ + // For negative directions (NEG_I, NEG_J, NEG_K) use the value from the neighbor cell + bool isPos = face == cvf::StructGridInterface::FaceType::POS_I || face == cvf::StructGridInterface::FaceType::POS_J || + face == cvf::StructGridInterface::FaceType::POS_K; + size_t index = isPos ? resultIndex : neighborResultIndex; + return getValueForFace( x, y, z, face, index ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigWellTargetMapping::loadVectorByName( RigCaseCellResultsData& resultsData, const QString& resultName, size_t timeStepIdx ) +{ + RigEclipseResultAddress address( RiaDefines::ResultCatType::DYNAMIC_NATIVE, resultName ); + if ( !resultsData.ensureKnownResultLoaded( address ) ) return {}; + return resultsData.cellScalarResults( address, timeStepIdx ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RigWellTargetMapping::getOilVectorName( VolumesType volumesType ) +{ + switch ( volumesType ) + { + case VolumesType::RESERVOIR_VOLUMES_COMPUTED: + return RiaResultNames::riPorvSoil(); + case VolumesType::RESERVOIR_VOLUMES: + return "RFIPOIL"; + case VolumesType::SURFACE_VOLUMES_SFIP: + return "SFIPOIL"; + case VolumesType::SURFACE_VOLUMES_FIP: + return "FIPOIL"; + default: + { + CAF_ASSERT( false ); + return ""; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RigWellTargetMapping::getGasVectorName( VolumesType volumesType ) +{ + switch ( volumesType ) + { + case VolumesType::RESERVOIR_VOLUMES_COMPUTED: + return RiaResultNames::riPorvSgas(); + case VolumesType::RESERVOIR_VOLUMES: + return "RFIPGAS"; + case VolumesType::SURFACE_VOLUMES_SFIP: + return "SFIPGAS"; + case VolumesType::SURFACE_VOLUMES_FIP: + return "FIPGAS"; + default: + { + CAF_ASSERT( false ); + return ""; + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigWellTargetMapping::loadOilVectorByName( RigCaseCellResultsData& resultsData, + VolumesType volumesType, + VolumeResultType volumeResultType, + size_t timeStepIdx, + const RigFloodingSettings& floodingSettings ) +{ + std::vector volume = loadVectorByName( resultsData, getOilVectorName( volumesType ), timeStepIdx ); + if ( volumeResultType == RigWellTargetMapping::VolumeResultType::MOBILE ) + { + std::vector residualOil = RigHydrocarbonFlowTools::residualOilData( resultsData, + RigHydrocarbonFlowTools::ResultType::MOBILE_OIL, + floodingSettings, + volume.size() ); + if ( volumesType == RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED ) + { + const std::vector& porvResults = + resultsData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::porv() ), 0 ); + + for ( size_t i = 0; i < volume.size(); i++ ) + { + volume[i] = std::max( volume[i] - ( porvResults[i] * residualOil[i] ), 0.0 ); + } + } + else + { + const std::vector& soilResults = + resultsData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::soil() ), + timeStepIdx ); + + for ( size_t i = 0; i < volume.size(); i++ ) + { + if ( soilResults[i] != 0.0 ) + { + volume[i] = std::max( volume[i] * ( soilResults[i] - residualOil[i] ) / soilResults[i], 0.0 ); + } + else + { + volume[i] = 0.0; + } + } + } + } + + return volume; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigWellTargetMapping::loadGasVectorByName( RigCaseCellResultsData& resultsData, + RiaDefines::EclipseUnitSystem unitsType, + VolumesType volumesType, + VolumeResultType volumeResultType, + size_t timeStepIdx, + const RigFloodingSettings& floodingSettings ) +{ + std::vector volume = loadVectorByName( resultsData, getGasVectorName( volumesType ), timeStepIdx ); + + if ( volumeResultType == RigWellTargetMapping::VolumeResultType::MOBILE ) + { + std::vector residualGas = RigHydrocarbonFlowTools::residualGasData( resultsData, + RigHydrocarbonFlowTools::ResultType::MOBILE_GAS, + floodingSettings, + volume.size() ); + if ( volumesType == RigWellTargetMapping::VolumesType::RESERVOIR_VOLUMES_COMPUTED ) + { + const std::vector& porvResults = + resultsData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::porv() ), 0 ); + + for ( size_t i = 0; i < volume.size(); i++ ) + { + volume[i] = std::max( volume[i] - ( porvResults[i] * residualGas[i] ), 0.0 ); + } + } + else + { + const std::vector& sgasResults = + resultsData.cellScalarResults( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ), + timeStepIdx ); + + for ( size_t i = 0; i < volume.size(); i++ ) + { + if ( sgasResults[i] != 0.0 ) + { + volume[i] = std::max( volume[i] * ( sgasResults[i] - residualGas[i] ) / sgasResults[i], 0.0 ); + } + else + { + volume[i] = 0.0; + } + } + } + } + + // Convert to gas volumes to oil equivalents + for ( size_t i = 0; i < volume.size(); i++ ) + { + volume[i] = RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( unitsType, volume[i] ); + } + + return volume; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigWellTargetMapping::getVolumeVector( RigCaseCellResultsData& resultsData, + RiaDefines::EclipseUnitSystem unitsType, + VolumeType volumeType, + VolumesType volumesType, + VolumeResultType volumeResultType, + size_t timeStepIdx, + const RigFloodingSettings& floodingSettings ) +{ + if ( volumeType == VolumeType::OIL ) + { + return loadOilVectorByName( resultsData, volumesType, volumeResultType, timeStepIdx, floodingSettings ); + } + else if ( volumeType == VolumeType::GAS ) + { + return loadGasVectorByName( resultsData, unitsType, volumesType, volumeResultType, timeStepIdx, floodingSettings ); + } + else if ( volumeType == VolumeType::HYDROCARBON ) + { + std::vector oilVolume = loadOilVectorByName( resultsData, volumesType, volumeResultType, timeStepIdx, floodingSettings ); + std::vector gasVolume = + loadGasVectorByName( resultsData, unitsType, volumesType, volumeResultType, timeStepIdx, floodingSettings ); + if ( oilVolume.empty() || gasVolume.empty() || oilVolume.size() != gasVolume.size() ) return {}; + + std::vector volume; + volume.resize( oilVolume.size(), std::numeric_limits::infinity() ); + for ( size_t i = 0; i < oilVolume.size(); i++ ) + { + volume[i] = oilVolume[i] + gasVolume[i]; + } + return volume; + } + + CAF_ASSERT( false && "Unknown volume type" ); + return {}; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RigWellTargetMapping::generateStatistics( RimEclipseCase* eclipseCase, + const std::vector& pressure, + const std::vector& permeabilityX, + int numClustersFound, + size_t timeStepIdx, + const QString& clusterResultName ) +{ + std::vector statistics( numClustersFound ); + + auto resultsData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) return statistics; + + auto loadData = []( RigCaseCellResultsData* resultsData, RiaDefines::ResultCatType categoryType, const QString& name, size_t timeStepIdx ) + { + RigEclipseResultAddress address( categoryType, name ); + std::vector values; + if ( resultsData->ensureKnownResultLoaded( address ) ) + { + values = resultsData->cellScalarResults( address, timeStepIdx ); + } + + return values; + }; + + const std::vector porv = loadData( resultsData, RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::porv(), 0 ); + const std::vector porvSoil = + loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSoil(), timeStepIdx ); + const std::vector porvSgas = + loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSgas(), timeStepIdx ); + const std::vector porvSoilAndSgas = + loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::riPorvSoilSgas(), timeStepIdx ); + const std::vector fipOil = loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FIPOIL", timeStepIdx ); + const std::vector fipGas = loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "FIPGAS", timeStepIdx ); + const std::vector sfipOil = loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SFIPOIL", timeStepIdx ); + const std::vector sfipGas = loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "SFIPGAS", timeStepIdx ); + const std::vector rfipOil = loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RFIPOIL", timeStepIdx ); + const std::vector rfipGas = loadData( resultsData, RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RFIPGAS", timeStepIdx ); + + RigEclipseResultAddress clusterAddress( RiaDefines::ResultCatType::GENERATED, clusterResultName ); + resultsData->ensureKnownResultLoaded( clusterAddress ); + const std::vector& clusterIds = resultsData->cellScalarResults( clusterAddress, 0 ); + + std::vector> permeabilityCalculators( numClustersFound ); + std::vector> pressureCalculators( numClustersFound ); + + for ( size_t idx = 0; idx < clusterIds.size(); idx++ ) + { + if ( !std::isinf( clusterIds[idx] ) && static_cast( clusterIds[idx] ) > 0 ) + { + size_t i = clusterIds[idx] - 1; + if ( i < static_cast( numClustersFound ) ) + { + statistics[i].id = clusterIds[idx]; + statistics[i].numCells++; + if ( idx < porvSoil.size() ) statistics[i].totalPorvSoil += porvSoil[idx]; + if ( idx < porvSgas.size() ) statistics[i].totalPorvSgas += porvSgas[idx]; + if ( idx < porvSoilAndSgas.size() ) statistics[i].totalPorvSoilAndSgas += porvSoilAndSgas[idx]; + + if ( idx < fipOil.size() ) statistics[i].totalFipOil += fipOil[idx]; + if ( idx < fipGas.size() ) statistics[i].totalFipGas += fipGas[idx]; + + if ( idx < rfipOil.size() ) statistics[i].totalRfipOil += rfipOil[idx]; + if ( idx < rfipGas.size() ) statistics[i].totalRfipGas += rfipGas[idx]; + + if ( idx < sfipOil.size() ) statistics[i].totalSfipOil += sfipOil[idx]; + if ( idx < sfipGas.size() ) statistics[i].totalSfipGas += sfipGas[idx]; + + permeabilityCalculators[i].addValueAndWeight( permeabilityX[idx], porv[idx] ); + + pressureCalculators[i].addValueAndWeight( pressure[idx], porv[idx] ); + } + } + } + + for ( int i = 0; i < numClustersFound; i++ ) + { + statistics[i].permeability = permeabilityCalculators[i].weightedMean(); + statistics[i].pressure = pressureCalculators[i].weightedMean(); + + // Invalidate results for empty vectors + if ( porvSoil.empty() ) statistics[i].totalPorvSoil = std::numeric_limits::infinity(); + if ( porvSgas.empty() ) statistics[i].totalPorvSgas = std::numeric_limits::infinity(); + if ( porvSoilAndSgas.empty() ) statistics[i].totalPorvSoilAndSgas = std::numeric_limits::infinity(); + if ( fipOil.empty() ) statistics[i].totalFipOil = std::numeric_limits::infinity(); + if ( fipGas.empty() ) statistics[i].totalFipGas = std::numeric_limits::infinity(); + if ( rfipOil.empty() ) statistics[i].totalRfipOil = std::numeric_limits::infinity(); + if ( rfipGas.empty() ) statistics[i].totalRfipGas = std::numeric_limits::infinity(); + if ( sfipOil.empty() ) statistics[i].totalSfipOil = std::numeric_limits::infinity(); + if ( sfipGas.empty() ) statistics[i].totalSfipGas = std::numeric_limits::infinity(); + } + + return statistics; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimRegularGridCase* RigWellTargetMapping::generateEnsembleCandidates( RimEclipseCaseEnsemble& ensemble, + size_t timeStepIdx, + const cvf::Vec3st& resultGridCellCount, + VolumeType volumeType, + VolumesType volumesType, + VolumeResultType volumeResultType, + const RigFloodingSettings& floodingSettings, + const ClusteringLimits& limits ) +{ + RiaLogging::debug( "Generating ensemble statistics" ); + + caf::ProgressInfo progInfo( ensemble.cases().size() * 2, "Generating ensemble statistics" ); + + for ( auto eclipseCase : ensemble.cases() ) + { + auto task = progInfo.task( "Generating realization statistics.", 1 ); + + generateCandidates( eclipseCase, timeStepIdx, volumeType, volumesType, volumeResultType, floodingSettings, limits, false ); + } + + cvf::BoundingBox boundingBox; + for ( auto eclipseCase : ensemble.cases() ) + { + cvf::BoundingBox bb = computeBoundingBoxForResult( *eclipseCase, RigWellTargetMapping::wellTargetResultName(), 0 ); + boundingBox.add( bb ); + } + + RiaLogging::debug( + QString( "Clusters bounding box min: [%1 %2 %3]" ).arg( boundingBox.min().x() ).arg( boundingBox.min().y() ).arg( boundingBox.min().z() ) ); + RiaLogging::debug( + QString( "Clusters bounding box max: [%1 %2 %3]" ).arg( boundingBox.max().x() ).arg( boundingBox.max().y() ).arg( boundingBox.max().z() ) ); + + RimRegularGridCase* targetCase = new RimRegularGridCase; + targetCase->setBoundingBox( boundingBox ); + targetCase->setCellCount( resultGridCellCount ); + targetCase->createModel(); + + std::vector occurrence; + + std::map>> resultNamesAndSamples; + resultNamesAndSamples["TOTAL_PORV_SOIL"] = {}; + resultNamesAndSamples["TOTAL_PORV_SGAS"] = {}; + resultNamesAndSamples["TOTAL_PORV_SOIL_SGAS"] = {}; + resultNamesAndSamples["TOTAL_FIPOIL"] = {}; + resultNamesAndSamples["TOTAL_FIPGAS"] = {}; + resultNamesAndSamples["TOTAL_RFIPOIL"] = {}; + resultNamesAndSamples["TOTAL_RFIPGAS"] = {}; + resultNamesAndSamples["TOTAL_SFIPOIL"] = {}; + resultNamesAndSamples["TOTAL_SFIPGAS"] = {}; + + for ( auto eclipseCase : ensemble.cases() ) + { + auto task = progInfo.task( "Accumulating results.", 1 ); + + accumulateResultsForSingleCase( *eclipseCase, *targetCase, resultNamesAndSamples, occurrence ); + } + + auto createFractionVector = []( const std::vector& occurrence, int maxRealizationCount ) -> std::vector + { + std::vector fractions( occurrence.size() ); + std::transform( occurrence.begin(), + occurrence.end(), + fractions.begin(), + [maxRealizationCount]( int value ) { return static_cast( value ) / maxRealizationCount; } ); + + return fractions; + }; + + createResultVector( *targetCase, "OCCURRENCE", occurrence ); + std::vector probability = createFractionVector( occurrence, static_cast( ensemble.cases().size() ) ); + createResultVector( *targetCase, "PROBABILITY", probability ); + + for ( auto [resultName, vec] : resultNamesAndSamples ) + { + computeStatisticsAndCreateVectors( *targetCase, resultName, vec ); + } + + return targetCase; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::computeStatisticsAndCreateVectors( RimEclipseCase& targetCase, + const QString& resultName, + const std::vector>& vec ) +{ + const RigCaseCellResultsData* targetResultsData = targetCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !targetResultsData ) return; + + const RigActiveCellInfo* targetActiveCellInfo = targetResultsData->activeCellInfo(); + if ( !targetActiveCellInfo ) return; + + const size_t targetNumActiveCells = targetActiveCellInfo->reservoirActiveCellCount(); + + int nCells = static_cast( targetNumActiveCells ); + std::vector p10Results( nCells, std::numeric_limits::infinity() ); + std::vector p50Results( nCells, std::numeric_limits::infinity() ); + std::vector p90Results( nCells, std::numeric_limits::infinity() ); + std::vector meanResults( nCells, std::numeric_limits::infinity() ); + std::vector minResults( nCells, std::numeric_limits::infinity() ); + std::vector maxResults( nCells, std::numeric_limits::infinity() ); + +#pragma omp parallel for + for ( int i = 0; i < nCells; i++ ) + { + size_t numSamples = vec.size(); + std::vector samples( numSamples, 0.0 ); + for ( size_t s = 0; s < numSamples; s++ ) + samples[s] = vec[s][i]; + + double p10, p50, p90, mean; + RigStatisticsMath::calculateStatisticsCurves( samples, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED ); + + if ( RiaStatisticsTools::isValidNumber( p10 ) ) p10Results[i] = p10; + if ( RiaStatisticsTools::isValidNumber( p50 ) ) p50Results[i] = p50; + if ( RiaStatisticsTools::isValidNumber( p90 ) ) p90Results[i] = p90; + if ( RiaStatisticsTools::isValidNumber( mean ) ) meanResults[i] = mean; + + double minValue = RiaStatisticsTools::minimumValue( samples ); + if ( RiaStatisticsTools::isValidNumber( minValue ) && minValue < std::numeric_limits::max() ) minResults[i] = minValue; + + double maxValue = RiaStatisticsTools::maximumValue( samples ); + if ( RiaStatisticsTools::isValidNumber( maxValue ) && maxValue > -std::numeric_limits::max() ) maxResults[i] = maxValue; + } + + createResultVectorIfDefined( targetCase, resultName + "_P10", p10Results ); + createResultVectorIfDefined( targetCase, resultName + "_P50", p50Results ); + createResultVectorIfDefined( targetCase, resultName + "_P90", p90Results ); + createResultVectorIfDefined( targetCase, resultName + "_MEAN", meanResults ); + createResultVectorIfDefined( targetCase, resultName + "_MIN", minResults ); + createResultVectorIfDefined( targetCase, resultName + "_MAX", maxResults ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RigWellTargetMapping::accumulateResultsForSingleCase( RimEclipseCase& eclipseCase, + RimEclipseCase& targetCase, + std::map>>& resultNamesAndSamples, + std::vector& occupancy ) +{ + RigCaseCellResultsData* resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + if ( !resultsData ) return; + const RigMainGrid* mainGrid = eclipseCase.mainGrid(); + if ( !mainGrid ) return; + const RigActiveCellInfo* activeCellInfo = resultsData->activeCellInfo(); + if ( !activeCellInfo ) return; + + const RigCaseCellResultsData* targetResultsData = targetCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + + const RigActiveCellInfo* targetActiveCellInfo = targetResultsData->activeCellInfo(); + + const size_t targetNumReservoirCells = targetActiveCellInfo->reservoirCellCount(); + const size_t targetNumActiveCells = targetActiveCellInfo->reservoirActiveCellCount(); + + occupancy.resize( targetNumActiveCells, 0 ); + + RigEclipseResultAddress clustersNumAddress( RiaDefines::ResultCatType::GENERATED, RigWellTargetMapping::wellTargetResultName() ); + resultsData->ensureKnownResultLoaded( clustersNumAddress ); + const std::vector& clusterNum = resultsData->cellScalarResults( clustersNumAddress, 0 ); + + std::map*> namedInputVector; + + for ( const auto& [resultName, vec] : resultNamesAndSamples ) + { + RigEclipseResultAddress resultAddress( RiaDefines::ResultCatType::GENERATED, resultName ); + resultsData->ensureKnownResultLoaded( resultAddress ); + const std::vector& resultVector = resultsData->cellScalarResults( resultAddress, 0 ); + namedInputVector[resultName] = &resultVector; + } + + std::map> namedOutputVector; + for ( const auto& [resultName, vec] : resultNamesAndSamples ) + { + namedOutputVector[resultName] = std::vector( targetNumActiveCells, std::numeric_limits::infinity() ); + } + + for ( size_t targetCellIdx = 0; targetCellIdx < targetNumReservoirCells; targetCellIdx++ ) + { + const RigCell& nativeCell = targetCase.mainGrid()->cell( targetCellIdx ); + cvf::Vec3d cellCenter = nativeCell.center(); + + size_t targetResultIndex = targetActiveCellInfo->cellResultIndex( targetCellIdx ); + + size_t cellIdx = mainGrid->findReservoirCellIndexFromPoint( cellCenter ); + if ( cellIdx != cvf::UNDEFINED_SIZE_T && activeCellInfo->isActive( cellIdx ) && targetResultIndex != cvf::UNDEFINED_SIZE_T ) + { + size_t resultIndex = resultsData->activeCellInfo()->cellResultIndex( cellIdx ); + if ( !std::isinf( clusterNum[resultIndex] ) && clusterNum[resultIndex] > 0 ) + { + occupancy[targetResultIndex]++; + for ( const auto& [resultName, vec] : resultNamesAndSamples ) + { + namedOutputVector[resultName][targetResultIndex] = namedInputVector[resultName]->at( resultIndex ); + } + } + } + } + + for ( const auto& [resultName, vec] : resultNamesAndSamples ) + { + resultNamesAndSamples[resultName].push_back( namedOutputVector[resultName] ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +cvf::BoundingBox RigWellTargetMapping::computeBoundingBoxForResult( RimEclipseCase& eclipseCase, const QString& resultName, size_t timeStepIndex ) +{ + RigCaseCellResultsData* resultsData = eclipseCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL ); + const RigMainGrid* mainGrid = eclipseCase.mainGrid(); + const RigActiveCellInfo* activeCellInfo = resultsData->activeCellInfo(); + const size_t numReservoirCells = activeCellInfo->reservoirCellCount(); + + RigEclipseResultAddress clustersNumAddress( RiaDefines::ResultCatType::GENERATED, resultName ); + resultsData->ensureKnownResultLoaded( clustersNumAddress ); + const std::vector& clusterNum = resultsData->cellScalarResults( clustersNumAddress, timeStepIndex ); + + cvf::BoundingBox boundingBox; + for ( size_t reservoirCellIndex = 0; reservoirCellIndex < numReservoirCells; reservoirCellIndex++ ) + { + size_t targetResultIndex = activeCellInfo->cellResultIndex( reservoirCellIndex ); + if ( reservoirCellIndex != cvf::UNDEFINED_SIZE_T && activeCellInfo->isActive( reservoirCellIndex ) && + targetResultIndex != cvf::UNDEFINED_SIZE_T && !std::isinf( clusterNum[targetResultIndex] ) && clusterNum[targetResultIndex] > 0 ) + { + const RigCell& nativeCell = mainGrid->cell( reservoirCellIndex ); + boundingBox.add( nativeCell.boundingBox() ); + } + } + + return boundingBox; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::list, size_t>> + RigWellTargetMapping::nncConnectionCellAndResult( size_t cellIdx, RigMainGrid* mainGrid ) +{ + std::list, size_t>> foundCells; + + if ( mainGrid->nncData() == nullptr ) return foundCells; + + auto& connections = mainGrid->nncData()->allConnections(); + for ( size_t i = 0; i < connections.size(); i++ ) + { + if ( connections[i].c1GlobIdx() == cellIdx ) + { + foundCells.push_back( std::make_pair( std::make_pair( connections[i].c2GlobIdx(), connections[i].face() ), i ) ); + } + } + + return foundCells; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RigWellTargetMapping::wellTargetResultName() +{ + return "WELL_TARGET_NUM"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool RigWellTargetMapping::isSaturationSufficient( const VolumeType volumeType, const DataContainer& data, const ClusteringLimits& limits, size_t idx ) +{ + bool needsValidOil = volumeType == VolumeType::OIL || volumeType == VolumeType::HYDROCARBON; + bool needsValidGas = volumeType == VolumeType::GAS || volumeType == VolumeType::HYDROCARBON; + // For hydrocarbon it is enough that one of the saturations is above the limit. + if ( needsValidOil && data.saturationOil[idx] >= limits.saturationOil ) return true; + if ( needsValidGas && data.saturationGas[idx] >= limits.saturationGas ) return true; + return false; +} diff --git a/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h new file mode 100644 index 0000000000..12899abddb --- /dev/null +++ b/ApplicationLibCode/ReservoirDataModel/Well/RigWellTargetMapping.h @@ -0,0 +1,256 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cafVecIjk.h" + +#include "cvfBoundingBox.h" +#include "cvfStructGrid.h" + +#include "RigEclipseResultAddress.h" + +#include +#include +#include +#include + +class RigActiveCellInfo; +class RigCaseCellResultsData; +class RigMainGrid; +class RimEclipseCase; +class RimEclipseCaseEnsemble; +class RimRegularGridCase; +class RigFloodingSettings; + +//================================================================================================== +/// +/// +//================================================================================================== +class RigWellTargetMapping +{ +public: + using CellFaceType = cvf::StructGridInterface::FaceType; + + enum class VolumeType + { + OIL, + GAS, + HYDROCARBON + }; + + enum class VolumeResultType + { + MOBILE, + TOTAL + }; + + enum class VolumesType + { + RESERVOIR_VOLUMES, + SURFACE_VOLUMES_SFIP, + SURFACE_VOLUMES_FIP, + RESERVOIR_VOLUMES_COMPUTED + }; + + struct ClusteringLimits + { + double saturationOil; + double saturationGas; + double permeability; + double pressure; + double transmissibility; + int maxNumTargets; + int maxIterations; + RigEclipseResultAddress filterAddress; + std::vector filter; + }; + + struct DataContainer + { + std::vector volume; + std::vector saturationOil; + std::vector saturationGas; + std::vector pressure; + std::vector permeabilityX; + std::vector permeabilityNNC; + std::vector transmissibilityX; + std::vector transmissibilityY; + std::vector transmissibilityZ; + const std::vector* transmissibilityNNC; + }; + + static void generateCandidates( RimEclipseCase* eclipseCase, + size_t timeStepIdx, + VolumeType volumeType, + VolumesType volumesType, + VolumeResultType volumeResultType, + const RigFloodingSettings& floodingSettings, + const ClusteringLimits& limits, + bool skipUndefinedResults ); + + static std::vector getVolumeVector( RigCaseCellResultsData& resultsData, + RiaDefines::EclipseUnitSystem unitsType, + VolumeType volumeType, + VolumesType volumesType, + VolumeResultType volumeResultType, + size_t timeStepIdx, + const RigFloodingSettings& floodingSettings ); + + static RimRegularGridCase* generateEnsembleCandidates( RimEclipseCaseEnsemble& ensemble, + size_t timeStepIdx, + const cvf::Vec3st& resultGridCellCount, + VolumeType volumeType, + VolumesType volumesType, + VolumeResultType volumeResultType, + const RigFloodingSettings& floodingSettings, + const ClusteringLimits& limits ); + + static QString wellTargetResultName(); + + class ClusterStatistics + { + public: + ClusterStatistics() + : id( -1 ) + , numCells( 0 ) + , totalPorvSoil( 0.0 ) + , totalPorvSgas( 0.0 ) + , totalPorvSoilAndSgas( 0.0 ) + , totalFipOil( 0.0 ) + , totalFipGas( 0.0 ) + , totalRfipOil( 0.0 ) + , totalRfipGas( 0.0 ) + , totalSfipOil( 0.0 ) + , totalSfipGas( 0.0 ) + , permeability( 0.0 ) + , pressure( 0.0 ) + { + } + + int id; + size_t numCells; + double totalPorvSoil; + double totalPorvSgas; + double totalPorvSoilAndSgas; + double totalFipOil; + double totalFipGas; + double totalRfipOil; + double totalRfipGas; + double totalSfipOil; + double totalSfipGas; + double permeability; + double pressure; + }; + +private: + static std::optional findStartCell( RimEclipseCase* eclipseCase, + size_t timeStepIdx, + const VolumeType volumeType, + const ClusteringLimits& limits, + const DataContainer& data, + const std::vector& filterVector, + const std::vector& clusters ); + + static void growCluster( RimEclipseCase* eclipseCase, + const caf::VecIjk& startCell, + const VolumeType volumeType, + const ClusteringLimits& limits, + const DataContainer& data, + const std::vector& filterVector, + std::vector& clusters, + int clusterId, + size_t timeStepIdx, + int maxIterations ); + + static std::vector findCandidates( RimEclipseCase* eclipseCase, + const std::vector& previousCells, + const VolumeType volumeType, + const ClusteringLimits& limits, + const DataContainer& data, + const std::vector& filterVector, + std::vector& clusters ); + + static void assignClusterIdToCells( const RigActiveCellInfo& activeCellInfo, + const std::vector& cells, + std::vector& clusters, + int clusterId ); + + static std::optional getActiveCellCount( RimEclipseCase* eclipseCase ); + + static void createResultVector( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& clusterIds ); + + static void createResultVector( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& values ); + + static void createResultVector( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& clusterIds, double value ); + + static void createResultVectorIfDefined( RimEclipseCase& eclipseCase, const QString& resultName, const std::vector& values ); + + static double getValueForFace( const std::vector& x, + const std::vector& y, + const std::vector& z, + CellFaceType face, + size_t resultIndex ); + + static double getTransmissibilityValueForFace( const std::vector& x, + const std::vector& y, + const std::vector& z, + CellFaceType face, + size_t resultIndex, + size_t neighborResultIndex ); + + static std::vector generateStatistics( RimEclipseCase* eclipseCase, + const std::vector& pressure, + const std::vector& permeabilityX, + int numClustersFound, + size_t timeStepIdx, + const QString& clusterResultName ); + + static void computeStatisticsAndCreateVectors( RimEclipseCase& targetCase, + const QString& resultName, + const std::vector>& vec ); + + static void accumulateResultsForSingleCase( RimEclipseCase& eclipseCase, + RimEclipseCase& targetCase, + std::map>>& resultNamesAndSamples, + std::vector& occupancy ); + + static cvf::BoundingBox computeBoundingBoxForResult( RimEclipseCase& eclipseCase, const QString& resultName, size_t timeStepIndex ); + + static std::list, size_t>> nncConnectionCellAndResult( size_t cellIdx, RigMainGrid* mainGrid ); + + static std::vector loadVectorByName( RigCaseCellResultsData& resultsData, const QString& resultName, size_t timeStepIdx ); + + static std::vector loadOilVectorByName( RigCaseCellResultsData& resultsData, + VolumesType volumesType, + VolumeResultType volumeResultType, + size_t timeStepIdx, + const RigFloodingSettings& floodingSettings ); + + static std::vector loadGasVectorByName( RigCaseCellResultsData& resultsData, + RiaDefines::EclipseUnitSystem unitsType, + VolumesType volumesType, + VolumeResultType volumeResultType, + size_t timeStepIdx, + const RigFloodingSettings& floodingSettings ); + + static QString getOilVectorName( VolumesType volumesType ); + static QString getGasVectorName( VolumesType volumesType ); + + static bool isSaturationSufficient( const VolumeType volumeType, const DataContainer& data, const ClusteringLimits& limits, size_t idx ); +}; diff --git a/ApplicationLibCode/ReservoirDataModel/cvfGeometryTools.h b/ApplicationLibCode/ReservoirDataModel/cvfGeometryTools.h index 4bd5945c94..c00bc417a5 100644 --- a/ApplicationLibCode/ReservoirDataModel/cvfGeometryTools.h +++ b/ApplicationLibCode/ReservoirDataModel/cvfGeometryTools.h @@ -41,7 +41,8 @@ public: static Vec3Type computePolygonCenter( const std::vector& polygon ); static cvf::Mat3f computePlaneHorizontalRotationMx( const cvf::Vec3f& inPlaneVec0, const cvf::Vec3f& inPlaneVec1 ); - static cvf::Vec3d projectPointOnLine( const cvf::Vec3d& p1, const cvf::Vec3d& p2, const cvf::Vec3d& p3, double* normalizedIntersection ); + static cvf::Vec3d + projectPointOnLine( const cvf::Vec3d& p1, const cvf::Vec3d& p2, const cvf::Vec3d& p3, double* normalizedIntersection = nullptr ); static double linePointSquareDist( const cvf::Vec3d& p1, const cvf::Vec3d& p2, const cvf::Vec3d& p3 ); static int intersectLineSegmentTriangle( const cvf::Vec3d& p0, diff --git a/ApplicationLibCode/ResultStatisticsCache/CMakeLists.txt b/ApplicationLibCode/ResultStatisticsCache/CMakeLists.txt index 7d8c5acd3d..121aae877b 100644 --- a/ApplicationLibCode/ResultStatisticsCache/CMakeLists.txt +++ b/ApplicationLibCode/ResultStatisticsCache/CMakeLists.txt @@ -10,5 +10,3 @@ add_library( target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(${PROJECT_NAME} LibCore ApplicationLibCode) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/ApplicationLibCode/SocketInterface/CMakeLists_files.cmake b/ApplicationLibCode/SocketInterface/CMakeLists_files.cmake index 9c8472dbef..d72937b47d 100644 --- a/ApplicationLibCode/SocketInterface/CMakeLists_files.cmake +++ b/ApplicationLibCode/SocketInterface/CMakeLists_files.cmake @@ -15,11 +15,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -source_group( - "SocketInterface" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/UnitTests/CMakeLists.txt b/ApplicationLibCode/UnitTests/CMakeLists.txt index eeaf6cd846..76c7b40880 100644 --- a/ApplicationLibCode/UnitTests/CMakeLists.txt +++ b/ApplicationLibCode/UnitTests/CMakeLists.txt @@ -106,6 +106,8 @@ set(SOURCE_UNITTEST_FILES ${CMAKE_CURRENT_LIST_DIR}/RifOsduWellPathReader-Test.cpp ${CMAKE_CURRENT_LIST_DIR}/RigVfpTables-Test.cpp ${CMAKE_CURRENT_LIST_DIR}/RiaResultName-Test.cpp + ${CMAKE_CURRENT_LIST_DIR}/RigPolygonTools-Test.cpp + ${CMAKE_CURRENT_LIST_DIR}/RifVtkSurfaceImporter-Test.cpp ) if(RESINSIGHT_ENABLE_GRPC) diff --git a/ApplicationLibCode/UnitTests/Intersect-Test.cpp b/ApplicationLibCode/UnitTests/Intersect-Test.cpp index db1df36185..8f730c480f 100644 --- a/ApplicationLibCode/UnitTests/Intersect-Test.cpp +++ b/ApplicationLibCode/UnitTests/Intersect-Test.cpp @@ -1,5 +1,7 @@ #include "gtest/gtest.h" +#include "RiaResultNames.h" + #include "RifEclipseOutputFileTools.h" #include @@ -16,7 +18,7 @@ TEST( IntersectDataImport, DISABLED_TestImportPORV ) QString baseFolder = "d:/Models/Statoil/IX_output_files/"; QString filename = baseFolder + "NORNE_IX2.INIT"; - std::string porv_kw( "PORV" ); + std::string porv_kw( RiaResultNames::porv().toStdString() ); ecl_file_type* ecl_file = ecl_file_open( filename.toStdString().data(), ECL_FILE_CLOSE_STREAM ); diff --git a/ApplicationLibCode/UnitTests/ObservedDataParser-Test.cpp b/ApplicationLibCode/UnitTests/ObservedDataParser-Test.cpp index a9ade93783..792b649b70 100644 --- a/ApplicationLibCode/UnitTests/ObservedDataParser-Test.cpp +++ b/ApplicationLibCode/UnitTests/ObservedDataParser-Test.cpp @@ -1061,7 +1061,7 @@ TEST( RifKeywordBasedRsmspecParserTest, TestAddressCreation ) RifEclipseSummaryAddress address = RifEclipseUserDataKeywordTools::makeAndFillAddress( quantityName, headerColumn ); EXPECT_TRUE( address.isValid() ); - EXPECT_EQ( address.category(), RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR ); + EXPECT_EQ( address.category(), RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR ); EXPECT_EQ( address.uiText(), "LCABC:lgrName:wellName:12,14,16" ); } diff --git a/ApplicationLibCode/UnitTests/RiaEnsembleNameTools-Test.cpp b/ApplicationLibCode/UnitTests/RiaEnsembleNameTools-Test.cpp index c544593c9f..a1d899a736 100644 --- a/ApplicationLibCode/UnitTests/RiaEnsembleNameTools-Test.cpp +++ b/ApplicationLibCode/UnitTests/RiaEnsembleNameTools-Test.cpp @@ -32,3 +32,94 @@ TEST( RiaEnsembleNameToolsTests, commonBaseName ) ASSERT_EQ( "data_vs_time", RiaEnsembleNameTools::findCommonBaseName( fileNames ).toStdString() ); } + +//-------------------------------------------------------------------------------------------------- +TEST( RiaFilePathTools, EnsembleName ) +{ + { + QString testPath1( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-0/iter-3/eclipse/model/DROGON-0.SMSPEC" ); + QString testPath2( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-1/iter-3/eclipse/model/DROGON-1.SMSPEC" ); + QStringList allPaths = { testPath1, testPath2 }; + + auto ensembleName = RiaEnsembleNameTools::findSuitableEnsembleName( allPaths, RiaDefines::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); + + EXPECT_EQ( QString( "iter-3" ), ensembleName ); + } +} + +//-------------------------------------------------------------------------------------------------- +TEST( RiaFilePathTools, RealizationName ) +{ + { + QString testPath0( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-0/iter-3/eclipse/model/DROGON-0.SMSPEC" ); + QString testPath1( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-1/iter-3/eclipse/model/DROGON-1.SMSPEC" ); + QStringList allPaths = { testPath0, testPath1 }; + + QString fileName = "DROGON-0.SMSPEC"; + + auto name = RiaEnsembleNameTools::uniqueShortName( testPath1, allPaths, fileName ); + + EXPECT_EQ( QString( "real-1" ), name ); + } +} + +//-------------------------------------------------------------------------------------------------- +TEST( RiaFilePathTools, EnsembleGroupingMultipleEnsembles ) +{ + { + std::vector filepaths = { "f:/Models/scratch/project_a/realization-0/iter-0/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/project_a/realization-1/iter-0/eclipse/model/PROJECT-1.SMSPEC", + "f:/Models/scratch/project_a/realization-22/iter-0/eclipse/model/PROJECT-22.SMSPEC", + "f:/Models/scratch/project_b/realization-0/iter-0/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/project_b/realization-1/iter-0/eclipse/model/PROJECT-1.SMSPEC", + "f:/Models/scratch/project_b/realization-2/iter-0/eclipse/model/PROJECT-2.SMSPEC", + "f:/Models/scratch/project_c/realization-0/iter-0/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/project_c/realization-1/iter-0/eclipse/model/PROJECT-1.SMSPEC", + "f:/Models/scratch/project_c/realization-2/iter-0/eclipse/model/PROJECT-2.SMSPEC", + "f:/Models/scratch/project_c/realization-0/iter-1/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/project_c/realization-1\\iter-1/eclipse/model\\PROJECT-1.SMSPEC", + "f:/Models/scratch/project_c/realization-\\iter-1/eclipse/model\\PROJECT-2.SMSPEC" }; + + auto grouping = RiaEnsembleNameTools::groupFilePathsFmu( filepaths ); + + std::set keys1 = { "project_a", "project_b", "project_c" }; + std::set keys2 = { "iter-0", "iter-1" }; + + EXPECT_EQ( 4, grouping.size() ); + for ( const auto& [keys, paths] : grouping ) + { + const auto& [key1, key2] = keys; + EXPECT_TRUE( keys1.find( key1 ) != keys1.end() ); + EXPECT_TRUE( keys2.find( key2 ) != keys2.end() ); + } + } +} + +//-------------------------------------------------------------------------------------------------- +TEST( RiaFilePathTools, EnsembleGroupingEverest ) +{ + { + std::vector filepaths = { + "f:/Models/scratch/my_case/batch_0/geo_realization_0/simulation_0/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_0/geo_realization_1/simulation_1/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_0/geo_realization_2/simulation_2/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_0/geo_realization_2/simulation_2/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_1/geo_realization_0/simulation_0/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_1/geo_realization_1/simulation_1/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_1/geo_realization_2/simulation_2/eclipse/model/PROJECT-0.SMSPEC", + "f:/Models/scratch/my_case/batch_1/geo_realization_2/simulation_2/eclipse/model/PROJECT-0.SMSPEC", + }; + + auto grouping = RiaEnsembleNameTools::groupFilePathsEverest( filepaths ); + + std::set keys1 = { "my_case" }; + std::set keys2 = { "batch_0", "batch_1" }; + + for ( const auto& [keys, paths] : grouping ) + { + const auto& [key1, key2] = keys; + EXPECT_TRUE( keys1.find( key1 ) != keys1.end() ); + EXPECT_TRUE( keys2.find( key2 ) != keys2.end() ); + } + } +} diff --git a/ApplicationLibCode/UnitTests/RiaFilePathTools-Test.cpp b/ApplicationLibCode/UnitTests/RiaFilePathTools-Test.cpp index 96654aeb0b..a58664d449 100644 --- a/ApplicationLibCode/UnitTests/RiaFilePathTools-Test.cpp +++ b/ApplicationLibCode/UnitTests/RiaFilePathTools-Test.cpp @@ -1,6 +1,5 @@ #include "gtest/gtest.h" -#include "RiaEnsembleNameTools.h" #include "RiaFilePathTools.h" #include @@ -152,37 +151,6 @@ TEST( RiaFilePathTools, splitIntoComponets ) } } -//-------------------------------------------------------------------------------------------------- -TEST( RiaFilePathTools, EnsembleName ) -{ - { - QString testPath1( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-0/iter-3/eclipse/model/DROGON-0.SMSPEC" ); - QString testPath2( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-1/iter-3/eclipse/model/DROGON-1.SMSPEC" ); - QStringList allPaths = { testPath1, testPath2 }; - - auto ensembleName = - RiaEnsembleNameTools::findSuitableEnsembleName( allPaths, RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); - - EXPECT_EQ( QString( "iter-3" ), ensembleName ); - } -} - -//-------------------------------------------------------------------------------------------------- -TEST( RiaFilePathTools, RealizationName ) -{ - { - QString testPath0( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-0/iter-3/eclipse/model/DROGON-0.SMSPEC" ); - QString testPath1( "e:/models/from_equinor_sftp/drogon3d_ahm/realization-1/iter-3/eclipse/model/DROGON-1.SMSPEC" ); - QStringList allPaths = { testPath0, testPath1 }; - - QString fileName = "DROGON-0.SMSPEC"; - - auto name = RiaEnsembleNameTools::uniqueShortName( testPath1, allPaths, fileName ); - - EXPECT_EQ( QString( "real-1" ), name ); - } -} - //-------------------------------------------------------------------------------------------------- TEST( RiaFilePathTools, keyPathComponentsForEachFilePath ) { diff --git a/ApplicationLibCode/UnitTests/RiaStdStringTools-Test.cpp b/ApplicationLibCode/UnitTests/RiaStdStringTools-Test.cpp index da1435e10c..ca7ac91c56 100644 --- a/ApplicationLibCode/UnitTests/RiaStdStringTools-Test.cpp +++ b/ApplicationLibCode/UnitTests/RiaStdStringTools-Test.cpp @@ -231,6 +231,39 @@ TEST( RiaStdStringToolsTest, ValuesFromRangeSelectionMinMax ) ASSERT_EQ( expectedValues, actualValues ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +TEST( RiaStdStringToolsTest, ValuesWithStep ) +{ + { + std::string testString = "1, 4-10:2,13-15"; + std::set expectedValues = { 1, 4, 6, 8, 10, 13, 14, 15 }; + + auto actualValues = RiaStdStringTools::valuesFromRangeSelection( testString ); + + ASSERT_EQ( expectedValues, actualValues ); + } + + { + std::string testString = "4-6:invalid"; + std::set expectedValues = { 4, 5, 6 }; + + auto actualValues = RiaStdStringTools::valuesFromRangeSelection( testString ); + + ASSERT_EQ( expectedValues, actualValues ); + } + + { + std::string testString = "b-5"; + std::set expectedValues = {}; + + auto actualValues = RiaStdStringTools::valuesFromRangeSelection( testString ); + + ASSERT_EQ( expectedValues, actualValues ); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UnitTests/RiaSummaryAddressAnalyzer-Test.cpp b/ApplicationLibCode/UnitTests/RiaSummaryAddressAnalyzer-Test.cpp index e055072514..efa3e14377 100644 --- a/ApplicationLibCode/UnitTests/RiaSummaryAddressAnalyzer-Test.cpp +++ b/ApplicationLibCode/UnitTests/RiaSummaryAddressAnalyzer-Test.cpp @@ -12,30 +12,30 @@ TEST( RiaSummaryAddressAnalyzer, WellCompletions ) // Well A std::string wellNameA = "well_name_a"; { - RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellCompletionAddress( "quantity_name", wellNameA, 1, 2, 3 ); + RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellConnectionAddress( "quantity_name", wellNameA, 1, 2, 3 ); addresses.push_back( adr ); } { - RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellCompletionAddress( "quantity_name", wellNameA, 1, 2, 3 ); + RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellConnectionAddress( "quantity_name", wellNameA, 1, 2, 3 ); addresses.push_back( adr ); } { - RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellCompletionAddress( "quantity_name", wellNameA, 5, 2, 3 ); + RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellConnectionAddress( "quantity_name", wellNameA, 5, 2, 3 ); addresses.push_back( adr ); } // Well B std::string wellNameB = "well_name_b"; { - RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellCompletionAddress( "quantity_name", wellNameB, 5, 2, 3 ); + RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellConnectionAddress( "quantity_name", wellNameB, 5, 2, 3 ); addresses.push_back( adr ); } { - RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellCompletionAddress( "quantity_name", wellNameB, 5, 4, 3 ); + RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellConnectionAddress( "quantity_name", wellNameB, 5, 4, 3 ); addresses.push_back( adr ); } { - RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellCompletionAddress( "quantity_name", wellNameB, 5, 4, 30 ); + RifEclipseSummaryAddress adr = RifEclipseSummaryAddress::wellConnectionAddress( "quantity_name", wellNameB, 5, 4, 30 ); addresses.push_back( adr ); } @@ -44,13 +44,13 @@ TEST( RiaSummaryAddressAnalyzer, WellCompletions ) EXPECT_EQ( 2u, analyzer.wellNames().size() ); - auto completionsForA = analyzer.wellCompletions( wellNameA ); - EXPECT_EQ( 2u, completionsForA.size() ); + auto connectionsForA = analyzer.wellConnections( wellNameA ); + EXPECT_EQ( 2u, connectionsForA.size() ); - auto completionsForB = analyzer.wellCompletions( wellNameB ); - EXPECT_EQ( 3u, completionsForB.size() ); + auto connectionsForB = analyzer.wellConnections( wellNameB ); + EXPECT_EQ( 3u, connectionsForB.size() ); std::string tupleToFind = "5,4,30"; - EXPECT_TRUE( completionsForB.find( tupleToFind ) != completionsForB.end() ); + EXPECT_TRUE( connectionsForB.find( tupleToFind ) != connectionsForB.end() ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UnitTests/RifEclipseSummaryAddress-Test.cpp b/ApplicationLibCode/UnitTests/RifEclipseSummaryAddress-Test.cpp index 3d493779ae..efc08e1a58 100644 --- a/ApplicationLibCode/UnitTests/RifEclipseSummaryAddress-Test.cpp +++ b/ApplicationLibCode/UnitTests/RifEclipseSummaryAddress-Test.cpp @@ -126,19 +126,33 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Well ) EXPECT_FALSE( addr.isErrorResult() ); } +TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellConnection ) +{ + std::string addrString = "CPRL:B-1H:15,13,14"; + + RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString ); + + EXPECT_TRUE( addr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION, addr.category() ); + EXPECT_EQ( "CPRL", addr.vectorName() ); + EXPECT_EQ( "B-1H", addr.wellName() ); + EXPECT_EQ( 15, addr.cellI() ); + EXPECT_EQ( 13, addr.cellJ() ); + EXPECT_EQ( 14, addr.cellK() ); + EXPECT_FALSE( addr.isErrorResult() ); +} + TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellCompletion ) { - std::string addrString = "COFRL:B-1H:15,13,14"; + std::string addrString = "WGLRL:B-1H:15"; RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString ); EXPECT_TRUE( addr.isValid() ); EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION, addr.category() ); - EXPECT_EQ( "COFRL", addr.vectorName() ); + EXPECT_EQ( "WGLRL", addr.vectorName() ); EXPECT_EQ( "B-1H", addr.wellName() ); - EXPECT_EQ( 15, addr.cellI() ); - EXPECT_EQ( 13, addr.cellJ() ); - EXPECT_EQ( 14, addr.cellK() ); + EXPECT_EQ( 15, addr.wellCompletionNumber() ); EXPECT_FALSE( addr.isErrorResult() ); } @@ -163,7 +177,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellCompletionLgr RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString ); EXPECT_TRUE( addr.isValid() ); - EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR, addr.category() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR, addr.category() ); EXPECT_EQ( "LCGAS", addr.vectorName() ); EXPECT_EQ( "LGR1", addr.lgrName() ); EXPECT_EQ( "B-1H", addr.wellName() ); @@ -250,7 +264,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_ErrorResult2 ) RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString ); EXPECT_TRUE( addr.isValid() ); - EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR, addr.category() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR, addr.category() ); EXPECT_EQ( "LCGAS", addr.vectorName() ); EXPECT_EQ( "LGR1", addr.lgrName() ); EXPECT_EQ( "B-1H", addr.wellName() ); @@ -274,7 +288,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_ErrorResult3 ) TEST( RifEclipseSummaryAddressTest, TestEclipseAddressIjkParsing ) { - RifEclipseSummaryAddressDefines::SummaryCategory cat = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION; + RifEclipseSummaryAddressDefines::SummaryCategory cat = RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION; std::map identifiers( { { RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_WELL_NAME, "1-BH" }, { RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_CELL_IJK, "6, 7, 8" }, @@ -284,7 +298,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressIjkParsing ) RifEclipseSummaryAddress addr( cat, identifiers ); EXPECT_TRUE( addr.isValid() ); - EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION, addr.category() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION, addr.category() ); EXPECT_EQ( "WOPR", addr.vectorName() ); EXPECT_EQ( "1-BH", addr.wellName() ); EXPECT_EQ( 6, addr.cellI() ); @@ -392,3 +406,192 @@ TEST( RifEclipseSummaryAddressTest, LogicalOperators ) EXPECT_TRUE( addresses.at( 8 ) == block_c ); EXPECT_TRUE( addresses.at( 9 ) == block_d ); } + +TEST( RifEclipseSummaryAddressTest, ConversionFromTextToAddress ) +{ + // Aquifer + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "AAQR:456" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER, adr.category() ); + EXPECT_EQ( "AAQR", adr.vectorName() ); + EXPECT_EQ( 456, adr.aquiferNumber() ); + } + + // Unknown aquifer + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "AAQCEE:2" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER, adr.category() ); + EXPECT_EQ( "AAQCEE", adr.vectorName() ); + EXPECT_EQ( 2, adr.aquiferNumber() ); + } + + // Block + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "BPR:123,122,121" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK, adr.category() ); + EXPECT_EQ( "BPR", adr.vectorName() ); + EXPECT_EQ( 123, adr.cellI() ); + EXPECT_EQ( 122, adr.cellJ() ); + EXPECT_EQ( 121, adr.cellK() ); + } + + // Unknown block + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "BPGTEST:1,2,3" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK, adr.category() ); + EXPECT_EQ( "BPGTEST", adr.vectorName() ); + EXPECT_EQ( 1, adr.cellI() ); + EXPECT_EQ( 2, adr.cellJ() ); + EXPECT_EQ( 3, adr.cellK() ); + } + + // Well completion + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "WGLRL:B-1H:15" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION, adr.category() ); + EXPECT_EQ( "WGLRL", adr.vectorName() ); + EXPECT_EQ( "B-1H", adr.wellName() ); + EXPECT_EQ( 15, adr.wellCompletionNumber() ); + } + + // Unknown well completion + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "WGLRTESAT:B-1H:15" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION, adr.category() ); + EXPECT_EQ( "WGLRTESAT", adr.vectorName() ); + EXPECT_EQ( "B-1H", adr.wellName() ); + EXPECT_EQ( 15, adr.wellCompletionNumber() ); + } + + // Well connection + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "CPRL:B-1H:15,13,14" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION, adr.category() ); + EXPECT_EQ( "CPRL", adr.vectorName() ); + EXPECT_EQ( "B-1H", adr.wellName() ); + EXPECT_EQ( 15, adr.cellI() ); + EXPECT_EQ( 13, adr.cellJ() ); + EXPECT_EQ( 14, adr.cellK() ); + } + + // Unknown well connection + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "CAPIRSS:B-1H:15,13,22" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION, adr.category() ); + EXPECT_EQ( "CAPIRSS", adr.vectorName() ); + EXPECT_EQ( "B-1H", adr.wellName() ); + EXPECT_EQ( 15, adr.cellI() ); + EXPECT_EQ( 13, adr.cellJ() ); + EXPECT_EQ( 22, adr.cellK() ); + } + + // Field + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "FOPT" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_FIELD, adr.category() ); + EXPECT_EQ( "FOPT", adr.vectorName() ); + } + + // Unknown field + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "FOPCEE" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_FIELD, adr.category() ); + EXPECT_EQ( "FOPCEE", adr.vectorName() ); + } + + // Group + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "GOPR:WELLS1" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP, adr.category() ); + EXPECT_EQ( "GOPR", adr.vectorName() ); + EXPECT_EQ( "WELLS1", adr.groupName() ); + } + + // Unknown group + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "GOPRTEST:WELLS1" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP, adr.category() ); + EXPECT_EQ( "GOPRTEST", adr.vectorName() ); + EXPECT_EQ( "WELLS1", adr.groupName() ); + } + + // Region + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "RPR:7081" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION, adr.category() ); + EXPECT_EQ( "RPR", adr.vectorName() ); + EXPECT_EQ( 7081, adr.regionNumber() ); + } + + // Unknown region + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "RPRTEST:7081" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION, adr.category() ); + EXPECT_EQ( "RPRTEST", adr.vectorName() ); + EXPECT_EQ( 7081, adr.regionNumber() ); + } + + // Region to region + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "RGFT:7081-8001" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION_2_REGION, adr.category() ); + EXPECT_EQ( "RGFT", adr.vectorName() ); + EXPECT_EQ( 7081, adr.regionNumber() ); + EXPECT_EQ( 8001, adr.regionNumber2() ); + } + + // Unknown region to region is skipped, no general rule to identify region to region + + // Segment + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "SOFR:B-5H:32" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT, adr.category() ); + EXPECT_EQ( "SOFR", adr.vectorName() ); + EXPECT_EQ( "B-5H", adr.wellName() ); + EXPECT_EQ( 32, adr.wellSegmentNumber() ); + } + + // Unknown segment + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "SOFRTEST:B-5H:32" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT, adr.category() ); + EXPECT_EQ( "SOFRTEST", adr.vectorName() ); + EXPECT_EQ( "B-5H", adr.wellName() ); + EXPECT_EQ( 32, adr.wellSegmentNumber() ); + } + + // Well + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "WOPR:B-2H" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL, adr.category() ); + EXPECT_EQ( "WOPR", adr.vectorName() ); + EXPECT_EQ( "B-2H", adr.wellName() ); + } + + // Unknown well + { + auto adr = RifEclipseSummaryAddress::fromEclipseTextAddress( "WOPRTEST:B-2H" ); + EXPECT_TRUE( adr.isValid() ); + EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL, adr.category() ); + EXPECT_EQ( "WOPRTEST", adr.vectorName() ); + EXPECT_EQ( "B-2H", adr.wellName() ); + } +} diff --git a/ApplicationLibCode/UnitTests/RifSurfaceImporter-Test.cpp b/ApplicationLibCode/UnitTests/RifSurfaceImporter-Test.cpp index 27b823d7f0..11d696e78c 100644 --- a/ApplicationLibCode/UnitTests/RifSurfaceImporter-Test.cpp +++ b/ApplicationLibCode/UnitTests/RifSurfaceImporter-Test.cpp @@ -3,7 +3,7 @@ #include "RifSurfaceImporter.h" #include "RiaTestDataDirectory.h" -#include "RigGocadData.h" +#include "RigTriangleMeshData.h" #include "QDir" #include @@ -17,10 +17,10 @@ TEST( RifSurfaceImporter, GocadReadValidFile ) QString filePath = baseFolder.absoluteFilePath( filename ); EXPECT_TRUE( QFile::exists( filePath ) ); - RigGocadData gocadData; - RifSurfaceImporter::readGocadFile( filePath, &gocadData ); + RigTriangleMeshData triangleMeshData; + RifSurfaceImporter::readGocadFile( filePath, &triangleMeshData ); - auto surface = gocadData.gocadGeometry(); + auto surface = triangleMeshData.geometry(); auto vertices = surface.first; auto indices = surface.second; @@ -39,10 +39,10 @@ TEST( RifSurfaceImporter, GocadReadWrongIndices ) QString filePath = baseFolder.absoluteFilePath( filename ); EXPECT_TRUE( QFile::exists( filePath ) ); - RigGocadData gocadData; - RifSurfaceImporter::readGocadFile( filePath, &gocadData ); + RigTriangleMeshData triangleMeshData; + RifSurfaceImporter::readGocadFile( filePath, &triangleMeshData ); - auto surface = gocadData.gocadGeometry(); + auto surface = triangleMeshData.geometry(); auto vertices = surface.first; auto indices = surface.second; @@ -58,19 +58,19 @@ TEST( RifSurfaceImporter, GocadReadProperties ) QString filePath = baseFolder.absoluteFilePath( filename ); EXPECT_TRUE( QFile::exists( filePath ) ); - RigGocadData gocadData; - RifSurfaceImporter::readGocadFile( filePath, &gocadData ); + RigTriangleMeshData triangleMeshData; + RifSurfaceImporter::readGocadFile( filePath, &triangleMeshData ); - auto surface = gocadData.gocadGeometry(); + auto surface = triangleMeshData.geometry(); auto vertices = surface.first; auto indices = surface.second; - std::vector propNames = gocadData.propertyNames(); + std::vector propNames = triangleMeshData.propertyNames(); EXPECT_TRUE( propNames.size() == 3 ); EXPECT_TRUE( propNames[0] == "SX" ); - std::vector propValues_SX = gocadData.propertyValues( propNames[0] ); + std::vector propValues_SX = triangleMeshData.propertyValues( propNames[0] ); float SX_first = propValues_SX[0]; float SX_second = propValues_SX[1]; @@ -80,7 +80,7 @@ TEST( RifSurfaceImporter, GocadReadProperties ) EXPECT_NEAR( 0.000972, SX_second, 1e-4 ); EXPECT_NEAR( 0.004293, SX_last, 1e-4 ); - std::vector propValues_SY = gocadData.propertyValues( "SY" ); + std::vector propValues_SY = triangleMeshData.propertyValues( "SY" ); float SY_first = propValues_SY[0]; float SY_second = propValues_SY[1]; @@ -99,11 +99,11 @@ TEST( RifSurfaceImporter, GocadReadNoProperty ) QString filePath = baseFolder.absoluteFilePath( filename ); EXPECT_TRUE( QFile::exists( filePath ) ); - RigGocadData gocadData; - RifSurfaceImporter::readGocadFile( filePath, &gocadData ); + RigTriangleMeshData triangleMeshData; + RifSurfaceImporter::readGocadFile( filePath, &triangleMeshData ); - std::vector propNames = gocadData.propertyNames(); - std::vector propValues = gocadData.propertyValues( "" ); + std::vector propNames = triangleMeshData.propertyNames(); + std::vector propValues = triangleMeshData.propertyValues( "" ); EXPECT_TRUE( propNames.empty() ); EXPECT_TRUE( propValues.empty() ); @@ -117,10 +117,10 @@ TEST( RifSurfaceImporter, GocadReadNonExistingProperty ) QString filePath = baseFolder.absoluteFilePath( filename ); EXPECT_TRUE( QFile::exists( filePath ) ); - RigGocadData gocadData; - RifSurfaceImporter::readGocadFile( filePath, &gocadData ); + RigTriangleMeshData triangleMeshData; + RifSurfaceImporter::readGocadFile( filePath, &triangleMeshData ); - std::vector propValues = gocadData.propertyValues( "NonExistingProperty" ); + std::vector propValues = triangleMeshData.propertyValues( "NonExistingProperty" ); EXPECT_TRUE( propValues.empty() ); } @@ -134,10 +134,10 @@ TEST( RifSurfaceImporter, ReadWrongFileType ) QString filePath = baseFolder.absoluteFilePath( filename ); EXPECT_TRUE( QFile::exists( filePath ) ); - RigGocadData gocadData; - RifSurfaceImporter::readGocadFile( filePath, &gocadData ); + RigTriangleMeshData triangleMeshData; + RifSurfaceImporter::readGocadFile( filePath, &triangleMeshData ); - auto surface = gocadData.gocadGeometry(); + auto surface = triangleMeshData.geometry(); auto vertices = surface.first; auto indices = surface.second; @@ -233,6 +233,34 @@ TEST( RifSurfaceImporter, ReadTinyOpenWorksXyzFile ) } } +TEST( RifSurfaceImporter, ReadTinyOpenWorksXyzFileTabs ) +{ + QDir baseFolder( TEST_DATA_DIR ); + + QString filename( "RifSurfaceImporter/tiny-test-tabs.dat" ); + QString filePath = baseFolder.absoluteFilePath( filename ); + EXPECT_TRUE( QFile::exists( filePath ) ); + + auto surface = RifSurfaceImporter::readOpenWorksXyzFile( filePath, 0.1 ); + + auto vertices = surface.first; + auto indices = surface.second; + + EXPECT_EQ( (size_t)15, vertices.size() ); + EXPECT_EQ( (size_t)24, indices.size() ); + + if ( !indices.empty() ) + { + EXPECT_EQ( (size_t)0, indices.front() ); + EXPECT_EQ( (size_t)11, indices.back() ); + + for ( size_t i = 0; i < indices.size(); i++ ) + { + EXPECT_TRUE( indices[i] != ( (unsigned)-1 ) ); + } + } +} + TEST( RifSurfaceImporter, ReadLargeOpenWorksXyzFile ) { QDir baseFolder( TEST_DATA_DIR ); diff --git a/ApplicationLibCode/UnitTests/RifVtkSurfaceImporter-Test.cpp b/ApplicationLibCode/UnitTests/RifVtkSurfaceImporter-Test.cpp new file mode 100644 index 0000000000..8c5ddd39a1 --- /dev/null +++ b/ApplicationLibCode/UnitTests/RifVtkSurfaceImporter-Test.cpp @@ -0,0 +1,148 @@ +#include "RifVtkSurfaceImporter.h" + +#include "RiaTestDataDirectory.h" + +#include "RigTriangleMeshData.h" + +#include + +#include +#include +#include + +// Test importing a VTU file +TEST( RifVtkSurfaceImporterTest, ImportFromFile ) +{ + // Setup + std::filesystem::path testDataDir = std::filesystem::path( TEST_DATA_DIR ) / "RifVtkSurfaceImporter"; + std::filesystem::path vtuFilePath = testDataDir / "fracture-00000.vtu"; + + // Exercise + auto triangleMeshData = RifVtkSurfaceImporter::importFromFile( vtuFilePath ); + + // Verify + ASSERT_NE( triangleMeshData, nullptr ) << "Failed to import VTU file"; + + // Check vertex count (based on the sample data) + // Each triangle has 3 vertices and the sample file has 24 triangles (cells) + const size_t expectedVertexCount = 24 * 3; + auto [triangleVertices, triangleIndices] = triangleMeshData->geometry(); + EXPECT_EQ( triangleVertices.size(), expectedVertexCount ); + + // Check connectivity size + EXPECT_EQ( triangleIndices.size(), expectedVertexCount ); + + // Check properties + auto propertyNames = triangleMeshData->propertyNames(); + std::vector expectedProperties = { "ReservoirCell", "ReservoirPerm", "ReservoirDist" }; + for ( const QString& expectedProperty : expectedProperties ) + { + EXPECT_TRUE( std::any_of( propertyNames.begin(), + propertyNames.end(), + [expectedProperty]( const QString& name ) { return name == expectedProperty; } ) ); + EXPECT_EQ( triangleMeshData->propertyValues( expectedProperty ).size(), expectedVertexCount ); + } +} + +// Test parsing a PVD file +TEST( RifVtkSurfaceImporterTest, ParsePvdDatasets ) +{ + // Setup + std::filesystem::path testDataDir = std::filesystem::path( TEST_DATA_DIR ) / "RifVtkSurfaceImporter"; + std::filesystem::path pvdFilePath = testDataDir / "dataset.pvd"; + + // Exercise + auto datasets = RifVtkSurfaceImporter::parsePvdDatasets( pvdFilePath ); + + // Verify + ASSERT_EQ( datasets.size(), 2 ) << "Expected 2 datasets in the PVD file"; + + // Check the first dataset + EXPECT_DOUBLE_EQ( datasets[0].timestep, 1234567.123 ); + EXPECT_EQ( datasets[0].filepath.filename(), "fracture-00000.vtu" ); + + // Check the second dataset + EXPECT_DOUBLE_EQ( datasets[1].timestep, 7654321.765 ); + EXPECT_EQ( datasets[1].filepath.filename(), "fracture-00001.vtu" ); + + // Check that file paths are absolute + EXPECT_TRUE( datasets[0].filepath.is_absolute() ); + EXPECT_TRUE( datasets[1].filepath.is_absolute() ); +} + +// Test importing multiple VTU files from PVD +TEST( RifVtkSurfaceImporterTest, ImportMultipleTimesteps ) +{ + // Setup + std::filesystem::path testDataDir = std::filesystem::path( TEST_DATA_DIR ) / "RifVtkSurfaceImporter"; + std::filesystem::path pvdFilePath = testDataDir / "dataset.pvd"; + + // Exercise + auto datasets = RifVtkSurfaceImporter::parsePvdDatasets( pvdFilePath ); + ASSERT_FALSE( datasets.empty() ) << "Failed to parse PVD datasets"; + + // Import each VTU file + std::map> expectedValues; + expectedValues["ReservoirPerm"] = { 1.2e-13, 2.2e-13 }; + expectedValues["ReservoirDist"] = { 10.0, 110.0 }; + expectedValues["ReservoirCell"] = { 83769, 73769 }; + + int index = 0; + for ( const auto& dataset : datasets ) + { + auto triangleMeshData = RifVtkSurfaceImporter::importFromFile( dataset.filepath ); + + // Verify + ASSERT_NE( triangleMeshData, nullptr ) << "Failed to import VTU file: " << dataset.filepath; + + for ( const auto& [name, values] : expectedValues ) + { + // Check if ReservoirPerm values differ between timesteps + auto propValues = triangleMeshData->propertyValues( name ); + EXPECT_NEAR( propValues[0], values[index], 1e-15 ); + } + + index++; + } +} + +// Test handling of invalid files +TEST( RifVtkSurfaceImporterTest, HandleInvalidFiles ) +{ + std::filesystem::path testDataDir = std::filesystem::path( TEST_DATA_DIR ) / "RifVtkSurfaceImporter"; + + // Test with non-existent file + std::filesystem::path nonExistentFile = testDataDir / "non_existent_file.vtu"; + auto result = RifVtkSurfaceImporter::importFromFile( nonExistentFile ); + EXPECT_EQ( result, nullptr ) << "Expected nullptr for non-existent file"; + + // Test with invalid PVD file + std::filesystem::path invalidPvdFile = testDataDir / "invalid.pvd"; + auto datasets = RifVtkSurfaceImporter::parsePvdDatasets( invalidPvdFile ); + EXPECT_TRUE( datasets.empty() ) << "Expected empty dataset list for invalid PVD file"; +} + +// Test file path resolution in PVD datasets +TEST( RifVtkSurfaceImporterTest, PvdPathResolution ) +{ + // Setup + std::filesystem::path testDataDir = std::filesystem::path( TEST_DATA_DIR ) / "RifVtkSurfaceImporter"; + std::filesystem::path pvdFilePath = testDataDir / "dataset.pvd"; + + // Exercise + auto datasets = RifVtkSurfaceImporter::parsePvdDatasets( pvdFilePath ); + ASSERT_FALSE( datasets.empty() ) << "Failed to parse PVD datasets"; + + // Verify + for ( const auto& dataset : datasets ) + { + // Check that file paths are absolute + EXPECT_TRUE( dataset.filepath.is_absolute() ); + + // Check that the resolved path is in the same directory as the PVD file + EXPECT_EQ( dataset.filepath.parent_path(), pvdFilePath.parent_path() ); + + // Check file existence + EXPECT_TRUE( std::filesystem::exists( dataset.filepath ) ) << "File does not exist: " << dataset.filepath; + } +} diff --git a/ApplicationLibCode/UnitTests/RigPolygonTools-Test.cpp b/ApplicationLibCode/UnitTests/RigPolygonTools-Test.cpp new file mode 100644 index 0000000000..2652d933ab --- /dev/null +++ b/ApplicationLibCode/UnitTests/RigPolygonTools-Test.cpp @@ -0,0 +1,173 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2020- 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RigPolygonTools.h" +#include "gtest/gtest.h" + +// Test for erode function +TEST( RigPolygonToolsTest, ErodeTest ) +{ + // Arrange + RigPolygonTools::IntegerImage image = { { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 } }; + int kernelSize = 1; + RigPolygonTools::IntegerImage expected = { { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 } }; + + // Act + RigPolygonTools::IntegerImage result = RigPolygonTools::erode( image, kernelSize ); + + // Assert + EXPECT_EQ( result, expected ); +} + +// Test for erode function with invalid input +TEST( RigPolygonToolsTest, ErodeInvalidInputTest ) +{ + // Arrange + RigPolygonTools::IntegerImage emptyImage = {}; + int negativeKernelSize = -1; + + // Act & Assert + EXPECT_EQ( emptyImage, RigPolygonTools::erode( emptyImage, 1 ) ); + EXPECT_EQ( emptyImage, RigPolygonTools::erode( { { 1, 1 }, { 1 } }, 1 ) ); // Inconsistent row sizes + EXPECT_EQ( emptyImage, RigPolygonTools::erode( { { 1, 1 }, { 1, 1 } }, negativeKernelSize ) ); +} + +// Test for dilate function +TEST( RigPolygonToolsTest, DilateTest ) +{ + // Arrange + RigPolygonTools::IntegerImage image = { + { 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0 }, + { 0, 0, 1, 0, 0 }, + { 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0 }, + }; + int kernelSize = 2; + + RigPolygonTools::IntegerImage expected = { + { 0, 0, 0, 0, 0 }, + { 0, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 0 }, + { 0, 0, 0, 0, 0 }, + }; + + // Act + RigPolygonTools::IntegerImage result = RigPolygonTools::dilate( image, kernelSize ); + + // Assert + EXPECT_EQ( result, expected ); +} + +// Test for dilate function with invalid input +TEST( RigPolygonToolsTest, DilateInvalidInputTest ) +{ + // Arrange + RigPolygonTools::IntegerImage emptyImage = {}; + int negativeKernelSize = -1; + + // Act & Assert + EXPECT_EQ( emptyImage, RigPolygonTools::dilate( emptyImage, 1 ) ); + EXPECT_EQ( emptyImage, RigPolygonTools::dilate( { { 1, 1 }, { 1 } }, 1 ) ); // Inconsistent row sizes + EXPECT_EQ( emptyImage, RigPolygonTools::dilate( { { 1, 1 }, { 1, 1 } }, negativeKernelSize ) ); +} + +// Test for fillInterior function +TEST( RigPolygonToolsTest, FillInteriorTest ) +{ + // Arrange + RigPolygonTools::IntegerImage image = { { 1, 1, 1 }, { 1, 0, 1 }, { 1, 1, 1 } }; + RigPolygonTools::IntegerImage expected = { { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 } }; + + // Act + RigPolygonTools::IntegerImage result = RigPolygonTools::fillInterior( image ); + + // Assert + EXPECT_EQ( result, expected ); +} + +// Test for fillInterior function with invalid input +TEST( RigPolygonToolsTest, FillInteriorInvalidInputTest ) +{ + // Arrange + RigPolygonTools::IntegerImage emptyImage = {}; + + // Act & Assert + EXPECT_EQ( emptyImage, RigPolygonTools::fillInterior( emptyImage ) ); + EXPECT_EQ( emptyImage, RigPolygonTools::fillInterior( { { 1, 1 }, { 1 } } ) ); // Inconsistent row sizes +} + +// Test for boundary function +TEST( RigPolygonToolsTest, BoundaryTest ) +{ + // Arrange + RigPolygonTools::IntegerImage image = { { 1, 1, 1 }, { 1, 0, 1 }, { 1, 1, 1 } }; + std::vector> expected = { { 0, 0 }, { 0, 1 }, { 0, 2 }, { 1, 2 }, { 2, 2 }, { 2, 1 }, { 2, 0 }, { 1, 0 } }; + + // Act + std::vector> result = RigPolygonTools::boundary( image ); + + // Assert + EXPECT_EQ( result, expected ); +} + +// Test for boundary function with invalid input +TEST( RigPolygonToolsTest, BoundaryInvalidInputTest ) +{ + // Arrange + RigPolygonTools::IntegerImage emptyImage = {}; + + // Act & Assert + EXPECT_TRUE( RigPolygonTools::boundary( emptyImage ).empty() ); + EXPECT_TRUE( RigPolygonTools::boundary( { { 1, 1 }, { 1 } } ).empty() ); // Inconsistent row sizes +} + +// Test for simplifyPolygon function +TEST( RigPolygonToolsTest, SimplifyPolygonTest ) +{ + // Arrange + std::vector vertices = + { { 0.0, 0.0, 0.0 }, { 1.0, 0.1, 0.0 }, { 1.5, -0.1, 0.0 }, { 3.0, 5.0, 0.0 }, { 5.0, 6.0, 0.0 }, { 7.0, 7.0, 0.0 }, { 8.0, 8.0, 0.0 } }; + double epsilon = 1; + std::vector expected = { { 0.0, 0.0, 0.0 }, { 1.5, -0.1, 0.0 }, { 3.0, 5.0, 0.0 }, { 8.0, 8.0, 0.0 } }; + + // Act + RigPolygonTools::simplifyPolygon( vertices, epsilon ); + + // Assert + EXPECT_EQ( vertices.size(), expected.size() ); + for ( size_t i = 0; i < vertices.size(); ++i ) + { + EXPECT_DOUBLE_EQ( vertices[i].x(), expected[i].x() ); + EXPECT_DOUBLE_EQ( vertices[i].y(), expected[i].y() ); + EXPECT_DOUBLE_EQ( vertices[i].z(), expected[i].z() ); + } +} + +// Test for simplifyPolygon function with invalid input +TEST( RigPolygonToolsTest, SimplifyPolygonInvalidInputTest ) +{ + // Arrange + std::vector emptyVertices; + double epsilon = 1.0; + + // Act & Assert + EXPECT_NO_THROW( RigPolygonTools::simplifyPolygon( emptyVertices, epsilon ) ); + EXPECT_EQ( emptyVertices.size(), 0 ); +} diff --git a/ApplicationLibCode/UnitTests/RigWellLogExtractor-Test.cpp b/ApplicationLibCode/UnitTests/RigWellLogExtractor-Test.cpp index 0ab598a3d9..8b4dd35d99 100644 --- a/ApplicationLibCode/UnitTests/RigWellLogExtractor-Test.cpp +++ b/ApplicationLibCode/UnitTests/RigWellLogExtractor-Test.cpp @@ -67,8 +67,7 @@ TEST( RigEclipseWellLogExtractor, ShortWellPathInsideOneCell ) mdValues.push_back( offset ); } - wellPathGeometry->setWellPathPoints( wellPathPoints ); - wellPathGeometry->setMeasuredDepths( mdValues ); + wellPathGeometry->setWellPathPoints( wellPathPoints, mdValues ); } cvf::ref e = new RigEclipseWellLogExtractor( reservoir.p(), wellPathGeometry.p(), "" ); diff --git a/ApplicationLibCode/UnitTests/RigWellPathGeometryExporter-Test.cpp b/ApplicationLibCode/UnitTests/RigWellPathGeometryExporter-Test.cpp index 60c1da3b2a..83f4804522 100644 --- a/ApplicationLibCode/UnitTests/RigWellPathGeometryExporter-Test.cpp +++ b/ApplicationLibCode/UnitTests/RigWellPathGeometryExporter-Test.cpp @@ -38,8 +38,7 @@ TEST( RigWellPathGeometryExporter, VerticalPath ) for ( double md : inputMds ) { - rigWellPath.addMeasuredDepth( md ); - rigWellPath.addWellPathPoint( cvf::Vec3d( x, y, -md ) ); + rigWellPath.addWellPathPoint( cvf::Vec3d( x, y, -md ), md ); } double mdStepSize = 5.0; diff --git a/ApplicationLibCode/UnitTests/RigWellPathIntersectionTools-Test.cpp b/ApplicationLibCode/UnitTests/RigWellPathIntersectionTools-Test.cpp index 932272408d..dc1876ec3f 100644 --- a/ApplicationLibCode/UnitTests/RigWellPathIntersectionTools-Test.cpp +++ b/ApplicationLibCode/UnitTests/RigWellPathIntersectionTools-Test.cpp @@ -46,8 +46,7 @@ TEST( RigWellPathTest, FindWellPathCoordsIncludingIntersectionPoint ) mdValues.push_back( 3.0 ); mdValues.push_back( 4.0 ); - wellPathGeometry.setWellPathPoints( wellPathPoints ); - wellPathGeometry.setMeasuredDepths( mdValues ); + wellPathGeometry.setWellPathPoints( wellPathPoints, mdValues ); } // Before first MD diff --git a/ApplicationLibCode/UnitTests/TestData/RifSurfaceImporter/tiny-test-tabs.dat b/ApplicationLibCode/UnitTests/TestData/RifSurfaceImporter/tiny-test-tabs.dat new file mode 100644 index 0000000000..2c81fb86d0 --- /dev/null +++ b/ApplicationLibCode/UnitTests/TestData/RifSurfaceImporter/tiny-test-tabs.dat @@ -0,0 +1,15 @@ +0 0 0 +0 1 0 +0 2 0 +0 4 0 +2 0 0 +2 1 0 +2 2 0 +2 3 0 +4 1 0 +4 2 0 +6 -2 0 +6 1 0 +6 2 0 +8 3 0 +8 5 0 \ No newline at end of file diff --git a/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/dataset.pvd b/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/dataset.pvd new file mode 100644 index 0000000000..2887c54f2d --- /dev/null +++ b/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/dataset.pvd @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/fracture-00000.vtu b/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/fracture-00000.vtu new file mode 100644 index 0000000000..a0258a52d6 --- /dev/null +++ b/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/fracture-00000.vtu @@ -0,0 +1,48 @@ + + + + + + + 83769 83769 83769 83769 83769 83769 70169 83769 83769 83769 83769 83769 + 83769 83769 77369 77369 83769 83769 83769 83769 83769 83769 83769 70169 + + + 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 + 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 1.2e-13 + + + 10 11 12 13 14 15 16 17 17 19 20 21 + 22 23 24 25 26 27 28 29 30 31 32 33 + + + + + 1095 1095 2604.45 1095 1095 2603.84 1094.47 1095 2604.15 1094.47 1095 2604.76 + 1095 1095 2605.06 1095.53 1095 2604.76 1095.53 1095 2604.15 1095 1095 2603.23 + 1094.39 1095 2603.39 1093.94 1095 2603.84 1093.78 1095 2604.45 1093.94 1095 2605.06 + 1094.39 1095 2605.51 1095 1095 2605.67 1095.61 1095 2605.51 1096.06 1095 2605.06 + 1096.22 1095 2604.45 1096.06 1095 2603.84 1095.61 1095 2603.39 + + + + + 0 1 2 0 2 3 0 3 4 0 4 5 + 0 5 6 0 6 1 1 7 8 1 8 2 + 2 8 9 2 9 10 2 10 3 3 10 11 + 3 11 12 3 12 4 4 12 13 4 13 14 + 4 14 5 5 14 15 5 15 16 5 16 6 + 6 16 17 6 17 18 6 18 1 1 18 7 + + + 3 6 9 12 15 18 21 24 27 30 33 36 + 39 42 45 48 51 54 57 60 63 66 69 72 + + + 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 + + + + + diff --git a/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/fracture-00001.vtu b/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/fracture-00001.vtu new file mode 100644 index 0000000000..cc13ce28cd --- /dev/null +++ b/ApplicationLibCode/UnitTests/TestData/RifVtkSurfaceImporter/fracture-00001.vtu @@ -0,0 +1,48 @@ + + + + + + + 73769 73769 73769 73769 73769 73769 70169 73769 73769 73769 73769 73769 + 73769 73769 77369 77369 73769 73769 73769 73769 73769 73769 73769 70169 + + + 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 + 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 2.2e-13 + + + 110 111 112 113 114 115 116 117 117 119 120 121 + 122 123 124 125 126 127 128 129 130 131 132 133 + + + + + 1095 1095 2604.45 1095 1095 2603.84 1094.47 1095 2604.15 1094.47 1095 2604.76 + 1095 1095 2605.06 1095.53 1095 2604.76 1095.53 1095 2604.15 1095 1095 2603.23 + 1094.39 1095 2603.39 1093.94 1095 2603.84 1093.78 1095 2604.45 1093.94 1095 2605.06 + 1094.39 1095 2605.51 1095 1095 2605.67 1095.61 1095 2605.51 1096.06 1095 2605.06 + 1096.22 1095 2604.45 1096.06 1095 2603.84 1095.61 1095 2603.39 + + + + + 0 1 2 0 2 3 0 3 4 0 4 5 + 0 5 6 0 6 1 1 7 8 1 8 2 + 2 8 9 2 9 10 2 10 3 3 10 11 + 3 11 12 3 12 4 4 12 13 4 13 14 + 4 14 5 5 14 15 5 15 16 5 16 6 + 6 16 17 6 17 18 6 18 1 1 18 7 + + + 3 6 9 12 15 18 21 24 27 30 33 36 + 39 42 45 48 51 54 57 60 63 66 69 72 + + + 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 + + + + + diff --git a/ApplicationLibCode/UnitTests/TestData/h5-file/NORNE_ATW2013_RFTPLT_V2.ESMRY b/ApplicationLibCode/UnitTests/TestData/h5-file/NORNE_ATW2013_RFTPLT_V2.ESMRY index 7ceed96cf9..023b52680e 100644 Binary files a/ApplicationLibCode/UnitTests/TestData/h5-file/NORNE_ATW2013_RFTPLT_V2.ESMRY and b/ApplicationLibCode/UnitTests/TestData/h5-file/NORNE_ATW2013_RFTPLT_V2.ESMRY differ diff --git a/ApplicationLibCode/UnitTests/cvfGeometryTools-Test.cpp b/ApplicationLibCode/UnitTests/cvfGeometryTools-Test.cpp index 7a5b04304d..7146e3bff3 100644 --- a/ApplicationLibCode/UnitTests/cvfGeometryTools-Test.cpp +++ b/ApplicationLibCode/UnitTests/cvfGeometryTools-Test.cpp @@ -101,22 +101,20 @@ std::vector createVertices() std::vector vxs; vxs.resize( 14, cvf::Vec3d::ZERO ); - // clang-format off - vxs[ 0]= cvf::Vec3d( 0 , 0 , 0 ); - vxs[ 1]= cvf::Vec3d( 1 , 0 , 0 ); - vxs[ 2]= cvf::Vec3d( 1 , 1 , 0 ); - vxs[ 3]= cvf::Vec3d( 0 , 1 , 0 ); - vxs[ 4]= cvf::Vec3d(-0.4 ,-0.2 , 0.0 ); - vxs[ 5]= cvf::Vec3d( 0.4 , 0.6 , 0.0 ); - vxs[ 6]= cvf::Vec3d( 0.8 , 0.2 , 0.0 ); - vxs[ 7]= cvf::Vec3d( 0.0 ,-0.6 , 0.0 ); - vxs[ 8]= cvf::Vec3d( 1.0 , 1.2 , 0.0 ); - vxs[ 9]= cvf::Vec3d( 1.4 , 0.8 , 0.0 ); - vxs[10]= cvf::Vec3d( 0.4 ,-0.2 , 0.0 ); - vxs[11]= cvf::Vec3d( 1.2 , 0.6 , 0.0 ); - vxs[12]= cvf::Vec3d( 1.6 , 0.2 , 0.0 ); - vxs[13]= cvf::Vec3d( 0.8 ,-0.6 , 0.0 ); - // clang-format on + vxs[0] = cvf::Vec3d( 0, 0, 0 ); + vxs[1] = cvf::Vec3d( 1, 0, 0 ); + vxs[2] = cvf::Vec3d( 1, 1, 0 ); + vxs[3] = cvf::Vec3d( 0, 1, 0 ); + vxs[4] = cvf::Vec3d( -0.4, -0.2, 0.0 ); + vxs[5] = cvf::Vec3d( 0.4, 0.6, 0.0 ); + vxs[6] = cvf::Vec3d( 0.8, 0.2, 0.0 ); + vxs[7] = cvf::Vec3d( 0.0, -0.6, 0.0 ); + vxs[8] = cvf::Vec3d( 1.0, 1.2, 0.0 ); + vxs[9] = cvf::Vec3d( 1.4, 0.8, 0.0 ); + vxs[10] = cvf::Vec3d( 0.4, -0.2, 0.0 ); + vxs[11] = cvf::Vec3d( 1.2, 0.6, 0.0 ); + vxs[12] = cvf::Vec3d( 1.6, 0.2, 0.0 ); + vxs[13] = cvf::Vec3d( 0.8, -0.6, 0.0 ); return vxs; } diff --git a/ApplicationLibCode/UserInterface/AnalysisPlots/CMakeLists_files.cmake b/ApplicationLibCode/UserInterface/AnalysisPlots/CMakeLists_files.cmake index 0d37cd3736..62904be3c0 100644 --- a/ApplicationLibCode/UserInterface/AnalysisPlots/CMakeLists_files.cmake +++ b/ApplicationLibCode/UserInterface/AnalysisPlots/CMakeLists_files.cmake @@ -7,15 +7,4 @@ set(SOURCE_GROUP_SOURCE_FILES ) list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list(APPEND QT_MOC_HEADERS) - -list(APPEND QT_UI_FILES) - -source_group( - "UserInterface/AnalysisPlots" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/UserInterface/AnalysisPlots/RiuGroupedBarChartBuilder.cpp b/ApplicationLibCode/UserInterface/AnalysisPlots/RiuGroupedBarChartBuilder.cpp index 4404c3b6cc..8778225ca8 100644 --- a/ApplicationLibCode/UserInterface/AnalysisPlots/RiuGroupedBarChartBuilder.cpp +++ b/ApplicationLibCode/UserInterface/AnalysisPlots/RiuGroupedBarChartBuilder.cpp @@ -169,7 +169,7 @@ public: QwtText text( string ); QFont font = text.font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( m_labelFontPointSize + fontSizeChange ) ); + font.setPointSize( m_labelFontPointSize + fontSizeChange ); text.setFont( font ); text.setPaintAttribute( QwtText::PaintUsingTextFont, true ); @@ -489,47 +489,49 @@ void RiuGroupedBarChartBuilder::addBarChartToPlot( QwtPlot* plot, Qt::Orientatio filteredSortedBarEntries = filteredBarEntries; } - // clang-format off auto addGroupTickText = [&]( double groupStartPos, QString tickText, QList& groupTickPosList ) { - if( tickText.isEmpty() ) return; + if ( tickText.isEmpty() ) return; double tickPos = midPoint( groupStartPos, currentBarPosition ); - QwtScaleDiv::TickType ttyp = (&groupTickPosList == &majTickPositions ) ? QwtScaleDiv::MajorTick - : ( &groupTickPosList == &midTickPositions ) ? QwtScaleDiv::MediumTick - : QwtScaleDiv::MinorTick; + QwtScaleDiv::TickType ttyp = ( &groupTickPosList == &majTickPositions ) ? QwtScaleDiv::MajorTick + : ( &groupTickPosList == &midTickPositions ) ? QwtScaleDiv::MediumTick + : QwtScaleDiv::MinorTick; - // Make sure we do not get ticks of different level exactly at the same spot, + // Make sure we do not get ticks of different level exactly at the same spot, // so that the drawing is able to distinguish - if( ttyp == QwtScaleDiv::MinorTick ) tickPos += 2e-4; - if( ttyp == QwtScaleDiv::MediumTick ) tickPos += 1e-4; + if ( ttyp == QwtScaleDiv::MinorTick ) tickPos += 2e-4; + if ( ttyp == QwtScaleDiv::MediumTick ) tickPos += 1e-4; - groupPositionedAxisTexts[tickPos] = RiuBarChartScaleDraw::RiuBarChartTick(ttyp, tickText, true); + groupPositionedAxisTexts[tickPos] = RiuBarChartScaleDraw::RiuBarChartTick( ttyp, tickText, true ); groupTickPosList.push_back( tickPos ); }; - auto addGroupDivider = [&]( double position, QList& groupDividerPosList) + auto addGroupDivider = [&]( double position, QList& groupDividerPosList ) { - QwtScaleDiv::TickType ttyp = - (&groupDividerPosList == &majDividerPositions) ? QwtScaleDiv::MajorTick - : (&groupDividerPosList == &midDividerPositions) ? QwtScaleDiv::MediumTick - : QwtScaleDiv::MinorTick; + QwtScaleDiv::TickType ttyp = ( &groupDividerPosList == &majDividerPositions ) ? QwtScaleDiv::MajorTick + : ( &groupDividerPosList == &midDividerPositions ) ? QwtScaleDiv::MediumTick + : QwtScaleDiv::MinorTick; - // Make sure we do not get ticks of different level exactly at the same spot, + // Make sure we do not get ticks of different level exactly at the same spot, // so that the drawing is able to distinguish double spacing = majGroupSpacing; - if( ttyp == QwtScaleDiv::MediumTick ){ spacing = midGroupSpacing; } - if( ttyp == QwtScaleDiv::MinorTick ) { spacing = minGroupSpacing; } + if ( ttyp == QwtScaleDiv::MediumTick ) + { + spacing = midGroupSpacing; + } + if ( ttyp == QwtScaleDiv::MinorTick ) + { + spacing = minGroupSpacing; + } - groupDividerPosList.push_back(currentBarPosition - 0.5 - 0.5*spacing); + groupDividerPosList.push_back( currentBarPosition - 0.5 - 0.5 * spacing ); }; - // clang-format on - // Loop over entries, calculate tick positions and bar positions as we go for ( const BarEntry& barDef : filteredSortedBarEntries ) diff --git a/ApplicationLibCode/UserInterface/CMakeLists_files.cmake b/ApplicationLibCode/UserInterface/CMakeLists_files.cmake index e8361f003b..b037d583f0 100644 --- a/ApplicationLibCode/UserInterface/CMakeLists_files.cmake +++ b/ApplicationLibCode/UserInterface/CMakeLists_files.cmake @@ -23,6 +23,8 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RiuPropertyViewTabWidget.h ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotPanel.h ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotUpdater.h + ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotWidget.h + ${CMAKE_CURRENT_LIST_DIR}/RiuPlotUpdater.h ${CMAKE_CURRENT_LIST_DIR}/RiuQwtLinearScaleEngine.h ${CMAKE_CURRENT_LIST_DIR}/RiuQwtScalePicker.h ${CMAKE_CURRENT_LIST_DIR}/RiuQwtCurvePointTracker.h @@ -110,6 +112,7 @@ set(SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RiuMenuBarBuildTools.h ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotRectAnnotation.h ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotZoomerMultiAxes.h + ${CMAKE_CURRENT_LIST_DIR}/RiuCellSelectionTool.h ) set(SOURCE_GROUP_SOURCE_FILES @@ -136,6 +139,8 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RiuPropertyViewTabWidget.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotPanel.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotUpdater.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotWidget.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiuPlotUpdater.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuQwtLinearScaleEngine.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuQwtScalePicker.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuQwtCurvePointTracker.cpp @@ -221,6 +226,7 @@ set(SOURCE_GROUP_SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/RiuMenuBarBuildTools.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotRectAnnotation.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotZoomerMultiAxes.cpp + ${CMAKE_CURRENT_LIST_DIR}/RiuCellSelectionTool.cpp ) if(RESINSIGHT_USE_QT_CHARTS) @@ -247,79 +253,7 @@ if(RESINSIGHT_USE_QT_CHARTS) ${CMAKE_CURRENT_LIST_DIR}/RiuQtChartsToolTip.cpp ${CMAKE_CURRENT_LIST_DIR}/RiuSummaryQtChartsPlot.cpp ) - - list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RiuQtChartsPlotWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuSummaryQtChartsPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQtChartsPlotCurve.h - ) endif() list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) - list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) - -list( - APPEND - QT_MOC_HEADERS - ${CMAKE_CURRENT_LIST_DIR}/RiuMainWindowBase.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMainWindow.h - ${CMAKE_CURRENT_LIST_DIR}/RiuPlotMainWindow.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMdiArea.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMdiSubWindow.h - ${CMAKE_CURRENT_LIST_DIR}/RiuPvtPlotPanel.h - ${CMAKE_CURRENT_LIST_DIR}/RiuSeismicHistogramPanel.h - ${CMAKE_CURRENT_LIST_DIR}/RiuRelativePermeabilityPlotPanel.h - ${CMAKE_CURRENT_LIST_DIR}/RiuResultInfoPanel.h - ${CMAKE_CURRENT_LIST_DIR}/RiuResultQwtPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuDepthQwtPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuTextDialog.h - ${CMAKE_CURRENT_LIST_DIR}/RiuViewer.h - ${CMAKE_CURRENT_LIST_DIR}/RiuProcessMonitor.h - ${CMAKE_CURRENT_LIST_DIR}/RiuViewerCommands.h - ${CMAKE_CURRENT_LIST_DIR}/RiuTreeViewEventFilter.h - ${CMAKE_CURRENT_LIST_DIR}/RiuWellLogPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuWellLogTrack.h - ${CMAKE_CURRENT_LIST_DIR}/RiuSummaryMultiPlotBook.h - ${CMAKE_CURRENT_LIST_DIR}/RiuSummaryMultiPlotPage.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMultiPlotPage.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMultiPlotBook.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuPlotWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotLegend.h - ${CMAKE_CURRENT_LIST_DIR}/RiuRecentFileActionProvider.h - ${CMAKE_CURRENT_LIST_DIR}/RiuDockedQwtPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuGridCrossQwtPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuSummaryQwtPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuSummaryPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuTofAccumulatedPhaseFractionsPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQwtScalePicker.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotWheelZoomer.h - ${CMAKE_CURRENT_LIST_DIR}/RiuWidgetDragger.h - ${CMAKE_CURRENT_LIST_DIR}/RiuEditPerforationCollectionWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuAdvancedSnapshotExportWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuWellAllocationPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuFlowCharacteristicsPlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuNightchartsWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMessagePanel.h - ${CMAKE_CURRENT_LIST_DIR}/RiuExpressionContextMenuManager.h - ${CMAKE_CURRENT_LIST_DIR}/RiuCalculationsContextMenuManager.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMohrsCirclePlot.h - ${CMAKE_CURRENT_LIST_DIR}/RiuDraggableOverlayFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuAbstractOverlayContentFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuAbstractLegendFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuCategoryLegendFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuScalarMapperLegendFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuTextEditWithCompletion.h - ${CMAKE_CURRENT_LIST_DIR}/RiuTextContentFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQwtLegendOverlayContentFrame.h - ${CMAKE_CURRENT_LIST_DIR}/RiuMatrixPlotWidget.h - ${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotZoomerMultiAxes.h -) - -list(APPEND QT_UI_FILES) - -source_group( - "UserInterface" - FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} - ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake -) diff --git a/ApplicationLibCode/UserInterface/Riu3dSelectionManager.cpp b/ApplicationLibCode/UserInterface/Riu3dSelectionManager.cpp index c64040799c..fb2c09f5be 100644 --- a/ApplicationLibCode/UserInterface/Riu3dSelectionManager.cpp +++ b/ApplicationLibCode/UserInterface/Riu3dSelectionManager.cpp @@ -20,6 +20,7 @@ #include "Riu3dSelectionManager.h" #include "Rim2dIntersectionView.h" +#include "RimEclipseCellColors.h" #include "RimEclipseResultDefinition.h" #include "RimEclipseView.h" #include "RimGeoMechResultDefinition.h" @@ -37,7 +38,7 @@ /// //-------------------------------------------------------------------------------------------------- Riu3dSelectionManager::Riu3dSelectionManager() - : m_notificationCenter( new RiuSelectionChangedHandler ) + : m_selectionChangedHandler( new RiuSelectionChangedHandler ) { m_selection.resize( 2 ); } @@ -50,7 +51,7 @@ Riu3dSelectionManager::~Riu3dSelectionManager() deleteAllItemsFromSelection( RUI_APPLICATION_GLOBAL ); deleteAllItemsFromSelection( RUI_TEMPORARY ); - delete m_notificationCenter; + delete m_selectionChangedHandler; } //-------------------------------------------------------------------------------------------------- @@ -99,7 +100,19 @@ void Riu3dSelectionManager::appendItemToSelection( RiuSelectionItem* item, int r s.push_back( item ); - if ( role == RUI_APPLICATION_GLOBAL ) m_notificationCenter->handleItemAppended( item ); + if ( role == RUI_APPLICATION_GLOBAL ) m_selectionChangedHandler->handleItemAppended( item ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void Riu3dSelectionManager::updateSelectedItems() +{ + m_selectionChangedHandler->handleSelectionDeleted(); + for ( RiuSelectionItem* item : m_selection[RUI_APPLICATION_GLOBAL] ) + { + m_selectionChangedHandler->handleItemAppended( item ); + } } //-------------------------------------------------------------------------------------------------- @@ -113,7 +126,7 @@ void Riu3dSelectionManager::setSelectedItem( RiuSelectionItem* item, int role ) s.push_back( item ); - if ( role == RUI_APPLICATION_GLOBAL ) m_notificationCenter->handleSetSelectedItem( item ); + if ( role == RUI_APPLICATION_GLOBAL ) m_selectionChangedHandler->handleSetSelectedItem( item ); } //-------------------------------------------------------------------------------------------------- @@ -125,7 +138,7 @@ void Riu3dSelectionManager::deleteAllItems( int role ) { deleteAllItemsFromSelection( role ); - if ( role == RUI_APPLICATION_GLOBAL ) m_notificationCenter->handleSelectionDeleted(); + if ( role == RUI_APPLICATION_GLOBAL ) m_selectionChangedHandler->handleSelectionDeleted(); } } @@ -178,6 +191,24 @@ RiuEclipseSelectionItem::RiuEclipseSelectionItem( RimGridView* { } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuEclipseSelectionItem::RiuEclipseSelectionItem( RimEclipseView* view, size_t gridIndex, size_t gridLocalCellIndex ) +{ + m_view = view; + + m_resultDefinition = view ? view->cellResult() : nullptr; + m_timestepIdx = view ? view->currentTimeStep() : 0; + + m_gridIndex = gridIndex; + m_gridLocalCellIndex = gridLocalCellIndex; + m_nncIndex = cvf::UNDEFINED_SIZE_T; + m_color = cvf::Color3f( 1.0f, 0.0f, 0.0f ); + m_face = cvf::StructGridInterface::NO_FACE; + m_localIntersectionPointInDisplay = cvf::Vec3d::UNDEFINED; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/Riu3dSelectionManager.h b/ApplicationLibCode/UserInterface/Riu3dSelectionManager.h index b3d69c49c5..cadbd07249 100644 --- a/ApplicationLibCode/UserInterface/Riu3dSelectionManager.h +++ b/ApplicationLibCode/UserInterface/Riu3dSelectionManager.h @@ -28,8 +28,6 @@ #include #include #include -// #include "RivWellPathSourceInfo.h" -// #include "RivWellPipeSourceInfo.h" class RimGridView; class RimEclipseView; @@ -90,6 +88,8 @@ public: return dynamic_cast( selectedItem( role ) ); } + void updateSelectedItems(); + private: Riu3dSelectionManager(); ~Riu3dSelectionManager(); @@ -102,7 +102,7 @@ private: private: std::vector> m_selection; - RiuSelectionChangedHandler* m_notificationCenter; + RiuSelectionChangedHandler* m_selectionChangedHandler; }; //================================================================================================== @@ -148,6 +148,8 @@ public: cvf::StructGridInterface::FaceType face, const cvf::Vec3d& localIntersectionPointInDisplay ); + explicit RiuEclipseSelectionItem( RimEclipseView* view, size_t gridIndex, size_t gridLocalCellIndex ); + ~RiuEclipseSelectionItem() override{}; RiuSelectionType type() const override { return ECLIPSE_SELECTION_OBJECT; } diff --git a/ApplicationLibCode/UserInterface/RiuAbstractOverlayContentFrame.cpp b/ApplicationLibCode/UserInterface/RiuAbstractOverlayContentFrame.cpp index 46fb7eff7c..eef813b43f 100644 --- a/ApplicationLibCode/UserInterface/RiuAbstractOverlayContentFrame.cpp +++ b/ApplicationLibCode/UserInterface/RiuAbstractOverlayContentFrame.cpp @@ -47,7 +47,7 @@ RiuAbstractOverlayContentFrame::~RiuAbstractOverlayContentFrame() void RiuAbstractOverlayContentFrame::updateFontSize() { QFont font = this->font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( RiaPreferences::current()->defaultPlotFontSize() ) ); + font.setPointSize( caf::FontTools::pointSizeFromEnum( RiaPreferences::current()->defaultPlotFontSize() ) ); setFont( font ); } @@ -98,6 +98,6 @@ void RiuTextOverlayContentFrame::renderTo( QPainter* painter, const QRect& targe void RiuTextOverlayContentFrame::updateLabelFont() { QFont font = m_textLabel->font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( RiaPreferences::current()->defaultPlotFontSize() ) ); + font.setPointSize( caf::FontTools::pointSizeFromEnum( RiaPreferences::current()->defaultPlotFontSize() ) ); m_textLabel->setFont( font ); } diff --git a/ApplicationLibCode/UserInterface/RiuCategoryLegendFrame.cpp b/ApplicationLibCode/UserInterface/RiuCategoryLegendFrame.cpp index 78e22e6379..e87507d1ff 100644 --- a/ApplicationLibCode/UserInterface/RiuCategoryLegendFrame.cpp +++ b/ApplicationLibCode/UserInterface/RiuCategoryLegendFrame.cpp @@ -57,7 +57,12 @@ void RiuCategoryLegendFrame::layoutInfo( LayoutInfo* layout ) const //-------------------------------------------------------------------------------------------------- QString RiuCategoryLegendFrame::label( int index ) const { - return cvfqt::Utils::toQString( m_categoryMapper->textForCategoryIndex( index ) ); + if ( index < (int)m_categoryMapper->categoryCount() && index >= 0 ) + { + return cvfqt::Utils::toQString( m_categoryMapper->textForCategoryIndex( index ) ); + } + + return {}; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuCellAndNncPickEventHandler.cpp b/ApplicationLibCode/UserInterface/RiuCellAndNncPickEventHandler.cpp index 2863191de4..702de76c96 100644 --- a/ApplicationLibCode/UserInterface/RiuCellAndNncPickEventHandler.cpp +++ b/ApplicationLibCode/UserInterface/RiuCellAndNncPickEventHandler.cpp @@ -137,7 +137,6 @@ bool RiuCellAndNncPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve RimIntersectionResultDefinition* sepInterResDef = nullptr; - // clang-format off if ( const RivSourceInfo* rivSourceInfo = dynamic_cast( firstHitPart->sourceInfo() ) ) { gridIndex = rivSourceInfo->gridIndex(); @@ -146,56 +145,54 @@ bool RiuCellAndNncPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve CVF_ASSERT( rivSourceInfo->m_cellFaceFromTriangleMapper.notNull() ); gridLocalCellIndex = rivSourceInfo->m_cellFaceFromTriangleMapper->cellIndex( firstPartTriangleIndex ); - face = rivSourceInfo->m_cellFaceFromTriangleMapper->cellFace( firstPartTriangleIndex ); + face = rivSourceInfo->m_cellFaceFromTriangleMapper->cellFace( firstPartTriangleIndex ); } } - else if ( const RivFemPickSourceInfo* femSourceInfo = - dynamic_cast( firstHitPart->sourceInfo() ) ) + else if ( const RivFemPickSourceInfo* femSourceInfo = dynamic_cast( firstHitPart->sourceInfo() ) ) { - gridIndex = femSourceInfo->femPartIndex(); + gridIndex = femSourceInfo->femPartIndex(); gridLocalCellIndex = femSourceInfo->triangleToElmMapper()->elementIndex( firstPartTriangleIndex ); - gmFace = femSourceInfo->triangleToElmMapper()->elementFace( firstPartTriangleIndex ); + gmFace = femSourceInfo->triangleToElmMapper()->elementFace( firstPartTriangleIndex ); } - else if ( const RivReservoirSurfaceIntersectionSourceInfo* surfeIntersectSourceInfo = - dynamic_cast( firstHitPart->sourceInfo() ) ) + else if ( const RivReservoirSurfaceIntersectionSourceInfo* surfeIntersectSourceInfo = + dynamic_cast( firstHitPart->sourceInfo() ) ) { - RiuViewerCommands::findCellAndGridIndex( mainOrComparisonView, - surfeIntersectSourceInfo->intersection()->activeSeparateResultDefinition(), - surfeIntersectSourceInfo->triangleToCellIndex()[firstPartTriangleIndex], - &gridLocalCellIndex, - &gridIndex ); + RiuViewerCommands::findCellAndGridIndex( mainOrComparisonView, + surfeIntersectSourceInfo->intersection()->activeSeparateResultDefinition(), + surfeIntersectSourceInfo->triangleToCellIndex()[firstPartTriangleIndex], + &gridLocalCellIndex, + &gridIndex ); - intersectionHit = true; + intersectionHit = true; intersectionTriangleHit = surfeIntersectSourceInfo->triangle( firstPartTriangleIndex ); - sepInterResDef = surfeIntersectSourceInfo->intersection()->activeSeparateResultDefinition(); + sepInterResDef = surfeIntersectSourceInfo->intersection()->activeSeparateResultDefinition(); } - else if ( const RivExtrudedCurveIntersectionSourceInfo* intersectionSourceInfo = - dynamic_cast( firstHitPart->sourceInfo() ) ) + else if ( const RivExtrudedCurveIntersectionSourceInfo* intersectionSourceInfo = + dynamic_cast( firstHitPart->sourceInfo() ) ) { - RiuViewerCommands::findCellAndGridIndex( mainOrComparisonView, - intersectionSourceInfo->intersection()->activeSeparateResultDefinition(), - intersectionSourceInfo->triangleToCellIndex()[firstPartTriangleIndex], - &gridLocalCellIndex, - &gridIndex ); + RiuViewerCommands::findCellAndGridIndex( mainOrComparisonView, + intersectionSourceInfo->intersection()->activeSeparateResultDefinition(), + intersectionSourceInfo->triangleToCellIndex()[firstPartTriangleIndex], + &gridLocalCellIndex, + &gridIndex ); intersectionHit = true; intersectionTriangleHit = intersectionSourceInfo->triangle( firstPartTriangleIndex ); - sepInterResDef = intersectionSourceInfo->intersection()->activeSeparateResultDefinition(); + sepInterResDef = intersectionSourceInfo->intersection()->activeSeparateResultDefinition(); } - else if ( const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo = - dynamic_cast( firstHitPart->sourceInfo() ) ) + else if ( const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo = + dynamic_cast( firstHitPart->sourceInfo() ) ) { - RiuViewerCommands::findCellAndGridIndex( mainOrComparisonView, - intersectionBoxSourceInfo->intersectionBox()->activeSeparateResultDefinition(), - intersectionBoxSourceInfo->triangleToCellIndex()[firstPartTriangleIndex], - &gridLocalCellIndex, - &gridIndex ); + RiuViewerCommands::findCellAndGridIndex( mainOrComparisonView, + intersectionBoxSourceInfo->intersectionBox()->activeSeparateResultDefinition(), + intersectionBoxSourceInfo->triangleToCellIndex()[firstPartTriangleIndex], + &gridLocalCellIndex, + &gridIndex ); intersectionHit = true; intersectionTriangleHit = intersectionBoxSourceInfo->triangle( firstPartTriangleIndex ); - sepInterResDef = intersectionBoxSourceInfo->intersectionBox()->activeSeparateResultDefinition(); + sepInterResDef = intersectionBoxSourceInfo->intersectionBox()->activeSeparateResultDefinition(); } - // clang-format on if ( sepInterResDef ) { @@ -309,65 +306,60 @@ bool RiuCellAndNncPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve { // Select the other cell if we are about to select the same cell at an nnc. // To make consecutive clicks toggle between closest and furthest cell - // clang-format off if ( nncIndex != cvf::UNDEFINED_SIZE_T ) { auto selectedItem = dynamic_cast( Riu3dSelectionManager::instance()->selectedItem() ); - RimEclipseView* eclipseView = dynamic_cast(mainOrComparisonView); + RimEclipseView* eclipseView = dynamic_cast( mainOrComparisonView ); - if ( selectedItem && eclipseView && - selectedItem->m_gridIndex == gridIndex && - selectedItem->m_gridLocalCellIndex == gridLocalCellIndex && - selectedItem->m_nncIndex == nncIndex ) + if ( selectedItem && eclipseView && selectedItem->m_gridIndex == gridIndex && + selectedItem->m_gridLocalCellIndex == gridLocalCellIndex && selectedItem->m_nncIndex == nncIndex ) { - RigMainGrid* mainGrid = eclipseView->eclipseCase()->eclipseCaseData()->mainGrid(); - const RigConnection& nncConn = mainGrid->nncData()->allConnections()[nncIndex]; + RigMainGrid* mainGrid = eclipseView->eclipseCase()->eclipseCaseData()->mainGrid(); + const RigConnection& nncConn = mainGrid->nncData()->allConnections()[nncIndex]; - size_t c1LocalIdx = cvf::UNDEFINED_SIZE_T; - const RigGridBase* grid1 = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx(nncConn.c1GlobIdx(), &c1LocalIdx); - size_t c1GridIdx = grid1->gridIndex(); - size_t c2LocalIdx = cvf::UNDEFINED_SIZE_T; - const RigGridBase* grid2 = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx(nncConn.c2GlobIdx(), &c2LocalIdx); - size_t c2GridIdx = grid2->gridIndex(); + size_t c1LocalIdx = cvf::UNDEFINED_SIZE_T; + const RigGridBase* grid1 = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( nncConn.c1GlobIdx(), &c1LocalIdx ); + size_t c1GridIdx = grid1->gridIndex(); + size_t c2LocalIdx = cvf::UNDEFINED_SIZE_T; + const RigGridBase* grid2 = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( nncConn.c2GlobIdx(), &c2LocalIdx ); + size_t c2GridIdx = grid2->gridIndex(); - if (gridLocalCellIndex == c1LocalIdx && gridIndex == c1GridIdx) + if ( gridLocalCellIndex == c1LocalIdx && gridIndex == c1GridIdx ) { gridLocalCellIndex = c2LocalIdx; - gridIndex = c2GridIdx; - - if (face == cvf::StructGridInterface::NO_FACE) + gridIndex = c2GridIdx; + + if ( face == cvf::StructGridInterface::NO_FACE ) { face = nncConn.face(); } else { - face = cvf::StructGridInterface::oppositeFace(face); + face = cvf::StructGridInterface::oppositeFace( face ); } } - else if (gridLocalCellIndex == c2LocalIdx && gridIndex == c2GridIdx) + else if ( gridLocalCellIndex == c2LocalIdx && gridIndex == c2GridIdx ) { gridLocalCellIndex = c1LocalIdx; - gridIndex = c1GridIdx; - if (face == cvf::StructGridInterface::NO_FACE) + gridIndex = c1GridIdx; + if ( face == cvf::StructGridInterface::NO_FACE ) { - face = cvf::StructGridInterface::oppositeFace(nncConn.face()); + face = cvf::StructGridInterface::oppositeFace( nncConn.face() ); } else { - face = cvf::StructGridInterface::oppositeFace(face); + face = cvf::StructGridInterface::oppositeFace( face ); } } else { - // None really matched, error in nnc data. + // None really matched, error in nnc data. } } } - // clang-format on - selItem = new RiuEclipseSelectionItem( associatedGridView, eclResDef, timestepIndex, diff --git a/ApplicationLibCode/UserInterface/RiuCellSelectionTool.cpp b/ApplicationLibCode/UserInterface/RiuCellSelectionTool.cpp new file mode 100644 index 0000000000..edc9be7b8a --- /dev/null +++ b/ApplicationLibCode/UserInterface/RiuCellSelectionTool.cpp @@ -0,0 +1,295 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuCellSelectionTool.h" + +#include "RiaApplication.h" +#include "RiaTextStringTools.h" + +#include "Rim3dView.h" +#include "RimEclipseView.h" + +#include "RigMainGrid.h" + +#include "Riu3dSelectionManager.h" +#include "RiuViewer.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuCellSelectionTool::RiuCellSelectionTool( QWidget* parent /*= nullptr */ ) + : QDialog( parent ) +{ + setupUI(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuCellSelectionTool::setupUI() +{ + QVBoxLayout* mainLayout = new QVBoxLayout( this ); + + QButtonGroup* inputTypeGroup = new QButtonGroup( this ); + m_xyzRadio = new QRadioButton( "XYZ Coordinates" ); + m_ijkRadio = new QRadioButton( "IJK Cell Indices" ); + inputTypeGroup->addButton( m_xyzRadio ); + inputTypeGroup->addButton( m_ijkRadio ); + m_xyzRadio->setChecked( true ); + + mainLayout->addWidget( m_xyzRadio ); + mainLayout->addWidget( m_ijkRadio ); + + m_coordinateLabel = new QLabel( "Coordinates:" ); + m_coordinateEdit = new QLineEdit(); + m_coordinateEdit->setPlaceholderText( "Enter coordinates (space or comma separated), two or three coordinates." ); + m_coordinateEdit->setToolTip( "Three doubles: Find cell for point. Two doubles, find top cell for EN coordinate." ); + + m_cellLabel = new QLabel( "IJK:" ); + m_cellEdit = new QLineEdit(); + m_cellEdit->setPlaceholderText( "Enter IJK (space or comma separated)" ); + + QGridLayout* labelLayout = new QGridLayout(); + labelLayout->addWidget( m_coordinateLabel, 0, 0 ); + labelLayout->addWidget( m_coordinateEdit, 0, 1 ); + labelLayout->addWidget( m_cellLabel, 1, 0 ); + labelLayout->addWidget( m_cellEdit, 1, 1 ); + mainLayout->addLayout( labelLayout ); + + m_submitButton = new QPushButton( "Select Cell" ); + mainLayout->addWidget( m_submitButton ); + + m_appendButton = new QPushButton( "Append Cell" ); + mainLayout->addWidget( m_appendButton ); + + mainLayout->addStretch(); + + connect( m_submitButton, &QPushButton::clicked, this, &RiuCellSelectionTool::validateAndSelect ); + connect( m_appendButton, &QPushButton::clicked, this, &RiuCellSelectionTool::validateAndAppend ); + connect( m_xyzRadio, &QRadioButton::toggled, this, &RiuCellSelectionTool::updateVisibleUiItems ); + + updateVisibleUiItems(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RiuCellSelectionTool::findTopCellIndex( double easting, double northing, const RigMainGrid* mainGrid ) +{ + if ( !mainGrid ) return cvf::UNDEFINED_SIZE_T; + + auto mainGridBoundingBox = mainGrid->boundingBox(); + + cvf::BoundingBox pointBBox; + pointBBox.add( cvf::Vec3d( easting, northing, mainGridBoundingBox.min().z() ) ); + pointBBox.add( cvf::Vec3d( easting, northing, mainGridBoundingBox.max().z() ) ); + + std::vector cellIndices = mainGrid->findIntersectingCells( pointBBox ); + + double topDepth = mainGridBoundingBox.min().z(); + size_t topCellIndex = cvf::UNDEFINED_SIZE_T; + + for ( size_t cellIndex : cellIndices ) + { + auto cell = mainGrid->cell( cellIndex ); + auto center = cell.center(); + + // The domain coordinates use negative z-values to represent depth + if ( center.z() > topDepth ) + { + topDepth = center.z(); + topCellIndex = cellIndex; + } + } + + return topCellIndex; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RiuCellSelectionTool::findCellForPoint( const cvf::Vec3d& source, double distance, const RigMainGrid* mainGrid ) +{ + if ( !mainGrid ) return cvf::UNDEFINED_SIZE_T; + + std::vector points = { source, + source + cvf::Vec3d( 0.0, 0.0, distance ), + source + cvf::Vec3d( distance, 0.0, 0.0 ), + source + cvf::Vec3d( -distance, 0.0, 0.0 ), + source + cvf::Vec3d( 0.0, distance, 0.0 ), + source + cvf::Vec3d( 0.0, -distance, 0.0 ), + source + cvf::Vec3d( 0.0, 0.0, -distance ) }; + + // Check if the point is inside a cell + for ( const auto& p : points ) + { + auto candidate = mainGrid->findReservoirCellIndexFromPoint( p ); + if ( candidate != cvf::UNDEFINED_SIZE_T ) return candidate; + } + + // If the point is not inside a cell, check if it is close to a cell + cvf::BoundingBox pointBBox; + pointBBox.add( source ); + + std::vector cellIndices = mainGrid->findIntersectingCells( pointBBox ); + if ( !cellIndices.empty() ) + { + return cellIndices.front(); + } + + return cvf::UNDEFINED_SIZE_T; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuCellSelectionTool::validateAndSelect() +{ + if ( auto activeView = RiaApplication::instance()->activeReservoirView() ) + { + if ( auto selItem = createSelectionItemFromInput() ) + { + Riu3dSelectionManager::instance()->setSelectedItem( selItem ); + + activeView->updateDisplayModelForCurrentTimeStepAndRedraw(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuCellSelectionTool::validateAndAppend() +{ + if ( auto activeView = RiaApplication::instance()->activeReservoirView() ) + { + if ( auto selItem = createSelectionItemFromInput() ) + { + Riu3dSelectionManager::instance()->appendItemToSelection( selItem ); + + activeView->updateDisplayModelForCurrentTimeStepAndRedraw(); + } + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuEclipseSelectionItem* RiuCellSelectionTool::createSelectionItemFromInput() +{ + auto eclipseView = dynamic_cast( RiaApplication::instance()->activeReservoirView() ); + if ( !eclipseView || !eclipseView->mainGrid() ) + { + return nullptr; + } + + size_t cellIndex = cvf::UNDEFINED_SIZE_T; + auto mainGrid = eclipseView->mainGrid(); + + if ( m_xyzRadio->isChecked() ) + { + QVector coords = RiaTextStringTools::parseDoubleValues( m_coordinateEdit->text().trimmed() ); + if ( coords.size() < 2 ) + { + return nullptr; + } + + m_cellEdit->clear(); + + double iSize, jSize, kSize; + mainGrid->characteristicCellSizes( &iSize, &jSize, &kSize ); + + auto distance = std::min( { iSize, jSize, kSize } ) * 0.4; + + if ( coords.size() == 3 ) + { + cellIndex = findCellForPoint( cvf::Vec3d( coords[0], coords[1], -coords[2] ), distance, mainGrid ); + } + if ( cellIndex == cvf::UNDEFINED_SIZE_T ) + { + cellIndex = findTopCellIndex( coords[0], coords[1], mainGrid ); + } + + if ( cellIndex == cvf::UNDEFINED_SIZE_T ) + { + QString coordStr = coords.size() == 3 ? QString( "E:%1 N:%2 D:%3" ).arg( coords[0] ).arg( coords[1] ).arg( coords[2] ) + : QString( "E:%1 N:%2" ).arg( coords[0] ).arg( coords[1] ); + + QMessageBox::information( this, "Cell Selection", "No cell found for : " + coordStr ); + + return nullptr; + } + + if ( auto ijk = mainGrid->ijkFromCellIndex( cellIndex ) ) + { + // 1-based for user input + m_cellEdit->setText( QString( "%1 %2 %3" ).arg( ijk->i() + 1 ).arg( ijk->j() + 1 ).arg( ijk->k() + 1 ) ); + } + } + else + { + QVector ijkValues = RiaTextStringTools::parseDoubleValues( m_cellEdit->text().trimmed() ); + if ( ijkValues.size() != 3 ) + { + return nullptr; + } + + // 0-based for internal use + int i = ijkValues[0] - 1; + int j = ijkValues[1] - 1; + int k = ijkValues[2] - 1; + + if ( mainGrid->isCellValid( i, j, k ) ) + { + cellIndex = mainGrid->cellIndexFromIJK( i, j, k ); + } + } + + if ( cellIndex != cvf::UNDEFINED_SIZE_T ) + { + size_t gridIndex = 0; + return new RiuEclipseSelectionItem( eclipseView, gridIndex, cellIndex ); + } + + return nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuCellSelectionTool::updateVisibleUiItems() +{ + bool isXYZ = m_xyzRadio->isChecked(); + m_coordinateEdit->setVisible( isXYZ ); + m_coordinateLabel->setVisible( isXYZ ); + + m_cellEdit->setReadOnly( isXYZ ); +} diff --git a/ApplicationLibCode/UserInterface/RiuCellSelectionTool.h b/ApplicationLibCode/UserInterface/RiuCellSelectionTool.h new file mode 100644 index 0000000000..32597ba6c0 --- /dev/null +++ b/ApplicationLibCode/UserInterface/RiuCellSelectionTool.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2025 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "cvfVector3.h" + +#include + +class QRadioButton; +class QLineEdit; +class QPushButton; +class QLabel; + +namespace caf +{ +class VecIjk; +} + +class RiuEclipseSelectionItem; +class RigMainGrid; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuCellSelectionTool : public QDialog +{ + Q_OBJECT + +public: + RiuCellSelectionTool( QWidget* parent = nullptr ); + +private slots: + void validateAndSelect(); + void validateAndAppend(); + +private: + RiuEclipseSelectionItem* createSelectionItemFromInput(); + void updateVisibleUiItems(); + void setupUI(); + + static size_t findTopCellIndex( double easting, double northing, const RigMainGrid* mainGrid ); + static size_t findCellForPoint( const cvf::Vec3d& source, double distance, const RigMainGrid* mainGrid ); + +private: + QRadioButton* m_xyzRadio; + QRadioButton* m_ijkRadio; + + QLabel* m_coordinateLabel; + QLineEdit* m_coordinateEdit; + QLabel* m_cellLabel; + QLineEdit* m_cellEdit; + + QPushButton* m_submitButton; + QPushButton* m_appendButton; +}; diff --git a/ApplicationLibCode/UserInterface/RiuDepthQwtPlot.cpp b/ApplicationLibCode/UserInterface/RiuDepthQwtPlot.cpp index fb8070a8e5..dcf83a5432 100644 --- a/ApplicationLibCode/UserInterface/RiuDepthQwtPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuDepthQwtPlot.cpp @@ -89,10 +89,18 @@ void RiuDepthQwtPlot::addCurve( const RimCase* rimCase, return; } - double yMax = *std::max_element( depthValues.begin(), depthValues.end() ); - double yMin = *std::min_element( depthValues.begin(), depthValues.end() ); - m_maxY = std::max( yMax, m_maxY ); - m_minY = std::min( yMin, m_minY ); + std::vector filtered; + for ( double x : depthValues ) + { + if ( !std::isnan( x ) ) filtered.push_back( x ); + } + + if ( !filtered.empty() ) + { + auto [min_it, max_it] = std::minmax_element( filtered.begin(), filtered.end() ); + m_maxY = std::max( *max_it, m_maxY ); + m_minY = std::min( *min_it, m_minY ); + } std::vector tmpDepths; const double nan = std::nan( "" ); diff --git a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp index 1d06c704cb..7c14983c47 100644 --- a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp +++ b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp @@ -18,17 +18,14 @@ #include "RiuDockWidgetTools.h" -#include "RimEclipseView.h" -#include "RimGeoMechView.h" - #include "RiuMainWindow.h" - -#include "cvfAssert.h" +#include "RiuPlotMainWindow.h" #include "DockManager.h" #include "DockWidget.h" -#include +#include "cafAssert.h" +#include "cafPdmUiTreeView.h" //-------------------------------------------------------------------------------------------------- /// @@ -147,6 +144,14 @@ QString RiuDockWidgetTools::mainWindowQuickAccessName() return "dockQuickAccess_mainWindow"; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiuDockWidgetTools::mainWindowCellSelectionToolName() +{ + return "dockCellSelectionTool_mainWindow"; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -405,6 +410,40 @@ QIcon RiuDockWidgetTools::dockIcon( const QString dockWidgetName ) return QIcon( ":/view.svg" ); } +//-------------------------------------------------------------------------------------------------- +// When a user clicks on an item in a tree view, or right-clicks for the context menu, the global selection is set to the activated object. +// This function can be used to get the selection from a different tree view +//-------------------------------------------------------------------------------------------------- +std::vector RiuDockWidgetTools::selectedItemsInTreeView( const QString& dockWidgetName ) +{ + ads::CDockWidget* dockWidget = nullptr; + if ( auto mainWindow = RiuMainWindow::instance() ) + { + dockWidget = RiuDockWidgetTools::findDockWidget( mainWindow->dockManager(), dockWidgetName ); + } + + if ( !dockWidget ) + { + if ( auto plotWindow = RiuPlotMainWindow::instance() ) + { + dockWidget = RiuDockWidgetTools::findDockWidget( plotWindow->dockManager(), dockWidgetName ); + } + } + + if ( dockWidget ) + { + if ( auto tree = dynamic_cast( dockWidget->widget() ) ) + { + std::vector uiItems; + tree->selectedUiItems( uiItems ); + + return uiItems; + } + } + + return {}; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h index 55423cac9c..11abb6af7b 100644 --- a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h +++ b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h @@ -34,6 +34,11 @@ class CDockWidget; class CDockManager; }; // namespace ads +namespace caf +{ +class PdmUiItem; +}; // namespace caf + //================================================================================================== // // @@ -59,6 +64,7 @@ public: static QString mainWindowMohrsCirclePlotName(); static QString mainWindowUndoStackName(); static QString mainWindowQuickAccessName(); + static QString mainWindowCellSelectionToolName(); static QString mainWindowProjectTreeName(); static QString mainWindowDataSourceTreeName(); @@ -95,6 +101,8 @@ public: static QIcon dockIcon( const QString dockWidgetName ); + static std::vector selectedItemsInTreeView( const QString& dockWidgetName ); + private: static QByteArray defaultEclipseDockState(); static QByteArray defaultGeoMechDockState(); diff --git a/ApplicationLibCode/UserInterface/RiuDockedQwtPlot.cpp b/ApplicationLibCode/UserInterface/RiuDockedQwtPlot.cpp index 05b98b3d0d..ff3cc6e724 100644 --- a/ApplicationLibCode/UserInterface/RiuDockedQwtPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuDockedQwtPlot.cpp @@ -50,7 +50,7 @@ void RiuDockedQwtPlot::applyFontSizes( bool replot /*= false*/ ) QwtText titleText = title(); QFont font = titleText.font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( titleFontSize ) ); + font.setPointSize( titleFontSize ); titleText.setFont( font ); setTitle( titleText ); @@ -58,19 +58,19 @@ void RiuDockedQwtPlot::applyFontSizes( bool replot /*= false*/ ) { QwtText text = axisTitle( axis ); QFont axisTitleFont = text.font(); - axisTitleFont.setPixelSize( caf::FontTools::pointSizeToPixelSize( axisFontSize ) ); + axisTitleFont.setPointSize( axisFontSize ); text.setFont( axisTitleFont ); setAxisTitle( axis, text ); QFont valuesFont = axisFont( axis ); - valuesFont.setPixelSize( axisTitleFont.pixelSize() ); + valuesFont.setPointSize( axisTitleFont.pointSize() ); setAxisFont( axis, valuesFont ); } if ( legend() ) { auto font = legend()->font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( legendFontSize ) ); + font.setPointSize( legendFontSize ); legend()->setFont( font ); } diff --git a/ApplicationLibCode/UserInterface/RiuDragDrop.cpp b/ApplicationLibCode/UserInterface/RiuDragDrop.cpp index f769dac2b5..b6f04e70b7 100644 --- a/ApplicationLibCode/UserInterface/RiuDragDrop.cpp +++ b/ApplicationLibCode/UserInterface/RiuDragDrop.cpp @@ -420,7 +420,7 @@ bool RiuDragDrop::dropMimeData( const QMimeData* data, Qt::DropAction action, in auto summaryCaseMainCollection = dropTarget->firstAncestorOrThisOfType(); if ( summaryCaseMainCollection ) { - return handleSummaryCaseMainCollectionDrop( action, draggedObjects, summaryCaseMainCollection ); + return handleSummaryCaseMainCollectionDrop( action, draggedObjects, summaryCaseMainCollection, row ); } auto surfaceCollection = dropTarget->firstAncestorOrThisOfType(); @@ -607,7 +607,8 @@ bool RiuDragDrop::handleSummaryCaseCollectionDrop( Qt::DropAction action, //-------------------------------------------------------------------------------------------------- bool RiuDragDrop::handleSummaryCaseMainCollectionDrop( Qt::DropAction action, caf::PdmObjectGroup& draggedObjects, - RimSummaryCaseMainCollection* summaryCaseDropTarget ) + RimSummaryCaseMainCollection* summaryCaseDropTarget, + int insertAtPosition ) { std::vector summaryCases = RiuTypedPdmObjects::typedObjectsFromGroup( draggedObjects ); @@ -622,10 +623,21 @@ bool RiuDragDrop::handleSummaryCaseMainCollectionDrop( Qt::DropAction summaryCaseCollection->removeCase( summaryCase ); summaryCaseDropTarget->addCase( summaryCase ); summaryCaseCollection->updateConnectedEditors(); + + summaryCaseDropTarget->updateConnectedEditors(); + return true; } } - summaryCaseDropTarget->updateConnectedEditors(); + if ( summaryCases.size() == 1 ) + { + auto summaryCase = summaryCases.front(); + auto parentContainer = summaryCase->firstAncestorOfType(); + if ( parentContainer == summaryCaseDropTarget ) + { + parentContainer->moveCase( summaryCase, insertAtPosition ); + } + } return true; } diff --git a/ApplicationLibCode/UserInterface/RiuDragDrop.h b/ApplicationLibCode/UserInterface/RiuDragDrop.h index fbeedd02dc..d9d6a7d5be 100644 --- a/ApplicationLibCode/UserInterface/RiuDragDrop.h +++ b/ApplicationLibCode/UserInterface/RiuDragDrop.h @@ -82,7 +82,8 @@ private: bool handleSummaryCaseCollectionDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimSummaryEnsemble* summaryCaseCollection ); bool handleSummaryCaseMainCollectionDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, - RimSummaryCaseMainCollection* summaryCaseMainCollection ); + RimSummaryCaseMainCollection* summaryCaseMainCollection, + int insertAtPosition ); bool handleSurfaceCollectionDrop( Qt::DropAction action, int row, caf::PdmObjectGroup& objectGroup, RimSurfaceCollection* surfaceCollection ); diff --git a/ApplicationLibCode/UserInterface/RiuFemResultTextBuilder.cpp b/ApplicationLibCode/UserInterface/RiuFemResultTextBuilder.cpp index 329b3ba39c..8977a9ffe3 100644 --- a/ApplicationLibCode/UserInterface/RiuFemResultTextBuilder.cpp +++ b/ApplicationLibCode/UserInterface/RiuFemResultTextBuilder.cpp @@ -28,8 +28,8 @@ #include "RigFormationNames.h" #include "RigGeoMechCaseData.h" +#include "Formations/RimFormationNames.h" #include "Rim2dIntersectionView.h" -#include "RimFormationNames.h" #include "RimGeoMechCase.h" #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" diff --git a/ApplicationLibCode/UserInterface/RiuGridCrossQwtPlot.cpp b/ApplicationLibCode/UserInterface/RiuGridCrossQwtPlot.cpp index 6006f91a72..b97df2307b 100644 --- a/ApplicationLibCode/UserInterface/RiuGridCrossQwtPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuGridCrossQwtPlot.cpp @@ -141,7 +141,8 @@ void RiuGridCrossQwtPlot::updateAnnotationObjects( RimPlotAxisPropertiesInterfac annotation->name(), annotation->penStyle(), annotation->value(), - RiaDefines::Orientation::HORIZONTAL ); + RiaDefines::Orientation::HORIZONTAL, + Qt::AlignRight ); } } @@ -153,7 +154,7 @@ void RiuGridCrossQwtPlot::setLegendFontSize( int fontSize ) if ( qwtPlot()->legend() ) { QFont font = qwtPlot()->legend()->font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( fontSize ) ); + font.setPointSize( fontSize ); qwtPlot()->legend()->setFont( font ); // Set font size for all existing labels QList labels = qwtPlot()->legend()->findChildren(); diff --git a/ApplicationLibCode/UserInterface/RiuMainWindow.cpp b/ApplicationLibCode/UserInterface/RiuMainWindow.cpp index d1d8de2057..7bf1d33ca5 100644 --- a/ApplicationLibCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationLibCode/UserInterface/RiuMainWindow.cpp @@ -29,13 +29,13 @@ #include "RicGridCalculatorDialog.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "QuickAccess/RimQuickAccessCollection.h" #include "Rim2dIntersectionView.h" #include "Rim3dView.h" #include "RimCellEdgeColors.h" #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" -#include "RimEclipseContourMapView.h" #include "RimEclipseFaultColors.h" #include "RimEclipsePropertyFilter.h" #include "RimEclipseResultDefinition.h" @@ -50,6 +50,7 @@ #include "RimViewLinkerCollection.h" #include "RimViewWindow.h" +#include "RiuCellSelectionTool.h" #include "RiuDepthQwtPlot.h" #include "RiuDockWidgetTools.h" #include "RiuMdiArea.h" @@ -325,6 +326,8 @@ void RiuMainWindow::cleanupGuiCaseClose() } RicShowSummaryCurveCalculatorFeature::hideCurveCalculatorDialog(); + + if ( m_messagePanel ) m_messagePanel->slotClearMessages(); } //-------------------------------------------------------------------------------------------------- @@ -332,6 +335,8 @@ void RiuMainWindow::cleanupGuiCaseClose() //-------------------------------------------------------------------------------------------------- void RiuMainWindow::cleanupGuiBeforeProjectClose() { + m_mdiArea->closeAllSubWindows(); + setPdmRoot( nullptr ); cleanupGuiCaseClose(); @@ -406,13 +411,13 @@ void RiuMainWindow::createActions() m_viewFromWest->setToolTip( "Look East (Ctrl+Alt+E)" ); caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromWest, QKeySequence( tr( "Ctrl+Alt+E" ) ) ); - m_viewFromAbove = new QAction( QIcon( ":/DownView.svg" ), "Look Down", this ); - m_viewFromAbove->setToolTip( "Look Down (Ctrl+Alt+D)" ); - caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromAbove, QKeySequence( tr( "Ctrl+Alt+D" ) ) ); + m_viewFromAbove = new QAction( QIcon( ":/DownView.svg" ), "Top View", this ); + m_viewFromAbove->setToolTip( "Top View (Ctrl+Alt+T)" ); + caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromAbove, QKeySequence( tr( "Ctrl+Alt+T" ) ) ); - m_viewFromBelow = new QAction( QIcon( ":/UpView.svg" ), "Look Up", this ); - m_viewFromBelow->setToolTip( "Look Up (Ctrl+Alt+U)" ); - caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromBelow, QKeySequence( tr( "Ctrl+Alt+U" ) ) ); + m_viewFromBelow = new QAction( QIcon( ":/UpView.svg" ), "Bottom View", this ); + m_viewFromBelow->setToolTip( "Bottom View (Ctrl+Alt+B)" ); + caf::CmdFeature::applyShortcutWithHintToAction( m_viewFromBelow, QKeySequence( tr( "Ctrl+Alt+B" ) ) ); connect( m_viewFromNorth, SIGNAL( triggered() ), SLOT( slotViewFromNorth() ) ); connect( m_viewFromSouth, SIGNAL( triggered() ), SLOT( slotViewFromSouth() ) ); @@ -532,6 +537,9 @@ void RiuMainWindow::createMenus() viewMenu->addAction( m_viewFromEast ); viewMenu->addAction( m_viewFromBelow ); viewMenu->addAction( m_viewFromAbove ); + viewMenu->addSeparator(); + viewMenu->addAction( cmdFeatureMgr->action( "RicApplyUserDefinedCameraFeature" ) ); + viewMenu->addAction( cmdFeatureMgr->action( "RicStoreUserDefinedCameraFeature" ) ); connect( viewMenu, SIGNAL( aboutToShow() ), SLOT( slotRefreshViewActions() ) ); @@ -640,6 +648,7 @@ void RiuMainWindow::createToolBars() toolbar->addAction( m_viewFromWest ); toolbar->addAction( m_viewFromAbove ); toolbar->addAction( m_viewFromBelow ); + toolbar->addAction( cmdFeatureMgr->action( "RicApplyUserDefinedCameraFeature" ) ); QLabel* scaleLabel = new QLabel( toolbar ); scaleLabel->setText( "Scale" ); @@ -868,7 +877,6 @@ void RiuMainWindow::createDockPanels() dockManager()->addDockWidgetTabToArea( dockWidget, bottomArea ); } - // result info { auto dockWidget = RiuDockWidgetTools::createDockWidget( "Result Info", RiuDockWidgetTools::mainWindowResultInfoName(), dockManager() ); @@ -877,8 +885,16 @@ void RiuMainWindow::createDockPanels() dockManager()->addDockWidget( ads::DockWidgetArea::LeftDockWidgetArea, dockWidget, bottomArea ); } + { + auto dockWidget = + RiuDockWidgetTools::createDockWidget( "Cell Selection Tool", RiuDockWidgetTools::mainWindowCellSelectionToolName(), dockManager() ); + + m_cellSelectionTool = new RiuCellSelectionTool( dockWidget ); + dockWidget->setWidget( m_cellSelectionTool ); + dockManager()->addDockWidget( ads::DockWidgetArea::LeftDockWidgetArea, dockWidget, bottomArea ); + } + ads::CDockAreaWidget* procAndMsgTabs = nullptr; - // process monitor { auto dockWidget = RiuDockWidgetTools::createDockWidget( "Process Monitor", RiuDockWidgetTools::mainWindowProcessMonitorName(), dockManager() ); @@ -968,7 +984,9 @@ void RiuMainWindow::slotRefreshViewActions() commandIds << "RicLinkVisibleViewsFeature" << "RicTileWindowsFeature" << "RicTogglePerspectiveViewFeature" - << "RicViewZoomAllFeature"; + << "RicViewZoomAllFeature" + << "RicApplyUserDefinedCameraFeature" + << "RicStoreUserDefinedCameraFeature"; caf::CmdFeatureManager::instance()->refreshEnabledState( commandIds ); } @@ -1009,7 +1027,7 @@ void RiuMainWindow::refreshAnimationActions() if ( activeView->isTimeStepDependentDataVisibleInThisOrComparisonView() ) { - timeStepStrings = activeView->ownerCase()->timeStepStrings(); + timeStepStrings = activeView->timeStepStrings(); } else { diff --git a/ApplicationLibCode/UserInterface/RiuMainWindow.h b/ApplicationLibCode/UserInterface/RiuMainWindow.h index 9cba9dca15..877eb3ad9c 100644 --- a/ApplicationLibCode/UserInterface/RiuMainWindow.h +++ b/ApplicationLibCode/UserInterface/RiuMainWindow.h @@ -55,6 +55,7 @@ class RiuPvtPlotPanel; class RiuMohrsCirclePlot; class RiuMdiArea; class RiuSeismicHistogramPanel; +class RiuCellSelectionTool; class RicGridCalculatorDialog; @@ -182,12 +183,14 @@ private: RiuProcessMonitor* m_processMonitor; QPointer m_messagePanel; - RiuResultQwtPlot* m_resultQwtPlot; - RiuDepthQwtPlot* m_depthQwtPlot; - RiuMohrsCirclePlot* m_mohrsCirclePlot; - RiuRelativePermeabilityPlotPanel* m_relPermPlotPanel; - RiuSeismicHistogramPanel* m_seismicHistogramPanel; - RiuPvtPlotPanel* m_pvtPlotPanel; + RiuResultQwtPlot* m_resultQwtPlot; + RiuDepthQwtPlot* m_depthQwtPlot; + RiuMohrsCirclePlot* m_mohrsCirclePlot; + RiuRelativePermeabilityPlotPanel* m_relPermPlotPanel; + RiuSeismicHistogramPanel* m_seismicHistogramPanel; + RiuPvtPlotPanel* m_pvtPlotPanel; + RiuCellSelectionTool* m_cellSelectionTool; + std::unique_ptr m_gridCalculatorDialog; QLabel* m_memoryCriticalWarning; diff --git a/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp b/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp index 7e66ca900d..a2316bc01c 100644 --- a/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp +++ b/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp @@ -210,29 +210,21 @@ void RiuMainWindowTools::setFixedWindowSizeFor3dViews( RiuMainWindowBase* mainWi RimProject* proj = RimProject::current(); if ( !proj ) return; - std::vector projectCases = proj->allGridCases(); - for ( RimCase* cas : projectCases ) + for ( Rim3dView* riv : proj->allViews() ) { - if ( !cas ) continue; - - std::vector views = cas->views(); - - for ( Rim3dView* riv : views ) + if ( riv && riv->viewer() ) { - if ( riv && riv->viewer() ) + // Make sure all views are maximized for snapshotting + QMdiSubWindow* subWnd = mainWindow->findMdiSubWindow( riv->viewer()->layoutWidget() ); + if ( subWnd ) { - // Make sure all views are maximized for snapshotting - QMdiSubWindow* subWnd = mainWindow->findMdiSubWindow( riv->viewer()->layoutWidget() ); - if ( subWnd ) - { - subWnd->showMaximized(); - } - - // This size is set to match the regression test reference images - QSize windowSize( width, height ); - - riv->viewer()->setFixedSize( windowSize ); + subWnd->showMaximized(); } + + // This size is set to match the regression test reference images + QSize windowSize( width, height ); + + riv->viewer()->setFixedSize( windowSize ); } } } diff --git a/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp b/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp index f8b7aa49f9..e923b82652 100644 --- a/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp +++ b/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp @@ -29,6 +29,7 @@ #include "RiuQwtLinearScaleEngine.h" #include "RiuQwtPlotItem.h" #include "RiuQwtPlotTools.h" +#include "RiuQwtPlotWidget.h" #include "RiuScalarMapperLegendFrame.h" #include "cvfColor3.h" @@ -431,7 +432,7 @@ void RiuMatrixPlotWidget::createMatrixCells() cvf::Color3f contrastColor = RiaColorTools::contrastColor( cvf::Color3f( color ) ); textLabel.setColor( RiaColorTools::toQColor( contrastColor ) ); QFont font = textLabel.font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( m_valueFontSize ) ); + font.setPointSize( m_valueFontSize ); textLabel.setFont( font ); QwtPlotMarker* marker = new QwtPlotMarker(); marker->setLabel( textLabel ); diff --git a/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.h b/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.h index be1fa5a553..11657e6cb7 100644 --- a/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.h +++ b/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.h @@ -20,9 +20,7 @@ #include "RiuInterfaceToViewWindow.h" #include "RiuPlotItem.h" -#include "RiuQwtPlotWidget.h" -#include "cafFontTools.h" #include "cafPdmPointer.h" #include "cafSignal.h" @@ -36,6 +34,7 @@ class RimViewWindow; class RimRegularLegendConfig; class RiuAbstractLegendFrame; +class RiuQwtPlotWidget; class RiuMatrixPlotWidget : public QWidget, public RiuInterfaceToViewWindow, public caf::SignalEmitter { diff --git a/ApplicationLibCode/UserInterface/RiuMessagePanel.cpp b/ApplicationLibCode/UserInterface/RiuMessagePanel.cpp index 1b48f3e384..e7e7537ddb 100644 --- a/ApplicationLibCode/UserInterface/RiuMessagePanel.cpp +++ b/ApplicationLibCode/UserInterface/RiuMessagePanel.cpp @@ -130,8 +130,6 @@ void RiuMessagePanel::slotShowContextMenu( const QPoint& pos ) void RiuMessagePanel::slotClearMessages() { m_textEdit->clear(); - - RiaLogging::info( "Message window cleared." ); } //================================================================================================== diff --git a/ApplicationLibCode/UserInterface/RiuMessagePanel.h b/ApplicationLibCode/UserInterface/RiuMessagePanel.h index 483e89a3f4..3ef6aa1e61 100644 --- a/ApplicationLibCode/UserInterface/RiuMessagePanel.h +++ b/ApplicationLibCode/UserInterface/RiuMessagePanel.h @@ -40,9 +40,10 @@ public: void addMessage( RILogLevel messageLevel, const QString& msg ); QSize sizeHint() const override; + void slotClearMessages(); + private slots: void slotShowContextMenu( const QPoint& pos ); - void slotClearMessages(); private: QPointer m_textEdit; diff --git a/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp b/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp index 9bbf0269a7..3ed6c3c39e 100644 --- a/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp +++ b/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp @@ -80,9 +80,9 @@ RiuMultiPlotPage::RiuMultiPlotPage( RimPlotWindow* plotDefinition, QWidget* pare , m_previewMode( false ) , m_showSubTitles( false ) , m_autoAlignAxes( true ) - , m_titleFontPixelSize( 12 ) - , m_subTitleFontPixelSize( 11 ) - , m_legendFontPixelSize( 8 ) + , m_titleFontSize( 12 ) + , m_subTitleFontSize( 11 ) + , m_legendFontSize( 8 ) , m_axisTitleFontSize( 8 ) , m_axisValueFontSize( 8 ) @@ -290,8 +290,8 @@ void RiuMultiPlotPage::setTitleVisible( bool visible ) //-------------------------------------------------------------------------------------------------- void RiuMultiPlotPage::setTitleFontSizes( int titleFontSize, int subTitleFontSize ) { - m_titleFontPixelSize = caf::FontTools::pointSizeToPixelSize( titleFontSize ); - m_subTitleFontPixelSize = caf::FontTools::pointSizeToPixelSize( subTitleFontSize ); + m_titleFontSize = titleFontSize; + m_subTitleFontSize = subTitleFontSize; scheduleUpdate(); } @@ -301,7 +301,7 @@ void RiuMultiPlotPage::setTitleFontSizes( int titleFontSize, int subTitleFontSiz //-------------------------------------------------------------------------------------------------- void RiuMultiPlotPage::setLegendFontSize( int legendFontSize ) { - m_legendFontPixelSize = caf::FontTools::pointSizeToPixelSize( legendFontSize ); + m_legendFontSize = legendFontSize; scheduleUpdate(); } @@ -779,7 +779,7 @@ void RiuMultiPlotPage::updateSubTitleVisibility( QLabel* subTitle ) bool isSubTitleVisible = m_showSubTitles && !subTitle->text().isEmpty(); subTitle->setVisible( isSubTitleVisible ); QFont subTitleFont = subTitle->font(); - subTitleFont.setPixelSize( m_subTitleFontPixelSize ); + subTitleFont.setPointSize( m_subTitleFontSize ); subTitle->setFont( subTitleFont ); } @@ -836,7 +836,7 @@ void RiuMultiPlotPage::setRowAndColumnStretches( int row, int column, int rowSpa void RiuMultiPlotPage::updateLegendFont( RiuQwtPlotLegend* legend ) { QFont legendFont = legend->font(); - legendFont.setPixelSize( m_legendFontPixelSize ); + legendFont.setPointSize( m_legendFontSize ); // Set font size for all existing labels QList labels = legend->findChildren(); @@ -1104,7 +1104,7 @@ void RiuMultiPlotPage::applyLook() void RiuMultiPlotPage::updateTitleFont() { auto titleFont = m_plotTitle->font(); - titleFont.setPixelSize( m_titleFontPixelSize ); + titleFont.setPointSize( m_titleFontSize ); m_plotTitle->setFont( titleFont ); } diff --git a/ApplicationLibCode/UserInterface/RiuMultiPlotPage.h b/ApplicationLibCode/UserInterface/RiuMultiPlotPage.h index 3b2a1053d4..37763d1ee3 100644 --- a/ApplicationLibCode/UserInterface/RiuMultiPlotPage.h +++ b/ApplicationLibCode/UserInterface/RiuMultiPlotPage.h @@ -172,9 +172,9 @@ protected: std::map> m_visibleIndexToPositionMapping; caf::PdmPointer m_plotDefinition; - int m_titleFontPixelSize; - int m_subTitleFontPixelSize; - int m_legendFontPixelSize; + int m_titleFontSize; + int m_subTitleFontSize; + int m_legendFontSize; int m_axisTitleFontSize; int m_axisValueFontSize; diff --git a/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.cpp b/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.cpp index d9ef39c704..09c18ba405 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.cpp +++ b/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.cpp @@ -20,12 +20,14 @@ #include "RimPlotAxisAnnotation.h" #include "RiuGuiTheme.h" +#include "RiuQwtPlotCurveDefines.h" #include "cafCategoryMapper.h" #include "cvfMath.h" #include "qwt_plot.h" #include "qwt_plot_zoneitem.h" +#include "qwt_scale_map.h" #include "qwt_text.h" #include @@ -190,7 +192,8 @@ void RiuPlotAnnotationTool::attachAnnotationLine( QwtPlot* plot, const QString& annotationText, Qt::PenStyle penStyle, const double position, - RiaDefines::Orientation orientation ) + RiaDefines::Orientation orientation, + Qt::Alignment horizontalAlignment ) { m_plot = plot; @@ -202,22 +205,11 @@ void RiuPlotAnnotationTool::attachAnnotationLine( QwtPlot* plot, textColor = RiuGuiTheme::getColorByVariableName( "textColor" ); } - RiuPlotAnnotationTool::setLineProperties( line, annotationText, orientation, position, penStyle, color, textColor ); + RiuPlotAnnotationTool::setLineProperties( line, annotationText, orientation, position, penStyle, color, textColor, horizontalAlignment ); m_plotItems.push_back( line ); line->attach( m_plot ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPlotAnnotationTool::attachAnnotation( QwtPlot* plot, RimPlotAxisAnnotation* annotation, RiaDefines::Orientation orientation ) -{ - if ( annotation->annotationType() == RimPlotAxisAnnotation::AnnotationType::LINE ) - { - attachAnnotationLine( plot, annotation->color(), annotation->name(), annotation->penStyle(), annotation->value(), orientation ); - } -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -262,6 +254,23 @@ void RiuPlotAnnotationTool::detachAllAnnotations() m_plotItems.clear(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +Qt::Alignment RiuPlotAnnotationTool::textAlignment( RiaDefines::TextAlignment alignment ) +{ + switch ( alignment ) + { + case RiaDefines::TextAlignment::LEFT: + return Qt::AlignLeft; + case RiaDefines::TextAlignment::CENTER: + return Qt::AlignHCenter; + case RiaDefines::TextAlignment::RIGHT: + return Qt::AlignRight; + } + return Qt::AlignRight; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -341,6 +350,33 @@ void RiuPlotAnnotationTool::verticalRange( const QString& name, QStringList labels = name.split( " - " ); + // Define a lambda to calculate pixel distance between two timestamps + auto getPixelDistanceBetweenTimestamps = []( QwtPlot* plot, time_t time1, time_t time2 ) -> double + { + const QwtScaleMap& scaleMap = plot->canvasMap( QwtAxis::XBottom ); + + double t1 = static_cast( time1 ); + double t2 = static_cast( time2 ); + + double pixel1 = scaleMap.transform( t1 ); + double pixel2 = scaleMap.transform( t2 ); + + return std::abs( pixel2 - pixel1 ); + }; + + // Show labels inside the range by default + Qt::Alignment leftLineAlignment = Qt::AlignRight; + Qt::Alignment rightLineAlignment = Qt::AlignLeft; + + const auto distance = getPixelDistanceBetweenTimestamps( m_plot, xRange.first, xRange.second ); + const auto distanceThreshold = 200.0; + if ( distance < distanceThreshold ) + { + // Show labels outside if the range is narrow + leftLineAlignment = Qt::AlignLeft; + rightLineAlignment = Qt::AlignRight; + } + auto* line( new QwtPlotMarker() ); RiuPlotAnnotationTool::setLineProperties( line, labels[0], @@ -349,7 +385,7 @@ void RiuPlotAnnotationTool::verticalRange( const QString& name, Qt::SolidLine, color, textColor, - Qt::AlignRight | horizontalAlignment ); + leftLineAlignment | horizontalAlignment ); line->attach( m_plot ); m_plotItems.push_back( line ); @@ -361,7 +397,7 @@ void RiuPlotAnnotationTool::verticalRange( const QString& name, Qt::SolidLine, color, textColor, - Qt::AlignLeft | horizontalAlignment ); + rightLineAlignment | horizontalAlignment ); rightLine->attach( m_plot ); m_plotItems.push_back( rightLine ); } @@ -401,4 +437,6 @@ void RiuPlotAnnotationTool::setLineProperties( QwtPlotMarker* line, line->setLineStyle( QwtPlotMarker::VLine ); line->setXValue( linePosition ); } + + line->setZ( RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_ANNOTATION ) ); } diff --git a/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.h b/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.h index 03403ad32e..f7fa38b333 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.h +++ b/ApplicationLibCode/UserInterface/RiuPlotAnnotationTool.h @@ -58,9 +58,8 @@ public: const QString& annotationText, Qt::PenStyle penStyle, const double position, - RiaDefines::Orientation orientation ); - - void attachAnnotation( QwtPlot* plot, RimPlotAxisAnnotation* annotation, RiaDefines::Orientation orientation ); + RiaDefines::Orientation orientation, + Qt::Alignment horizontalAlignment ); void attachAnnotationRange( QwtPlot* plot, const QColor& color, @@ -83,6 +82,8 @@ public: void detachAllAnnotations(); + static Qt::Alignment textAlignment( RiaDefines::TextAlignment alignment ); + private: static Qt::Alignment trackTextAlignment( RiaDefines::TrackSpan trackSpan ); diff --git a/ApplicationLibCode/UserInterface/RiuPlotCurve.h b/ApplicationLibCode/UserInterface/RiuPlotCurve.h index 5e55185ee7..5e7b491d1f 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotCurve.h +++ b/ApplicationLibCode/UserInterface/RiuPlotCurve.h @@ -56,7 +56,6 @@ class RiuPlotCurve { public: explicit RiuPlotCurve( RimPlotCurve* ownerRimCurve, const QString& title = QString() ); - explicit RiuPlotCurve(); virtual ~RiuPlotCurve(); virtual void setTitle( const QString& title ) = 0; diff --git a/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.cpp b/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.cpp index 7f04aff931..63a4b5c0cb 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.cpp +++ b/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.cpp @@ -28,11 +28,11 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiuPlotCurveSymbol::RiuPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSizePt ) +RiuPlotCurveSymbol::RiuPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSize ) : m_style( riuStyle ) , m_globalLabel( label ) , m_labelPosition( labelPosition ) - , m_labelFontSizePx( caf::FontTools::pointSizeToPixelSize( labelFontSizePt ) ) + , m_labelFontSize( labelFontSize ) { } @@ -63,9 +63,9 @@ void RiuPlotCurveSymbol::setLabelPosition( LabelPosition labelPosition ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuPlotCurveSymbol::setLabelFontSize( int labelFontSizePt ) +void RiuPlotCurveSymbol::setLabelFontSize( int labelFontSize ) { - m_labelFontSizePx = caf::FontTools::pointSizeToPixelSize( labelFontSizePt ); + m_labelFontSize = labelFontSize; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.h b/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.h index 50aba10c75..228ae402f6 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.h +++ b/ApplicationLibCode/UserInterface/RiuPlotCurveSymbol.h @@ -64,7 +64,7 @@ public: SYMBOL_DOWN_ALIGNED_TRIANGLE }; - RiuPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition = LabelAboveSymbol, int labelFontSizePt = 8 ); + RiuPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition = LabelAboveSymbol, int labelFontSize = 8 ); QString globalLabel() const; @@ -72,7 +72,7 @@ public: void setLabelPosition( LabelPosition labelPosition ); - void setLabelFontSize( int labelFontSizePt ); + void setLabelFontSize( int labelFontSize ); virtual void setPixmap( const QPixmap& pixmap ) = 0; @@ -94,6 +94,6 @@ public: protected: PointSymbolEnum m_style; QString m_globalLabel; - int m_labelFontSizePx; + int m_labelFontSize; LabelPosition m_labelPosition; }; diff --git a/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp b/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp index bfafc98f4a..43af07272e 100644 --- a/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp +++ b/ApplicationLibCode/UserInterface/RiuPlotMainWindow.cpp @@ -24,16 +24,17 @@ #include "RiaPreferences.h" #include "RiaPreferencesSystem.h" #include "RiaRegressionTestRunner.h" +#include "Summary/RiaSummaryPlotTools.h" #include "Summary/RiaSummaryTools.h" -#include "PlotBuilderCommands/RicSummaryPlotBuilder.h" - #include "RimEnsembleCurveSetCollection.h" #include "RimMainPlotCollection.h" #include "RimMultiPlot.h" #include "RimProject.h" +#include "RimSummaryCase.h" #include "RimSummaryCaseMainCollection.h" #include "RimSummaryCurveCollection.h" +#include "RimSummaryEnsembleTools.h" #include "RimSummaryMultiPlot.h" #include "RimSummaryMultiPlotCollection.h" #include "RimSummaryPlot.h" @@ -244,6 +245,8 @@ void RiuPlotMainWindow::initializeGuiNewProjectLoaded() //-------------------------------------------------------------------------------------------------- void RiuPlotMainWindow::cleanupGuiBeforeProjectClose() { + m_mdiArea->closeAllSubWindows(); + setPdmRoot( nullptr ); for ( auto pdmUiPropertyView : m_propertyViews ) @@ -258,6 +261,8 @@ void RiuPlotMainWindow::cleanupGuiBeforeProjectClose() m_multiPlotLayoutToolBarEditor->clear(); setWindowTitle( "Plots - ResInsight" ); + + if ( m_messagePanel ) m_messagePanel->slotClearMessages(); } //-------------------------------------------------------------------------------------------------- @@ -932,6 +937,17 @@ void RiuPlotMainWindow::selectedObjectsChanged( caf::PdmUiTreeView* projectTree, propertyView->showProperties( firstSelectedObject ); + std::vector summaryCases; + for ( auto uiItem : uiItems ) + { + if ( auto summaryCase = dynamic_cast( uiItem ) ) + { + summaryCases.push_back( summaryCase ); + } + } + + RimSummaryEnsembleTools::highlightCurvesForSummaryCases( summaryCases ); + if ( uiItems.size() == 1 && m_allowActiveViewChangeFromSelection ) { // Find the reservoir view or the Plot that the selected item is within @@ -1057,7 +1073,7 @@ void RiuPlotMainWindow::dropEvent( QDropEvent* event ) if ( RiuDragDrop::handleGenericDropEvent( event, objects ) ) { - RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( objects ); + RiaSummaryPlotTools::createAndAppendSummaryMultiPlot( objects ); } } diff --git a/ApplicationLibCode/UserInterface/RiuPlotUpdater.cpp b/ApplicationLibCode/UserInterface/RiuPlotUpdater.cpp new file mode 100644 index 0000000000..2cf315d0f5 --- /dev/null +++ b/ApplicationLibCode/UserInterface/RiuPlotUpdater.cpp @@ -0,0 +1,205 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuPlotUpdater.h" + +#include "Rim2dIntersectionView.h" +#include "Rim3dView.h" +#include "RimEclipseCellColors.h" +#include "RimEclipseResultDefinition.h" +#include "RimEclipseView.h" + +#include "Riu3dSelectionManager.h" + +#include + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuPlotUpdater::RiuPlotUpdater() + : m_viewToFollowAnimationFrom( nullptr ) + , m_eclipseResultDef( nullptr ) + , m_gridIndex( 0 ) + , m_gridLocalCellIndex( 0 ) + , m_timeStepIndex( 0 ) +{ +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuEclipseSelectionItem* RiuPlotUpdater::extractEclipseSelectionItem( const RiuSelectionItem* selectionItem, Rim3dView*& newFollowAnimView ) +{ + newFollowAnimView = nullptr; + RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; + + eclipseSelectionItem = dynamic_cast( const_cast( selectionItem ) ); + + if ( eclipseSelectionItem ) + { + // If we clicked in an eclipse view, and hit something using the standard result definition there, + // set this up to follow the animation there. + + RimEclipseView* clickedInEclView = dynamic_cast( eclipseSelectionItem->m_view.p() ); + + if ( clickedInEclView && clickedInEclView->cellResult() == eclipseSelectionItem->m_resultDefinition.p() ) + { + newFollowAnimView = eclipseSelectionItem->m_view; + } + } + else + { + auto intersectionSelItem = dynamic_cast( selectionItem ); + + if ( intersectionSelItem && intersectionSelItem->eclipseSelectionItem() ) + { + eclipseSelectionItem = intersectionSelItem->eclipseSelectionItem(); + newFollowAnimView = intersectionSelItem->view(); + } + } + + return eclipseSelectionItem; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPlotUpdater::doDelayedUpdate() +{ + if ( m_eclipseResultDef != nullptr ) + { + if ( !queryDataAndUpdatePlot( m_eclipseResultDef, m_timeStepIndex, m_gridIndex, m_gridLocalCellIndex ) ) + { + clearPlot(); + } + clearDelayedInformation(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPlotUpdater::storeDelayedInformation( const RiuEclipseSelectionItem* selItem ) +{ + if ( selItem != nullptr ) + { + m_eclipseResultDef = selItem->m_resultDefinition; + m_timeStepIndex = selItem->m_timestepIdx; + m_gridIndex = selItem->m_gridIndex; + m_gridLocalCellIndex = selItem->m_gridLocalCellIndex; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPlotUpdater::clearDelayedInformation() +{ + m_eclipseResultDef = nullptr; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPlotUpdater::updateOnSelectionChanged( const RiuSelectionItem* selectionItem ) +{ + if ( !plotPanel() ) + { + return; + } + + Rim3dView* newFollowAnimView = nullptr; + RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; + + eclipseSelectionItem = extractEclipseSelectionItem( selectionItem, newFollowAnimView ); + + bool mustClearPlot = true; + m_viewToFollowAnimationFrom = nullptr; + + if ( eclipseSelectionItem && eclipseSelectionItem->m_resultDefinition ) + { + if ( plotPanel()->isVisible() ) + { + if ( queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition, + eclipseSelectionItem->m_timestepIdx, + eclipseSelectionItem->m_gridIndex, + eclipseSelectionItem->m_gridLocalCellIndex ) ) + { + mustClearPlot = false; + } + } + else + { + storeDelayedInformation( eclipseSelectionItem ); + mustClearPlot = false; + } + m_viewToFollowAnimationFrom = newFollowAnimView; + } + + if ( mustClearPlot ) + { + clearDelayedInformation(); + clearPlot(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPlotUpdater::updateOnTimeStepChanged( Rim3dView* changedView ) +{ + if ( !plotPanel() ) + { + return; + } + + // Don't update the plot if the view that changed time step is different + // from the view that was the source of the current plot + + if ( changedView != m_viewToFollowAnimationFrom ) + { + return; + } + + // Fetch the current global selection and only continue if the selection's view matches the view with time step change + + const RiuSelectionItem* selectionItem = Riu3dSelectionManager::instance()->selectedItem(); + Rim3dView* newFollowAnimView = nullptr; + RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; + + eclipseSelectionItem = RiuPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView ); + + if ( eclipseSelectionItem && newFollowAnimView == changedView ) + { + if ( plotPanel()->isVisible() ) + { + if ( !queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition, + newFollowAnimView->currentTimeStep(), + eclipseSelectionItem->m_gridIndex, + eclipseSelectionItem->m_gridLocalCellIndex ) ) + { + clearPlot(); + } + } + else + { + storeDelayedInformation( eclipseSelectionItem ); + m_timeStepIndex = newFollowAnimView->currentTimeStep(); + } + } +} diff --git a/ApplicationLibCode/UserInterface/RiuPlotUpdater.h b/ApplicationLibCode/UserInterface/RiuPlotUpdater.h new file mode 100644 index 0000000000..20c47b549c --- /dev/null +++ b/ApplicationLibCode/UserInterface/RiuPlotUpdater.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2024 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// +#pragma once + +#include +#include + +class RiuEclipseSelectionItem; +class RiuSelectionItem; +class Rim3dView; +class RimEclipseView; +class RigEclipseCaseData; +class RimEclipseResultDefinition; +class QWidget; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuPlotUpdater +{ +public: + RiuPlotUpdater(); + + void updateOnSelectionChanged( const RiuSelectionItem* selectionItem ); + void updateOnTimeStepChanged( Rim3dView* changedView ); + + void doDelayedUpdate(); + +protected: + virtual void clearPlot() = 0; + virtual QWidget* plotPanel() = 0; + + virtual bool queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResDef, + size_t timeStepIndex, + size_t gridIndex, + size_t gridLocalCellIndex ) = 0; + + void storeDelayedInformation( const RiuEclipseSelectionItem* selItem ); + void clearDelayedInformation(); + + static RiuEclipseSelectionItem* extractEclipseSelectionItem( const RiuSelectionItem* selectionItem, Rim3dView*& newFollowAnimView ); + +protected: + const Rim3dView* m_viewToFollowAnimationFrom; + + // cached values for delayed plot updates + const RimEclipseResultDefinition* m_eclipseResultDef; + size_t m_timeStepIndex; + size_t m_gridIndex; + size_t m_gridLocalCellIndex; +}; diff --git a/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.cpp b/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.cpp index 6cc42753f4..7b3eb9cbbf 100644 --- a/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.cpp +++ b/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.cpp @@ -18,485 +18,18 @@ #include "RiuPvtPlotPanel.h" -#include "RiuDockedQwtPlot.h" -#include "RiuGuiTheme.h" #include "RiuPvtPlotUpdater.h" - -#include "RiaEclipseUnitTools.h" +#include "RiuPvtPlotWidget.h" #include "RigFlowDiagSolverInterface.h" #include "cvfAssert.h" #include "cvfMath.h" -#include "qwt_legend.h" -#include "qwt_picker_machine.h" -#include "qwt_plot.h" -#include "qwt_plot_curve.h" -#include "qwt_plot_grid.h" -#include "qwt_plot_layout.h" -#include "qwt_plot_marker.h" -#include "qwt_plot_picker.h" -#include "qwt_symbol.h" -#include "qwt_text.h" - #include #include #include #include -#include - -//================================================================================================== -// -// -// -//================================================================================================== -class PvtQwtPlot : public RiuDockedQwtPlot -{ -public: - PvtQwtPlot( QWidget* parent ) - : RiuDockedQwtPlot( parent ) - { - } - QSize sizeHint() const override { return QSize( 100, 100 ); } - QSize minimumSizeHint() const override { return QSize( 0, 0 ); } -}; - -//================================================================================================== -// -// -// -//================================================================================================== -class RiuPvtQwtPicker : public QwtPicker -{ -public: - RiuPvtQwtPicker( QwtPlot* plot, RiuPvtTrackerTextProvider* trackerTextProvider ) - : QwtPicker( QwtPicker::NoRubberBand, QwtPicker::AlwaysOn, plot->canvas() ) - , m_trackerTextProvider( trackerTextProvider ) - { - setStateMachine( new QwtPickerTrackerMachine ); - } - - QwtText trackerText( const QPoint& ) const override - { - QwtText text( m_trackerTextProvider->trackerText() ); - text.setRenderFlags( Qt::AlignLeft ); - return text; - } - -private: - const RiuPvtTrackerTextProvider* m_trackerTextProvider; -}; - -//================================================================================================== -/// -/// \class RiuPvtPlotWidget -/// -/// -/// -//================================================================================================== - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuPvtPlotWidget::RiuPvtPlotWidget( RiuPvtPlotPanel* parent ) - : QWidget( parent ) - , m_trackerPlotMarker( nullptr ) -{ - m_qwtPlot = new PvtQwtPlot( this ); - m_qwtPlot->setProperty( "qss-class", "PvtPlot" ); - setPlotDefaults( m_qwtPlot ); - applyFontSizes( false ); - - QHBoxLayout* layout = new QHBoxLayout(); - layout->addWidget( m_qwtPlot ); - layout->setSpacing( 0 ); - layout->setContentsMargins( 0, 0, 0, 0 ); - - setLayout( layout ); - - m_qwtPicker = new RiuPvtQwtPicker( m_qwtPlot, this ); - RiuGuiTheme::styleQwtItem( m_qwtPicker ); - connect( m_qwtPicker, SIGNAL( activated( bool ) ), this, SLOT( slotPickerActivated( bool ) ) ); - connect( m_qwtPicker, SIGNAL( moved( const QPoint& ) ), this, SLOT( slotPickerPointChanged( const QPoint& ) ) ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPvtPlotWidget::setPlotDefaults( QwtPlot* plot ) -{ - plot->setAutoFillBackground( true ); - - QFrame* canvasFrame = dynamic_cast( plot->canvas() ); - if ( canvasFrame ) - { - canvasFrame->setFrameShape( QFrame::NoFrame ); - } - - // Grid - { - QwtPlotGrid* grid = new QwtPlotGrid; - grid->attach( plot ); - RiuGuiTheme::styleQwtItem( grid ); - } - - // Axis number font - { - QFont axisFont = plot->axisFont( QwtAxis::XBottom ); - axisFont.setPointSize( 8 ); - plot->setAxisFont( QwtAxis::XBottom, axisFont ); - plot->setAxisFont( QwtAxis::YLeft, axisFont ); - } - - // Axis title font - { - QwtText axisTitle = plot->axisTitle( QwtAxis::XBottom ); - QFont axisTitleFont = axisTitle.font(); - axisTitleFont.setPointSize( 8 ); - axisTitleFont.setBold( false ); - axisTitle.setFont( axisTitleFont ); - axisTitle.setRenderFlags( Qt::AlignRight ); - plot->setAxisTitle( QwtAxis::XBottom, axisTitle ); - plot->setAxisTitle( QwtAxis::YLeft, axisTitle ); - } - - // Title font - { - QwtText plotTitle = plot->title(); - QFont titleFont = plotTitle.font(); - titleFont.setPointSize( 12 ); - plotTitle.setFont( titleFont ); - plot->setTitle( plotTitle ); - } - - plot->setAxisMaxMinor( QwtAxis::XBottom, 2 ); - plot->setAxisMaxMinor( QwtAxis::YLeft, 3 ); - - plot->plotLayout()->setAlignCanvasToScales( true ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPvtPlotWidget::plotCurves( RiaDefines::EclipseUnitSystem unitSystem, - const std::vector& curveArr, - double pressure, - double pointMarkerYValue, - const QString& pointMarkerLabel, - const QString& plotTitle, - const QString& yAxisTitle ) -{ - m_qwtPlot->detachItems( QwtPlotItem::Rtti_PlotCurve ); - m_qwtPlot->detachItems( QwtPlotItem::Rtti_PlotMarker ); - m_qwtCurveArr.clear(); - m_pvtCurveArr.clear(); - m_trackerPlotMarker = nullptr; - - // Construct an auxiliary curve that connects the first point in all the input curves as a visual aid - // This should only be shown when the phase being plotted is oil - // Will not be added to our array of qwt curves since we do not expect the user to interact with it - { - std::vector xVals; - std::vector yVals; - for ( size_t i = 0; i < curveArr.size(); i++ ) - { - const RigFlowDiagSolverInterface::PvtCurve& curve = curveArr[i]; - if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::OIL && !curve.pressureVals.empty() && !curve.yVals.empty() ) - { - xVals.push_back( curve.pressureVals[0] ); - yVals.push_back( curve.yVals[0] ); - } - } - - if ( xVals.size() > 1 ) - { - QwtPlotCurve* qwtCurve = new QwtPlotCurve( "Auxiliary" ); - qwtCurve->setSamples( xVals.data(), yVals.data(), static_cast( xVals.size() ) ); - - qwtCurve->setStyle( QwtPlotCurve::Lines ); - qwtCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true ); - - qwtCurve->attach( m_qwtPlot ); - RiuGuiTheme::styleQwtItem( qwtCurve ); - } - } - - // Add the primary curves - for ( size_t i = 0; i < curveArr.size(); i++ ) - { - const RigFlowDiagSolverInterface::PvtCurve& curve = curveArr[i]; - QwtPlotCurve* qwtCurve = new QwtPlotCurve(); - QwtSymbol* curveSymbol = new QwtSymbol( QwtSymbol::Ellipse ); - - CVF_ASSERT( curve.pressureVals.size() == curve.yVals.size() ); - qwtCurve->setSamples( curve.pressureVals.data(), curve.yVals.data(), static_cast( curve.pressureVals.size() ) ); - - qwtCurve->setStyle( QwtPlotCurve::Lines ); - - if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::GAS ) - { - qwtCurve->setTitle( "Gas" ); - } - else if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::OIL ) - { - qwtCurve->setTitle( "Oil" ); - } - else - { - qwtCurve->setTitle( "Undefined" ); - } - - qwtCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true ); - - curveSymbol->setSize( 6, 6 ); - curveSymbol->setBrush( Qt::NoBrush ); - qwtCurve->setSymbol( curveSymbol ); - - qwtCurve->attach( m_qwtPlot ); - RiuGuiTheme::styleQwtItem( qwtCurve ); - - m_qwtCurveArr.push_back( qwtCurve ); - } - - m_pvtCurveArr = curveArr; - CVF_ASSERT( m_pvtCurveArr.size() == m_qwtCurveArr.size() ); - - // Add vertical marker line to indicate cell pressure - if ( pressure != HUGE_VAL ) - { - QwtPlotMarker* lineMarker = new QwtPlotMarker; - - QPen pen; - pen.setStyle( Qt::DashLine ); - lineMarker->setLinePen( pen ); - - lineMarker->setXValue( pressure ); - lineMarker->setLineStyle( QwtPlotMarker::VLine ); - lineMarker->setLabel( QString( "PRESSURE" ) ); - lineMarker->setLabelAlignment( Qt::AlignTop | Qt::AlignRight ); - lineMarker->setLabelOrientation( Qt::Vertical ); - lineMarker->attach( m_qwtPlot ); - RiuGuiTheme::styleQwtItem( lineMarker ); - } - - // Then point marker - if ( pressure != HUGE_VAL && pointMarkerYValue != HUGE_VAL ) - { - QwtPlotMarker* pointMarker = new QwtPlotMarker; - pointMarker->setValue( pressure, pointMarkerYValue ); - - QwtSymbol* symbol = new QwtSymbol( QwtSymbol::Ellipse ); - symbol->setSize( 13, 13 ); - QPen pen; - pen.setWidth( 2 ); - symbol->setPen( pen ); - symbol->setBrush( Qt::NoBrush ); - pointMarker->setSymbol( symbol ); - - if ( !pointMarkerLabel.isEmpty() ) - { - QwtText text( pointMarkerLabel ); - text.setRenderFlags( Qt::AlignLeft ); - text.setColor( RiuGuiTheme::getColorByVariableName( "textColor" ) ); - pointMarker->setLabel( text ); - pointMarker->setLabelAlignment( Qt::AlignTop | Qt::AlignRight ); - } - - pointMarker->attach( m_qwtPlot ); - RiuGuiTheme::styleQwtItem( pointMarker ); - } - - m_qwtPlot->setTitle( plotTitle ); - - m_qwtPlot->setAxisTitle( QwtAxis::XBottom, QString( "Pressure [%1]" ).arg( RiaEclipseUnitTools::unitStringPressure( unitSystem ) ) ); - m_qwtPlot->setAxisTitle( QwtAxis::YLeft, yAxisTitle ); - - updateTrackerPlotMarkerAndLabelFromPicker(); - - m_qwtPlot->replot(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPvtPlotWidget::applyFontSizes( bool replot ) -{ - m_qwtPlot->applyFontSizes( replot ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPvtPlotWidget::updateTrackerPlotMarkerAndLabelFromPicker() -{ - bool hasValidSamplePoint = false; - QPointF samplePoint; - QString mixRatioText = ""; - double mixRat = HUGE_VAL; - - if ( m_qwtPicker && m_qwtPicker->isActive() ) - { - const QPoint trackerPos = m_qwtPicker->trackerPosition(); - - int pointSampleIdx = -1; - const QwtPlotCurve* closestQwtCurve = closestCurveSample( trackerPos, &pointSampleIdx ); - if ( closestQwtCurve && pointSampleIdx >= 0 ) - { - samplePoint = closestQwtCurve->sample( pointSampleIdx ); - hasValidSamplePoint = true; - - size_t curveIdx = indexOfQwtCurve( closestQwtCurve ); - if ( curveIdx < m_pvtCurveArr.size() ) - { - const RigFlowDiagSolverInterface::PvtCurve& pvtCurve = m_pvtCurveArr[curveIdx]; - if ( static_cast( pointSampleIdx ) < pvtCurve.mixRatVals.size() ) - { - mixRat = pvtCurve.mixRatVals[pointSampleIdx]; - - // The text is Rs or Rv depending on phase - mixRatioText = ( pvtCurve.phase == RigFlowDiagSolverInterface::PvtCurve::GAS ) ? "Rv" : "Rs"; - } - } - } - } - - m_trackerLabel = ""; - - bool needsReplot = false; - - if ( hasValidSamplePoint ) - { - if ( !m_trackerPlotMarker ) - { - m_trackerPlotMarker = new QwtPlotMarker; - m_trackerPlotMarker->setTitle( QString( "TrackedPoint" ) ); - - QwtSymbol* symbol = new QwtSymbol( QwtSymbol::Ellipse ); - symbol->setSize( 13, 13 ); - symbol->setBrush( Qt::NoBrush ); - m_trackerPlotMarker->setSymbol( symbol ); - m_trackerPlotMarker->attach( m_qwtPlot ); - RiuGuiTheme::styleQwtItem( m_trackerPlotMarker ); - - needsReplot = true; - } - - if ( m_trackerPlotMarker->value() != samplePoint ) - { - m_trackerPlotMarker->setValue( samplePoint ); - needsReplot = true; - } - - m_trackerLabel = QString( "%1 (%2)" ).arg( samplePoint.y() ).arg( samplePoint.x() ); - if ( mixRat != HUGE_VAL ) - { - m_trackerLabel += QString( "\n%1 = %2" ).arg( mixRatioText ).arg( mixRat ); - } - } - else - { - if ( m_trackerPlotMarker ) - { - m_trackerPlotMarker->detach(); - delete m_trackerPlotMarker; - m_trackerPlotMarker = nullptr; - - needsReplot = true; - } - } - - if ( needsReplot ) - { - m_qwtPlot->replot(); - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const QwtPlotCurve* RiuPvtPlotWidget::closestCurveSample( const QPoint& cursorPosition, int* closestSampleIndex ) const -{ - // Construct a set containing the relevant qwt curves to consider - // These are the curves that have a corresponding Pvt source curve - std::set relevantQwtCurvesSet( m_qwtCurveArr.begin(), m_qwtCurveArr.end() ); - - if ( closestSampleIndex ) *closestSampleIndex = -1; - - const QwtPlotCurve* closestCurve = nullptr; - double distMin = HUGE_VAL; - int closestPointSampleIndex = -1; - - const QwtPlotItemList& itemList = m_qwtPlot->itemList(); - for ( QwtPlotItemIterator it = itemList.begin(); it != itemList.end(); it++ ) - { - if ( ( *it )->rtti() == QwtPlotItem::Rtti_PlotCurve ) - { - const QwtPlotCurve* curve = static_cast( *it ); - if ( relevantQwtCurvesSet.find( curve ) != relevantQwtCurvesSet.end() ) - { - double dist = HUGE_VAL; - int candidateSampleIndex = curve->closestPoint( cursorPosition, &dist ); - if ( dist < distMin ) - { - closestCurve = curve; - closestPointSampleIndex = candidateSampleIndex; - distMin = dist; - } - } - } - } - - if ( closestCurve && closestPointSampleIndex >= 0 && distMin < 50 ) - { - if ( closestSampleIndex ) *closestSampleIndex = closestPointSampleIndex; - return closestCurve; - } - else - { - return nullptr; - } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -size_t RiuPvtPlotWidget::indexOfQwtCurve( const QwtPlotCurve* qwtCurve ) const -{ - for ( size_t i = 0; i < m_qwtCurveArr.size(); i++ ) - { - if ( m_qwtCurveArr[i] == qwtCurve ) - { - return i; - } - } - - return cvf::UNDEFINED_SIZE_T; -} - -//-------------------------------------------------------------------------------------------------- -/// Implements the RiuPvtTrackerTextProvider interface -//-------------------------------------------------------------------------------------------------- -QString RiuPvtPlotWidget::trackerText() const -{ - return m_trackerLabel; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPvtPlotWidget::slotPickerPointChanged( const QPoint& pt ) -{ - updateTrackerPlotMarkerAndLabelFromPicker(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RiuPvtPlotWidget::slotPickerActivated( bool on ) -{ - updateTrackerPlotMarkerAndLabelFromPicker(); -} //================================================================================================== /// @@ -803,3 +336,12 @@ void RiuPvtPlotPanel::slotPhaseComboCurrentIndexChanged( int ) { plotUiSelectedCurves(); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotPanel::showEvent( QShowEvent* event ) +{ + if ( m_plotUpdater != nullptr ) m_plotUpdater->doDelayedUpdate(); + QWidget::showEvent( event ); +} diff --git a/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.h b/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.h index 0f97890826..362d95a353 100644 --- a/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.h +++ b/ApplicationLibCode/UserInterface/RiuPvtPlotPanel.h @@ -21,75 +21,17 @@ #include "RiaDefines.h" #include "RigFlowDiagSolverInterface.h" -#include #include #include #include -class RiuDockedQwtPlot; class RiuPvtPlotUpdater; -class RiuPvtQwtPicker; -class RiuPvtPlotPanel; +class RiuPvtPlotWidget; class QComboBox; class QLabel; -class QwtPlot; -class QwtPlotMarker; -class QwtPlotCurve; - -// Interface for providing our custom picker with a tracker text -class RiuPvtTrackerTextProvider -{ -public: - virtual QString trackerText() const = 0; -}; - -//================================================================================================== -// -// -// -//================================================================================================== -class RiuPvtPlotWidget : public QWidget, public RiuPvtTrackerTextProvider -{ - Q_OBJECT - -public: - RiuPvtPlotWidget( RiuPvtPlotPanel* parent ); - - void plotCurves( RiaDefines::EclipseUnitSystem unitSystem, - const std::vector& curveArr, - double pressure, - double pointMarkerYValue, - const QString& pointMarkerLabel, - const QString& plotTitle, - const QString& yAxisTitle ); - void applyFontSizes( bool replot ); - -private: - static void setPlotDefaults( QwtPlot* plot ); - const QwtPlotCurve* closestCurveSample( const QPoint& cursorPosition, int* closestSampleIndex ) const; - size_t indexOfQwtCurve( const QwtPlotCurve* qwtCurve ) const; - void updateTrackerPlotMarkerAndLabelFromPicker(); - QString trackerText() const override; - -private slots: - void slotPickerActivated( bool ); - void slotPickerPointChanged( const QPoint& pt ); - -private: - QPointer m_qwtPlot; - - std::vector m_pvtCurveArr; // Array of source Pvt curves currently being plotted - std::vector m_qwtCurveArr; // Array of corresponding qwt curves used for mapping to Pvt curve - // when doing tracking - - QPointer m_qwtPicker; - QString m_trackerLabel; - QwtPlotMarker* m_trackerPlotMarker; -}; - //================================================================================================== // // @@ -140,6 +82,7 @@ private: private slots: void slotPhaseComboCurrentIndexChanged( int ); + void showEvent( QShowEvent* event ) override; private: RiaDefines::EclipseUnitSystem m_unitSystem; diff --git a/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.cpp b/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.cpp index e3b4f8ed27..56e25f0d36 100644 --- a/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.cpp +++ b/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.cpp @@ -47,85 +47,23 @@ //-------------------------------------------------------------------------------------------------- RiuPvtPlotUpdater::RiuPvtPlotUpdater( RiuPvtPlotPanel* targetPlotPanel ) : m_targetPlotPanel( targetPlotPanel ) - , m_viewToFollowAnimationFrom( nullptr ) { } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuPvtPlotUpdater::updateOnSelectionChanged( const RiuSelectionItem* selectionItem ) +void RiuPvtPlotUpdater::clearPlot() { - if ( !m_targetPlotPanel ) - { - return; - } - - Rim3dView* newFollowAnimView = nullptr; - RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; - - eclipseSelectionItem = RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView ); - - bool mustClearPlot = true; - m_viewToFollowAnimationFrom = nullptr; - - if ( m_targetPlotPanel->isVisible() && eclipseSelectionItem && eclipseSelectionItem->m_resultDefinition ) - { - if ( queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition, - eclipseSelectionItem->m_timestepIdx, - eclipseSelectionItem->m_gridIndex, - eclipseSelectionItem->m_gridLocalCellIndex, - m_targetPlotPanel ) ) - { - mustClearPlot = false; - - m_viewToFollowAnimationFrom = newFollowAnimView; - } - } - - if ( mustClearPlot ) - { - m_targetPlotPanel->clearPlot(); - } + if ( m_targetPlotPanel ) m_targetPlotPanel->clearPlot(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuPvtPlotUpdater::updateOnTimeStepChanged( Rim3dView* changedView ) +QWidget* RiuPvtPlotUpdater::plotPanel() { - if ( !m_targetPlotPanel || !m_targetPlotPanel->isVisible() ) - { - return; - } - - // Don't update the plot if the view that changed time step is different - // from the view that was the source of the current plot - - if ( changedView != m_viewToFollowAnimationFrom ) - { - return; - } - - // Fetch the current global selection and only continue if the selection's view matches the view with time step change - - const RiuSelectionItem* selectionItem = Riu3dSelectionManager::instance()->selectedItem(); - Rim3dView* newFollowAnimView = nullptr; - RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; - - eclipseSelectionItem = RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView ); - - if ( eclipseSelectionItem && newFollowAnimView == changedView ) - { - if ( !queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition, - newFollowAnimView->currentTimeStep(), - eclipseSelectionItem->m_gridIndex, - eclipseSelectionItem->m_gridLocalCellIndex, - m_targetPlotPanel ) ) - { - m_targetPlotPanel->clearPlot(); - } - } + return m_targetPlotPanel; } //-------------------------------------------------------------------------------------------------- @@ -134,11 +72,9 @@ void RiuPvtPlotUpdater::updateOnTimeStepChanged( Rim3dView* changedView ) bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResDef, size_t timeStepIndex, size_t gridIndex, - size_t gridLocalCellIndex, - RiuPvtPlotPanel* plotPanel ) + size_t gridLocalCellIndex ) { - CVF_ASSERT( plotPanel ); - + if ( m_targetPlotPanel == nullptr ) return false; if ( !eclipseResDef ) return false; RimEclipseResultCase* eclipseResultCase = dynamic_cast( eclipseResDef->eclipseCase() ); @@ -218,7 +154,13 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition "PVTNUM", cellPvtNumDouble ); - plotPanel->setPlotData( eclipseCaseData->unitsType(), fvfCurveArr, viscosityCurveArr, fvfDynProps, viscosityDynProps, cellValues, cellRefText ); + m_targetPlotPanel->setPlotData( eclipseCaseData->unitsType(), + fvfCurveArr, + viscosityCurveArr, + fvfDynProps, + viscosityDynProps, + cellValues, + cellRefText ); return true; } diff --git a/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.h b/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.h index df25eb304f..16fd7687fb 100644 --- a/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.h +++ b/ApplicationLibCode/UserInterface/RiuPvtPlotUpdater.h @@ -18,14 +18,9 @@ #pragma once -#include -#include +#include "RiuPlotUpdater.h" -class RiuSelectionItem; class RiuPvtPlotPanel; -class Rim3dView; -class RimEclipseView; -class RigEclipseCaseData; class RimEclipseResultDefinition; //================================================================================================== @@ -33,22 +28,20 @@ class RimEclipseResultDefinition; // // //================================================================================================== -class RiuPvtPlotUpdater +class RiuPvtPlotUpdater : public RiuPlotUpdater { public: RiuPvtPlotUpdater( RiuPvtPlotPanel* targetPlotPanel ); - void updateOnSelectionChanged( const RiuSelectionItem* selectionItem ); - void updateOnTimeStepChanged( Rim3dView* changedView ); +protected: + void clearPlot() override; + QWidget* plotPanel() override; -private: - static bool queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResultDef, - size_t timeStepIndex, - size_t gridIndex, - size_t gridLocalCellIndex, - RiuPvtPlotPanel* plotPanel ); + bool queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResultDef, + size_t timeStepIndex, + size_t gridIndex, + size_t gridLocalCellIndex ) override; private: QPointer m_targetPlotPanel; - const Rim3dView* m_viewToFollowAnimationFrom; }; diff --git a/ApplicationLibCode/UserInterface/RiuPvtPlotWidget.cpp b/ApplicationLibCode/UserInterface/RiuPvtPlotWidget.cpp new file mode 100644 index 0000000000..5a6a6e3bf2 --- /dev/null +++ b/ApplicationLibCode/UserInterface/RiuPvtPlotWidget.cpp @@ -0,0 +1,496 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 Statoil 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RiuPvtPlotWidget.h" + +#include "RiuDockedQwtPlot.h" +#include "RiuGuiTheme.h" +#include "RiuPvtPlotPanel.h" +#include "RiuPvtPlotUpdater.h" + +#include "RiaEclipseUnitTools.h" + +#include "RigFlowDiagSolverInterface.h" + +#include "cvfAssert.h" +#include "cvfMath.h" + +#include "qwt_legend.h" +#include "qwt_picker_machine.h" +#include "qwt_plot.h" +#include "qwt_plot_curve.h" +#include "qwt_plot_grid.h" +#include "qwt_plot_layout.h" +#include "qwt_plot_marker.h" +#include "qwt_plot_picker.h" +#include "qwt_symbol.h" +#include "qwt_text.h" + +#include + +//================================================================================================== +// +// +// +//================================================================================================== +class PvtQwtPlot : public RiuDockedQwtPlot +{ +public: + PvtQwtPlot( QWidget* parent ) + : RiuDockedQwtPlot( parent ) + { + } + QSize sizeHint() const override { return QSize( 100, 100 ); } + QSize minimumSizeHint() const override { return QSize( 0, 0 ); } +}; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuPvtQwtPicker : public QwtPicker +{ +public: + RiuPvtQwtPicker( QwtPlot* plot, RiuPvtTrackerTextProvider* trackerTextProvider ) + : QwtPicker( QwtPicker::NoRubberBand, QwtPicker::AlwaysOn, plot->canvas() ) + , m_trackerTextProvider( trackerTextProvider ) + { + setStateMachine( new QwtPickerTrackerMachine ); + } + + QwtText trackerText( const QPoint& ) const override + { + QwtText text( m_trackerTextProvider->trackerText() ); + text.setRenderFlags( Qt::AlignLeft ); + return text; + } + +private: + const RiuPvtTrackerTextProvider* m_trackerTextProvider; +}; + +//================================================================================================== +/// +/// \class RiuPvtPlotWidget +/// +/// +/// +//================================================================================================== + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RiuPvtPlotWidget::RiuPvtPlotWidget( RiuPvtPlotPanel* parent ) + : QWidget( parent ) + , m_trackerPlotMarker( nullptr ) +{ + m_qwtPlot = new PvtQwtPlot( this ); + m_qwtPlot->setProperty( "qss-class", "PvtPlot" ); + setPlotDefaults( m_qwtPlot ); + applyFontSizes( false ); + + QHBoxLayout* layout = new QHBoxLayout(); + layout->addWidget( m_qwtPlot ); + layout->setSpacing( 0 ); + layout->setContentsMargins( 0, 0, 0, 0 ); + + setLayout( layout ); + + m_qwtPicker = new RiuPvtQwtPicker( m_qwtPlot, this ); + RiuGuiTheme::styleQwtItem( m_qwtPicker ); + connect( m_qwtPicker, SIGNAL( activated( bool ) ), this, SLOT( slotPickerActivated( bool ) ) ); + connect( m_qwtPicker, SIGNAL( moved( const QPoint& ) ), this, SLOT( slotPickerPointChanged( const QPoint& ) ) ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotWidget::setPlotDefaults( QwtPlot* plot ) +{ + plot->setAutoFillBackground( true ); + + QFrame* canvasFrame = dynamic_cast( plot->canvas() ); + if ( canvasFrame ) + { + canvasFrame->setFrameShape( QFrame::NoFrame ); + } + + // Grid + { + QwtPlotGrid* grid = new QwtPlotGrid; + grid->attach( plot ); + RiuGuiTheme::styleQwtItem( grid ); + } + + // Axis number font + { + QFont axisFont = plot->axisFont( QwtAxis::XBottom ); + axisFont.setPointSize( 8 ); + plot->setAxisFont( QwtAxis::XBottom, axisFont ); + plot->setAxisFont( QwtAxis::YLeft, axisFont ); + } + + // Axis title font + { + QwtText axisTitle = plot->axisTitle( QwtAxis::XBottom ); + QFont axisTitleFont = axisTitle.font(); + axisTitleFont.setPointSize( 8 ); + axisTitleFont.setBold( false ); + axisTitle.setFont( axisTitleFont ); + axisTitle.setRenderFlags( Qt::AlignRight ); + plot->setAxisTitle( QwtAxis::XBottom, axisTitle ); + plot->setAxisTitle( QwtAxis::YLeft, axisTitle ); + } + + // Title font + { + QwtText plotTitle = plot->title(); + QFont titleFont = plotTitle.font(); + titleFont.setPointSize( 12 ); + plotTitle.setFont( titleFont ); + plot->setTitle( plotTitle ); + } + + plot->setAxisMaxMinor( QwtAxis::XBottom, 2 ); + plot->setAxisMaxMinor( QwtAxis::YLeft, 3 ); + + plot->plotLayout()->setAlignCanvasToScales( true ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotWidget::plotCurves( RiaDefines::EclipseUnitSystem unitSystem, + const std::vector& curveArr, + double pressure, + double pointMarkerYValue, + const QString& pointMarkerLabel, + const QString& plotTitle, + const QString& yAxisTitle ) +{ + m_qwtPlot->detachItems( QwtPlotItem::Rtti_PlotCurve ); + m_qwtPlot->detachItems( QwtPlotItem::Rtti_PlotMarker ); + m_qwtCurveArr.clear(); + m_pvtCurveArr.clear(); + m_trackerPlotMarker = nullptr; + + // Construct an auxiliary curve that connects the first point in all the input curves as a visual aid + // This should only be shown when the phase being plotted is oil + // Will not be added to our array of qwt curves since we do not expect the user to interact with it + { + std::vector xVals; + std::vector yVals; + for ( size_t i = 0; i < curveArr.size(); i++ ) + { + const RigFlowDiagSolverInterface::PvtCurve& curve = curveArr[i]; + if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::OIL && !curve.pressureVals.empty() && !curve.yVals.empty() ) + { + xVals.push_back( curve.pressureVals[0] ); + yVals.push_back( curve.yVals[0] ); + } + } + + if ( xVals.size() > 1 ) + { + QwtPlotCurve* qwtCurve = new QwtPlotCurve( "Auxiliary" ); + qwtCurve->setSamples( xVals.data(), yVals.data(), static_cast( xVals.size() ) ); + + qwtCurve->setStyle( QwtPlotCurve::Lines ); + qwtCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true ); + + qwtCurve->attach( m_qwtPlot ); + RiuGuiTheme::styleQwtItem( qwtCurve ); + } + } + + // Add the primary curves + for ( size_t i = 0; i < curveArr.size(); i++ ) + { + const RigFlowDiagSolverInterface::PvtCurve& curve = curveArr[i]; + QwtPlotCurve* qwtCurve = new QwtPlotCurve(); + QwtSymbol* curveSymbol = new QwtSymbol( QwtSymbol::Ellipse ); + + CVF_ASSERT( curve.pressureVals.size() == curve.yVals.size() ); + qwtCurve->setSamples( curve.pressureVals.data(), curve.yVals.data(), static_cast( curve.pressureVals.size() ) ); + + qwtCurve->setStyle( QwtPlotCurve::Lines ); + + if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::GAS ) + { + qwtCurve->setTitle( "Gas" ); + } + else if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::OIL ) + { + qwtCurve->setTitle( "Oil" ); + } + else + { + qwtCurve->setTitle( "Undefined" ); + } + + qwtCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true ); + + curveSymbol->setSize( 6, 6 ); + curveSymbol->setBrush( Qt::NoBrush ); + qwtCurve->setSymbol( curveSymbol ); + + qwtCurve->attach( m_qwtPlot ); + RiuGuiTheme::styleQwtItem( qwtCurve ); + + m_qwtCurveArr.push_back( qwtCurve ); + } + + m_pvtCurveArr = curveArr; + CVF_ASSERT( m_pvtCurveArr.size() == m_qwtCurveArr.size() ); + + // Add vertical marker line to indicate cell pressure + if ( pressure != HUGE_VAL ) + { + QwtPlotMarker* lineMarker = new QwtPlotMarker; + + QPen pen; + pen.setStyle( Qt::DashLine ); + lineMarker->setLinePen( pen ); + + lineMarker->setXValue( pressure ); + lineMarker->setLineStyle( QwtPlotMarker::VLine ); + lineMarker->setLabel( QString( "PRESSURE" ) ); + lineMarker->setLabelAlignment( Qt::AlignTop | Qt::AlignRight ); + lineMarker->setLabelOrientation( Qt::Vertical ); + lineMarker->attach( m_qwtPlot ); + RiuGuiTheme::styleQwtItem( lineMarker ); + } + + // Then point marker + if ( pressure != HUGE_VAL && pointMarkerYValue != HUGE_VAL ) + { + QwtPlotMarker* pointMarker = new QwtPlotMarker; + pointMarker->setValue( pressure, pointMarkerYValue ); + + QwtSymbol* symbol = new QwtSymbol( QwtSymbol::Ellipse ); + symbol->setSize( 13, 13 ); + QPen pen; + pen.setWidth( 2 ); + symbol->setPen( pen ); + symbol->setBrush( Qt::NoBrush ); + pointMarker->setSymbol( symbol ); + + if ( !pointMarkerLabel.isEmpty() ) + { + QwtText text( pointMarkerLabel ); + text.setRenderFlags( Qt::AlignLeft ); + text.setColor( RiuGuiTheme::getColorByVariableName( "textColor" ) ); + pointMarker->setLabel( text ); + pointMarker->setLabelAlignment( Qt::AlignTop | Qt::AlignRight ); + } + + pointMarker->attach( m_qwtPlot ); + RiuGuiTheme::styleQwtItem( pointMarker ); + } + + m_qwtPlot->setTitle( plotTitle ); + + m_qwtPlot->setAxisTitle( QwtAxis::XBottom, QString( "Pressure [%1]" ).arg( RiaEclipseUnitTools::unitStringPressure( unitSystem ) ) ); + m_qwtPlot->setAxisTitle( QwtAxis::YLeft, yAxisTitle ); + + updateTrackerPlotMarkerAndLabelFromPicker(); + + m_qwtPlot->replot(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotWidget::applyFontSizes( bool replot ) +{ + m_qwtPlot->applyFontSizes( replot ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotWidget::updateTrackerPlotMarkerAndLabelFromPicker() +{ + bool hasValidSamplePoint = false; + QPointF samplePoint; + QString mixRatioText = ""; + double mixRat = HUGE_VAL; + + if ( m_qwtPicker && m_qwtPicker->isActive() ) + { + const QPoint trackerPos = m_qwtPicker->trackerPosition(); + + int pointSampleIdx = -1; + const QwtPlotCurve* closestQwtCurve = closestCurveSample( trackerPos, &pointSampleIdx ); + if ( closestQwtCurve && pointSampleIdx >= 0 ) + { + samplePoint = closestQwtCurve->sample( pointSampleIdx ); + hasValidSamplePoint = true; + + size_t curveIdx = indexOfQwtCurve( closestQwtCurve ); + if ( curveIdx < m_pvtCurveArr.size() ) + { + const RigFlowDiagSolverInterface::PvtCurve& pvtCurve = m_pvtCurveArr[curveIdx]; + if ( static_cast( pointSampleIdx ) < pvtCurve.mixRatVals.size() ) + { + mixRat = pvtCurve.mixRatVals[pointSampleIdx]; + + // The text is Rs or Rv depending on phase + mixRatioText = ( pvtCurve.phase == RigFlowDiagSolverInterface::PvtCurve::GAS ) ? "Rv" : "Rs"; + } + } + } + } + + m_trackerLabel = ""; + + bool needsReplot = false; + + if ( hasValidSamplePoint ) + { + if ( !m_trackerPlotMarker ) + { + m_trackerPlotMarker = new QwtPlotMarker; + m_trackerPlotMarker->setTitle( QString( "TrackedPoint" ) ); + + QwtSymbol* symbol = new QwtSymbol( QwtSymbol::Ellipse ); + symbol->setSize( 13, 13 ); + symbol->setBrush( Qt::NoBrush ); + m_trackerPlotMarker->setSymbol( symbol ); + m_trackerPlotMarker->attach( m_qwtPlot ); + RiuGuiTheme::styleQwtItem( m_trackerPlotMarker ); + + needsReplot = true; + } + + if ( m_trackerPlotMarker->value() != samplePoint ) + { + m_trackerPlotMarker->setValue( samplePoint ); + needsReplot = true; + } + + m_trackerLabel = QString( "%1 (%2)" ).arg( samplePoint.y() ).arg( samplePoint.x() ); + if ( mixRat != HUGE_VAL ) + { + m_trackerLabel += QString( "\n%1 = %2" ).arg( mixRatioText ).arg( mixRat ); + } + } + else + { + if ( m_trackerPlotMarker ) + { + m_trackerPlotMarker->detach(); + delete m_trackerPlotMarker; + m_trackerPlotMarker = nullptr; + + needsReplot = true; + } + } + + if ( needsReplot ) + { + m_qwtPlot->replot(); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const QwtPlotCurve* RiuPvtPlotWidget::closestCurveSample( const QPoint& cursorPosition, int* closestSampleIndex ) const +{ + // Construct a set containing the relevant qwt curves to consider + // These are the curves that have a corresponding Pvt source curve + std::set relevantQwtCurvesSet( m_qwtCurveArr.begin(), m_qwtCurveArr.end() ); + + if ( closestSampleIndex ) *closestSampleIndex = -1; + + const QwtPlotCurve* closestCurve = nullptr; + double distMin = HUGE_VAL; + int closestPointSampleIndex = -1; + + const QwtPlotItemList& itemList = m_qwtPlot->itemList(); + for ( QwtPlotItemIterator it = itemList.begin(); it != itemList.end(); it++ ) + { + if ( ( *it )->rtti() == QwtPlotItem::Rtti_PlotCurve ) + { + const QwtPlotCurve* curve = static_cast( *it ); + if ( relevantQwtCurvesSet.find( curve ) != relevantQwtCurvesSet.end() ) + { + double dist = HUGE_VAL; + int candidateSampleIndex = curve->closestPoint( cursorPosition, &dist ); + if ( dist < distMin ) + { + closestCurve = curve; + closestPointSampleIndex = candidateSampleIndex; + distMin = dist; + } + } + } + } + + if ( closestCurve && closestPointSampleIndex >= 0 && distMin < 50 ) + { + if ( closestSampleIndex ) *closestSampleIndex = closestPointSampleIndex; + return closestCurve; + } + else + { + return nullptr; + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +size_t RiuPvtPlotWidget::indexOfQwtCurve( const QwtPlotCurve* qwtCurve ) const +{ + for ( size_t i = 0; i < m_qwtCurveArr.size(); i++ ) + { + if ( m_qwtCurveArr[i] == qwtCurve ) + { + return i; + } + } + + return cvf::UNDEFINED_SIZE_T; +} + +//-------------------------------------------------------------------------------------------------- +/// Implements the RiuPvtTrackerTextProvider interface +//-------------------------------------------------------------------------------------------------- +QString RiuPvtPlotWidget::trackerText() const +{ + return m_trackerLabel; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotWidget::slotPickerPointChanged( const QPoint& pt ) +{ + updateTrackerPlotMarkerAndLabelFromPicker(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuPvtPlotWidget::slotPickerActivated( bool on ) +{ + updateTrackerPlotMarkerAndLabelFromPicker(); +} diff --git a/ApplicationLibCode/UserInterface/RiuPvtPlotWidget.h b/ApplicationLibCode/UserInterface/RiuPvtPlotWidget.h new file mode 100644 index 0000000000..4d8d4ceb40 --- /dev/null +++ b/ApplicationLibCode/UserInterface/RiuPvtPlotWidget.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 2017 Statoil 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "RiaDefines.h" +#include "RigFlowDiagSolverInterface.h" + +#include +#include + +#include +#include + +class RiuDockedQwtPlot; +class RiuPvtPlotUpdater; +class RiuPvtQwtPicker; +class RiuPvtPlotPanel; + +class QComboBox; + +class QwtPlot; +class QwtPlotMarker; +class QwtPlotCurve; + +// Interface for providing our custom picker with a tracker text +class RiuPvtTrackerTextProvider +{ +public: + virtual QString trackerText() const = 0; +}; + +//================================================================================================== +// +// +// +//================================================================================================== +class RiuPvtPlotWidget : public QWidget, public RiuPvtTrackerTextProvider +{ + Q_OBJECT + +public: + RiuPvtPlotWidget( RiuPvtPlotPanel* parent ); + + void plotCurves( RiaDefines::EclipseUnitSystem unitSystem, + const std::vector& curveArr, + double pressure, + double pointMarkerYValue, + const QString& pointMarkerLabel, + const QString& plotTitle, + const QString& yAxisTitle ); + void applyFontSizes( bool replot ); + +private: + static void setPlotDefaults( QwtPlot* plot ); + const QwtPlotCurve* closestCurveSample( const QPoint& cursorPosition, int* closestSampleIndex ) const; + size_t indexOfQwtCurve( const QwtPlotCurve* qwtCurve ) const; + void updateTrackerPlotMarkerAndLabelFromPicker(); + QString trackerText() const override; + +private slots: + void slotPickerActivated( bool ); + void slotPickerPointChanged( const QPoint& pt ); + +private: + QPointer m_qwtPlot; + + std::vector m_pvtCurveArr; // Array of source Pvt curves currently being plotted + std::vector m_qwtCurveArr; // Array of corresponding qwt curves used for mapping to Pvt curve + // when doing tracking + + QPointer m_qwtPicker; + QString m_trackerLabel; + QwtPlotMarker* m_trackerPlotMarker; +}; diff --git a/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.cpp b/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.cpp index 1cac5db574..d3e6b4617a 100644 --- a/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.cpp +++ b/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.cpp @@ -37,8 +37,8 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RiuQtChartsPlotCurveSymbol::RiuQtChartsPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSizePt ) - : RiuPlotCurveSymbol( riuStyle, label, labelPosition, labelFontSizePt ) +RiuQtChartsPlotCurveSymbol::RiuQtChartsPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSize ) + : RiuPlotCurveSymbol( riuStyle, label, labelPosition, labelFontSize ) { } diff --git a/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.h b/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.h index 77e519cc24..23b9956867 100644 --- a/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.h +++ b/ApplicationLibCode/UserInterface/RiuQtChartsPlotCurveSymbol.h @@ -38,9 +38,9 @@ class RiuQtChartsPlotCurveSymbol : public RiuPlotCurveSymbol { public: RiuQtChartsPlotCurveSymbol( RiuPlotCurveSymbol::PointSymbolEnum riuStyle, - const QString& label = QString(), - LabelPosition labelPosition = RiuPlotCurveSymbol::LabelAboveSymbol, - int labelFontSizePt = 8 ); + const QString& label = QString(), + LabelPosition labelPosition = RiuPlotCurveSymbol::LabelAboveSymbol, + int labelFontSize = 8 ); void renderSymbolLabel( QPainter* painter, const QPointF& position, const QString& label ) const; diff --git a/ApplicationLibCode/UserInterface/RiuQtChartsPlotWidget.cpp b/ApplicationLibCode/UserInterface/RiuQtChartsPlotWidget.cpp index ff98639628..a12c3cd89b 100644 --- a/ApplicationLibCode/UserInterface/RiuQtChartsPlotWidget.cpp +++ b/ApplicationLibCode/UserInterface/RiuQtChartsPlotWidget.cpp @@ -160,18 +160,15 @@ int RiuQtChartsPlotWidget::axisValueFontSize( RiuPlotAxis axis ) const //-------------------------------------------------------------------------------------------------- void RiuQtChartsPlotWidget::setAxisFontsAndAlignment( RiuPlotAxis axis, int titleFontSize, int valueFontSize, bool titleBold, int alignment ) { - int titleFontPixelSize = caf::FontTools::pointSizeToPixelSize( titleFontSize ); - int valueFontPixelSize = caf::FontTools::pointSizeToPixelSize( valueFontSize ); - // Axis number font QFont axisFont = plotAxis( axis )->labelsFont(); - axisFont.setPixelSize( valueFontPixelSize ); + axisFont.setPointSize( valueFontSize ); axisFont.setBold( false ); plotAxis( axis )->setLabelsFont( axisFont ); // Axis title font QFont axisTitleFont = plotAxis( axis )->labelsFont(); - axisTitleFont.setPixelSize( titleFontPixelSize ); + axisTitleFont.setPointSize( titleFontSize ); axisTitleFont.setBold( titleBold ); plotAxis( axis )->setTitleFont( axisTitleFont ); @@ -268,7 +265,7 @@ bool RiuQtChartsPlotWidget::plotTitleEnabled() const void RiuQtChartsPlotWidget::setPlotTitleFontSize( int titleFontSize ) { QFont font = qtChart()->titleFont(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( titleFontSize ) ); + font.setPointSize( titleFontSize ); qtChart()->setTitleFont( font ); } @@ -280,7 +277,7 @@ void RiuQtChartsPlotWidget::setLegendFontSize( int fontSize ) if ( qtChart()->legend() ) { QFont font = qtChart()->legend()->font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( fontSize ) ); + font.setPointSize( fontSize ); qtChart()->legend()->setFont( font ); } } diff --git a/ApplicationLibCode/UserInterface/RiuQwtCurvePointTracker.cpp b/ApplicationLibCode/UserInterface/RiuQwtCurvePointTracker.cpp index ab57583754..ceed8c7331 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtCurvePointTracker.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtCurvePointTracker.cpp @@ -19,6 +19,7 @@ #include "RiuQwtCurvePointTracker.h" #include "RiaQDateTimeTools.h" + #include "RiuGuiTheme.h" #include "RiuPlotCurve.h" #include "RiuPlotCurveInfoTextProvider.h" @@ -45,9 +46,7 @@ RiuQwtCurvePointTracker::RiuQwtCurvePointTracker( QwtPlot* plot, bool isMainAxis setTrackerMode( QwtPicker::AlwaysOn ); m_plotMarker = new QwtPlotMarker; - // Have this marker always on top of all curves/plot items. - double zAlwaysOnTop = 99999999; - m_plotMarker->setZ( zAlwaysOnTop ); + m_plotMarker->setZ( RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_ANNOTATION ) ); auto color = RiuGuiTheme::getColorByVariableName( "markerColor" ); diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.cpp b/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.cpp index 46973d509d..5e1c0f4bf8 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.cpp @@ -73,6 +73,9 @@ int RiuQwtPlotCurveDefines::zDepthForIndex( ZIndex index ) case RiuQwtPlotCurveDefines::ZIndex::Z_REGRESSION_CURVE: return 700; break; + case RiuQwtPlotCurveDefines::ZIndex::Z_ANNOTATION: + return 9999; + break; default: break; diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.h b/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.h index 2a92f2acea..0adf441b98 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.h +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotCurveDefines.h @@ -47,7 +47,8 @@ enum class ZIndex Z_ERROR_BARS, Z_SINGLE_CURVE_OBSERVED, Z_PLOT_RECT_ANNOTATION, - Z_REGRESSION_CURVE + Z_REGRESSION_CURVE, + Z_ANNOTATION }; int zDepthForIndex( ZIndex index ); diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotTools.cpp b/ApplicationLibCode/UserInterface/RiuQwtPlotTools.cpp index bbda2104b7..546d3a32c2 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotTools.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotTools.cpp @@ -71,7 +71,7 @@ void RiuQwtPlotTools::setCommonPlotBehaviour( QwtPlot* plot ) int axisFontSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(), caf::FontTools::RelativeSize::Medium ); QFont axisFont = plot->axisFont( QwtAxis::XBottom ); - axisFont.setPixelSize( caf::FontTools::pointSizeToPixelSize( axisFontSize ) ); + axisFont.setPointSize( axisFontSize ); plot->setAxisFont( QwtAxis::XBottom, axisFont ); plot->setAxisFont( QwtAxis::XTop, axisFont ); @@ -85,7 +85,7 @@ void RiuQwtPlotTools::setCommonPlotBehaviour( QwtPlot* plot ) { QwtText axisTitle = plot->axisTitle( axis ); QFont axisTitleFont = axisTitle.font(); - axisTitleFont.setPixelSize( caf::FontTools::pointSizeToPixelSize( axisFontSize ) ); + axisTitleFont.setPointSize( axisFontSize ); axisTitleFont.setBold( false ); axisTitle.setFont( axisTitleFont ); axisTitle.setRenderFlags( Qt::AlignRight ); diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp b/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp index 203b17c0dd..4271a4c1be 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.cpp @@ -156,21 +156,17 @@ int RiuQwtPlotWidget::axisValueFontSize( RiuPlotAxis axis ) const //-------------------------------------------------------------------------------------------------- void RiuQwtPlotWidget::setAxisFontsAndAlignment( RiuPlotAxis axis, int titleFontSize, int valueFontSize, bool titleBold, int alignment ) { - int titleFontPixelSize = caf::FontTools::pointSizeToPixelSize( titleFontSize ); - int valueFontPixelSize = caf::FontTools::pointSizeToPixelSize( valueFontSize ); - // Axis number font - auto qwtAxis = toQwtPlotAxis( axis ); QFont axisFont = m_plot->axisFont( qwtAxis ); - axisFont.setPixelSize( valueFontPixelSize ); + axisFont.setPointSize( valueFontSize ); axisFont.setBold( false ); m_plot->setAxisFont( qwtAxis, axisFont ); // Axis title font QwtText axisTitle = m_plot->axisTitle( qwtAxis ); QFont axisTitleFont = axisTitle.font(); - axisTitleFont.setPixelSize( titleFontPixelSize ); + axisTitleFont.setPointSize( titleFontSize ); axisTitleFont.setBold( titleBold ); axisTitle.setFont( axisTitleFont ); axisTitle.setRenderFlags( alignment | Qt::TextWordWrap ); @@ -260,7 +256,7 @@ void RiuQwtPlotWidget::setLegendFontSize( int fontSize ) if ( m_plot->legend() ) { QFont font = m_plot->legend()->font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( fontSize ) ); + font.setPointSize( fontSize ); m_plot->legend()->setFont( font ); // Set font size for all existing labels QList labels = m_plot->legend()->findChildren(); @@ -570,10 +566,16 @@ bool RiuQwtPlotWidget::eventFilter( QObject* watched, QEvent* event ) if ( mouseEvent->type() == QMouseEvent::MouseButtonDblClick ) { - if ( m_plotDefinition ) m_plotDefinition->zoomAll(); + if ( m_plotDefinition ) m_plotDefinition->zoomAllForMultiPlot(); return true; } + if ( mouseEvent->type() == QMouseEvent::MouseButtonPress && ( mouseEvent->button() == Qt::LeftButton ) && m_plotDefinition ) + { + // Select the plot clicked at in the Project Tree + RiuPlotMainWindowTools::selectAsCurrentItem( m_plotDefinition ); + } + bool toggleItemInSelection = ( mouseEvent->modifiers() & Qt::ControlModifier ) != 0; if ( mouseEvent->type() == QMouseEvent::MouseButtonPress && mouseEvent->button() == Qt::LeftButton ) @@ -611,7 +613,38 @@ bool RiuQwtPlotWidget::eventFilter( QObject* watched, QEvent* event ) { endZoomOperations(); - selectClosestPlotItem( mouseEvent->pos(), toggleItemInSelection ); + auto hasRecentlyBeenZoomed = [this]() -> bool + { + if ( !m_plotDefinition ) return false; + auto lastZoom = m_plotDefinition->valueForKey( "TimeStampZoomOperation" ); + if ( lastZoom.has_value() ) + { + try + { + auto retrieved_time = std::any_cast( lastZoom ); + auto t0 = std::chrono::steady_clock::now(); + + auto timeDiff = std::chrono::duration_cast( t0 - retrieved_time ).count(); + if ( timeDiff < 10 ) + { + return true; + } + } + catch ( ... ) + { + } + } + return false; + }; + + if ( !hasRecentlyBeenZoomed() ) + { + // Avoid selecting the curve if a zoom operation has been performed recently + // It is confusing to select a curve when the user is trying to zoom + + selectClosestPlotItem( mouseEvent->pos(), toggleItemInSelection ); + } + m_clickPosition = QPoint(); return true; } @@ -658,7 +691,7 @@ void RiuQwtPlotWidget::applyPlotTitleToQwt() if ( m_titleFontSize > 0 ) { QFont font = qwtText.font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( m_titleFontSize ) ); + font.setPointSize( m_titleFontSize ); qwtText.setFont( font ); } qwtText.setText( plotTitleToApply ); @@ -848,28 +881,63 @@ QWidget* RiuQwtPlotWidget::getParentForOverlay() const //-------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos, QwtPlotItem** closestItem, int* closestCurvePoint, double* distanceFromClick ) const +void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos, QwtPlotItem** closestItem, int* closestCurveSampleIndex, double* distanceFromClick ) const { - CAF_ASSERT( closestItem && closestCurvePoint && distanceFromClick ); + CAF_ASSERT( closestItem && closestCurveSampleIndex && distanceFromClick ); - // Force empty defaults - *closestItem = nullptr; - *closestCurvePoint = -1; - *distanceFromClick = std::numeric_limits::infinity(); + *closestItem = nullptr; + *closestCurveSampleIndex = -1; + *distanceFromClick = std::numeric_limits::infinity(); const QwtPlotItemList& itmList = m_plot->itemList(); for ( auto it : itmList ) { if ( it->rtti() == QwtPlotItem::Rtti_PlotCurve ) { - auto* candidateCurve = static_cast( it ); - double dist = std::numeric_limits::infinity(); - int curvePoint = candidateCurve->closestPoint( pos, &dist ); + auto* candidateCurve = static_cast( it ); + double dist = std::numeric_limits::infinity(); + int curveSampleIndex = candidateCurve->closestPoint( pos, &dist ); + + if ( curveSampleIndex != -1 ) + { + // Use the sample index before and after to interpolate the closest point on the curve. + const auto firstIndex = std::max( 0, curveSampleIndex - 1 ); + const auto secondIndex = std::min( curveSampleIndex + 1, (int)candidateCurve->dataSize() - 1 ); + + if ( firstIndex != secondIndex ) + { + const QPointF p0 = candidateCurve->sample( firstIndex ); + const QPointF p1 = candidateCurve->sample( secondIndex ); + + const QwtScaleMap xMap = candidateCurve->plot()->canvasMap( candidateCurve->xAxis() ); + const QwtScaleMap yMap = candidateCurve->plot()->canvasMap( candidateCurve->yAxis() ); + + const auto x0 = xMap.transform( p0.x() ); + const auto y0 = yMap.transform( p0.y() ); + const auto x1 = xMap.transform( p1.x() ); + const auto y1 = yMap.transform( p1.y() ); + + const double dx = x1 - x0; + const double dy = y1 - y0; + const double d = dx * dx + dy * dy; + if ( d > 0.0 ) + { + const double t = ( ( pos.x() - x0 ) * dx + ( pos.y() - y0 ) * dy ) / d; + if ( t >= 0.0 && t <= 1.0 ) + { + const double cx = x0 + t * dx - pos.x(); + const double cy = y0 + t * dy - pos.y(); + dist = std::sqrt( cx * cx + cy * cy ); + } + } + } + } + if ( dist < *distanceFromClick ) { - *closestItem = candidateCurve; - *distanceFromClick = dist; - *closestCurvePoint = curvePoint; + *closestItem = candidateCurve; + *distanceFromClick = dist; + *closestCurveSampleIndex = curveSampleIndex; } } else if ( it->rtti() == QwtPlotItem::Rtti_PlotShape ) @@ -894,9 +962,9 @@ void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos, QwtPlotItem** clo double dist = horizontal ? std::abs( samplePoint.x() - scalePos.y() ) : std::abs( samplePoint.x() - scalePos.x() ); if ( dist < *distanceFromClick ) { - *closestItem = it; - *closestCurvePoint = (int)i; - *distanceFromClick = dist; + *closestItem = it; + *closestCurveSampleIndex = (int)i; + *distanceFromClick = dist; } } } @@ -931,22 +999,53 @@ void RiuQwtPlotWidget::selectClosestPlotItem( const QPoint& pos, bool toggleItem findClosestPlotItem( pos, &closestItem, &closestCurvePoint, &distanceFromClick ); RiuPlotMainWindowTools::showPlotMainWindow(); - if ( closestItem && distanceFromClick < 20 ) + if ( closestItem ) { + RimPlotCurve* clickedCurve = nullptr; + if ( auto curve = dynamic_cast( closestItem ) ) + { + clickedCurve = curve->ownerRimCurve(); + } + + std::vector curvesToSelect; + + bool wasToggledOff = false; + if ( toggleItemInSelection ) + { + for ( auto highlightedCurve : m_hightlightedCurves ) + { + if ( toggleItemInSelection && ( highlightedCurve == clickedCurve ) ) + { + wasToggledOff = true; + continue; + } + + curvesToSelect.push_back( highlightedCurve ); + } + } + + if ( !wasToggledOff && clickedCurve ) + { + if ( distanceFromClick < 100 ) + { + curvesToSelect.push_back( clickedCurve ); + } + } + bool updateCurveOrder = false; resetPlotItemHighlighting( updateCurveOrder ); - auto curve = dynamic_cast( closestItem ); - if ( curve && curve->ownerRimCurve() ) + if ( !curvesToSelect.empty() ) { - const auto rimCurve = curve->ownerRimCurve(); - if ( RimSummaryEnsembleTools::isEnsembleCurve( rimCurve ) ) + if ( RimSummaryEnsembleTools::isEnsembleCurve( curvesToSelect.front() ) ) { - RimSummaryEnsembleTools::highlightCurvesForSameRealization( rimCurve ); + auto summaryCases = RimSummaryEnsembleTools::summaryCasesFromCurves( curvesToSelect ); + RimSummaryEnsembleTools::selectSummaryCasesInProjectTree( summaryCases ); + RimSummaryEnsembleTools::highlightCurvesForSummaryCases( summaryCases ); } else { - highlightCurvesUpdateOrder( { rimCurve } ); + highlightCurvesUpdateOrder( curvesToSelect ); } } else @@ -989,7 +1088,7 @@ void RiuQwtPlotWidget::replot() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuQwtPlotWidget::highlightCurvesUpdateOrder( const std::set& curves ) +void RiuQwtPlotWidget::highlightCurvesUpdateOrder( const std::vector& curves ) { highlightPlotCurves( curves ); @@ -999,7 +1098,7 @@ void RiuQwtPlotWidget::highlightCurvesUpdateOrder( const std::set //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuQwtPlotWidget::highlightPlotCurves( const std::set& curves ) +void RiuQwtPlotWidget::highlightPlotCurves( const std::vector& curves ) { if ( !m_plotDefinition || !m_plotDefinition->isCurveHighlightSupported() ) { @@ -1014,7 +1113,8 @@ void RiuQwtPlotWidget::highlightPlotCurves( const std::set& curve auto currentRimPlotCurve = riuPlotCurve->ownerRimCurve(); - // Do not modify curve objects with no associated Rim object, as the Rim object is used to restore color after highlight manipulation + // Do not modify curve objects with no associated Rim object, as the Rim object is used to restore color after highlight + // manipulation if ( !currentRimPlotCurve ) continue; auto* plotCurve = dynamic_cast( plotItem ); @@ -1036,7 +1136,9 @@ void RiuQwtPlotWidget::highlightPlotCurves( const std::set& curve } double zValue = plotCurve->z(); - if ( curves.count( currentRimPlotCurve ) > 0 ) + + auto it = std::find( curves.begin(), curves.end(), currentRimPlotCurve ); + if ( it != curves.end() ) { auto highlightColor = curveColor; @@ -1055,6 +1157,8 @@ void RiuQwtPlotWidget::highlightPlotCurves( const std::set& curve plotCurve->setPen( existingPen ); plotCurve->setZ( zValue + 100.0 ); highlightPlotAxes( plotCurve->xAxis(), plotCurve->yAxis() ); + + m_hightlightedCurves.push_back( currentRimPlotCurve ); } else { @@ -1110,11 +1214,21 @@ void RiuQwtPlotWidget::resetPlotItemHighlighting( bool doUpdateCurveOrder ) if ( doUpdateCurveOrder ) updateCurveOrder(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RiuQwtPlotWidget::highlightedCurves() const +{ + return m_hightlightedCurves; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RiuQwtPlotWidget::resetPlotCurveHighlighting() { + m_hightlightedCurves.clear(); + if ( !m_plotDefinition || m_originalZValues.empty() ) { return; @@ -1192,7 +1306,7 @@ void RiuQwtPlotWidget::resetPlotAxisHighlighting() //-------------------------------------------------------------------------------------------------- void RiuQwtPlotWidget::highlightPlotItemsForQwtAxis( QwtAxisId axisId ) { - std::set curves; + std::vector curves; auto plotItemList = m_plot->itemList(); for ( QwtPlotItem* plotItem : plotItemList ) @@ -1206,12 +1320,15 @@ void RiuQwtPlotWidget::highlightPlotItemsForQwtAxis( QwtAxisId axisId ) { if ( auto curve = qwtPlotCurve->ownerRimCurve() ) { - curves.insert( curve ); + curves.push_back( curve ); } } } } + std::sort( curves.begin(), curves.end() ); + curves.erase( std::unique( curves.begin(), curves.end() ), curves.end() ); + highlightCurvesUpdateOrder( curves ); } diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.h b/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.h index 728445cbdc..1bb9bb4d90 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.h +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotWidget.h @@ -154,8 +154,6 @@ public: void detachItems( RiuPlotWidget::PlotItemType plotItemType ) override; - void findClosestPlotItem( const QPoint& pos, QwtPlotItem** closestItem, int* closestCurvePoint, double* distanceFromClick ) const; - const QColor& backgroundColor() const override; QWidget* getParentForOverlay() const override; @@ -164,9 +162,10 @@ public: QwtAxisId toQwtPlotAxis( RiuPlotAxis axis ) const; - void highlightPlotItem( const QwtPlotItem* plotItem ); - void highlightCurvesUpdateOrder( const std::set& curves ); - void resetPlotItemHighlighting( bool doUpdateCurveOrder = true ); + void highlightPlotItem( const QwtPlotItem* plotItem ); + void highlightCurvesUpdateOrder( const std::vector& curves ); + void resetPlotItemHighlighting( bool doUpdateCurveOrder = true ); + std::vector highlightedCurves() const; void replot() override; @@ -204,12 +203,14 @@ protected: virtual void onMouseMoveEvent( QMouseEvent* event ); private: - void selectClosestPlotItem( const QPoint& pos, bool toggleItemInSelection = false ); + void selectClosestPlotItem( const QPoint& pos, bool toggleItemInSelection = false ); + void findClosestPlotItem( const QPoint& pos, QwtPlotItem** closestItem, int* closestCurveSampleIndex, double* distanceFromClick ) const; + static int defaultMinimumWidth(); void highlightPlotAxes( QwtAxisId axisIdX, QwtAxisId axisIdY ); void highlightPlotItemsForQwtAxis( QwtAxisId axisId ); - void highlightPlotCurves( const std::set& curves ); + void highlightPlotCurves( const std::vector& curves ); void highlightPlotShapeItems( const std::set& closestItems ); void resetPlotCurveHighlighting(); void resetPlotShapeItemHighlighting(); @@ -231,6 +232,7 @@ private: }; std::map m_originalZValues; + std::vector m_hightlightedCurves; std::map m_axisMapping; QPointer m_plot; diff --git a/ApplicationLibCode/UserInterface/RiuQwtSymbol.cpp b/ApplicationLibCode/UserInterface/RiuQwtSymbol.cpp index c4ecb95160..bff3934c8d 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtSymbol.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtSymbol.cpp @@ -32,8 +32,8 @@ //-------------------------------------------------------------------------------------------------- /// Internal class to support labels on symbols //-------------------------------------------------------------------------------------------------- -RiuQwtSymbol::RiuQwtSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSizePt ) - : RiuPlotCurveSymbol( riuStyle, label, labelPosition, labelFontSizePt ) +RiuQwtSymbol::RiuQwtSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSize ) + : RiuPlotCurveSymbol( riuStyle, label, labelPosition, labelFontSize ) , QwtSymbol( QwtSymbol::NoSymbol ) { QwtSymbol::Style style = QwtSymbol::NoSymbol; @@ -192,7 +192,7 @@ void RiuQwtSymbol::renderSymbolLabel( QPainter* painter, const QPointF& position { painter->save(); QFont font = painter->font(); - font.setPixelSize( m_labelFontSizePx ); + font.setPointSize( m_labelFontSize ); painter->setFont( font ); painter->setPen( RiaColorTools::textColor() ); diff --git a/ApplicationLibCode/UserInterface/RiuQwtSymbol.h b/ApplicationLibCode/UserInterface/RiuQwtSymbol.h index 343a50ec7f..57774a10da 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtSymbol.h +++ b/ApplicationLibCode/UserInterface/RiuQwtSymbol.h @@ -38,9 +38,9 @@ class RiuQwtSymbol : public RiuPlotCurveSymbol, public QwtSymbol { public: RiuQwtSymbol( RiuPlotCurveSymbol::PointSymbolEnum riuStyle, - const QString& label = QString(), - LabelPosition labelPosition = RiuPlotCurveSymbol::LabelAboveSymbol, - int labelFontSizePt = 8 ); + const QString& label = QString(), + LabelPosition labelPosition = RiuPlotCurveSymbol::LabelAboveSymbol, + int labelFontSize = 8 ); void renderSymbols( QPainter* painter, const QPointF* points, int numPoints ) const override; void renderSymbolLabel( QPainter* painter, const QPointF& position, const QString& label ) const; diff --git a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp index 0fde3bcf15..091cf5cf0b 100644 --- a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp +++ b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.cpp @@ -871,6 +871,15 @@ void RiuRelativePermeabilityPlotPanel::slotSomeCheckBoxStateChanged( int ) plotUiSelectedCurves(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuRelativePermeabilityPlotPanel::showEvent( QShowEvent* event ) +{ + if ( m_plotUpdater != nullptr ) m_plotUpdater->doDelayedUpdate(); + QWidget::showEvent( event ); +} + //================================================================================================== // // diff --git a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.h b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.h index 5a7194ec2b..32973a8502 100644 --- a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.h +++ b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotPanel.h @@ -126,6 +126,7 @@ private slots: void slotSomeCheckBoxStateChanged( int ); void slotCurrentPlotDataInTextDialog(); void slotShowCurveSelectionWidgets( int state ); + void showEvent( QShowEvent* event ) override; private: RiaDefines::EclipseUnitSystem m_unitSystem; diff --git a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp index db004ddd4f..7cff8d79dd 100644 --- a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp +++ b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.cpp @@ -52,85 +52,23 @@ //-------------------------------------------------------------------------------------------------- RiuRelativePermeabilityPlotUpdater::RiuRelativePermeabilityPlotUpdater( RiuRelativePermeabilityPlotPanel* targetPlotPanel ) : m_targetPlotPanel( targetPlotPanel ) - , m_viewToFollowAnimationFrom( nullptr ) { } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuRelativePermeabilityPlotUpdater::updateOnSelectionChanged( const RiuSelectionItem* selectionItem ) +void RiuRelativePermeabilityPlotUpdater::clearPlot() { - if ( !m_targetPlotPanel ) - { - return; - } - - Rim3dView* newFollowAnimView = nullptr; - RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; - - eclipseSelectionItem = extractEclipseSelectionItem( selectionItem, newFollowAnimView ); - - bool mustClearPlot = true; - m_viewToFollowAnimationFrom = nullptr; - - if ( m_targetPlotPanel->isVisible() && eclipseSelectionItem ) - { - if ( queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition, - eclipseSelectionItem->m_timestepIdx, - eclipseSelectionItem->m_gridIndex, - eclipseSelectionItem->m_gridLocalCellIndex, - m_targetPlotPanel ) ) - { - mustClearPlot = false; - - m_viewToFollowAnimationFrom = newFollowAnimView; - } - } - - if ( mustClearPlot ) - { - m_targetPlotPanel->clearPlot(); - } + if ( m_targetPlotPanel ) m_targetPlotPanel->clearPlot(); } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuRelativePermeabilityPlotUpdater::updateOnTimeStepChanged( Rim3dView* changedView ) +QWidget* RiuRelativePermeabilityPlotUpdater::plotPanel() { - if ( !m_targetPlotPanel || !m_targetPlotPanel->isVisible() ) - { - return; - } - - // Don't update the plot if the view that changed time step is different - // from the view that was the source of the current plot - - if ( changedView != m_viewToFollowAnimationFrom ) - { - return; - } - - // Fetch the current global selection and only continue if the selection's view matches the view with time step change - - const RiuSelectionItem* selectionItem = Riu3dSelectionManager::instance()->selectedItem(); - Rim3dView* newFollowAnimView = nullptr; - RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; - - eclipseSelectionItem = extractEclipseSelectionItem( selectionItem, newFollowAnimView ); - - if ( eclipseSelectionItem && newFollowAnimView == changedView ) - { - if ( !queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition, - newFollowAnimView->currentTimeStep(), - eclipseSelectionItem->m_gridIndex, - eclipseSelectionItem->m_gridLocalCellIndex, - m_targetPlotPanel ) ) - { - m_targetPlotPanel->clearPlot(); - } - } + return m_targetPlotPanel; } //-------------------------------------------------------------------------------------------------- @@ -139,10 +77,9 @@ void RiuRelativePermeabilityPlotUpdater::updateOnTimeStepChanged( Rim3dView* cha bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResDef, size_t timeStepIndex, size_t gridIndex, - size_t gridLocalCellIndex, - RiuRelativePermeabilityPlotPanel* plotPanel ) + size_t gridLocalCellIndex ) { - CVF_ASSERT( plotPanel ); + if ( m_targetPlotPanel == nullptr ) return false; if ( !eclipseResDef ) return false; @@ -207,7 +144,7 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips QString cellRefText = constructCellReferenceText( eclipseCaseData, gridIndex, gridLocalCellIndex, "SATNUM", cellSATNUM ); QString caseName = eclipseResultCase->caseUserDescription(); - plotPanel->setPlotData( eclipseCaseData->unitsType(), relPermCurveArr, cellSWAT, cellSGAS, caseName, cellRefText ); + m_targetPlotPanel->setPlotData( eclipseCaseData->unitsType(), relPermCurveArr, cellSWAT, cellSGAS, caseName, cellRefText ); return true; } @@ -260,43 +197,6 @@ QString RiuRelativePermeabilityPlotUpdater::constructCellReferenceText( const Ri return QString(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RiuEclipseSelectionItem* RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( const RiuSelectionItem* selectionItem, - Rim3dView*& newFollowAnimView ) -{ - newFollowAnimView = nullptr; - RiuEclipseSelectionItem* eclipseSelectionItem = nullptr; - - eclipseSelectionItem = dynamic_cast( const_cast( selectionItem ) ); - - if ( eclipseSelectionItem ) - { - // If we clicked in an eclipse view, and hit something using the standard result definition there, - // set this up to follow the animation there. - - RimEclipseView* clickedInEclView = dynamic_cast( eclipseSelectionItem->m_view.p() ); - - if ( clickedInEclView && clickedInEclView->cellResult() == eclipseSelectionItem->m_resultDefinition.p() ) - { - newFollowAnimView = eclipseSelectionItem->m_view; - } - } - else - { - auto intersectionSelItem = dynamic_cast( selectionItem ); - - if ( intersectionSelItem && intersectionSelItem->eclipseSelectionItem() ) - { - eclipseSelectionItem = intersectionSelItem->eclipseSelectionItem(); - newFollowAnimView = intersectionSelItem->view(); - } - } - - return eclipseSelectionItem; -} - //================================================================================================== // // diff --git a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.h b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.h index f6a12b5935..109415da40 100644 --- a/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.h +++ b/ApplicationLibCode/UserInterface/RiuRelativePermeabilityPlotUpdater.h @@ -18,48 +18,39 @@ #pragma once -#include -#include +#include "RiuPlotUpdater.h" -class RiuSelectionItem; class RiuRelativePermeabilityPlotPanel; -class Rim3dView; -class RimEclipseView; class RigEclipseCaseData; class RimEclipseResultDefinition; -class RiuSelectionItem; -class RiuEclipseSelectionItem; //================================================================================================== // // // //================================================================================================== -class RiuRelativePermeabilityPlotUpdater +class RiuRelativePermeabilityPlotUpdater : public RiuPlotUpdater { public: RiuRelativePermeabilityPlotUpdater( RiuRelativePermeabilityPlotPanel* targetPlotPanel ); - void updateOnSelectionChanged( const RiuSelectionItem* selectionItem ); - void updateOnTimeStepChanged( Rim3dView* changedView ); + static QString constructCellReferenceText( const RigEclipseCaseData* eclipseCaseData, + size_t gridIndex, + size_t gridLocalCellIndex, + const QString& valueName, + double cellValue ); - static RiuEclipseSelectionItem* extractEclipseSelectionItem( const RiuSelectionItem* selectionItem, Rim3dView*& newFollowAnimView ); - static QString constructCellReferenceText( const RigEclipseCaseData* eclipseCaseData, - size_t gridIndex, - size_t gridLocalCellIndex, - const QString& valueName, - double cellValue ); +protected: + void clearPlot() override; + QWidget* plotPanel() override; -private: - static bool queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResDef, - size_t timeStepIndex, - size_t gridIndex, - size_t gridLocalCellIndex, - RiuRelativePermeabilityPlotPanel* plotPanel ); + bool queryDataAndUpdatePlot( const RimEclipseResultDefinition* eclipseResDef, + size_t timeStepIndex, + size_t gridIndex, + size_t gridLocalCellIndex ) override; private: QPointer m_targetPlotPanel; - const Rim3dView* m_viewToFollowAnimationFrom; }; //================================================================================================== diff --git a/ApplicationLibCode/UserInterface/RiuResultQwtPlot.cpp b/ApplicationLibCode/UserInterface/RiuResultQwtPlot.cpp index 36f8b78997..ca29f89579 100644 --- a/ApplicationLibCode/UserInterface/RiuResultQwtPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuResultQwtPlot.cpp @@ -54,6 +54,7 @@ //-------------------------------------------------------------------------------------------------- RiuResultQwtPlot::RiuResultQwtPlot( QWidget* parent ) : RiuDockedQwtPlot( parent ) + , m_timeMarker( nullptr ) { setAutoFillBackground( true ); setDefaults(); @@ -133,20 +134,20 @@ void RiuResultQwtPlot::showTimeStep( const QDateTime& dateTime ) { if ( !dateTime.isValid() ) return; - auto lineMarker = new QwtPlotMarker; + if ( m_timeMarker == nullptr ) + { + m_timeMarker = new QwtPlotMarker(); + QPen pen; + pen.setStyle( Qt::DashLine ); + m_timeMarker->setLinePen( pen ); + m_timeMarker->setLineStyle( QwtPlotMarker::VLine ); + m_timeMarker->setLabel( QString( "Time Step" ) ); + m_timeMarker->setLabelAlignment( Qt::AlignTop | Qt::AlignRight ); + m_timeMarker->setLabelOrientation( Qt::Vertical ); + m_timeMarker->attach( this ); + } - QPen pen; - pen.setStyle( Qt::DashLine ); - lineMarker->setLinePen( pen ); - - lineMarker->setXValue( QwtDate::toDouble( dateTime ) ); - lineMarker->setLineStyle( QwtPlotMarker::VLine ); - lineMarker->setLabel( QString( "Time Step" ) ); - lineMarker->setLabelAlignment( Qt::AlignTop | Qt::AlignRight ); - lineMarker->setLabelOrientation( Qt::Vertical ); - lineMarker->attach( this ); - - m_plotItems.push_back( lineMarker ); + m_timeMarker->setXValue( QwtDate::toDouble( dateTime ) ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuResultQwtPlot.h b/ApplicationLibCode/UserInterface/RiuResultQwtPlot.h index 9a9c4e241f..c525c9fd97 100644 --- a/ApplicationLibCode/UserInterface/RiuResultQwtPlot.h +++ b/ApplicationLibCode/UserInterface/RiuResultQwtPlot.h @@ -28,6 +28,7 @@ class RimCase; class QwtPlotCurve; class QwtPlotGrid; +class QwtPlotMarker; namespace cvf { @@ -77,6 +78,7 @@ private slots: private: std::vector m_plotItems; + QwtPlotMarker* m_timeMarker; std::map m_caseNames; std::map> m_timeSteps; diff --git a/ApplicationLibCode/UserInterface/RiuResultTextBuilder.cpp b/ApplicationLibCode/UserInterface/RiuResultTextBuilder.cpp index 7efb230873..006a9a0535 100644 --- a/ApplicationLibCode/UserInterface/RiuResultTextBuilder.cpp +++ b/ApplicationLibCode/UserInterface/RiuResultTextBuilder.cpp @@ -32,6 +32,7 @@ #include "Well/RigWellResultFrame.h" #include "Well/RigWellResultPoint.h" +#include "Formations/RimFormationNames.h" #include "Rim2dIntersectionView.h" #include "RimCellEdgeColors.h" #include "RimEclipseCase.h" @@ -39,7 +40,6 @@ #include "RimEclipseFaultColors.h" #include "RimEclipseView.h" #include "RimExtrudedCurveIntersection.h" -#include "RimFormationNames.h" #include "RimIntersectionResultDefinition.h" #include "RimMultipleEclipseResults.h" #include "RimRegularLegendConfig.h" @@ -158,7 +158,7 @@ QString RiuResultTextBuilder::mainResultText() QString nncText = nncResultText(); if ( !nncText.isEmpty() ) { - text = "NNC : " + nncText; + text = "NNC: " + nncText; } else if ( m_cellIndex != cvf::UNDEFINED_SIZE_T ) { @@ -166,11 +166,11 @@ QString RiuResultTextBuilder::mainResultText() if ( !faultResultText().isEmpty() ) { - text = "Fault : " + faultText; + text = "Fault: " + faultText; } else { - text = "Grid cell : " + gridResultText(); + text = "Grid cell: " + gridResultText(); } } @@ -227,16 +227,16 @@ QString RiuResultTextBuilder::geometrySelectionText( const QString& itemSeparato QString faceText = faceEnum.text(); - text += QString( "Face : %1" ).arg( faceText ) + itemSeparator; + text += QString( "Face: %1" ).arg( faceText ) + itemSeparator; } QString gridName = QString::fromStdString( grid->gridName() ); - text += QString( "Grid : %1 [%2]" ).arg( gridName ).arg( m_gridIndex ) + itemSeparator; + text += QString( "Grid: %1 [%2]" ).arg( gridName ).arg( m_gridIndex ) + itemSeparator; - text += QString( "Cell : [%1, %2, %3]" ).arg( i ).arg( j ).arg( k ) + itemSeparator; + text += QString( "Cell: [%1, %2, %3]" ).arg( i ).arg( j ).arg( k ) + itemSeparator; size_t globalCellIndex = grid->reservoirCellIndex( m_cellIndex ); - text += QString( "Global Cell Index : %4" ).arg( globalCellIndex ) + itemSeparator; + text += QString( "Global Cell Index: %4" ).arg( globalCellIndex ) + itemSeparator; text += coordinatesText( grid, globalCellIndex, itemSeparator ); } @@ -254,7 +254,7 @@ QString RiuResultTextBuilder::geometrySelectionText( const QString& itemSeparato if ( !t.isZero() ) { cvf::Vec3d intPt = m_intersectionPointInDisplay.getTransformedPoint( t ); - formattedText = createTextFromDomainCoordinate( "Intersection point : [E: %1, N: %2, Depth: %3]", intPt ); + formattedText = createTextFromDomainCoordinate( "Intersection point: [E: %1, N: %2, Depth: %3]", intPt ); text += formattedText; } } @@ -265,7 +265,7 @@ QString RiuResultTextBuilder::geometrySelectionText( const QString& itemSeparato cvf::ref transForm = m_displayCoordView->displayCoordTransform(); cvf::Vec3d domainCoord = transForm->translateToDomainCoord( m_intersectionPointInDisplay ); - formattedText = createTextFromDomainCoordinate( "Intersection point : [E: %1, N: %2, Depth: %3]", domainCoord ); + formattedText = createTextFromDomainCoordinate( "Intersection point: [E: %1, N: %2, Depth: %3]", domainCoord ); text += formattedText; } } @@ -302,7 +302,7 @@ QString RiuResultTextBuilder::coordinatesText( const RigGridBase* grid, size_t g auto cell = mainGrid->cell( globalCellIndex ); const auto center = cell.center(); - text += createTextFromDomainCoordinate( "Cell Center : [%1, %2, %3]", center ) + itemSeparator; + text += createTextFromDomainCoordinate( "Cell Center: [%1, %2, %3]", center ) + itemSeparator; } if ( showCorner ) @@ -327,7 +327,7 @@ QString RiuResultTextBuilder::coordinatesText( const RigGridBase* grid, size_t g const auto& [nodeIndex, nodeText] = riNodeOrder[i]; auto v = mainGrid->nodes()[indices[nodeIndex]]; - text += createTextFromDomainCoordinate( QString::fromStdString( nodeText ) + " : [%1, %2, %3]" + itemSeparator, v ); + text += createTextFromDomainCoordinate( QString::fromStdString( nodeText ) + ": [%1, %2, %3]" + itemSeparator, v ); } } @@ -410,10 +410,10 @@ QString RiuResultTextBuilder::faultResultDetails() { text += "-- Fault result details --\n"; - text += QString( "Fault Name: %1\n" ).arg( fault->name() ); + text += QString( "Name: %1\n" ).arg( fault->name() ); cvf::StructGridInterface::FaceEnum faceHelper( m_face ); - text += "Fault Face : " + faceHelper.text() + "\n"; + text += "Face: " + faceHelper.text() + "\n"; if ( m_eclipseView && m_eclipseView->faultResultSettings()->hasValidCustomResult() ) { @@ -582,16 +582,11 @@ QString RiuResultTextBuilder::nncResultText() eclipseCase->allanDiagramData()->formationIndexCombinationFromCategory( ( *nncValues )[m_nncIndex] ); std::vector fmNames = eclipseCase->formationNames(); - // clang-format off - if ( fmIndexPair.first >= 0 && - fmIndexPair.second >= 0 && - static_cast(fmNames.size()) > fmIndexPair.first && - static_cast(fmNames.size()) > fmIndexPair.second ) + if ( fmIndexPair.first >= 0 && fmIndexPair.second >= 0 && static_cast( fmNames.size() ) > fmIndexPair.first && + static_cast( fmNames.size() ) > fmIndexPair.second ) { - resultValueText = fmNames[fmIndexPair.first] + " - " + - fmNames[fmIndexPair.second]; + resultValueText = fmNames[fmIndexPair.first] + " - " + fmNames[fmIndexPair.second]; } - // clang-format on } else if ( m_eclipseView->currentFaultResultColors()->resultVariable() == RiaResultNames::formationBinaryAllanResultName() ) @@ -666,19 +661,19 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData* scalarValue = dataAccessObjectX->cellScalar( cellIndex ); else scalarValue = 0.0; - resultInfoText->append( QString( "SOIL : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "SOIL: %1\n" ).arg( scalarValue ) ); if ( dataAccessObjectY.notNull() ) scalarValue = dataAccessObjectY->cellScalar( cellIndex ); else scalarValue = 0.0; - resultInfoText->append( QString( "SGAS : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "SGAS: %1\n" ).arg( scalarValue ) ); if ( dataAccessObjectZ.notNull() ) scalarValue = dataAccessObjectZ->cellScalar( cellIndex ); else scalarValue = 0.0; - resultInfoText->append( QString( "SWAT : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "SWAT: %1\n" ).arg( scalarValue ) ); } return; @@ -698,13 +693,13 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData* RiaResultNames::combinedTransmissibilityResultName() ) ); { double scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I ); - resultInfoText->append( QString( "Tran X : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "Tran X: %1\n" ).arg( scalarValue ) ); scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_J ); - resultInfoText->append( QString( "Tran Y : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "Tran Y: %1\n" ).arg( scalarValue ) ); scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_K ); - resultInfoText->append( QString( "Tran Z : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "Tran Z: %1\n" ).arg( scalarValue ) ); } return; @@ -719,19 +714,19 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData* RigEclipseResultAddress( RiaResultNames::combinedMultResultName() ) ); { double scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I ); - resultInfoText->append( QString( "MULTX : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "MULTX: %1\n" ).arg( scalarValue ) ); scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::NEG_I ); - resultInfoText->append( QString( "MULTX- : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "MULTX-: %1\n" ).arg( scalarValue ) ); scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_J ); - resultInfoText->append( QString( "MULTY : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "MULTY: %1\n" ).arg( scalarValue ) ); scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::NEG_J ); - resultInfoText->append( QString( "MULTY- : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "MULTY-: %1\n" ).arg( scalarValue ) ); scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_K ); - resultInfoText->append( QString( "MULTZ : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "MULTZ: %1\n" ).arg( scalarValue ) ); scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::NEG_K ); - resultInfoText->append( QString( "MULTZ- : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "MULTZ-: %1\n" ).arg( scalarValue ) ); } return; @@ -746,13 +741,13 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData* RigEclipseResultAddress( RiaResultNames::combinedRiTranResultName() ) ); { double scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I ); - resultInfoText->append( QString( "riTran X : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riTran X: %1\n" ).arg( scalarValue ) ); scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_J ); - resultInfoText->append( QString( "riTran Y : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riTran Y: %1\n" ).arg( scalarValue ) ); scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_K ); - resultInfoText->append( QString( "riTran Z : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riTran Z: %1\n" ).arg( scalarValue ) ); } return; @@ -767,13 +762,13 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData* RigEclipseResultAddress( RiaResultNames::combinedRiMultResultName() ) ); { double scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I ); - resultInfoText->append( QString( "riMult X : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riMult X: %1\n" ).arg( scalarValue ) ); scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_J ); - resultInfoText->append( QString( "riMult Y : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riMult Y: %1\n" ).arg( scalarValue ) ); scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_K ); - resultInfoText->append( QString( "riMult Z : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riMult Z: %1\n" ).arg( scalarValue ) ); } return; } @@ -788,13 +783,13 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData* RiaResultNames::combinedRiAreaNormTranResultName() ) ); { double scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I ); - resultInfoText->append( QString( "riTransByArea X : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riTransByArea X: %1\n" ).arg( scalarValue ) ); scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_J ); - resultInfoText->append( QString( "riTransByArea Y : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riTransByArea Y: %1\n" ).arg( scalarValue ) ); scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_K ); - resultInfoText->append( QString( "riTransByArea Z : %1\n" ).arg( scalarValue ) ); + resultInfoText->append( QString( "riTransByArea Z: %1\n" ).arg( scalarValue ) ); } return; @@ -884,7 +879,7 @@ QString RiuResultTextBuilder::cellEdgeResultDetails() if ( resultAccessor.notNull() ) { double scalarValue = resultAccessor->cellScalar( m_cellIndex ); - text.append( QString( "%1 : %2\n" ).arg( metaData[idx].m_resultVariable ).arg( scalarValue ) ); + text.append( QString( "%1: %2\n" ).arg( metaData[idx].m_resultVariable ).arg( scalarValue ) ); uniqueResultAddresses.insert( resultAddr ); } @@ -938,7 +933,7 @@ QString RiuResultTextBuilder::nncDetails() QString gridName = QString::fromStdString( hostGrid->gridName() ); text.append( - QString( "NNC 1 : cell [%1, %2, %3] face %4 (%5)\n" ).arg( i ).arg( j ).arg( k ).arg( face.text() ).arg( gridName ) ); + QString( "NNC 1: cell [%1, %2, %3] face %4 (%5)\n" ).arg( i ).arg( j ).arg( k ).arg( face.text() ).arg( gridName ) ); } } @@ -963,7 +958,7 @@ QString RiuResultTextBuilder::nncDetails() QString faceText = oppositeFaceEnum.text(); text.append( - QString( "NNC 2 : cell [%1, %2, %3] face %4 (%5)\n" ).arg( i ).arg( j ).arg( k ).arg( faceText ).arg( gridName ) ); + QString( "NNC 2: cell [%1, %2, %3] face %4 (%5)\n" ).arg( i ).arg( j ).arg( k ).arg( faceText ).arg( gridName ) ); } } } @@ -1008,7 +1003,7 @@ QString RiuResultTextBuilder::cellResultText( const std::vectoreclipseCase() ) { diff --git a/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.cpp b/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.cpp index 243e91b800..13d443a81b 100644 --- a/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.cpp +++ b/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.cpp @@ -19,6 +19,7 @@ #include "RiuSelectionChangedHandler.h" +#include "RiaColorTables.h" #include "RiaResultNames.h" #include "RigCaseCellResultsData.h" @@ -37,7 +38,11 @@ #include "RimGeoMechCase.h" #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" +#include "RimGridTimeHistoryCurve.h" #include "RimProject.h" +#include "RimSummaryPlot.h" +#include "RimTools.h" +#include "Tools/RimAutomationSettings.h" #include "Riu3dSelectionManager.h" #include "RiuDepthQwtPlot.h" @@ -125,6 +130,7 @@ void RiuSelectionChangedHandler::handleItemAppended( const RiuSelectionItem* ite if ( mohrsCirclePlot ) mohrsCirclePlot->appendSelection( item ); updateResultInfo( item ); + updateGridCellCurvesFromSelection(); scheduleUpdateForAllVisibleViews(); } @@ -166,11 +172,7 @@ void RiuSelectionChangedHandler::addResultCurveFromSelectionItem( const RiuEclip std::vector timeStepDates = eclResDef->eclipseCase()->eclipseCaseData()->results( porosityModel )->timeStepDates(); - QString curveName = eclResDef->eclipseCase()->caseUserDescription(); - curveName += ", "; - curveName += eclResDef->resultVariableUiShortName(); - curveName += ", "; - curveName += QString( "Grid index %1" ).arg( eclipseSelectionItem->m_gridIndex ); + QString curveName = eclResDef->resultVariableUiShortName(); curveName += ", "; curveName += RigTimeHistoryResultAccessor::geometrySelectionText( eclResDef->eclipseCase()->eclipseCaseData(), eclipseSelectionItem->m_gridIndex, @@ -417,6 +419,81 @@ void RiuSelectionChangedHandler::updateResultInfo( const RiuSelectionItem* itemA mainWnd->setResultInfo( resultInfo ); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSelectionChangedHandler::updateGridCellCurvesFromSelection() +{ + std::vector items; + Riu3dSelectionManager::instance()->selectedItems( items ); + if ( items.empty() ) return; + + auto autoSettings = RimTools::automationSettings(); + for ( auto summaryPlot : autoSettings->summaryPlots() ) + { + // if no curves present, create from selection + if ( summaryPlot->gridTimeHistoryCurves().empty() ) + { + for ( auto item : items ) + { + RimGridTimeHistoryCurve::createCurveFromSelectionItem( item, summaryPlot ); + } + } + else + { + // find unique result types like soil, swat + // for each result type, create a curve for all cells in selection + + auto curves = summaryPlot->gridTimeHistoryCurves(); + + std::map uniqueCurves; + for ( auto curve : curves ) + { + if ( uniqueCurves.contains( curve->quantityName() ) ) continue; + uniqueCurves[curve->quantityName()] = curve; + } + + std::vector sourceCurves; + std::transform( uniqueCurves.begin(), + uniqueCurves.end(), + std::back_inserter( sourceCurves ), + []( const auto& pair ) { return pair.second; } ); + + std::vector newCurves; + + for ( auto curve : sourceCurves ) + { + int index = 0; + for ( auto item : items ) + { + auto newCurve = curve->copyObject(); + newCurve->setLocked( false ); + bool updateResultDefinition = false; + newCurve->setFromSelectionItem( item, updateResultDefinition ); + + if ( index != 0 ) + { + cvf::Color3f curveColor = RiaColorTables::wellLogPlotPaletteColors().cycledColor3f( index ); + newCurve->setColor( curveColor ); + } + index++; + + newCurves.push_back( newCurve ); + } + } + + summaryPlot->deleteUnlockedGridTimeHistoryCurves(); + for ( auto c : newCurves ) + { + summaryPlot->addGridTimeHistoryCurve( c ); + } + + summaryPlot->updateConnectedEditors(); + summaryPlot->loadDataAndUpdate(); + } + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.h b/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.h index f7ac86a5b1..a551dc39a0 100644 --- a/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.h +++ b/ApplicationLibCode/UserInterface/RiuSelectionChangedHandler.h @@ -47,4 +47,6 @@ private: void scheduleUpdateForAllVisibleViews() const; void updateResultInfo( const RiuSelectionItem* itemAdded ) const; + + static void updateGridCellCurvesFromSelection(); }; diff --git a/ApplicationLibCode/UserInterface/RiuSummaryCurveDefinitionKeywords.h b/ApplicationLibCode/UserInterface/RiuSummaryCurveDefinitionKeywords.h index cc85730022..66ed8aeeb1 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryCurveDefinitionKeywords.h +++ b/ApplicationLibCode/UserInterface/RiuSummaryCurveDefinitionKeywords.h @@ -37,6 +37,4 @@ public: static QString completions() { return "CompletionsKeyword"; }; static QString lgrWells() { return "LgrWellsKeyword"; }; static QString wellSegments() { return "WellSegmentsKeyword"; }; - static QString appearance() { return "AppearanceKeyword"; }; - static QString nameConfig() { return "NameConfigKeyword"; }; }; diff --git a/ApplicationLibCode/UserInterface/RiuSummaryPlot.cpp b/ApplicationLibCode/UserInterface/RiuSummaryPlot.cpp index 7806fab2ec..13820345bd 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuSummaryPlot.cpp @@ -71,6 +71,8 @@ void RiuSummaryPlot::showContextMenu( QPoint pos ) menuBuilder.addCmdFeatureWithUserData( "RicSplitMultiPlotFeature", "Split into Multiple Plots", plotVariant ); menuBuilder.addSeparator(); menuBuilder.addCmdFeatureWithUserData( "RicDeleteSubPlotCtxFeature", "Delete Plot", plotVariant ); + menuBuilder.addSeparator(); + menuBuilder.addCmdFeature( "RicCreateEnsembleFromFilteredCasesFeature" ); } menuBuilder.addSeparator(); diff --git a/ApplicationLibCode/UserInterface/RiuSummaryPlot.h b/ApplicationLibCode/UserInterface/RiuSummaryPlot.h index ea1e7b0f50..9e85687af7 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryPlot.h +++ b/ApplicationLibCode/UserInterface/RiuSummaryPlot.h @@ -52,6 +52,8 @@ public: virtual RiuPlotWidget* plotWidget() const = 0; + virtual void enableCurvePointTracking( bool enable ){}; + public slots: void showContextMenu( QPoint ); }; diff --git a/ApplicationLibCode/UserInterface/RiuSummaryQuantityNameInfoProvider.cpp b/ApplicationLibCode/UserInterface/RiuSummaryQuantityNameInfoProvider.cpp index b366d29267..c803c9affe 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryQuantityNameInfoProvider.cpp +++ b/ApplicationLibCode/UserInterface/RiuSummaryQuantityNameInfoProvider.cpp @@ -18,7 +18,9 @@ #include "RiuSummaryQuantityNameInfoProvider.h" +#include "RiaStdStringTools.h" #include "RifEclipseSummaryAddress.h" +#include "RifOpmCommonSummary.h" #include "cafAppEnum.h" @@ -76,6 +78,18 @@ RifEclipseSummaryAddressDefines::SummaryCategory RiuSummaryQuantityNameInfoProvi if ( ( vectorName.size() < 3 || vectorName.size() > 8 ) && !vectorName.ends_with( RifEclipseSummaryAddressDefines::differenceIdentifier() ) ) return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID; + auto tokens = RiaStdStringTools::splitString( vectorName, ':' ); + if ( tokens.size() == 3 && tokens[0].starts_with( "W" ) ) + { + return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION; + } + + if ( auto category = RifOpmCommonSummaryTools::categoryFromKeyword( vectorName ); + category != RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID ) + { + return category; + } + // Try to match the base vector name with more heuristics auto strippedQuantityName = RifEclipseSummaryAddress::baseVectorName( vectorName ); @@ -113,7 +127,7 @@ RifEclipseSummaryAddressDefines::SummaryCategory RiuSummaryQuantityNameInfoProvi std::string firstTwoLetters = strippedQuantityName.substr( 0, 2 ); if ( firstTwoLetters == "LB" ) return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK_LGR; - if ( firstTwoLetters == "LC" ) return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR; + if ( firstTwoLetters == "LC" ) return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_CONNECTION_LGR; if ( firstTwoLetters == "LW" ) return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_LGR; return RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID; @@ -223,5 +237,15 @@ std::string RiuSummaryQuantityNameInfoProvider::stringFromEnum( RifEclipseSummar //-------------------------------------------------------------------------------------------------- RifEclipseSummaryAddressDefines::SummaryCategory RiuSummaryQuantityNameInfoProvider::enumFromString( const std::string& category ) { - return caf::AppEnum::fromText( QString::fromStdString( category ) ); + auto qstring = QString::fromStdString( category ); + + auto valid = caf::AppEnum::isValid( qstring ); + if ( !valid ) + { + // The category strings in keywords*.json must be mapped to the enum values in the enum definition + // Ensure that the strings in the json file are correct in /ApplicationLibCode/Application/Resources/keyword-description + throw std::runtime_error( "Invalid category string: " + category ); + } + + return caf::AppEnum::fromText( qstring ); } diff --git a/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.cpp b/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.cpp index cf6cec3da7..d13e85c779 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.cpp @@ -20,6 +20,7 @@ #include "RiaApplication.h" #include "RiaPreferences.h" +#include "Summary/RiaSummaryTools.h" #include "Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.h" @@ -29,7 +30,9 @@ #include "RimPlotAxisPropertiesInterface.h" #include "RimSummaryCase.h" #include "RimSummaryCurve.h" +#include "RimSummaryMultiPlot.h" #include "RimSummaryPlot.h" +#include "RimSummaryTimeAxisProperties.h" #include "RiuPlotAnnotationTool.h" #include "RiuPlotCurve.h" @@ -40,7 +43,6 @@ #include "RiuPlotMainWindowTools.h" #include "RiuQwtPlotTools.h" -#include "RiuQwtPlotWheelZoomer.h" #include "RiuQwtPlotZoomer.h" #include "RiuQwtScalePicker.h" @@ -54,6 +56,7 @@ #include "qwt_interval.h" #include "qwt_legend.h" #include "qwt_legend_label.h" +#include "qwt_picker_machine.h" #include "qwt_plot_curve.h" #include "qwt_plot_panner.h" #include "qwt_plot_zoomer.h" @@ -71,6 +74,44 @@ static RimEnsembleCurveInfoTextProvider ensembleCurveInfoTextProvider; +//-------------------------------------------------------------------------------------------------- +/// Class used to track the cursor position and send the plot coordinates to the summary plot +//-------------------------------------------------------------------------------------------------- +class CoordinatePicker : public QwtPlotPicker +{ +public: + CoordinatePicker( RimSummaryMultiPlot* summaryMultiPlot, QwtPlot* plot ) + : QwtPlotPicker( plot->canvas() ) + , m_summaryMultiPlot( summaryMultiPlot ) + { + setTrackerMode( QwtPlotPicker::AlwaysOn ); + plot->canvas()->setMouseTracking( true ); + + setStateMachine( new QwtPickerTrackerMachine ); + } + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + QwtText trackerText( const QPoint& screenPixelCoordinates ) const override + { + if ( m_summaryMultiPlot ) + { + auto domainCoordinates = invTransform( screenPixelCoordinates ); + auto qwtTimeValue = domainCoordinates.x(); + auto yValue = domainCoordinates.y(); + + m_summaryMultiPlot->updateReadOutLines( qwtTimeValue, yValue ); + } + + // Return empty text here, as we only want to update the vertical line + return {}; + } + +private: + caf::PdmPointer m_summaryMultiPlot; +}; + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -97,7 +138,7 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot( RimSummaryPlot* plot, QWidget* parent /*= connect( panner, SIGNAL( panned( int, int ) ), SLOT( onZoomedSlot() ) ); setDefaults(); - new RiuQwtCurvePointTracker( m_plotWidget->qwtPlot(), true, &ensembleCurveInfoTextProvider ); + m_curvePointTracker = new RiuQwtCurvePointTracker( m_plotWidget->qwtPlot(), true, &ensembleCurveInfoTextProvider ); RiuQwtPlotTools::setCommonPlotBehaviour( m_plotWidget->qwtPlot() ); RiuQwtPlotTools::setDefaultAxes( m_plotWidget->qwtPlot() ); @@ -107,6 +148,11 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot( RimSummaryPlot* plot, QWidget* parent /*= m_plotWidget->clearLegend(); m_annotationTool = std::make_unique(); + + if ( auto multiPlot = RiaSummaryTools::parentSummaryMultiPlot( plot ) ) + { + new CoordinatePicker( multiPlot, m_plotWidget->qwtPlot() ); + } } //-------------------------------------------------------------------------------------------------- @@ -158,16 +204,39 @@ void RiuSummaryQwtPlot::updateAnnotationObjects( RimPlotAxisPropertiesInterface* annotation->name(), annotation->penStyle(), annotation->value(), - orientation ); + orientation, + RiuPlotAnnotationTool::textAlignment( annotation->textAlignment() ) ); } else if ( annotation->annotationType() == RimPlotAxisAnnotation::AnnotationType::RANGE ) { - m_annotationTool->attachAnnotationRange( m_plotWidget->qwtPlot(), - annotation->color(), - annotation->name(), - annotation->rangeStart(), - annotation->rangeEnd(), - orientation ); + const auto epsilon = 1e-6; + if ( std::abs( annotation->rangeStart() - annotation->rangeEnd() ) > epsilon ) + { + m_annotationTool->attachAnnotationRange( m_plotWidget->qwtPlot(), + annotation->color(), + annotation->name(), + annotation->rangeStart(), + annotation->rangeEnd(), + orientation ); + } + else + { + QString label; + QStringList labels = annotation->name().split( " - " ); + + if ( !labels.isEmpty() ) + { + label = labels.first(); + } + + m_annotationTool->attachAnnotationLine( m_plotWidget->qwtPlot(), + annotation->color(), + label, + annotation->penStyle(), + annotation->rangeStart(), + orientation, + RiuPlotAnnotationTool::textAlignment( annotation->textAlignment() ) ); + } } } } @@ -215,6 +284,14 @@ RiuPlotWidget* RiuSummaryQwtPlot::plotWidget() const return m_plotWidget; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuSummaryQwtPlot::enableCurvePointTracking( bool enable ) +{ + m_curvePointTracker->setEnabled( enable ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.h b/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.h index c6afbcd410..7518b74f7a 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.h +++ b/ApplicationLibCode/UserInterface/RiuSummaryQwtPlot.h @@ -21,7 +21,6 @@ #include "RiaDateTimeDefines.h" #include "RiuInterfaceToViewWindow.h" -#include "RiuQwtPlotWidget.h" #include "RiuSummaryPlot.h" #include @@ -33,6 +32,8 @@ class RiuQwtPlotZoomer; class RiuQwtPlotWheelZoomer; class RimPlotAxisPropertiesInterface; class RiuPlotAnnotationTool; +class RiuQwtCurvePointTracker; +class RiuQwtPlotWidget; //================================================================================================== // @@ -59,6 +60,8 @@ public: RiuPlotWidget* plotWidget() const override; + void enableCurvePointTracking( bool enable ) override; + protected: void setDefaults(); bool isZoomerActive() const; @@ -71,6 +74,7 @@ private: std::unique_ptr m_annotationTool; QPointer m_plotWidget; - QPointer m_plotZoomer; - QPointer m_wheelZoomer; + QPointer m_plotZoomer; + QPointer m_wheelZoomer; + QPointer m_curvePointTracker; }; diff --git a/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.cpp b/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.cpp index 9b2f22a91c..f596c4fbd7 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.cpp +++ b/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.cpp @@ -126,12 +126,12 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi() { new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } }, - { SummaryCategory::SUMMARY_WELL_COMPLETION, + { SummaryCategory::SUMMARY_WELL_CONNECTION, { new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } }, - { SummaryCategory::SUMMARY_WELL_COMPLETION_LGR, + { SummaryCategory::SUMMARY_WELL_CONNECTION_LGR, { new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_LGR_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ), @@ -147,6 +147,11 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi() new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_SEGMENT_NUMBER ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } }, + { SummaryCategory::SUMMARY_WELL_COMPLETION, + { new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ), + new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_COMPLETION_NUMBER ), + new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ), + new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } }, { SummaryCategory::SUMMARY_BLOCK, { new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ), new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ), @@ -211,31 +216,31 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi() CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL][1]->pdmField(), "WellVectors", "Well Vectors" ); CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL][2]->pdmField(), "WellCalculationIds", "Calculation Ids" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][0]->pdmField(), - "WellCompletionWellName", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][0]->pdmField(), + "WellConnectionWellName", "Wells" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][1]->pdmField(), "WellCompletionIjk", "Cell IJK" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][2]->pdmField(), - "WellCompletionVectors", - "Well Completion Vectors" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][3]->pdmField(), - "WellCompletionCalculationIds", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][1]->pdmField(), "WellConnectionIjk", "Cell IJK" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][2]->pdmField(), + "WellConnectionVectors", + "Well Connection Vectors" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][3]->pdmField(), + "WellConnectionCalculationIds", "Calculation Ids" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][0]->pdmField(), - "WellCompletionLgrLgrName", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][0]->pdmField(), + "WellConnectionLgrLgrName", "LGR Names" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][1]->pdmField(), - "WellCompletionLgrWellName", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][1]->pdmField(), + "WellConnectionLgrWellName", "Wells" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][2]->pdmField(), - "WellCompletionLgrIjk", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][2]->pdmField(), + "WellConnectionLgrIjk", "Cell IJK" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][3]->pdmField(), - "WellCompletionLgrVectors", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][3]->pdmField(), + "WellConnectionLgrVectors", "Well Completion Vectors" ); - CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][4]->pdmField(), - "WellCompletionLgrCalculationIds", + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][4]->pdmField(), + "WellConnectionLgrCalculationIds", "Calculation Ids" ); CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_LGR][0]->pdmField(), "WellLgrLgrName", "LGR Names" ); @@ -252,6 +257,19 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi() "WellSegmentCalculationIds", "Calculation Ids" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][0]->pdmField(), + "WellCompletionWellName", + "Wells" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][1]->pdmField(), + "WellCompletionNumber", + "Completion Numbers" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][2]->pdmField(), + "WellCompletionVectors", + "Vectors" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][3]->pdmField(), + "WellCompletionCalculationIds", + "Calculation Ids" ); + CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_BLOCK][0]->pdmField(), "BlockIjk", "Cell IJK" ); CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_BLOCK][1]->pdmField(), "BlockVectors", "Block Vectors" ); CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryCategory::SUMMARY_BLOCK][2]->pdmField(), "BlockCalculationIds", "Calculation Ids" ); @@ -572,9 +590,9 @@ QList if ( !hideEnsembles ) { bool ensembleHeaderCreated = false; - for ( const auto& sumCaseColl : sumCaseMainColl->summaryCaseCollections() ) + for ( const auto& ensemble : sumCaseMainColl->summaryEnsembles() ) { - if ( !sumCaseColl->isEnsemble() ) continue; + if ( !ensemble->isEnsemble() ) continue; if ( !ensembleHeaderCreated ) { @@ -583,7 +601,7 @@ QList } // Ensemble level { - auto optionItem = caf::PdmOptionItemInfo( sumCaseColl->name(), sumCaseColl ); + auto optionItem = caf::PdmOptionItemInfo( ensemble->name(), ensemble ); optionItem.setLevel( 1 ); options.push_back( optionItem ); } @@ -593,13 +611,13 @@ QList if ( !hideSummaryCases ) { // Grouped cases - for ( const auto& sumCaseColl : sumCaseMainColl->summaryCaseCollections() ) + for ( const auto& ensemble : sumCaseMainColl->summaryEnsembles() ) { - if ( sumCaseColl->isEnsemble() && !showIndividualEnsembleCases ) continue; + if ( ensemble->isEnsemble() && !showIndividualEnsembleCases ) continue; - options.push_back( caf::PdmOptionItemInfo::createHeader( sumCaseColl->name(), true ) ); + options.push_back( caf::PdmOptionItemInfo::createHeader( ensemble->name(), true ) ); - for ( const auto& sumCase : sumCaseColl->allSummaryCases() ) + for ( const auto& sumCase : ensemble->allSummaryCases() ) { auto optionItem = caf::PdmOptionItemInfo( sumCase->displayCaseName(), sumCase ); optionItem.setLevel( 1 ); @@ -900,26 +918,26 @@ void RiuSummaryVectorSelectionUi::defineUiOrdering( QString uiConfigName, caf::P summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL][1]->pdmField(); } - else if ( sumCategory == SummaryCategory::SUMMARY_WELL_COMPLETION ) + else if ( sumCategory == SummaryCategory::SUMMARY_WELL_CONNECTION ) { { - caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryCompletion() + "s" ); - myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][0]->pdmField() ); - myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][1]->pdmField() ); + caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryWellConnection() + "s" ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][0]->pdmField() ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][1]->pdmField() ); } - summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][2]->pdmField(); + summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION][2]->pdmField(); } - else if ( sumCategory == SummaryCategory::SUMMARY_WELL_COMPLETION_LGR ) + else if ( sumCategory == SummaryCategory::SUMMARY_WELL_CONNECTION_LGR ) { { - caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryLgrCompletion() + "s" ); - myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][0]->pdmField() ); - myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][1]->pdmField() ); - myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][2]->pdmField() ); + caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryLgrConnection() + "s" ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][0]->pdmField() ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][1]->pdmField() ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][2]->pdmField() ); } - summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION_LGR][3]->pdmField(); + summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_CONNECTION_LGR][3]->pdmField(); } else if ( sumCategory == SummaryCategory::SUMMARY_WELL_LGR ) { @@ -941,6 +959,16 @@ void RiuSummaryVectorSelectionUi::defineUiOrdering( QString uiConfigName, caf::P summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_SEGMENT][2]->pdmField(); } + else if ( sumCategory == SummaryCategory::SUMMARY_WELL_COMPLETION ) + { + { + caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryWellCompletion() + "s" ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][0]->pdmField() ); + myGroup->add( m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][1]->pdmField() ); + } + + summaryiesField = m_identifierFieldsMap[SummaryCategory::SUMMARY_WELL_COMPLETION][2]->pdmField(); + } else if ( sumCategory == SummaryCategory::SUMMARY_BLOCK ) { { @@ -1290,10 +1318,9 @@ void RiuSummaryVectorSelectionUi::defineEditorAttribute( const caf::PdmFieldHand { if ( &m_selectedSummaryCategories == field ) { - attrib->currentIndexFieldHandle = &m_currentSummaryCategory; - attrib->showTextFilter = false; - attrib->showToggleAllCheckbox = false; - attrib->setCurrentIndexWhenItemIsChecked = true; + attrib->currentIndexFieldHandle = &m_currentSummaryCategory; + attrib->showTextFilter = false; + attrib->showToggleAllCheckbox = false; } // All tree selection editors are set in specified selection mode @@ -1374,13 +1401,14 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForCategories( QList values; diff --git a/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.h b/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.h index 4736ad6e73..ebac9736c5 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.h +++ b/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionUi.h @@ -33,7 +33,6 @@ class RimSummaryCase; class RimSummaryEnsemble; -class RimSummaryCurveAutoName; class RimSummaryPlot; class RiaSummaryCurveDefinition; class RiaCurveSetDefinition; diff --git a/ApplicationLibCode/UserInterface/RiuTextContentFrame.cpp b/ApplicationLibCode/UserInterface/RiuTextContentFrame.cpp index e8b1642b44..84ed8ab746 100644 --- a/ApplicationLibCode/UserInterface/RiuTextContentFrame.cpp +++ b/ApplicationLibCode/UserInterface/RiuTextContentFrame.cpp @@ -38,7 +38,7 @@ RiuTextContentFrame::RiuTextContentFrame( QWidget* parent, const QString& title, : RiuAbstractOverlayContentFrame( parent ) , m_title( title ) , m_text( text ) - , m_fontPixelSize( fontPixelSize ) + , m_fontSize( fontPixelSize ) { setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ); @@ -170,10 +170,10 @@ void RiuTextContentFrame::layoutInfo( LayoutInfo* layout ) const //-------------------------------------------------------------------------------------------------- void RiuTextContentFrame::updateFontSize() { - if ( m_fontPixelSize != -1 ) + if ( m_fontSize != -1 ) { QFont font = this->font(); - font.setPixelSize( m_fontPixelSize ); + font.setPointSize( m_fontSize ); setFont( font ); } else diff --git a/ApplicationLibCode/UserInterface/RiuTextContentFrame.h b/ApplicationLibCode/UserInterface/RiuTextContentFrame.h index df3f078280..8a06aaf3bc 100644 --- a/ApplicationLibCode/UserInterface/RiuTextContentFrame.h +++ b/ApplicationLibCode/UserInterface/RiuTextContentFrame.h @@ -65,5 +65,5 @@ private: private: QString m_title; QString m_text; - int m_fontPixelSize; + int m_fontSize; }; diff --git a/ApplicationLibCode/UserInterface/RiuTimeStepChangedHandler.cpp b/ApplicationLibCode/UserInterface/RiuTimeStepChangedHandler.cpp index 1477035c9e..a719ee4054 100644 --- a/ApplicationLibCode/UserInterface/RiuTimeStepChangedHandler.cpp +++ b/ApplicationLibCode/UserInterface/RiuTimeStepChangedHandler.cpp @@ -21,16 +21,18 @@ #include "RiaGuiApplication.h" #include "Rim3dView.h" +#include "RimCase.h" +#include "Riu3dSelectionManager.h" #include "RiuMainWindow.h" #include "RiuMohrsCirclePlot.h" #include "RiuPvtPlotPanel.h" #include "RiuPvtPlotUpdater.h" #include "RiuRelativePermeabilityPlotPanel.h" #include "RiuRelativePermeabilityPlotUpdater.h" +#include "RiuResultQwtPlot.h" -#include "cvfDebugTimer.h" -#include "cvfTrace.h" +#include //================================================================================================== /// @@ -61,6 +63,7 @@ RiuTimeStepChangedHandler* RiuTimeStepChangedHandler::instance() //-------------------------------------------------------------------------------------------------- void RiuTimeStepChangedHandler::handleTimeStepChanged( Rim3dView* changedView ) const { + if ( !changedView ) return; if ( !RiaGuiApplication::isRunning() ) return; RiuRelativePermeabilityPlotUpdater* relPermPlotUpdater = RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater(); @@ -69,6 +72,31 @@ void RiuTimeStepChangedHandler::handleTimeStepChanged( Rim3dView* changedView ) RiuPvtPlotUpdater* pvtPlotUpdater = RiuMainWindow::instance()->pvtPlotPanel()->plotUpdater(); pvtPlotUpdater->updateOnTimeStepChanged( changedView ); + if ( changedView->ownerCase() ) + { + int ts = changedView->currentTimeStep(); + const auto dates = changedView->ownerCase()->timeStepDates(); + if ( dates.size() > (size_t)ts ) + { + auto resultPlot = RiuMainWindow::instance()->resultPlot(); + resultPlot->showTimeStep( dates[ts] ); + resultPlot->replot(); + } + } + RiuMohrsCirclePlot* mohrsCirclePlot = RiuMainWindow::instance()->mohrsCirclePlot(); if ( mohrsCirclePlot ) mohrsCirclePlot->updateOnTimeStepChanged( changedView ); + + std::vector selectedItems; + Riu3dSelectionManager::instance()->selectedItems( selectedItems ); + + for ( RiuSelectionItem* item : selectedItems ) + { + if ( RiuEclipseSelectionItem* eclipseItem = dynamic_cast( item ) ) + { + eclipseItem->m_timestepIdx = changedView->currentTimeStep(); + } + } + + Riu3dSelectionManager::instance()->updateSelectedItems(); } diff --git a/ApplicationLibCode/UserInterface/RiuViewer.cpp b/ApplicationLibCode/UserInterface/RiuViewer.cpp index d9b8733ae4..da8db94390 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.cpp +++ b/ApplicationLibCode/UserInterface/RiuViewer.cpp @@ -174,7 +174,7 @@ RiuViewer::RiuViewer( QWidget* parent ) if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() ) { QFont regTestFont = m_infoLabel->font(); - regTestFont.setPixelSize( 11 ); + regTestFont.setPointSize( 11 ); m_infoLabel->setFont( regTestFont ); m_shortInfoLabel->setFont( regTestFont ); @@ -211,7 +211,7 @@ RiuViewer::RiuViewer( QWidget* parent ) m_comparisonWindowMover = new RiuComparisonViewMover( this ); setComparisonViewToFollowAnimation( false ); - m_fontPointSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultSceneFontSize() ); + m_fontSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultSceneFontSize() ); } //-------------------------------------------------------------------------------------------------- @@ -744,7 +744,7 @@ void RiuViewer::addColorLegendToBottomLeftCorner( caf::TitledOverlayFrame* added addedLegend->enableBackground( RiaPreferences::current()->showLegendBackground() ); addedLegend->setBackgroundColor( backgroundColor ); addedLegend->setBackgroundFrameColor( frameColor ); - addedLegend->setFont( app->sceneFont( m_fontPointSize ) ); + addedLegend->setFont( app->sceneFont( m_fontSize ) ); overlayRendering->addOverlayItem( addedLegend ); @@ -1336,16 +1336,16 @@ void RiuViewer::clearHoverCursor() //-------------------------------------------------------------------------------------------------- void RiuViewer::updateFonts( int fontPointSize ) { - m_fontPointSize = fontPointSize; + m_fontSize = fontPointSize; auto defaultFontSize = RiaApplication::instance()->preferences()->defaultSceneFontSize(); cvf::Font* axisFont = RiaGuiApplication::instance()->defaultSceneFont(); QFont font = QApplication::font(); - font.setPixelSize( caf::FontTools::pointSizeToPixelSize( m_fontPointSize ) ); + font.setPointSize( m_fontSize ); - if ( caf::FontTools::absolutePointSize( defaultFontSize ) != m_fontPointSize ) + if ( caf::FontTools::absolutePointSize( defaultFontSize ) != m_fontSize ) { - axisFont = RiaFontCache::getFont( m_fontPointSize ).p(); + axisFont = RiaFontCache::getFont( m_fontSize ).p(); } overlayItemsRendering()->removeOverlayItem( m_axisCross.p() ); @@ -1364,7 +1364,7 @@ void RiuViewer::updateFonts( int fontPointSize ) m_animationProgressCompView->setFont( font ); m_versionInfoLabel->setFont( font ); - m_gridBoxGenerator->setGridLabelFontSize( m_fontPointSize ); + m_gridBoxGenerator->setGridLabelFontSize( m_fontSize ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuViewer.h b/ApplicationLibCode/UserInterface/RiuViewer.h index a7bac0c1dd..3989bd9ebf 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.h +++ b/ApplicationLibCode/UserInterface/RiuViewer.h @@ -177,7 +177,7 @@ private: bool m_showZScaleLabel; bool m_hideZScaleCheckbox; double m_zScale; - int m_fontPointSize; + int m_fontSize; caf::QStyledProgressBar* m_animationProgress; caf::QStyledProgressBar* m_animationProgressCompView; diff --git a/ApplicationLibCode/UserInterface/RiuViewerCommands.cpp b/ApplicationLibCode/UserInterface/RiuViewerCommands.cpp index b95584dbd0..2467203028 100644 --- a/ApplicationLibCode/UserInterface/RiuViewerCommands.cpp +++ b/ApplicationLibCode/UserInterface/RiuViewerCommands.cpp @@ -20,6 +20,7 @@ #include "RiuViewerCommands.h" #include "RiaDefines.h" +#include "RiaOptionItemFactory.h" #include "GeoMechCommands/RicGeoMechPropertyFilterNewExec.h" #include "MeasurementCommands/RicMeasurementPickEventHandler.h" @@ -39,7 +40,7 @@ #include "RigMainGrid.h" #include "RigVirtualPerforationTransmissibilities.h" -#include "RiaOptionItemFactory.h" +#include "ContourMap/RimEclipseContourMapView.h" #include "Rim2dIntersectionView.h" #include "RimBoxIntersection.h" #include "RimCellEdgeColors.h" @@ -55,6 +56,7 @@ #include "RimFracture.h" #include "RimGeoMechCase.h" #include "RimGeoMechCellColors.h" +#include "RimGeoMechContourMapView.h" #include "RimGeoMechView.h" #include "RimIntersectionResultDefinition.h" #include "RimLegendConfig.h" @@ -438,8 +440,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event ) menuBuilder << "RicToggleMeasurementModeFeature"; menuBuilder << "RicTogglePolyMeasurementModeFeature"; - menuBuilder.addCmdFeature( "RicCreatePolygonFeature", "Polygon" ); } + menuBuilder.addCmdFeature( "RicCreatePolygonFeature", "Polygon" ); } // Well log curve creation commands @@ -567,8 +569,6 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event ) menuBuilder.addSeparator(); menuBuilder << "RicShowContributingWellsFeature"; menuBuilder.addSeparator(); - menuBuilder << "RicNewSimWellFractureAtPosFeature"; - menuBuilder.addSeparator(); menuBuilder << "RicNewSimWellIntersectionFeature"; } } @@ -593,28 +593,38 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event ) if ( gridView ) { - menuBuilder.addSeparator(); - menuBuilder << "RicNewGridTimeHistoryCurveFeature"; - menuBuilder << "RicShowFlowCharacteristicsPlotFeature"; - if ( dynamic_cast( gridView ) ) + bool isContourView = dynamic_cast( gridView ) || dynamic_cast( gridView ); + if ( isContourView ) { - menuBuilder << "RicCreateGridCrossPlotFeature"; + menuBuilder << "RicCreateContourMapPolygonFeature"; + menuBuilder << "RicCreateContourMapPolygonAdvancedFeature"; + menuBuilder.addSeparator(); + menuBuilder << "RicExportContourMapToTextFeature"; } - menuBuilder.addSeparator(); - menuBuilder.subMenuStart( "Export" ); - menuBuilder << "RicExportEclipseInputGridFeature"; - menuBuilder << "RicSaveEclipseInputActiveVisibleCellsFeature"; - menuBuilder << "RicSaveEclipseResultAsInputPropertyFeature"; - menuBuilder << "RicExportContourMapToTextFeature"; - menuBuilder.subMenuEnd(); - menuBuilder.addSeparator(); + else + { + menuBuilder.addSeparator(); + menuBuilder << "RicNewGridTimeHistoryCurveFeature"; + menuBuilder << "RicShowFlowCharacteristicsPlotFeature"; + if ( dynamic_cast( gridView ) ) + { + menuBuilder << "RicCreateGridCrossPlotFeature"; + } + menuBuilder.addSeparator(); + menuBuilder.subMenuStart( "Export" ); + menuBuilder << "RicExportEclipseInputGridFeature"; + menuBuilder << "RicSaveEclipseInputActiveVisibleCellsFeature"; + menuBuilder << "RicSaveEclipseResultAsInputPropertyFeature"; + menuBuilder.subMenuEnd(); + menuBuilder.addSeparator(); #ifdef USE_QTCHARTS - menuBuilder << "RicCreateGridStatisticsPlotFeature"; + menuBuilder << "RicCreateGridStatisticsPlotFeature"; #endif - menuBuilder << "RicShowGridStatisticsFeature"; - menuBuilder << "RicCopyGridStatisticsToClipboardFeature"; - menuBuilder << "RicSelectColorResult"; + menuBuilder << "RicShowGridStatisticsFeature"; + menuBuilder << "RicCopyGridStatisticsToClipboardFeature"; + menuBuilder << "RicSelectColorResult"; + } } if ( firstHitPart ) diff --git a/ApplicationLibCode/UserInterface/RiuWellLogTrack.cpp b/ApplicationLibCode/UserInterface/RiuWellLogTrack.cpp index 68f8ec5e24..c481ffb7ba 100644 --- a/ApplicationLibCode/UserInterface/RiuWellLogTrack.cpp +++ b/ApplicationLibCode/UserInterface/RiuWellLogTrack.cpp @@ -107,7 +107,13 @@ void RiuWellLogTrack::createAnnotationsInPlot( const std::vectorattachAnnotation( qwtPlot(), annotation, orientation ); + m_annotationTool->attachAnnotationLine( qwtPlot(), + annotation->color(), + annotation->name(), + annotation->penStyle(), + annotation->value(), + orientation, + Qt::AlignRight ); } } diff --git a/CMakeLists.txt b/CMakeLists.txt index f86f337acc..df5527e723 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.15) +# The way boost is configured and used in Boost 1.86 requires CMake 3.26 +cmake_minimum_required(VERSION 3.26) include(CheckCSourceCompiles) include(FetchContent) @@ -123,6 +124,11 @@ if(buildcache_program) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Z7") + + # Add this to avoid the warning: overriding '/Zi' with '/Z7' + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT + "$<$:Embedded>" + ) endif() else() message(STATUS "No buildcache found") @@ -398,12 +404,12 @@ message(STATUS "Starting download of external library OpenVDS ...") if(MSVC) FetchContent_Declare( openvds - URL https://bluware.jfrog.io/artifactory/Releases-OpenVDSPlus/3.4/openvds+-3.4.5-win.zip + URL https://downloads.bluware.com/artifactory/Releases-OpenVDSPlus/3.4/openvds+-3.4.5-win.zip ) else() FetchContent_Declare( openvds - URL https://bluware.jfrog.io/artifactory/Releases-OpenVDSPlus/3.4/openvds+-3.4.5-manylinux_2014.tar.gz + URL https://downloads.bluware.com/artifactory/Releases-OpenVDSPlus/3.4/openvds+-3.4.5-manylinux_2014.tar.gz ) endif() @@ -487,11 +493,14 @@ option(RESINSIGHT_BUILD_LIBS_FROM_SOURCE "Build opm-common from source" ON) mark_as_advanced(RESINSIGHT_BUILD_LIBS_FROM_SOURCE) if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC) + + message(STATUS "Starting download of external library opm-common ...") + # See description of URL here # https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases FetchContent_Declare( ri-dependencies - URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/latest/download/custom-opm-common.zip + URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2025.01/custom-opm-common.zip ) FetchContent_MakeAvailable(ri-dependencies) @@ -507,12 +516,21 @@ if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC) list(APPEND EXTERNAL_LINK_LIBRARIES custom-opm-common) - message(STATUS "opm-common: Enabled use of precompiled library") + message(STATUS "... completed download of external library opm-common ") else() + # CREATE_OPM_COMMON_KEYWORDS is used to create c++-code for the keywords in + # opm-common JSON files See description in + # ThirdParty/custom-opm-common/CMakeLists.txt When changing this flag, it is + # required to reopen the Visual Studio project + set(CREATE_OPM_COMMON_KEYWORDS OFF) + add_subdirectory(ThirdParty/custom-opm-common) - add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests) - list(APPEND OPM_LIBRARIES custom-opm-common) - set_property(TARGET opm-parser-tests PROPERTY FOLDER "Thirdparty/OPM") + + if(NOT CREATE_OPM_COMMON_KEYWORDS) + add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests) + list(APPEND OPM_LIBRARIES custom-opm-common) + set_property(TARGET opm-parser-tests PROPERTY FOLDER "Thirdparty/OPM") + endif() endif() list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app) @@ -699,6 +717,16 @@ else() list(APPEND THIRD_PARTY_LIBRARIES Parquet::parquet_static) endif() +# ############################################################################## +# pugixml +# ############################################################################## +find_package(pugixml CONFIG REQUIRED) +if(MSVC) + list(APPEND THIRD_PARTY_LIBRARIES pugixml::pugixml) +else() + list(APPEND THIRD_PARTY_LIBRARIES pugixml::static) +endif() + # ############################################################################## # nonstd::type-lite # ############################################################################## diff --git a/CMakePresets.json b/CMakePresets.json index 6b8cf75a0d..899ea80ebb 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -8,6 +8,7 @@ "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake", + "VCPKG_INSTALL_OPTIONS": "--disable-metrics;--clean-after-build", "RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS": true, "RESINSIGHT_TREAT_WARNINGS_AS_ERRORS": true, "RESINSIGHT_ENABLE_UNITY_BUILD": false, diff --git a/Fwk/AppFwk/CommonCode/CMakeLists.txt b/Fwk/AppFwk/CommonCode/CMakeLists.txt index 1f9e198804..6545e74a80 100644 --- a/Fwk/AppFwk/CommonCode/CMakeLists.txt +++ b/Fwk/AppFwk/CommonCode/CMakeLists.txt @@ -10,10 +10,6 @@ endif() find_package(OpenGL) # Qt - -# These headers need to go through Qt's MOC compiler -set(MOC_HEADER_FILES cafMessagePanel.h) - find_package( Qt6 COMPONENTS @@ -70,5 +66,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/CommonCode/cafVecIjk.cpp b/Fwk/AppFwk/CommonCode/cafVecIjk.cpp index 788c6a3565..84e6e3f2a1 100644 --- a/Fwk/AppFwk/CommonCode/cafVecIjk.cpp +++ b/Fwk/AppFwk/CommonCode/cafVecIjk.cpp @@ -46,6 +46,22 @@ VecIjk::VecIjk( size_t i, size_t j, size_t k ) m_values = { { i, j, k } }; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::VecIjk VecIjk::toOneBased() const +{ + return VecIjk( i() + 1, j() + 1, k() + 1 ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::VecIjk VecIjk::toZeroBased() const +{ + return VecIjk( i() - 1, j() - 1, k() - 1 ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/CommonCode/cafVecIjk.h b/Fwk/AppFwk/CommonCode/cafVecIjk.h index e80f813cc8..e6f4a755d6 100644 --- a/Fwk/AppFwk/CommonCode/cafVecIjk.h +++ b/Fwk/AppFwk/CommonCode/cafVecIjk.h @@ -47,6 +47,9 @@ class VecIjk public: VecIjk( size_t i, size_t j, size_t k ); + VecIjk toOneBased() const; + VecIjk toZeroBased() const; + size_t i() const; size_t j() const; size_t k() const; diff --git a/Fwk/AppFwk/cafAnimControl/CMakeLists.txt b/Fwk/AppFwk/cafAnimControl/CMakeLists.txt index 7d10739f2c..20c16e8224 100644 --- a/Fwk/AppFwk/cafAnimControl/CMakeLists.txt +++ b/Fwk/AppFwk/cafAnimControl/CMakeLists.txt @@ -6,11 +6,6 @@ if(CAF_ENABLE_UNITY_BUILD) set(CMAKE_UNITY_BUILD true) endif() -# Qt -set(MOC_HEADER_FILES cafFrameAnimationControl.h cafAnimationToolBar.h - cafPopupMenuButton.h -) - find_package( Qt6 COMPONENTS @@ -46,5 +41,3 @@ target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES}) if(MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4127") endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafCommand/CMakeLists.txt b/Fwk/AppFwk/cafCommand/CMakeLists.txt index e68a3c2f27..3e632c6a83 100644 --- a/Fwk/AppFwk/cafCommand/CMakeLists.txt +++ b/Fwk/AppFwk/cafCommand/CMakeLists.txt @@ -6,9 +6,6 @@ if(CAF_ENABLE_UNITY_BUILD) set(CMAKE_UNITY_BUILD true) endif() -# These headers need to go through Qt's MOC compiler -set(MOC_HEADER_FILES cafCmdFeature.h cafCmdFeatureManager.h) - # Qt find_package( Qt6 @@ -49,5 +46,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt b/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt index 3396102b5f..de9b8c8c39 100644 --- a/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt +++ b/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt @@ -6,9 +6,6 @@ if(CAF_ENABLE_UNITY_BUILD) set(CMAKE_UNITY_BUILD true) endif() -# These headers need to go through Qt's MOC compiler -set(MOC_HEADER_FILES) - # Qt find_package( Qt6 @@ -75,5 +72,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafDataLoader/CMakeLists.txt b/Fwk/AppFwk/cafDataLoader/CMakeLists.txt index e3473b1873..6432722603 100644 --- a/Fwk/AppFwk/cafDataLoader/CMakeLists.txt +++ b/Fwk/AppFwk/cafDataLoader/CMakeLists.txt @@ -33,5 +33,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator_UnitTest/CMakeLists.txt b/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator_UnitTest/CMakeLists.txt index 1aefcb39b3..c0d54986b4 100644 --- a/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator_UnitTest/CMakeLists.txt +++ b/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator_UnitTest/CMakeLists.txt @@ -24,5 +24,3 @@ set(PROJECT_FILES cafHexInterpolatorBasicTest.cpp add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp) target_link_libraries(${PROJECT_NAME} LibCore) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt b/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt index b800f4591a..7ee211e6bb 100644 --- a/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt +++ b/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt @@ -38,8 +38,6 @@ add_library( cafPdmMat3d/cafPdmXmlMat3d.cpp cafPdmMat3d/cafPdmXmlMat3d.h cafPdmMat3d/cafPdmFieldCvfMat3d.h - ${MOC_HEADER_FILES} - ${MOC_SOURCE_FILES} ) target_include_directories( @@ -48,5 +46,3 @@ target_include_directories( ) target_link_libraries(${PROJECT_NAME} cafUserInterface LibCore ${QT_LIBRARIES}) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafPdmCvf/cafPdmCvf_UnitTests/CMakeLists.txt b/Fwk/AppFwk/cafPdmCvf/cafPdmCvf_UnitTests/CMakeLists.txt index e1d2701318..2fc7248546 100644 --- a/Fwk/AppFwk/cafPdmCvf/cafPdmCvf_UnitTests/CMakeLists.txt +++ b/Fwk/AppFwk/cafPdmCvf/cafPdmCvf_UnitTests/CMakeLists.txt @@ -20,8 +20,6 @@ set(PROJECT_FILES # add the executable add_executable(${PROJECT_NAME} ${PROJECT_FILES}) -source_group("" FILES ${PROJECT_FILES}) - target_link_libraries( ${PROJECT_NAME} cafPdmCore cafPdmXml LibCore cafPdmCvf ${QT_LIBRARIES} ) diff --git a/Fwk/AppFwk/cafPdmCvf/cafPdmMat3d/cafPdmUiCoreMat3d.h b/Fwk/AppFwk/cafPdmCvf/cafPdmMat3d/cafPdmUiCoreMat3d.h index f5ea85d59f..8daeb01405 100644 --- a/Fwk/AppFwk/cafPdmCvf/cafPdmMat3d/cafPdmUiCoreMat3d.h +++ b/Fwk/AppFwk/cafPdmCvf/cafPdmMat3d/cafPdmUiCoreMat3d.h @@ -69,7 +69,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const cvf::Mat3d& ) { return QList(); } + static QList valueOptions( QString keyword, const cvf::Mat3d& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField&, std::vector* ) {} diff --git a/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreColor3f.h b/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreColor3f.h index 656b9a690e..aa445248f5 100644 --- a/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreColor3f.h +++ b/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreColor3f.h @@ -69,7 +69,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const cvf::Color3f& ) { return QList(); } + static QList valueOptions( QString keyword, const cvf::Color3f& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField&, std::vector* ) {} diff --git a/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreMat4d.h b/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreMat4d.h index 25902dd8ab..1634d92ef0 100644 --- a/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreMat4d.h +++ b/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreMat4d.h @@ -69,7 +69,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const cvf::Mat4d& ) { return QList(); } + static QList valueOptions( QString keyword, const cvf::Mat4d& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField&, std::vector* ) {} diff --git a/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreVec3d.h b/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreVec3d.h index 073f34da31..bc4d22c8f7 100644 --- a/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreVec3d.h +++ b/Fwk/AppFwk/cafPdmCvf/cafPdmUiCoreVec3d.h @@ -69,7 +69,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const cvf::Vec3d& ) { return QList(); } + static QList valueOptions( QString keyword, const cvf::Vec3d& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField&, std::vector* ) {} diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.cpp b/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.cpp index e5ef4211b4..39492f1caf 100644 --- a/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.cpp +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.cpp @@ -80,3 +80,53 @@ void PdmFieldScriptingCapabilityIOHandler>::readFromField( PdmFieldScriptingCapabilityIOHandler>::readFromField( fieldVectorValue, outputStream, quoteStrings ); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmFieldScriptingCapabilityIOHandler>::writeToField( cvf::Matrix4& fieldValue, + QTextStream& inputStream, + caf::PdmScriptIOMessages* errorMessageContainer, + bool stringsAreQuoted ) +{ + std::vector fieldVectorValue; + PdmFieldScriptingCapabilityIOHandler>::writeToField( fieldVectorValue, + inputStream, + errorMessageContainer, + stringsAreQuoted ); + if ( fieldVectorValue.size() == 16u ) + { + for ( int row = 0; row < 4; ++row ) + { + for ( int col = 0; col < 4; ++col ) + { + fieldValue( row, col ) = fieldVectorValue[row * 4 + col]; + } + } + } + else + { + QString errMsg = QString( "Expected 16 values, got %1" ).arg( fieldVectorValue.size() ); + errorMessageContainer->addError( errMsg ); + } +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void PdmFieldScriptingCapabilityIOHandler>::readFromField( const cvf::Matrix4& fieldValue, + QTextStream& outputStream, + bool quoteStrings, + bool quoteNonBuiltin ) +{ + std::vector fieldVectorValue( 16u ); + for ( int row = 0; row < 4; ++row ) + { + for ( int col = 0; col < 4; ++col ) + { + fieldVectorValue[row * 4 + col] = fieldValue( row, col ); + } + } + + PdmFieldScriptingCapabilityIOHandler>::readFromField( fieldVectorValue, outputStream, quoteStrings ); +} diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.h b/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.h index 7be7a058b7..7f239bc619 100644 --- a/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.h +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmFieldScriptingCapabilityCvfVec3d.h @@ -37,6 +37,7 @@ #include "cafPdmFieldScriptingCapability.h" +#include "cvfMatrix4.h" #include "cvfVector3.h" namespace caf @@ -53,4 +54,18 @@ struct PdmFieldScriptingCapabilityIOHandler> bool quoteStrings = true, bool quoteNonBuiltins = false ); }; + +template <> +struct PdmFieldScriptingCapabilityIOHandler> +{ + static void writeToField( cvf::Matrix4& fieldValue, + QTextStream& inputStream, + PdmScriptIOMessages* errorMessageContainer, + bool stringsAreQuoted = true ); + static void readFromField( const cvf::Matrix4& fieldValue, + QTextStream& outputStream, + bool quoteStrings = true, + bool quoteNonBuiltins = false ); +}; + } // namespace caf diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmPythonGenerator.cpp b/Fwk/AppFwk/cafPdmScripting/cafPdmPythonGenerator.cpp index a1f2773def..094193f302 100644 --- a/Fwk/AppFwk/cafPdmScripting/cafPdmPythonGenerator.cpp +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmPythonGenerator.cpp @@ -560,6 +560,7 @@ QString PdmPythonGenerator::dataTypeString( const PdmFieldHandle* field, bool us #ifndef CAF_EXCLUDE_CVF builtins[QString::fromStdString( typeid( cvf::Vec3d ).name() )] = "List[float]"; builtins[QString::fromStdString( typeid( cvf::Color3f ).name() )] = "str"; + builtins[QString::fromStdString( typeid( cvf::Mat4d ).name() )] = "List[float]"; #endif bool foundBuiltin = false; diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/CMakeLists.txt b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/CMakeLists.txt index 20ce6e346b..0dc36fd4ec 100644 --- a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/CMakeLists.txt +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/CMakeLists.txt @@ -16,8 +16,10 @@ endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp ) -set(PROJECT_FILES cafPdmScripting_UnitTests.cpp gtest/gtest-all.cpp - cafPdmScriptingBasicTest.cpp cafPdmFieldSerializationTest.cpp +set(PROJECT_FILES + cafPdmScripting_UnitTests.cpp gtest/gtest-all.cpp + cafPdmScriptingBasicTest.cpp cafPdmFieldSerializationTest.cpp + cafPdmObjectMethodTest.cpp cafMockObjects.cpp ) qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES}) @@ -32,8 +34,6 @@ target_link_libraries( ${PROJECT_NAME} PRIVATE cafPdmScripting ${QT_LIBRARIES} ${THREAD_LIBRARY} ) -source_group("" FILES ${PROJECT_FILES}) - install( TARGETS ${PROJECT_NAME} BUNDLE DESTINATION . diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafMockObjects.cpp b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafMockObjects.cpp new file mode 100644 index 0000000000..654fc6916b --- /dev/null +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafMockObjects.cpp @@ -0,0 +1,151 @@ + +#include "cafMockObjects.h" + +namespace caf +{ +template <> +void AppEnum::setUp() +{ + addItem( InheritedDemoObj::T1, "T1", "An A letter" ); + addItem( InheritedDemoObj::T2, "T2", "A B letter" ); + addItem( InheritedDemoObj::T3, "T3", "A B letter" ); + setDefault( InheritedDemoObj::T1 ); +} +} // namespace caf + +CAF_PDM_SOURCE_INIT( SimpleObj, "SimpleObj" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +SimpleObj::SimpleObj() + : PdmObject() + , m_doubleMember( 0.0 ) +{ + CAF_PDM_InitObject( "SimpleObj", "", "Tooltip SimpleObj", "WhatsThis SimpleObj" ); + + CAF_PDM_InitField( &m_position, "Position", 8765.2, "Position", "", "Tooltip", "WhatsThis" ); + CAF_PDM_InitField( &m_dir, "Dir", 123.56, "Direction", "", "Tooltip", "WhatsThis" ); + CAF_PDM_InitField( &m_up, "Up", 0.0, "Up value", "", "Tooltip", "WhatsThis" ); + CAF_PDM_InitFieldNoDefault( &m_numbers, "Numbers", "Important Numbers", "", "Tooltip", "WhatsThis" ); +#if 1 + m_proxyDouble.registerSetMethod( this, &SimpleObj::setDoubleMember ); + m_proxyDouble.registerGetMethod( this, &SimpleObj::doubleMember ); + addUiCapabilityToField( &m_proxyDouble ); + addXmlCapabilityToField( &m_proxyDouble ); + CAF_PDM_InitFieldNoDefault( &m_proxyDouble, "ProxyDouble", "ProxyDouble" ); +#endif +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +SimpleObj::SimpleObj( const SimpleObj& other ) + : PdmObject() +{ + CAF_PDM_InitField( &m_position, "Position", 8765.2, "Position", "", "", "WhatsThis" ); + CAF_PDM_InitField( &m_dir, "Dir", 123.56, "Direction", "", "", "WhatsThis" ); + CAF_PDM_InitField( &m_up, "Up", 0.0, "Up value", "", "", "WhatsThis" ); + + CAF_PDM_InitFieldNoDefault( &m_numbers, "Numbers", "Important Numbers", "", "", "WhatsThis" ); + + m_position = other.m_position; + m_dir = other.m_dir; + m_up = other.m_up; + m_numbers = other.m_numbers; + m_doubleMember = other.m_doubleMember; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void SimpleObj::setDoubleMember( const double& d ) +{ + m_doubleMember = d; + std::cout << "setDoubleMember" << std::endl; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +double SimpleObj::doubleMember() const +{ + std::cout << "doubleMember" << std::endl; + return m_doubleMember; +} + +CAF_PDM_SOURCE_INIT( DemoPdmObject, "DemoPdmObject" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +DemoPdmObject::DemoPdmObject() +{ + CAF_PDM_InitObject( "DemoPdmObject", "", "Tooltip DemoPdmObject", "WhatsThis DemoPdmObject" ); + + CAF_PDM_InitField( &m_doubleField, + "BigNumber", + 0.0, + "", + "", + "Enter a big number here", + "This is a place you can enter a big real value if you want" ); + + CAF_PDM_InitField( &m_intField, + "IntNumber", + 0, + "", + "", + "Enter some small number here", + "This is a place you can enter a small integer value if you want" ); + + CAF_PDM_InitField( &m_textField, "TextField", QString( "��� Test text end" ), "TextField", "", "Tooltip", "WhatsThis" ); + CAF_PDM_InitFieldNoDefault( &m_simpleObjPtrField, "SimpleObjPtrField", "SimpleObjPtrField", "", "Tooltip", "WhatsThis" ); + CAF_PDM_InitFieldNoDefault( &m_simpleObjPtrField2, "SimpleObjPtrField2", "SimpleObjPtrField2", "", "Tooltip", "WhatsThis" ); + m_simpleObjPtrField2 = new SimpleObj; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +DemoPdmObject::~DemoPdmObject() +{ + delete m_simpleObjPtrField(); + delete m_simpleObjPtrField2(); +} + +CAF_PDM_SOURCE_INIT( InheritedDemoObj, "InheritedDemoObj" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +InheritedDemoObj::InheritedDemoObj() +{ + CAF_PDM_InitScriptableObjectWithNameAndComment( "InheritedDemoObj", + "", + "ToolTip InheritedDemoObj", + "Whatsthis InheritedDemoObj", + "ScriptClassName_InheritedDemoObj", + "Script comment test" ); + + CAF_PDM_InitScriptableFieldNoDefault( &m_texts, "Texts", "Some words" ); + CAF_PDM_InitScriptableFieldNoDefault( &m_numbers, "Numbers", "Some words" ); + CAF_PDM_InitFieldNoDefault( &m_testEnumField, "TestEnumValue", "An Enum" ); + CAF_PDM_InitFieldNoDefault( &m_simpleObjectsField, + "SimpleObjects", + "SimpleObjectsField", + "", + "ToolTip SimpleObjectsField", + "Whatsthis SimpleObjectsField" ); +} + +CAF_PDM_SOURCE_INIT( MyPdmDocument, "MyPdmDocument" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +MyPdmDocument::MyPdmDocument() +{ + CAF_PDM_InitObject( "PdmObjectCollection" ); + CAF_PDM_InitFieldNoDefault( &objects, "PdmObjects", "", "", "", "" ) +} diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafMockObjects.h b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafMockObjects.h new file mode 100644 index 0000000000..b5e5d9f306 --- /dev/null +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafMockObjects.h @@ -0,0 +1,99 @@ + +#pragma once + +#include "gtest/gtest.h" + +#include "cafAppEnum.h" +#include "cafPdmChildArrayField.h" +#include "cafPdmChildField.h" +#include "cafPdmCodeGenerator.h" +#include "cafPdmDocument.h" +#include "cafPdmField.h" +#include "cafPdmFieldScriptingCapability.h" +#include "cafPdmObject.h" +#include "cafPdmObjectGroup.h" +#include "cafPdmObjectMethod.h" +#include "cafPdmObjectScriptingCapability.h" +#include "cafPdmPointer.h" +#include "cafPdmProxyValueField.h" +#include "cafPdmPythonGenerator.h" +#include "cafPdmReferenceHelper.h" + +#include +#include + +/// Demo objects to show the usage of the Pdm system + +class SimpleObj : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + SimpleObj(); + + /// Assignment and copying of PDM objects is not focus for the features. This is only a + /// "would it work" test + SimpleObj( const SimpleObj& other ); + + ~SimpleObj() {} + + caf::PdmField m_position; + caf::PdmField m_dir; + caf::PdmField m_up; + caf::PdmField> m_numbers; + caf::PdmProxyValueField m_proxyDouble; + + void setDoubleMember( const double& d ); + double doubleMember() const; + + double m_doubleMember; +}; + +class DemoPdmObject : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + DemoPdmObject(); + + ~DemoPdmObject(); + + // Fields + caf::PdmField m_doubleField; + caf::PdmField m_intField; + caf::PdmField m_textField; + + caf::PdmChildField m_simpleObjPtrField; + caf::PdmChildField m_simpleObjPtrField2; +}; + +class InheritedDemoObj : public DemoPdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + enum TestEnumType + { + T1, + T2, + T3 + }; + + InheritedDemoObj(); + + caf::PdmField> m_texts; + caf::PdmField> m_numbers; + + caf::PdmField> m_testEnumField; + caf::PdmChildArrayField m_simpleObjectsField; +}; + +class MyPdmDocument : public caf::PdmDocument +{ + CAF_PDM_HEADER_INIT; + +public: + MyPdmDocument(); + + caf::PdmChildArrayField objects; +}; diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmFieldSerializationTest.cpp b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmFieldSerializationTest.cpp index b53774116f..e772c21afb 100644 --- a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmFieldSerializationTest.cpp +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmFieldSerializationTest.cpp @@ -96,3 +96,33 @@ TEST( PdmFieldSerialization, StringListQuoted ) EXPECT_STREQ( "B-2H", destination[0].toStdString().c_str() ); EXPECT_STREQ( "B-4H", destination[1].toStdString().c_str() ); } + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- +TEST( PdmFieldSerialization, ValueList ) +{ + std::vector floatValues = { 1.5, 0.0001, 1.77e10 }; + + QString text; + QTextStream stream( &text ); + + caf::PdmScriptIOMessages messages; + bool stringsAreQuoted = true; + + caf::PdmFieldScriptingCapabilityIOHandler>::readFromField( floatValues, + stream, + &messages, + stringsAreQuoted ); + + const QString expected = "[1.5, 0.0001, 1.77e+10]"; + EXPECT_STREQ( expected.toStdString().c_str(), text.toStdString().c_str() ); + + std::vector result; + caf::PdmFieldScriptingCapabilityIOHandler>::writeToField( result, stream, &messages, stringsAreQuoted ); + + EXPECT_EQ( floatValues.size(), result.size() ); + for ( size_t i = 0; i < floatValues.size(); ++i ) + { + EXPECT_FLOAT_EQ( floatValues[i], result[i] ); + } +} diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmObjectMethodTest.cpp b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmObjectMethodTest.cpp new file mode 100644 index 0000000000..d4a679cdd5 --- /dev/null +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmObjectMethodTest.cpp @@ -0,0 +1,88 @@ + +#include "gtest/gtest.h" + +#include "cafMockObjects.h" + +namespace caf +{ + +//================================================================================================== +/// +//================================================================================================== +class InheritedDemoObj_appendValves : public caf::PdmObjectMethod +{ + CAF_PDM_HEADER_INIT; + +public: + InheritedDemoObj_appendValves( caf::PdmObjectHandle* self ); + + caf::PdmObjectHandle* execute() override; + bool resultIsPersistent() const override; + bool isNullptrValidResult() const override; + std::unique_ptr defaultResult() const override; + +private: + caf::PdmField> m_valveLocations; +}; + +CAF_PDM_OBJECT_METHOD_SOURCE_INIT( InheritedDemoObj, InheritedDemoObj_appendValves, "AppendValves" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +InheritedDemoObj_appendValves::InheritedDemoObj_appendValves( caf::PdmObjectHandle* self ) + : caf::PdmObjectMethod( self ) +{ + CAF_PDM_InitObject( "Append Valves", "", "", "Append Valves" ); + + CAF_PDM_InitScriptableFieldNoDefault( &m_valveLocations, "ValveLocations", "ValveLocations" ); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +caf::PdmObjectHandle* InheritedDemoObj_appendValves::execute() +{ + auto obj = self(); + + auto* child = new SimpleObj; + child->m_numbers = m_valveLocations(); + obj->m_simpleObjectsField().push_back( child ); + return obj; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool InheritedDemoObj_appendValves::resultIsPersistent() const +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool InheritedDemoObj_appendValves::isNullptrValidResult() const +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::unique_ptr InheritedDemoObj_appendValves::defaultResult() const +{ + return std::unique_ptr( new InheritedDemoObj ); +} + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- +TEST( PdmObjectMethodTest, GeneratePythonCode ) +{ + caf::PdmPythonGenerator generator; + std::vector logMessages; + auto generatedText = generator.generate( caf::PdmDefaultObjectFactory::instance(), logMessages ); + auto string = generatedText.toStdString(); +} + +} // namespace caf diff --git a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScriptingBasicTest.cpp b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScriptingBasicTest.cpp index 62f6c7e102..e8c254bf62 100644 --- a/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScriptingBasicTest.cpp +++ b/Fwk/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScriptingBasicTest.cpp @@ -36,206 +36,7 @@ #include "gtest/gtest.h" -#include "cafAppEnum.h" -#include "cafPdmChildArrayField.h" -#include "cafPdmChildField.h" -#include "cafPdmCodeGenerator.h" -#include "cafPdmDocument.h" -#include "cafPdmField.h" -#include "cafPdmFieldScriptingCapability.h" -#include "cafPdmObject.h" -#include "cafPdmObjectGroup.h" -#include "cafPdmPointer.h" -#include "cafPdmProxyValueField.h" -#include "cafPdmReferenceHelper.h" - -#include - -#include "cafPdmObjectScriptingCapability.h" -#include - -/// Demo objects to show the usage of the Pdm system - -class SimpleObj : public caf::PdmObject -{ - CAF_PDM_HEADER_INIT; - -public: - SimpleObj() - : PdmObject() - , m_doubleMember( 0.0 ) - { - CAF_PDM_InitObject( "SimpleObj", "", "Tooltip SimpleObj", "WhatsThis SimpleObj" ); - - CAF_PDM_InitField( &m_position, "Position", 8765.2, "Position", "", "Tooltip", "WhatsThis" ); - CAF_PDM_InitField( &m_dir, "Dir", 123.56, "Direction", "", "Tooltip", "WhatsThis" ); - CAF_PDM_InitField( &m_up, "Up", 0.0, "Up value", "", "Tooltip", "WhatsThis" ); - CAF_PDM_InitFieldNoDefault( &m_numbers, "Numbers", "Important Numbers", "", "Tooltip", "WhatsThis" ); -#if 1 - m_proxyDouble.registerSetMethod( this, &SimpleObj::setDoubleMember ); - m_proxyDouble.registerGetMethod( this, &SimpleObj::doubleMember ); - addUiCapabilityToField( &m_proxyDouble ); - addXmlCapabilityToField( &m_proxyDouble ); - CAF_PDM_InitFieldNoDefault( &m_proxyDouble, "ProxyDouble", "ProxyDouble" ); -#endif - } - - /// Assignment and copying of PDM objects is not focus for the features. This is only a - /// "would it work" test - SimpleObj( const SimpleObj& other ) - : PdmObject() - { - CAF_PDM_InitField( &m_position, "Position", 8765.2, "Position", "", "", "WhatsThis" ); - CAF_PDM_InitField( &m_dir, "Dir", 123.56, "Direction", "", "", "WhatsThis" ); - CAF_PDM_InitField( &m_up, "Up", 0.0, "Up value", "", "", "WhatsThis" ); - - CAF_PDM_InitFieldNoDefault( &m_numbers, "Numbers", "Important Numbers", "", "", "WhatsThis" ); - - m_position = other.m_position; - m_dir = other.m_dir; - m_up = other.m_up; - m_numbers = other.m_numbers; - m_doubleMember = other.m_doubleMember; - } - - ~SimpleObj() {} - - caf::PdmField m_position; - caf::PdmField m_dir; - caf::PdmField m_up; - caf::PdmField> m_numbers; - caf::PdmProxyValueField m_proxyDouble; - - void setDoubleMember( const double& d ) - { - m_doubleMember = d; - std::cout << "setDoubleMember" << std::endl; - } - double doubleMember() const - { - std::cout << "doubleMember" << std::endl; - return m_doubleMember; - } - - double m_doubleMember; -}; -CAF_PDM_SOURCE_INIT( SimpleObj, "SimpleObj" ); - -class DemoPdmObject : public caf::PdmObject -{ - CAF_PDM_HEADER_INIT; - -public: - DemoPdmObject() - { - CAF_PDM_InitObject( "DemoPdmObject", "", "Tooltip DemoPdmObject", "WhatsThis DemoPdmObject" ); - - CAF_PDM_InitField( &m_doubleField, - "BigNumber", - 0.0, - "", - "", - "Enter a big number here", - "This is a place you can enter a big real value if you want" ); - - CAF_PDM_InitField( &m_intField, - "IntNumber", - 0, - "", - "", - "Enter some small number here", - "This is a place you can enter a small integer value if you want" ); - - CAF_PDM_InitField( &m_textField, "TextField", QString( "��� Test text end" ), "TextField", "", "Tooltip", "WhatsThis" ); - CAF_PDM_InitFieldNoDefault( &m_simpleObjPtrField, "SimpleObjPtrField", "SimpleObjPtrField", "", "Tooltip", "WhatsThis" ); - CAF_PDM_InitFieldNoDefault( &m_simpleObjPtrField2, "SimpleObjPtrField2", "SimpleObjPtrField2", "", "Tooltip", "WhatsThis" ); - m_simpleObjPtrField2 = new SimpleObj; - } - - ~DemoPdmObject() - { - delete m_simpleObjPtrField(); - delete m_simpleObjPtrField2(); - } - - // Fields - caf::PdmField m_doubleField; - caf::PdmField m_intField; - caf::PdmField m_textField; - - caf::PdmChildField m_simpleObjPtrField; - caf::PdmChildField m_simpleObjPtrField2; -}; - -CAF_PDM_SOURCE_INIT( DemoPdmObject, "DemoPdmObject" ); - -class InheritedDemoObj : public DemoPdmObject -{ - CAF_PDM_HEADER_INIT; - -public: - enum TestEnumType - { - T1, - T2, - T3 - }; - - InheritedDemoObj() - { - CAF_PDM_InitScriptableObjectWithNameAndComment( "InheritedDemoObj", - "", - "ToolTip InheritedDemoObj", - "Whatsthis InheritedDemoObj", - "ScriptClassName_InheritedDemoObj", - "Script comment test" ); - - CAF_PDM_InitScriptableFieldNoDefault( &m_texts, "Texts", "Some words" ); - CAF_PDM_InitScriptableFieldNoDefault( &m_numbers, "Numbers", "Some words" ); - CAF_PDM_InitFieldNoDefault( &m_testEnumField, "TestEnumValue", "An Enum" ); - CAF_PDM_InitFieldNoDefault( &m_simpleObjectsField, - "SimpleObjects", - "SimpleObjectsField", - "", - "ToolTip SimpleObjectsField", - "Whatsthis SimpleObjectsField" ); - } - - caf::PdmField> m_texts; - caf::PdmField> m_numbers; - - caf::PdmField> m_testEnumField; - caf::PdmChildArrayField m_simpleObjectsField; -}; -CAF_PDM_SOURCE_INIT( InheritedDemoObj, "InheritedDemoObj" ); - -class MyPdmDocument : public caf::PdmDocument -{ - CAF_PDM_HEADER_INIT; - -public: - MyPdmDocument() - { - CAF_PDM_InitObject( "PdmObjectCollection" ); - CAF_PDM_InitFieldNoDefault( &objects, "PdmObjects", "", "", "", "" ) - } - - caf::PdmChildArrayField objects; -}; -CAF_PDM_SOURCE_INIT( MyPdmDocument, "MyPdmDocument" ); - -namespace caf -{ -template <> -void AppEnum::setUp() -{ - addItem( InheritedDemoObj::T1, "T1", "An A letter" ); - addItem( InheritedDemoObj::T2, "T2", "A B letter" ); - addItem( InheritedDemoObj::T3, "T3", "A B letter" ); - setDefault( InheritedDemoObj::T1 ); -} - -} // namespace caf +#include "cafMockObjects.h" //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt index c85916f470..9586cb6cc0 100644 --- a/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt @@ -36,5 +36,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127 /wd4996" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt index 7416c8ae41..159e9492d2 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt @@ -59,6 +59,7 @@ set(PROJECT_FILES cafAsyncObjectDeleter.inl cafAsyncWorkerManager.h cafAsyncWorkerManager.cpp + cafPdmObjectHandleTools.h ) add_library(${PROJECT_NAME} ${PROJECT_FILES}) @@ -72,5 +73,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h index 02e4ab362a..7263c6fdcd 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnum.h @@ -37,10 +37,12 @@ #pragma once #include "cafAssert.h" +#include "cafPdmFieldHandle.h" #include #include +#include #include namespace caf @@ -95,6 +97,16 @@ namespace caf /// options.push_back(caf::PdmOptionItemInfo(caf::AppEnum::uiTextFromIndex(i), /// caf::AppEnum::fromIndex(i))); /// } +/// +/// Subset of enums: +/// +/// Define a subset of the enum to be used in a field. Assign a value from the subset to make sure the field +/// contains a valid value when the constructor is done. +/// +/// CAF_PDM_InitField( &m_enum2Field, "Enum2Field", MyEnumType::T6, "Subset using setEnumSubset()" ); +/// caf::AppEnum::setEnumSubset( &m_enum2Field, { MyEnumType::T2, MyEnumType::T6 } ); +/// +/// //================================================================================================== class AppEnumInterface @@ -117,6 +129,19 @@ public: { } + static void setEnumSubset( caf::PdmFieldHandle* fieldKeyword, std::vector subset ) + { + if ( !fieldKeyword ) return; + m_enumSubset[fieldKeyword->keyword()] = subset; + } + static std::vector enumSubset( QString fieldKeyword ) + { + auto it = m_enumSubset.find( fieldKeyword ); + if ( it != m_enumSubset.end() ) return it->second; + + return {}; + } + operator T() const { return m_value; } T value() const { return m_value; } @@ -176,6 +201,8 @@ private: T m_value; + static std::map> m_enumSubset; + //================================================================================================== /// A private class to handle the instance of the mapping vector. /// all access methods could have been placed directly in the \class AppEnum class, @@ -354,4 +381,7 @@ private: }; }; +template +std::map> AppEnum::m_enumSubset; + } // namespace caf diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl index 140419b48f..d05c0bc20d 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl @@ -193,8 +193,15 @@ void PdmChildArrayField::deleteChildrenAsync() { CAF_ASSERT( isInitializedByInitFieldMacro() ); - AsyncPdmObjectVectorDeleter pointerDeleter( m_pointers ); - CAF_ASSERT( m_pointers.empty() ); // Object storage for m_pointers should be empty immediately. + auto objectsToDelete = m_pointers; + + // Disconnect the connection to observers before deleting the objects + // https://github.com/OPM/ResInsight/issues/12262 + // + // See test in \Fwk\AppFwk\cafProjectDataModel\cafPdmCore\cafPdmCore_UnitTests\cafPdmChildArrayFieldHandleTest.cpp + clearWithoutDelete(); + + AsyncPdmObjectVectorDeleter pointerDeleter( objectsToDelete ); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/CMakeLists.txt index 02252476d0..33aa764683 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/CMakeLists.txt @@ -44,8 +44,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ) endif() -source_group("" FILES ${PROJECT_FILES}) - target_link_libraries( ${PROJECT_NAME} PRIVATE cafPdmCore ${QT_LIBRARIES} ${THREAD_LIBRARY} ) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp index 01e1214e63..9814dcf549 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmChildArrayFieldHandleTest.cpp @@ -34,9 +34,13 @@ public: class SimpleObjDerived : public MsjSimpleObj { +public: + caf::Signal<> basicSignal; + public: SimpleObjDerived() : MsjSimpleObj() + , basicSignal( this ) { this->addField( &valueA, "valueA" ); } @@ -66,6 +70,30 @@ public: this->addField( &derivedOtherObjs, "derivedOtherObjs" ); } + ~ContainerObj(){ + /* + * + * Test code used when debugging crash related to delete of objects and disconnect of signals + * + QString timestamp = QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss.zzz" ); + std::cout << timestamp.toStdString() << std::endl; + + auto count = observedSignals().size(); + + std::cout << "Destructor ~ContainerObj: " << count << std::endl; + */ + }; + + void setBasicSignalReceived( const caf::SignalEmitter* emitter ) {} + + void createAndAppendObject() + { + SimpleObjDerived* s = new SimpleObjDerived; + s->basicSignal.connect( this, &ContainerObj::setBasicSignalReceived ); + + derivedObjs.push_back( s ); + } + caf::PdmChildArrayField derivedObjs; caf::PdmChildArrayField derivedOtherObjs; }; @@ -131,3 +159,26 @@ TEST( ChildArrayFieldHandle, DerivedOtherObjects ) delete containerObj; } + +TEST( ChildArrayFieldHandle, AsyncDeleteOfMultipleChildren ) +{ + // https://github.com/OPM/ResInsight/issues/12262 + // + // To trigger crash, remove the line + // clearWithoutDelete(); + // from PdmChildArrayField::deleteChildrenAsync() + // + // Crash was reproduced in Debug build in VS2022 17.13.2 + + ContainerObj containerObj; + const int numObjects = 100000; + for ( int i = 0; i < numObjects; i++ ) + { + containerObj.createAndAppendObject(); + } + + containerObj.derivedObjs.deleteChildrenAsync(); + + // Wait for some time to allow the async delete + std::this_thread::sleep_for( std::chrono::milliseconds( 2 ) ); +} diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandleTools.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandleTools.h new file mode 100644 index 0000000000..f7182eeef7 --- /dev/null +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmObjectHandleTools.h @@ -0,0 +1,37 @@ +#pragma once + +namespace caf +{ +namespace PdmObjectHandleTools +{ + // Utility function to get all objects of a certain type from a vector of objects. + // firstAncestorOrThisOfType is applied to the referring objects of the source objects + // + // Example usage: + // std::vector ensembles; + // std::vector plots = + // caf::PdmObjectHandleTools::referringAncestorOfType( ensembles ); + // + template + std::set referringAncestorOfType( const std::vector& sourceObjects ) + { + std::set destinationObjects; + for ( auto source : sourceObjects ) + { + if ( !source ) continue; + + for ( auto object : source->objectsWithReferringPtrFields() ) + { + if ( !object ) continue; + + if ( auto candidate = object->template firstAncestorOrThisOfType() ) + { + destinationObjects.insert( candidate ); + } + } + } + + return destinationObjects; + } +} //namespace PdmObjectHandleTools +} //namespace caf diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h index 7b49ebbb23..1256528c64 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmObject.h @@ -157,23 +157,6 @@ public: PdmObject(); ~PdmObject() override {} - /// Adds field to the internal data structure and sets the file keyword and Ui information - /// Consider this method private. Please use the CAF_PDM_InitField() macro instead - template - void addFieldUi( PdmField* field, - const QString& keyword, - const FieldDataType& defaultValue, - PdmUiItemInfo* fieldDescription ) - { - addFieldUiNoDefault( field, keyword, fieldDescription ); - field->setDefaultValue( defaultValue ); - *field = defaultValue; - } - - /// Does the same as the above method, but omits the default value. - /// Consider this method private. Please use the CAF_PDM_InitFieldNoDefault() macro instead. - void addFieldUiNoDefault( PdmFieldHandle* field, const QString& keyword, PdmUiItemInfo* fieldDescription ); - /// Returns _this_ if _this_ has requested class keyword /// Traverses parents recursively and returns first parent of the requested /// type. @@ -187,6 +170,40 @@ public: /// Gets all children matching class keyword. Not recursive. void childrenFromClassKeyword( const QString& classKeyword, std::vector& children ) const; + /// Adds field to the internal data structure and sets the file keyword and Ui information + /// Consider this method private. Please use the CAF_PDM_InitField() macro instead + template + void addFieldUi( PdmField* field, + const QString& keyword, + const FieldDataType& defaultValue, + PdmUiItemInfo* fieldDescription ) + { + addFieldUiNoDefault( field, keyword, fieldDescription ); + field->setDefaultValue( defaultValue ); + *field = defaultValue; + } + + /// Template specialization for AppEnum to make it possible to use an enum value as the default value. + /// + /// In the header file: + /// caf::PdmField> m_enum2Field; + /// In the source file: + /// CAF_PDM_InitField( &m_enum2Field, "m_enum2Field", MyEnumType::T6, "Subset using setEnumSubset()" ); + /// + template + void addFieldUi( PdmField>* field, + const QString& keyword, + const FieldDataType& defaultValue, + PdmUiItemInfo* fieldDescription ) + { + auto defaultAppEnum = AppEnum( defaultValue ); + addFieldUi( field, keyword, defaultAppEnum, fieldDescription ); + } + + /// Does the same as the above method, but omits the default value. + /// Consider this method private. Please use the CAF_PDM_InitFieldNoDefault() macro instead. + void addFieldUiNoDefault( PdmFieldHandle* field, const QString& keyword, PdmUiItemInfo* fieldDescription ); + protected: PdmObjectHandle* doCopyObject() const override; }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt index 29b109f141..220e7d25b4 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt @@ -93,5 +93,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp index 93d935f62a..1482504332 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.cpp @@ -89,25 +89,9 @@ int FontTools::absolutePointSize( FontSize normalPointSize, RelativeSize relativ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -int FontTools::pointSizeToPixelSize( int pointSize ) +int FontTools::pointSizeFromEnum( FontSize pointSize ) { - return pointSize; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -int FontTools::pointSizeToPixelSize( FontSize pointSize ) -{ - return pointSizeToPixelSize( (int)pointSize ); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -int FontTools::pixelSizeToPointSize( int pixelSize ) -{ - return pixelSize; + return (int)pointSize; } QList FontTools::relativeSizeValueOptions( FontSize normalPointSize ) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.h index 51ff53ac86..eaee2c4b43 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafFontTools.h @@ -83,9 +83,7 @@ public: typedef caf::AppEnum RelativeSizeEnum; static int absolutePointSize( FontSize normalPointSize, RelativeSize relativeSize = RelativeSize::Medium ); - static int pointSizeToPixelSize( FontSize pointSize ); - static int pointSizeToPixelSize( int pointSize ); - static int pixelSizeToPointSize( int pixelSize ); + static int pointSizeFromEnum( FontSize pointSize ); static QList relativeSizeValueOptions( FontSize normalPointSize ); }; diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmFieldTypeSpecializations.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmFieldTypeSpecializations.h index 4486578654..99375ea01e 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmFieldTypeSpecializations.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmFieldTypeSpecializations.h @@ -42,7 +42,10 @@ public: return variantValue.value>() == variantValue2.value>(); } - static QList valueOptions( const PdmPointer& ) { return QList(); } + static QList valueOptions( QString keyword, const PdmPointer& ) + { + return QList(); + } }; //================================================================================================== @@ -87,7 +90,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const std::list& ) { return QList(); } + static QList valueOptions( QString keyword, const std::list& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField>&, std::vector* ) {} @@ -120,7 +126,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const std::vector& ) { return QList(); } + static QList valueOptions( QString keyword, const std::vector& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField>& field, std::vector* objects ) @@ -156,14 +165,23 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const caf::AppEnum& ) + static QList valueOptions( QString keyword, const caf::AppEnum& appEnum ) { QList optionList; - for ( size_t i = 0; i < caf::AppEnum::size(); ++i ) + // If a subset of the enum is defined, use that subset + auto enumValues = caf::AppEnum::enumSubset( keyword ); + if ( enumValues.empty() ) { - T enumVal = caf::AppEnum::fromIndex( i ); - optionList.push_back( PdmOptionItemInfo( caf::AppEnum::uiTextFromIndex( i ), static_cast( enumVal ) ) ); + // If no subset is defined, use all values + for ( size_t i = 0; i < caf::AppEnum::size(); ++i ) + { + enumValues.push_back( caf::AppEnum::fromIndex( i ) ); + } + } + for ( auto enumValue : enumValues ) + { + optionList.push_back( PdmOptionItemInfo( caf::AppEnum::uiText( enumValue ), static_cast( enumValue ) ) ); } return optionList; @@ -197,7 +215,7 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const std::pair& ) + static QList valueOptions( QString keyword, const std::pair& ) { QList optionList; @@ -236,7 +254,10 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const caf::FilePath& ) { return QList(); } + static QList valueOptions( QString keyword, const caf::FilePath& ) + { + return QList(); + } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField& field, std::vector* objects ) {} diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl index e09e972b5a..90a98f0f46 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl @@ -192,7 +192,9 @@ QList PdmFieldUiCap::valueOptions() const if ( m_optionEntryCache.empty() ) { - m_optionEntryCache = PdmUiFieldSpecialization::valueOptions( m_field->value() ); + auto keyword = m_field->keyword(); + m_optionEntryCache = + PdmUiFieldSpecialization::valueOptions( keyword, m_field->value() ); } if ( !m_optionEntryCache.empty() && isAutoAddingOptionFromValue() ) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldSpecialization.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldSpecialization.h index 0a4a4100a8..99743acd1a 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldSpecialization.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldSpecialization.h @@ -56,7 +56,7 @@ public: } /// Methods to get a list of options for a field, specialized for AppEnum - static QList valueOptions( const T& ) { return QList(); } + static QList valueOptions( QString keyword, const T& ) { return QList(); } /// Methods to retrieve the possible PdmObject pointed to by a field static void childObjects( const PdmDataValueField&, std::vector* ) {} diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt index 885ca2cf2e..c581802b3b 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt @@ -49,5 +49,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/CMakeLists.txt index 3d5ece722d..6e1dac74bf 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/CMakeLists.txt @@ -27,8 +27,6 @@ set(PROJECT_FILES qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES}) -source_group("" FILES ${PROJECT_FILES}) - target_link_libraries( ${PROJECT_NAME} PRIVATE cafPdmXml ${QT_LIBRARIES} ${THREAD_LIBRARY} ) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/CMakeLists.txt index 8b86a7abcd..f8cc9b4bde 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/CMakeLists.txt @@ -41,8 +41,6 @@ target_link_libraries( ${PROJECT_NAME} PRIVATE cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY} ) -source_group("" FILES ${PROJECT_FILES}) - install( TARGETS ${PROJECT_NAME} BUNDLE DESTINATION . diff --git a/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp b/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp index d304e06c5f..4cd446a264 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafPdmBasicTest.cpp @@ -144,7 +144,7 @@ public: "Enter some small number here", "This is a place you can enter a small integer value if you want" ); - CAF_PDM_InitField( &m_textField, "TextField", QString( "ÆØÅ Test text end" ), "TextField", "", "Tooltip", "WhatsThis" ); + CAF_PDM_InitField( &m_textField, "TextField", QString( "Test text end" ), "TextField", "", "Tooltip", "WhatsThis" ); CAF_PDM_InitFieldNoDefault( &m_simpleObjPtrField, "SimpleObjPtrField", "SimpleObjPtrField", "", "Tooltip", "WhatsThis" ); CAF_PDM_InitFieldNoDefault( &m_simpleObjPtrField2, "SimpleObjPtrField2", "SimpleObjPtrField2", "", "Tooltip", "WhatsThis" ); m_simpleObjPtrField2 = new SimpleObj; @@ -497,7 +497,7 @@ TEST( BaseTest, ReadWrite ) id1->m_texts.v().push_back( "Hei" ); id1->m_texts.v().push_back( "og" ); - id1->m_texts.v().push_back( "Hå test with whitespace" ); + id1->m_texts.v().push_back( "test with whitespace" ); d2->m_simpleObjPtrField = &s2; d2->m_simpleObjPtrField2 = s1; @@ -579,7 +579,7 @@ TEST( BaseTest, ReadWrite ) ASSERT_EQ( size_t( 4 ), ihDObjs[0]->m_simpleObjectsField[1]->m_numbers().size() ); EXPECT_EQ( 3.13, ihDObjs[0]->m_simpleObjectsField[1]->m_numbers()[3] ); - EXPECT_EQ( QString( "ÆØÅ Test text end" ), ihDObjs[0]->m_textField() ); + EXPECT_EQ( QString( "Test text end" ), ihDObjs[0]->m_textField() ); // Write file xmlDoc.setFileName( fileName ); diff --git a/Fwk/AppFwk/cafTensor/CMakeLists.txt b/Fwk/AppFwk/cafTensor/CMakeLists.txt index 2c4a3421f7..cccb0b1449 100644 --- a/Fwk/AppFwk/cafTensor/CMakeLists.txt +++ b/Fwk/AppFwk/cafTensor/CMakeLists.txt @@ -7,5 +7,3 @@ add_library(${PROJECT_NAME} ${PROJECT_FILES}) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(${PROJECT_NAME} LibCore) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/ApplicationEnum.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/ApplicationEnum.cpp new file mode 100644 index 0000000000..637bf1b088 --- /dev/null +++ b/Fwk/AppFwk/cafTests/cafTestApplication/ApplicationEnum.cpp @@ -0,0 +1,62 @@ + +#include "ApplicationEnum.h" +#include "cafPdmUiListEditor.h" +#include "cafPdmUiTreeSelectionEditor.h" + +template <> +void caf::AppEnum::setUp() +{ + addItem( ApplicationEnum::MyEnumType::T1, "T1", "T 1" ); + addItem( ApplicationEnum::MyEnumType::T2, "T2", "T 2" ); + addItem( ApplicationEnum::MyEnumType::T3, "T3", "T 3" ); + addItem( ApplicationEnum::MyEnumType::T4, "T4", "T 4" ); + addItem( ApplicationEnum::MyEnumType::T5, "T5", "T 5" ); + addItem( ApplicationEnum::MyEnumType::T6, "T5", "T 6" ); + addItem( ApplicationEnum::MyEnumType::T7, "T6", "T 7" ); + + setDefault( ApplicationEnum::MyEnumType::T4 ); +} + +CAF_PDM_SOURCE_INIT( ApplicationEnum, "ApplicationEnum" ); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +ApplicationEnum::ApplicationEnum() +{ + CAF_PDM_InitObject( "Application Enum", "", "", "" ); + + // Enum field displaying all defined enums + CAF_PDM_InitFieldNoDefault( &m_enumField, "EnumField", "All Enums" ); + + // Enum field displaying a subset of the defined enums using the static function setEnumSubset() + CAF_PDM_InitField( &m_enum2Field, "Enum2Field", MyEnumType::T6, "Subset using setEnumSubset()" ); + caf::AppEnum::setEnumSubset( &m_enum2Field, { MyEnumType::T2, MyEnumType::T6 } ); + + // Enum field displaying a subset of the defined enums using calculateValueOptions() + CAF_PDM_InitFieldNoDefault( &m_enum3Field, "Enum3Field", "Subset using calculateValueOptions()" ); + m_enum3Field = MyEnumType::T2; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QList ApplicationEnum::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) +{ + if ( fieldNeedingOptions == &m_enum3Field ) + { + QList options; + + options.push_back( + caf::PdmOptionItemInfo( caf::AppEnum::uiText( ApplicationEnum::MyEnumType::T2 ), + ApplicationEnum::MyEnumType::T2 ) ); + + options.push_back( + caf::PdmOptionItemInfo( caf::AppEnum::uiText( ApplicationEnum::MyEnumType::T3 ), + ApplicationEnum::MyEnumType::T3 ) ); + + return options; + } + + return {}; +} diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/ApplicationEnum.h b/Fwk/AppFwk/cafTests/cafTestApplication/ApplicationEnum.h new file mode 100644 index 0000000000..ea30fd8e70 --- /dev/null +++ b/Fwk/AppFwk/cafTests/cafTestApplication/ApplicationEnum.h @@ -0,0 +1,32 @@ +#pragma once + +#include "cafPdmField.h" +#include "cafPdmObject.h" + +class ApplicationEnum : public caf::PdmObject +{ + CAF_PDM_HEADER_INIT; + +public: + enum class MyEnumType + { + T1, + T2, + T3, + T4, + T5, + T6, + T7 + }; + +public: + ApplicationEnum(); + +private: + QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; + +private: + caf::PdmField> m_enumField; + caf::PdmField> m_enum2Field; + caf::PdmField> m_enum3Field; +}; diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt b/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt index d134adef6b..f7168bf4f1 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt +++ b/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt @@ -7,11 +7,6 @@ find_package(OpenGL) # Qt -# Qt MOC -set(MOC_HEADER_FILES MainWindow.h WidgetLayoutTest.h CustomObjectEditor.h - MenuItemProducer.h -) - # Resource file set(QRC_FILES ${QRC_FILES} textedit.qrc) message("QRC_FILES: ${QRC_FILES}") @@ -47,6 +42,8 @@ set(PROJECT_FILES TamComboBox.cpp LineEditAndPushButtons.h LineEditAndPushButtons.cpp + ApplicationEnum.h + ApplicationEnum.cpp ) qt_add_executable( @@ -76,8 +73,6 @@ target_link_libraries( ${EXTERNAL_LINK_LIBRARIES} ) -source_group("" FILES ${PROJECT_FILES}) - foreach(qtlib ${QT_LIBRARIES}) add_custom_command( TARGET ${PROJECT_NAME} diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp index c9ea6c4de7..9d92f3652d 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp +++ b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp @@ -3,6 +3,7 @@ #include "MainWindow.h" +#include "ApplicationEnum.h" #include "CustomObjectEditor.h" #include "LineEditAndPushButtons.h" #include "ManyGroups.h" @@ -1332,6 +1333,8 @@ void MainWindow::buildTestModel() demoObj2->m_objectList.push_back( new SmallDemoPdmObject() ); delete smallObj3; + + m_testRoot->objects.push_back( new ApplicationEnum ); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafTests/cafTestCvfApplication/CMakeLists.txt b/Fwk/AppFwk/cafTests/cafTestCvfApplication/CMakeLists.txt index e040960bfc..9a41069b8c 100644 --- a/Fwk/AppFwk/cafTests/cafTestCvfApplication/CMakeLists.txt +++ b/Fwk/AppFwk/cafTests/cafTestCvfApplication/CMakeLists.txt @@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.15) project(cafTestCvfApplication) -# Qt MOC -set(MOC_HEADER_FILES MainWindow.h WidgetLayoutTest.h) - # Resource file set(QRC_FILES textedit.qrc) @@ -43,8 +40,6 @@ endif(USE_COMMAND_FRAMEWORK) target_link_libraries(${PROJECT_NAME} ${TAP_LINK_LIBRARIES}) -source_group("" FILES ${PROJECT_FILES}) - foreach(qtlib ${QT_LIBRARIES}) add_custom_command( TARGET ${PROJECT_NAME} diff --git a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt index 1a2017a9d6..9d2ca5a13a 100644 --- a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt +++ b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt @@ -152,5 +152,3 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( ${PROJECT_NAME} cafProjectDataModel cafPdmScripting ${QT_LIBRARIES} ) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp index a9635a7e92..8ea7a2aac5 100644 --- a/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp +++ b/Fwk/AppFwk/cafUserInterface/QMinimizePanel.cpp @@ -366,9 +366,7 @@ void QMinimizePanel::setExpanded( bool isExpanded ) this->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ); } - this->QWidget::updateGeometry(); - - emit expandedChanged( isExpanded ); + updateGeometry(); } //-------------------------------------------------------------------------------------------------- @@ -377,6 +375,10 @@ void QMinimizePanel::setExpanded( bool isExpanded ) void QMinimizePanel::toggleExpanded() { setExpanded( m_contentFrame->isHidden() ); + + // Notify property editor of the change + // https://github.com/OPM/ResInsight/issues/12119 + emit expandedChanged( isExpanded() ); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.h index e8a88675d0..d8386f7764 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiFilePathEditor.h @@ -58,7 +58,7 @@ public: PdmUiFilePathEditorAttribute() { m_selectSaveFileName = false; - m_fileSelectionFilter = "All files (*.*)"; + m_fileSelectionFilter = "All files (*)"; m_defaultPath = QString(); m_selectDirectory = false; m_appendUiSelectedFolderToText = false; diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiFormLayoutObjectEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiFormLayoutObjectEditor.cpp index 02731853f1..d9c3d33bbf 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiFormLayoutObjectEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiFormLayoutObjectEditor.cpp @@ -478,6 +478,10 @@ void caf::PdmUiFormLayoutObjectEditor::groupBoxExpandedStateToggled( bool isExpa if ( !panel ) return; m_objectKeywordGroupUiNameExpandedState[objKeyword][panel->objectName()] = isExpanded; + + // Required to update the layout when the group box is expanded + // https://github.com/OPM/ResInsight/issues/12119 + updateUi(); } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp index 76433d45b3..7c9f796a7d 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.cpp @@ -354,8 +354,6 @@ QWidget* PdmUiTreeSelectionEditor::createEditorWidget( QWidget* parent ) headerLayout->setContentsMargins( 0, 0, 0, 0 ); layout->addLayout( headerLayout ); - PdmUiTreeSelectionEditorAttribute attrib; - m_toggleAllCheckBox = new QCheckBox(); headerLayout->addWidget( m_toggleAllCheckBox ); @@ -715,7 +713,7 @@ void PdmUiTreeSelectionEditor::slotClicked( const QModelIndex& index ) return; } - if ( m_attributes.setCurrentIndexWhenItemIsChecked && index.isValid() ) + if ( index.isValid() ) { QModelIndexList selectedIndexes = m_treeView->selectionModel()->selectedIndexes(); if ( selectedIndexes.size() < 2 ) @@ -723,6 +721,7 @@ void PdmUiTreeSelectionEditor::slotClicked( const QModelIndex& index ) QVariant v = m_proxyModel->data( index, Qt::CheckStateRole ); if ( v == Qt::Checked ) { + // Make sure the activated item also is selected in the tree view m_treeView->setCurrentIndex( index ); } } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.h b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.h index 5d6fca4316..6079d67776 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.h +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionEditor.h @@ -63,7 +63,6 @@ public: bool showTextFilter; bool showToggleAllCheckbox; bool singleSelectionMode; - bool setCurrentIndexWhenItemIsChecked; bool showCheckBoxes; bool showContextMenu; int heightHint; @@ -77,13 +76,12 @@ public: public: PdmUiTreeSelectionEditorAttribute() { - showTextFilter = true; - showToggleAllCheckbox = true; - singleSelectionMode = false; - setCurrentIndexWhenItemIsChecked = false; - showCheckBoxes = true; - showContextMenu = true; - heightHint = -1; + showTextFilter = true; + showToggleAllCheckbox = true; + singleSelectionMode = false; + showCheckBoxes = true; + showContextMenu = true; + heightHint = -1; currentIndexFieldHandle = nullptr; } diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewItemDelegate.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewItemDelegate.cpp index 0f093e01ae..bb51f4d088 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewItemDelegate.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewItemDelegate.cpp @@ -163,14 +163,7 @@ void PdmUiTreeViewItemDelegate::paint( QPainter* painter, const QStyleOptionView const int outsideLeftRightMargins = 4; QFont font = QApplication::font(); - if ( font.pixelSize() > 0 ) - { - font.setPixelSize( std::max( 1, font.pixelSize() - 1 ) ); - } - else - { - font.setPointSize( std::max( 1, font.pointSize() - 1 ) ); - } + font.setPointSize( std::max( 1, font.pointSize() - 1 ) ); painter->setFont( font ); QString text = tag->text; diff --git a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp index 486447ed45..1b76f66d2c 100644 --- a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp @@ -323,11 +323,11 @@ static std::vector& progressSpanStack() /// Calculate the total maximum value for the progress bar composed /// of the complete stack //-------------------------------------------------------------------------------------------------- -static size_t currentTotalMaxProgressValue() +static double currentTotalMaxProgressValue() { std::vector& maxProgressStack_v = maxProgressStack(); - size_t levCount = 1; + double levCount = 1.0; for ( size_t levelDepth = 0; levelDepth < maxProgressStack_v.size(); ++levelDepth ) { levCount *= maxProgressStack_v[levelDepth]; @@ -338,7 +338,7 @@ static size_t currentTotalMaxProgressValue() //-------------------------------------------------------------------------------------------------- /// Calculate the total progress value based on the current level subdivision and progress //-------------------------------------------------------------------------------------------------- -static size_t currentTotalProgress() +static double currentTotalProgress() { double progress = 0; @@ -349,12 +349,12 @@ static size_t currentTotalProgress() for ( int i = static_cast( progressStack_v.size() ) - 1; i >= 0; --i ) { size_t span = ( i < 1 ) ? 1 : progressSpanStack_v[i - 1]; - progress = span * ( progress + progressStack_v[i] ) / (double)maxProgressStack_v[i]; + progress = 1.0 * span * ( progress + progressStack_v[i] ) / (double)maxProgressStack_v[i]; } - size_t totalIntProgress = static_cast( currentTotalMaxProgressValue() * progress ); + double totalProgress = currentTotalMaxProgressValue() * progress; - return totalIntProgress; + return totalProgress; } //-------------------------------------------------------------------------------------------------- @@ -533,8 +533,9 @@ void ProgressInfoStatic::start( ProgressInfo& progressInfo, if ( dialog ) { - dialog->setMaximum( static_cast( currentTotalMaxProgressValue() ) ); - dialog->setValue( static_cast( currentTotalProgress() ) ); + double value = currentTotalProgress() / currentTotalMaxProgressValue(); + dialog->setMaximum( 100 ); + dialog->setValue( (int)( 100.0 * value ) ); dialog->setLabelText( currentComposedLabel() ); } @@ -583,10 +584,10 @@ void ProgressInfoStatic::setProgress( size_t progressValue ) progressStack_v.back() = progressValue; progressSpanStack_v.back() = 1; - int totalProgress = static_cast( currentTotalProgress() ); - int totalMaxProgress = static_cast( currentTotalMaxProgressValue() ); + double totalProgress = currentTotalProgress(); + double totalMaxProgress = currentTotalMaxProgressValue(); - if ( static_cast( totalProgress ) > totalMaxProgress ) + if ( totalProgress > totalMaxProgress ) { reportError( "totalProgress > totalMaxProgress" ", totalProgress == " + @@ -597,8 +598,9 @@ void ProgressInfoStatic::setProgress( size_t progressValue ) QProgressDialog* dialog = progressDialog(); if ( dialog ) { - dialog->setMaximum( totalMaxProgress ); - dialog->setValue( totalProgress ); + double value = currentTotalProgress() / currentTotalMaxProgressValue(); + dialog->setMaximum( 100 ); + dialog->setValue( (int)( 100.0 * value ) ); } if ( s_shouldProcessEvents ) QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents ); diff --git a/Fwk/AppFwk/cafUserInterface/cafUserInterface_UnitTests/CMakeLists.txt b/Fwk/AppFwk/cafUserInterface/cafUserInterface_UnitTests/CMakeLists.txt index 52cd936e95..3b981d37cb 100644 --- a/Fwk/AppFwk/cafUserInterface/cafUserInterface_UnitTests/CMakeLists.txt +++ b/Fwk/AppFwk/cafUserInterface/cafUserInterface_UnitTests/CMakeLists.txt @@ -19,8 +19,6 @@ set(PROJECT_FILES cafUserInterface_UnitTests.cpp cafPdmUiTreeViewModelTest.cpp qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES}) -source_group("" FILES ${PROJECT_FILES}) - target_link_libraries( ${PROJECT_NAME} PRIVATE cafUserInterface ${QT_LIBRARIES} ${THREAD_LIBRARY} ) diff --git a/Fwk/AppFwk/cafViewer/CMakeLists.txt b/Fwk/AppFwk/cafViewer/CMakeLists.txt index 95aeb8093e..d7a7d2d8ef 100644 --- a/Fwk/AppFwk/cafViewer/CMakeLists.txt +++ b/Fwk/AppFwk/cafViewer/CMakeLists.txt @@ -6,11 +6,6 @@ if(CAF_ENABLE_UNITY_BUILD) set(CMAKE_UNITY_BUILD true) endif() -# Qt - -# These headers need to go through Qt's MOC compiler -set(MOC_HEADER_FILES cafViewer.h) - find_package( Qt6 COMPONENTS @@ -55,5 +50,3 @@ if(MSVC) ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127" ) endif() - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt b/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt index 3135539089..8e32521e65 100644 --- a/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt +++ b/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt @@ -66,5 +66,3 @@ target_link_libraries( CommonCode ${QT_LIBRARIES} ) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafVizExtensions/cafHexGridIntersectionTools/cafHexGridIntersectionTools_UnitTest/CMakeLists.txt b/Fwk/AppFwk/cafVizExtensions/cafHexGridIntersectionTools/cafHexGridIntersectionTools_UnitTest/CMakeLists.txt index 21a538b759..7b988b6db7 100644 --- a/Fwk/AppFwk/cafVizExtensions/cafHexGridIntersectionTools/cafHexGridIntersectionTools_UnitTest/CMakeLists.txt +++ b/Fwk/AppFwk/cafVizExtensions/cafHexGridIntersectionTools/cafHexGridIntersectionTools_UnitTest/CMakeLists.txt @@ -26,5 +26,3 @@ set(PROJECT_FILES add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp) target_link_libraries(${PROJECT_NAME} LibCore) - -source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/VizFwk/LibCore/CMakeLists.txt b/Fwk/VizFwk/LibCore/CMakeLists.txt index 3f2417463e..76a19c8dc4 100644 --- a/Fwk/VizFwk/LibCore/CMakeLists.txt +++ b/Fwk/VizFwk/LibCore/CMakeLists.txt @@ -117,4 +117,4 @@ endif() set(PROJECT_FILES ${CEE_HEADER_FILES} ${CEE_SOURCE_FILES}) -source_group("" FILES ${PROJECT_FILES}) + diff --git a/Fwk/VizFwk/LibGeometry/cvfBoundingBox.cpp b/Fwk/VizFwk/LibGeometry/cvfBoundingBox.cpp index d2eba2cb4b..ac93cfb7b3 100644 --- a/Fwk/VizFwk/LibGeometry/cvfBoundingBox.cpp +++ b/Fwk/VizFwk/LibGeometry/cvfBoundingBox.cpp @@ -45,409 +45,432 @@ namespace cvf { -//================================================================================================== -/// -/// \class cvf::BoundingBox -/// \ingroup Geometry -/// -/// The BoundingBox class implements an axis-aligned bounding box. -/// -//================================================================================================== + //================================================================================================== + /// + /// \class cvf::BoundingBox + /// \ingroup Geometry + /// + /// The BoundingBox class implements an axis-aligned bounding box. + /// + //================================================================================================== -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -BoundingBox::BoundingBox() -{ - reset(); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -BoundingBox::BoundingBox(const Vec3d& min, const Vec3d& max) - : m_min(min), m_max(max) -{ -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -BoundingBox::BoundingBox(const Vec3f& min, const Vec3f& max) - : m_min(min), m_max(max) -{ -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -BoundingBox::BoundingBox(const BoundingBox& other) -: m_min(other.m_min), - m_max(other.m_max) -{ -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -BoundingBox& BoundingBox::operator=(const BoundingBox& rhs) -{ - m_min = rhs.m_min; - m_max = rhs.m_max; - - return *this; -} - - -//-------------------------------------------------------------------------------------------------- -/// Initialize bounding box -//-------------------------------------------------------------------------------------------------- -void BoundingBox::reset() -{ - const double maxDouble = std::numeric_limits::max(); - - m_max.set(-maxDouble, -maxDouble, -maxDouble); - m_min.set( maxDouble, maxDouble, maxDouble); -} - - -//-------------------------------------------------------------------------------------------------- -/// Returns false if no input has been given -//-------------------------------------------------------------------------------------------------- -bool BoundingBox::isValid() const -{ - if (m_min.x() <= m_max.x() && - m_min.y() <= m_max.y() && - m_min.z() <= m_max.z()) + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + BoundingBox::BoundingBox() { + reset(); + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + BoundingBox::BoundingBox(const Vec3d& min, const Vec3d& max) + : m_min(min), m_max(max) + { + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + BoundingBox::BoundingBox(const Vec3f& min, const Vec3f& max) + : m_min(min), m_max(max) + { + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + BoundingBox::BoundingBox(const BoundingBox& other) + : m_min(other.m_min), + m_max(other.m_max) + { + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + BoundingBox& BoundingBox::operator=(const BoundingBox& rhs) + { + m_min = rhs.m_min; + m_max = rhs.m_max; + + return *this; + } + + + //-------------------------------------------------------------------------------------------------- + /// Initialize bounding box + //-------------------------------------------------------------------------------------------------- + void BoundingBox::reset() + { + const double maxDouble = std::numeric_limits::max(); + + m_max.set(-maxDouble, -maxDouble, -maxDouble); + m_min.set(maxDouble, maxDouble, maxDouble); + } + + + //-------------------------------------------------------------------------------------------------- + /// Returns false if no input has been given + //-------------------------------------------------------------------------------------------------- + bool BoundingBox::isValid() const + { + if (m_min.x() <= m_max.x() && + m_min.y() <= m_max.y() && + m_min.z() <= m_max.z()) + { + return true; + } + else + { + return false; + } + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::add(const Vec3d& point) + { + if (point.x() < m_min.x()) m_min.x() = point.x(); + if (point.y() < m_min.y()) m_min.y() = point.y(); + if (point.z() < m_min.z()) m_min.z() = point.z(); + + if (point.x() > m_max.x()) m_max.x() = point.x(); + if (point.y() > m_max.y()) m_max.y() = point.y(); + if (point.z() > m_max.z()) m_max.z() = point.z(); + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::add(const Vec3f& point) + { + if (point.x() < m_min.x()) m_min.x() = point.x(); + if (point.y() < m_min.y()) m_min.y() = point.y(); + if (point.z() < m_min.z()) m_min.z() = point.z(); + + if (point.x() > m_max.x()) m_max.x() = point.x(); + if (point.y() > m_max.y()) m_max.y() = point.y(); + if (point.z() > m_max.z()) m_max.z() = point.z(); + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::add(const Vec3dArray& points) + { + size_t i; + for (i = 0; i < points.size(); i++) + { + add(points[i]); + } + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::add(const Vec3fArray& points) + { + size_t i; + for (i = 0; i < points.size(); i++) + { + add(points[i]); + } + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::add(const BoundingBox& bb) + { + if (bb.isValid()) + { + add(bb.min()); + add(bb.max()); + } + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::addValid(const BoundingBox& bb) + { + if (bb.m_min.x() < m_min.x()) m_min.x() = bb.m_min.x(); + if (bb.m_min.y() < m_min.y()) m_min.y() = bb.m_min.y(); + if (bb.m_min.z() < m_min.z()) m_min.z() = bb.m_min.z(); + + if (bb.m_max.x() > m_max.x()) m_max.x() = bb.m_max.x(); + if (bb.m_max.y() > m_max.y()) m_max.y() = bb.m_max.y(); + if (bb.m_max.z() > m_max.z()) m_max.z() = bb.m_max.z(); + } + + //-------------------------------------------------------------------------------------------------- + /// Computes center of the bounding box + //-------------------------------------------------------------------------------------------------- + Vec3d BoundingBox::center() const + { + CVF_TIGHT_ASSERT(isValid()); + + return (m_min + m_max) / 2.0; + } + + + //-------------------------------------------------------------------------------------------------- + /// Computes the total size of the bounding box + //-------------------------------------------------------------------------------------------------- + Vec3d BoundingBox::extent() const + { + if (!isValid()) return { 0,0,0 }; + + return (m_max - m_min); + } + + + //-------------------------------------------------------------------------------------------------- + /// Compute radius as half the length of the box's diagonal + //-------------------------------------------------------------------------------------------------- + double BoundingBox::radius() const + { + if (!isValid()) return 0.0; + + return extent().length() / 2.0; + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + const Vec3d& BoundingBox::min() const + { + CVF_TIGHT_ASSERT(isValid()); + + return m_min; + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + const Vec3d& BoundingBox::max() const + { + CVF_TIGHT_ASSERT(isValid()); + + return m_max; + } + + + //-------------------------------------------------------------------------------------------------- + /// Check if the bounding box contains the specified point + /// + /// Note that a point on the box's surface is classified as being contained + //-------------------------------------------------------------------------------------------------- + bool BoundingBox::contains(const Vec3d& point) const + { + if (!isValid()) return false; + + if (point.x() >= m_min.x() && point.x() <= m_max.x() && + point.y() >= m_min.y() && point.y() <= m_max.y() && + point.z() >= m_min.z() && point.z() <= m_max.z()) + { + return true; + } + else + { + return false; + } + } + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + bool BoundingBox::intersects(const BoundingBox& box) const + { + if (!isValid() || !box.isValid()) return false; + + if (m_max.x() < box.m_min.x() || m_min.x() > box.m_max.x()) return false; + if (m_max.y() < box.m_min.y() || m_min.y() > box.m_max.y()) return false; + if (m_max.z() < box.m_min.z() || m_min.z() > box.m_max.z()) return false; + return true; } - else + + + //-------------------------------------------------------------------------------------------------- + /// Get corner points of box + /// + /// \param corners Array of Vec3d. Must be allocated 8 vectors long. + /// + ///
    +    ///        7---------6                
    +    ///       /|        /|     |z       
    +    ///      / |       / |     | / y    
    +    ///     4---------5  |     |/       
    +    ///     |  3------|--2     *---x    
    +    ///     | /       | /           
    +    ///     |/        |/            
    +    ///     0---------1    
    + /// + //-------------------------------------------------------------------------------------------------- + void BoundingBox::cornerVertices(Vec3d corners[8]) const { - return false; + corners[0].set(m_min.x(), m_min.y(), m_min.z()); + corners[1].set(m_max.x(), m_min.y(), m_min.z()); + corners[2].set(m_max.x(), m_max.y(), m_min.z()); + corners[3].set(m_min.x(), m_max.y(), m_min.z()); + corners[4].set(m_min.x(), m_min.y(), m_max.z()); + corners[5].set(m_max.x(), m_min.y(), m_max.z()); + corners[6].set(m_max.x(), m_max.y(), m_max.z()); + corners[7].set(m_min.x(), m_max.y(), m_max.z()); } -} -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::add(const Vec3d& point) -{ - if (point.x() < m_min.x()) m_min.x() = point.x(); - if (point.y() < m_min.y()) m_min.y() = point.y(); - if (point.z() < m_min.z()) m_min.z() = point.z(); - - if (point.x() > m_max.x()) m_max.x() = point.x(); - if (point.y() > m_max.y()) m_max.y() = point.y(); - if (point.z() > m_max.z()) m_max.z() = point.z(); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::add(const Vec3f& point) -{ - if (point.x() < m_min.x()) m_min.x() = point.x(); - if (point.y() < m_min.y()) m_min.y() = point.y(); - if (point.z() < m_min.z()) m_min.z() = point.z(); - - if (point.x() > m_max.x()) m_max.x() = point.x(); - if (point.y() > m_max.y()) m_max.y() = point.y(); - if (point.z() > m_max.z()) m_max.z() = point.z(); -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::add(const Vec3dArray& points) -{ - size_t i; - for (i = 0; i < points.size(); i++) + //-------------------------------------------------------------------------------------------------- + /// Expands the bounding box by the given amount in all three directions + /// + /// If a bounding box is expanded by 2, the bounding box's size will increase by 2 in each direction + /// \sa extent() + //-------------------------------------------------------------------------------------------------- + void BoundingBox::expand(double amount) { - add(points[i]); + double half = amount / 2; + m_min.x() -= half; + m_min.y() -= half; + m_min.z() -= half; + m_max.x() += half; + m_max.y() += half; + m_max.z() += half; } -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::add(const Vec3fArray& points) -{ - size_t i; - for (i = 0; i < points.size(); i++) + //-------------------------------------------------------------------------------------------------- + /// Expands the bounding box by the given percent in all three directions + /// + /// If a bounding box is expanded by 10%, the bounding box's size will increase by 5% in each direction + //-------------------------------------------------------------------------------------------------- + void BoundingBox::expandPercent(double percent) { - add(points[i]); + const auto ext = extent(); + const double factor = percent / 100.0; + + const double xHalf = (ext.x() / 2) * factor; + const double yHalf = (ext.y() / 2) * factor; + const double zHalf = (ext.z() / 2) * factor; + + m_min.x() -= xHalf; + m_min.y() -= yHalf; + m_min.z() -= zHalf; + m_max.x() += xHalf; + m_max.y() += yHalf; + m_max.z() += zHalf; } -} -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::add(const BoundingBox& bb) -{ - if (bb.isValid()) + + //-------------------------------------------------------------------------------------------------- + /// Transform the min and max coordinate with the given transformation matrix + //-------------------------------------------------------------------------------------------------- + void BoundingBox::transform(const Mat4d& matrix) { - add(bb.min()); - add(bb.max()); + // Check if box is invalid, and don't transform if so + if (!isValid()) return; + + BoundingBox newBox; + newBox.reset(); + + Vec3d node; + + node.set(m_min.x(), m_min.y(), m_min.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_max.x(), m_min.y(), m_min.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_max.x(), m_max.y(), m_min.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_min.x(), m_max.y(), m_min.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_min.x(), m_min.y(), m_max.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_max.x(), m_min.y(), m_max.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_max.x(), m_max.y(), m_max.z()); + node.transformPoint(matrix); + newBox.add(node); + + node.set(m_min.x(), m_max.y(), m_max.z()); + node.transformPoint(matrix); + newBox.add(node); + + *this = newBox; } -} -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::addValid(const BoundingBox& bb) -{ - if (bb.m_min.x() < m_min.x()) m_min.x() = bb.m_min.x(); - if (bb.m_min.y() < m_min.y()) m_min.y() = bb.m_min.y(); - if (bb.m_min.z() < m_min.z()) m_min.z() = bb.m_min.z(); - - if (bb.m_max.x() > m_max.x()) m_max.x() = bb.m_max.x(); - if (bb.m_max.y() > m_max.y()) m_max.y() = bb.m_max.y(); - if (bb.m_max.z() > m_max.z()) m_max.z() = bb.m_max.z(); -} - -//-------------------------------------------------------------------------------------------------- -/// Computes center of the bounding box -//-------------------------------------------------------------------------------------------------- -Vec3d BoundingBox::center() const -{ - CVF_TIGHT_ASSERT(isValid()); - - return (m_min + m_max) / 2.0; -} - - -//-------------------------------------------------------------------------------------------------- -/// Computes the total size of the bounding box -//-------------------------------------------------------------------------------------------------- -Vec3d BoundingBox::extent() const -{ - if (!isValid()) return { 0,0,0 }; - - return (m_max - m_min); -} - - -//-------------------------------------------------------------------------------------------------- -/// Compute radius as half the length of the box's diagonal -//-------------------------------------------------------------------------------------------------- -double BoundingBox::radius() const -{ - if (!isValid()) return 0.0; - - return extent().length() / 2.0; -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const Vec3d& BoundingBox::min() const -{ - CVF_TIGHT_ASSERT(isValid()); - - return m_min; -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const Vec3d& BoundingBox::max() const -{ - CVF_TIGHT_ASSERT(isValid()); - - return m_max; -} - - -//-------------------------------------------------------------------------------------------------- -/// Check if the bounding box contains the specified point -/// -/// Note that a point on the box's surface is classified as being contained -//-------------------------------------------------------------------------------------------------- -bool BoundingBox::contains(const Vec3d& point) const -{ - if (!isValid()) return false; - - if (point.x() >= m_min.x() && point.x() <= m_max.x() && - point.y() >= m_min.y() && point.y() <= m_max.y() && - point.z() >= m_min.z() && point.z() <= m_max.z()) + //-------------------------------------------------------------------------------------------------- + /// Returns this BoundingBox transformed with the given transformation matrix + //-------------------------------------------------------------------------------------------------- + const BoundingBox BoundingBox::getTransformed(const Mat4d& matrix) const { - return true; + BoundingBox box(*this); + box.transform(matrix); + + return box; } - else + + + //-------------------------------------------------------------------------------------------------- + /// + //-------------------------------------------------------------------------------------------------- + String BoundingBox::debugString() const { - return false; + String str = "BoundingBox:"; + str += " min: x=" + String::number(m_min.x()) + " y=" + String::number(m_min.y()) + " z=" + String::number(m_min.z()); + str += " max: x=" + String::number(m_max.x()) + " y=" + String::number(m_max.y()) + " z=" + String::number(m_max.z()); + return str; } -} + //-------------------------------------------------------------------------------------------------- + /// Cuts the box at the given depth, to never go below the given depth + /// + /// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth + //-------------------------------------------------------------------------------------------------- + void BoundingBox::cutBelow(double depth) + { + if (m_min.z() < depth) m_min.z() = depth; + if (m_max.z() < depth) m_max.z() = depth; + } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool BoundingBox::intersects(const BoundingBox& box) const -{ - if (!isValid() || !box.isValid()) return false; - - if (m_max.x() < box.m_min.x() || m_min.x() > box.m_max.x()) return false; - if (m_max.y() < box.m_min.y() || m_min.y() > box.m_max.y()) return false; - if (m_max.z() < box.m_min.z() || m_min.z() > box.m_max.z()) return false; - - return true; -} - - -//-------------------------------------------------------------------------------------------------- -/// Get corner points of box -/// -/// \param corners Array of Vec3d. Must be allocated 8 vectors long. -/// -///
    -///        7---------6                
    -///       /|        /|     |z       
    -///      / |       / |     | / y    
    -///     4---------5  |     |/       
    -///     |  3------|--2     *---x    
    -///     | /       | /           
    -///     |/        |/            
    -///     0---------1    
    -/// -//-------------------------------------------------------------------------------------------------- -void BoundingBox::cornerVertices(Vec3d corners[8]) const -{ - corners[0].set(m_min.x(), m_min.y(), m_min.z()); - corners[1].set(m_max.x(), m_min.y(), m_min.z()); - corners[2].set(m_max.x(), m_max.y(), m_min.z()); - corners[3].set(m_min.x(), m_max.y(), m_min.z()); - corners[4].set(m_min.x(), m_min.y(), m_max.z()); - corners[5].set(m_max.x(), m_min.y(), m_max.z()); - corners[6].set(m_max.x(), m_max.y(), m_max.z()); - corners[7].set(m_min.x(), m_max.y(), m_max.z()); -} - - -//-------------------------------------------------------------------------------------------------- -/// Expands the bounding box by the given amount in all three directions -/// -/// If a bounding box is expanded by 2, the bounding box's size will increase by 2 in each direction -/// \sa extent() -//-------------------------------------------------------------------------------------------------- -void BoundingBox::expand(double amount) -{ - double half = amount/2; - m_min.x() -= half; - m_min.y() -= half; - m_min.z() -= half; - m_max.x() += half; - m_max.y() += half; - m_max.z() += half; -} - - -//-------------------------------------------------------------------------------------------------- -/// Transform the min and max coordinate with the given transformation matrix -//-------------------------------------------------------------------------------------------------- -void BoundingBox::transform(const Mat4d& matrix) -{ - // Check if box is invalid, and don't transform if so - if (!isValid()) return; - - BoundingBox newBox; - newBox.reset(); - - Vec3d node; - - node.set(m_min.x(), m_min.y(), m_min.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_max.x(), m_min.y(), m_min.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_max.x(), m_max.y(), m_min.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_min.x(), m_max.y(), m_min.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_min.x(), m_min.y(), m_max.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_max.x(), m_min.y(), m_max.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_max.x(), m_max.y(), m_max.z()); - node.transformPoint(matrix); - newBox.add(node); - - node.set(m_min.x(), m_max.y(), m_max.z()); - node.transformPoint(matrix); - newBox.add(node); - - *this = newBox; -} - - -//-------------------------------------------------------------------------------------------------- -/// Returns this BoundingBox transformed with the given transformation matrix -//-------------------------------------------------------------------------------------------------- -const BoundingBox BoundingBox::getTransformed(const Mat4d& matrix) const -{ - BoundingBox box(*this); - box.transform(matrix); - - return box; -} - - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -String BoundingBox::debugString() const -{ - String str = "BoundingBox:"; - str += " min: x=" + String::number(m_min.x()) + " y=" + String::number(m_min.y()) + " z=" + String::number(m_min.z()); - str += " max: x=" + String::number(m_max.x()) + " y=" + String::number(m_max.y()) + " z=" + String::number(m_max.z()); - return str; -} - -//-------------------------------------------------------------------------------------------------- -/// Cuts the box at the given depth, to never go below the given depth -/// -/// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth -//-------------------------------------------------------------------------------------------------- -void BoundingBox::cutBelow(double depth) -{ - if (m_min.z() < depth) m_min.z() = depth; - if (m_max.z() < depth) m_max.z() = depth; -} - -//-------------------------------------------------------------------------------------------------- -/// Cuts the box at the given depth, to never go above the given depth -/// -/// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth -//-------------------------------------------------------------------------------------------------- -void BoundingBox::cutAbove(double depth) -{ - if (m_min.z() > depth) m_min.z() = depth; - if (m_max.z() > depth) m_max.z() = depth; -} + //-------------------------------------------------------------------------------------------------- + /// Cuts the box at the given depth, to never go above the given depth + /// + /// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth + //-------------------------------------------------------------------------------------------------- + void BoundingBox::cutAbove(double depth) + { + if (m_min.z() > depth) m_min.z() = depth; + if (m_max.z() > depth) m_max.z() = depth; + } diff --git a/Fwk/VizFwk/LibGeometry/cvfBoundingBox.h b/Fwk/VizFwk/LibGeometry/cvfBoundingBox.h index f2b02cda05..7339825379 100644 --- a/Fwk/VizFwk/LibGeometry/cvfBoundingBox.h +++ b/Fwk/VizFwk/LibGeometry/cvfBoundingBox.h @@ -44,56 +44,57 @@ namespace cvf { -//================================================================================================== -// -// Axis aligned bounding box -// -//================================================================================================== -class BoundingBox -{ -public: - BoundingBox(); - BoundingBox(const Vec3f& min, const Vec3f& max); - BoundingBox(const Vec3d& min, const Vec3d& max); - BoundingBox(const BoundingBox& other); + //================================================================================================== + // + // Axis aligned bounding box + // + //================================================================================================== + class BoundingBox + { + public: + BoundingBox(); + BoundingBox(const Vec3f& min, const Vec3f& max); + BoundingBox(const Vec3d& min, const Vec3d& max); + BoundingBox(const BoundingBox& other); - BoundingBox& operator=(const BoundingBox& rhs); + BoundingBox& operator=(const BoundingBox& rhs); - void reset(); + void reset(); - bool isValid() const; + bool isValid() const; - void add(const Vec3f& vertex); - void add(const Vec3d& vertex); - void add(const Vec3fArray& vertices); - void add(const Vec3dArray& vertices); - void add(const BoundingBox& bb); - void addValid(const BoundingBox& bb); + void add(const Vec3f& vertex); + void add(const Vec3d& vertex); + void add(const Vec3fArray& vertices); + void add(const Vec3dArray& vertices); + void add(const BoundingBox& bb); + void addValid(const BoundingBox& bb); - const Vec3d& min() const; - const Vec3d& max() const; + const Vec3d& min() const; + const Vec3d& max() const; - Vec3d center() const; - Vec3d extent() const; - double radius() const; + Vec3d center() const; + Vec3d extent() const; + double radius() const; - bool contains(const Vec3d& point) const; - bool intersects(const BoundingBox& box) const; + bool contains(const Vec3d& point) const; + bool intersects(const BoundingBox& box) const; - void cornerVertices(Vec3d corners[8]) const; + void cornerVertices(Vec3d corners[8]) const; - void expand(double amount); - void transform(const Mat4d& matrix); - const BoundingBox getTransformed(const Mat4d& matrix) const; + void expand(double amount); + void expandPercent(double percent); + void transform(const Mat4d& matrix); + const BoundingBox getTransformed(const Mat4d& matrix) const; - void cutBelow(double depth); - void cutAbove(double depth); + void cutBelow(double depth); + void cutAbove(double depth); - String debugString() const; + String debugString() const; -private: - Vec3d m_min; - Vec3d m_max; -}; + private: + Vec3d m_min; + Vec3d m_max; + }; } diff --git a/GrpcInterface/CMakeLists.txt b/GrpcInterface/CMakeLists.txt index a88ddb3714..5a2f0d54b0 100644 --- a/GrpcInterface/CMakeLists.txt +++ b/GrpcInterface/CMakeLists.txt @@ -56,7 +56,7 @@ set(SOURCE_GROUP_SOURCE_FILES # Find Protobuf installation Looks for protobuf-config.cmake file installed by # Protobuf's cmake installation. set(protobuf_MODULE_COMPATIBLE ON) -find_package(Protobuf CONFIG 3.0 QUIET) +find_package(Protobuf CONFIG QUIET) if(Protobuf_FOUND) message(STATUS "Using protobuf ${protobuf_VERSION}") @@ -267,9 +267,3 @@ if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE) install(DIRECTORY ${GRPC_PYTHON_SOURCE_PATH}/ DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/Python) endif() - -source_group("Generated" FILES ${GRPC_PYTHON_GENERATED_SOURCES}) -source_group("Sources" FILES ${GRPC_PYTHON_RIPS_SOURCES}) -source_group("Protos" FILES ${GRPC_PROTO_FILES}) -source_group("PythonExamples" FILES ${GRPC_PYTHON_EXAMPLE_SOURCES}) -source_group("Tests" FILES ${GRPC_PYTHON_TEST_SOURCES}) diff --git a/GrpcInterface/Python/rips/PythonExamples/fishbones_completion.py b/GrpcInterface/Python/rips/PythonExamples/fishbones_completion.py new file mode 100644 index 0000000000..60a195bc55 --- /dev/null +++ b/GrpcInterface/Python/rips/PythonExamples/fishbones_completion.py @@ -0,0 +1,76 @@ +# Load ResInsight Processing Server Client Library +import rips +import time + +# Connect to ResInsight instance +resinsight = rips.Instance.find() + +# Create a modeled well path and add well path targets +# The coordinates are based on the Norne case +# Add a lateral to the main well path + +well_path_coll = resinsight.project.descendants(rips.WellPathCollection)[0] + +editable_well_paths = well_path_coll.descendants(rips.ModeledWellPath) +if editable_well_paths: + # Use the first well path if it exists + well_path = editable_well_paths[0] +else: + # Create a well path + well_path = well_path_coll.add_new_object(rips.ModeledWellPath) + well_path.name = "Test Well-1" + well_path.update() + + geometry = well_path.well_path_geometry() + + reference_point = geometry.reference_point + reference_point[0] = 457196 + reference_point[1] = 7322270 + reference_point[2] = 2742 + geometry.update() + + coord = [0, 0, 0] + geometry.append_well_target(coord) + + coord = [454.28, 250, -10] + target = geometry.append_well_target(coord) + + coord = [1054.28, 250, -50] + target = geometry.append_well_target(coord) + + +# Add a fishbone completion to the well path with default settings +well_path.append_fishbones([4000.0, 4100.0, 4200.0]) + +# Optional settings on the collection level that will affect all installed fishbones +fishbones_collection = well_path.completions().fishbones() +fishbones_collection.main_bore_skin_factor = 0.1 +fishbones_collection.update() + +# Drilling type is one of [STANDARD, EXTENDED, ACID_JETTING] +drilling_type = "ACID_JETTING" + +sub_locations = [3500.0, 3550.0, 3600.0, 3700.0] +fishbones = fishbones_collection.append_fishbones(sub_locations, drilling_type) + +fishbones.lateral_diameter = 47.0 +fishbones.lateral_skin_factor = 27.0 +fishbones.update() + +# Optionally set the fixed start location for all fishbones +fishbones_collection.set_fixed_start_location(2900.0) + +# Export completions +cases = resinsight.project.cases() + +for case in cases: + print("Case name: ", case.name) + print("Case id: ", case.id) + + case.export_well_path_completions( + time_step=0, + well_path_names=["Test Well-1 Y1"], + file_split="UNIFIED_FILE", + include_perforations=True, + custom_file_name="f:/scratch/2023-11-02/myfile.myext", + ) diff --git a/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py b/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py index a172e8871c..4a6ae3fa3d 100644 --- a/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py +++ b/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py @@ -41,13 +41,25 @@ for measured_depth in measured_depths: eclipse_case=case, ) -# Update the orientation of the fracture -# Call update() to propagate changes from the Python object back to ResInsight +# Update the orientation of the fracture. All fracture parameters are displayed, most with default values. fracture_template.orientation = "Azimuth" fracture_template.azimuth_angle = 60.0 -fracture_template.user_defined_perforation_length = True +fracture_template.beta_factor_type = "UserDefinedBetaFactor" fracture_template.conductivity_type = "InfiniteConductivity" +fracture_template.effective_permeability = 0 +fracture_template.fracture_width = 0.01 +fracture_template.fracture_width_type = "FractureWidth" +fracture_template.gas_viscosity = 0.02 +fracture_template.height_scale_factor = 1 +fracture_template.inertial_coefficient = 0.00608324 +fracture_template.non_darcy_flow_type = "None" fracture_template.perforation_length = 12.3 +fracture_template.permeability_type = "FractureConductivity" +fracture_template.relative_gas_density = 0.8 +fracture_template.relative_permeability = 1 +fracture_template.user_defined_d_factor = 1 +fracture_template.user_defined_perforation_length = True +fracture_template.width_scale_factor = 1 fracture_template.update() # Scale the template diff --git a/GrpcInterface/Python/rips/PythonExamples/modeled_well_path.py b/GrpcInterface/Python/rips/PythonExamples/modeled_well_path.py index d385d63639..f1cdc1a9e2 100644 --- a/GrpcInterface/Python/rips/PythonExamples/modeled_well_path.py +++ b/GrpcInterface/Python/rips/PythonExamples/modeled_well_path.py @@ -55,6 +55,18 @@ completions_settings.group_name_for_export = "msj" completions_settings.well_type_for_export = "GAS" completions_settings.update() # Commit updates back to ResInsight +# Optionally update the MSW settings +msw_settings = well_path.msw_settings() +msw_settings.custom_values_for_lateral = False +msw_settings.enforce_max_segment_length = False +msw_settings.liner_diameter = 0.152 +msw_settings.max_segment_length = 200 +msw_settings.pressure_drop = "HF-" +msw_settings.reference_md_type = "GridEntryPoint" +msw_settings.roughness_factor = 1e-05 +msw_settings.user_defined_reference_md = 0 +msw_settings.update() + # export completions cases = resinsight.project.cases() diff --git a/GrpcInterface/Python/rips/case.py b/GrpcInterface/Python/rips/case.py index 6b36fdc80a..522c52cce3 100644 --- a/GrpcInterface/Python/rips/case.py +++ b/GrpcInterface/Python/rips/case.py @@ -20,7 +20,7 @@ When working with grid case results, the following two arguments are used in man result **Result Definition enums**:: - + property_type | | porosity_model (str enum) | | (str enum) ----------------------- | ----- | -------------- @@ -344,7 +344,6 @@ def views(self): views = project.views() views_for_case = [] for view_object in views: - view_object.print_object_info() if view_object.id == self.id: views_for_case.append(view_object) return views_for_case diff --git a/GrpcInterface/Python/rips/tests/test_wells_path_completions.py b/GrpcInterface/Python/rips/tests/test_wells_path_completions.py index 5a0bff8d8b..34bbeee1ea 100644 --- a/GrpcInterface/Python/rips/tests/test_wells_path_completions.py +++ b/GrpcInterface/Python/rips/tests/test_wells_path_completions.py @@ -141,3 +141,53 @@ def test_add_well_path_fracture_template(rips_instance, initialize_test): assert fracture_template_updated.user_defined_perforation_length == True assert fracture_template_updated.user_description == "my frac name" assert fracture_template_updated.width_scale_factor == 7 + + +# test fishbone interface +def test_fishbone_interface(rips_instance, initialize_test): + well_path_coll = rips_instance.project.descendants(rips.WellPathCollection)[0] + + well_path = well_path_coll.add_new_object(rips.ModeledWellPath) + well_path.name = "fishbone_well" + well_path.update() + + fishbones_collection = well_path.completions().fishbones() + fishbones_collection.main_bore_skin_factor = 0.1 + fishbones_collection.update() + + fishbones_collection.set_fixed_start_location(2900.0) + + sub_locations2 = [3500.0, 3550.0, 3600.0, 3700.0] + fishbones = fishbones_collection.append_fishbones(sub_locations2) + + fishbones.lateral_diameter = 21.0 + fishbones.lateral_skin_factor = 2.1 + fishbones.icd_count = 1 + fishbones.icd_flow_coefficient = 0.1 + fishbones.icd_orifice_diameter = 0.1 + fishbones.lateral_build_angle = 0.1 + fishbones.lateral_count_per_sub = 1 + fishbones.lateral_exit_angle = 0.1 + fishbones.lateral_install_success_fraction = 0.1 + fishbones.lateral_length = "1" + fishbones.lateral_open_hole_roghness_factor = 0.2 + fishbones.lateral_tubing_diameter = 0.1 + fishbones.lateral_tubing_roghness_factor = 0.1 + fishbones.subs_orientation_mode = "FIXED" + fishbones.update() + + fishbones_updated = fishbones_collection.fishbones()[0] + assert fishbones_updated.lateral_diameter == 21.0 + assert fishbones_updated.lateral_skin_factor == 2.1 + assert fishbones_updated.icd_count == 1 + assert fishbones_updated.icd_flow_coefficient == 0.1 + assert fishbones_updated.icd_orifice_diameter == 0.1 + assert fishbones_updated.lateral_build_angle == 0.1 + assert fishbones_updated.lateral_count_per_sub == 1 + assert fishbones_updated.lateral_exit_angle == 0.1 + assert fishbones_updated.lateral_install_success_fraction == 0.1 + assert fishbones_updated.lateral_length == "1" + assert fishbones_updated.lateral_open_hole_roghness_factor == 0.2 + assert fishbones_updated.lateral_tubing_diameter == 0.1 + assert fishbones_updated.lateral_tubing_roghness_factor == 0.1 + assert fishbones_updated.subs_orientation_mode == "FIXED" diff --git a/GrpcInterface/Python/setup.py.cmake b/GrpcInterface/Python/setup.py.cmake index bd5f49adf5..8931ca8e89 100644 --- a/GrpcInterface/Python/setup.py.cmake +++ b/GrpcInterface/Python/setup.py.cmake @@ -6,7 +6,7 @@ with open('README.md') as f: with open('LICENSE') as f: license = f.read() -RIPS_DIST_VERSION = '3' +RIPS_DIST_VERSION = '1' setup( name='rips', diff --git a/GrpcInterface/RiaGrpcPdmObjectService.cpp b/GrpcInterface/RiaGrpcPdmObjectService.cpp index de2a0aff45..f489b5dbd7 100644 --- a/GrpcInterface/RiaGrpcPdmObjectService.cpp +++ b/GrpcInterface/RiaGrpcPdmObjectService.cpp @@ -22,7 +22,6 @@ #include "RiaGrpcCallbacks.h" #include "RiaGrpcHelper.h" -#include "Rim3dView.h" #include "RimEclipseResultDefinition.h" #include "RimProject.h" @@ -31,6 +30,7 @@ #include "cafPdmObjectMethod.h" #include "cafPdmObjectScriptingCapability.h" #include "cafPdmObjectScriptingCapabilityRegister.h" +#include "cafPdmProxyValueField.h" using namespace rips; @@ -448,11 +448,6 @@ grpc::Status RiaGrpcPdmObjectService::UpdateExistingPdmObject( grpc::ServerConte matchingObject->updateAllRequiredEditors(); RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews(); - Rim3dView* view = dynamic_cast( matchingObject ); - if ( view ) - { - view->applyBackgroundColorAndFontChanges(); - } return grpc::Status::OK; } return grpc::Status( grpc::NOT_FOUND, "PdmObject not found" ); diff --git a/README.md b/README.md index 329bc58e57..cf564f6dea 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,63 @@ # ResInsight -ResInsight is an open source, cross-platform 3D visualization and post processing tool for reservoir models and simulations. The system also constitutes a framework for further development and support for new data sources and visualization methods, e.g. additional solvers, seismic data, CSEM, geomechanics, and more. +ResInsight is an open source, cross-platform 3D visualization and post-processing tool for reservoir models and simulations. -The user interface is tailored for efficient interpretation of reservoir simulation data with specialized visualizations of properties, faults and wells. It enables easy handling of a large number of realizations and calculation of statistics. To be highly responsive, ResInsight exploits multi-core CPUs and GPUs. Integration with GNU Octave enables powerful and flexible result manipulation and computations. Derived results can be returned to ResInsight for further handling and visualization. Eventually, derived and computed properties can be directly exported to Eclipse input formats for further simulation cycles and parameter studies. +## Key Features -The main input data is *.GRID and *.EGRID files along with their *.INIT and restart files *.XNNN and *.UNRST. ResInsight also supports selected parts of Eclipse input files and can read grid information and corresponding cell property data sets. +- **Specialized Visualizations**: Tailored for efficient interpretation of reservoir simulation data with visualizations of properties, faults, and wells +- **Performance-Oriented**: Exploits multi-core CPUs and GPUs for highly responsive operation +- **Statistical Analysis**: Handles large numbers of realizations with built-in statistical calculations +- **Python Integration**: Enables powerful result manipulation and computations with two-way data exchange +- **GNU Octave Integration**: Enables powerful result manipulation and computations with two-way data exchange +- **Extensible Framework**: Supports additional data sources and visualization methods (solvers, seismic data, CSEM, geomechanics) +- **Eclipse Integration**: Supports export to Eclipse input formats for simulation cycles and parameter studies -ResInsight has been co-developed by Equinor ASA, Ceetron Solutions AS, and Ceetron AS with the aim to provide a versatile tool for professionals who need to visualize and process reservoir models. The software is copyrighted by Ceetron and Equinor and licensed under GPL 3+. See COPYING for details. +## Supported Input Formats -### Dependencies -ResInsight uses the Equinor/libecl (formerly Ensambles/ert) library to access Eclipse result files, and the two projects collaborates closely. The source code of the approved libecl version is embedded in the ResInsight source code tree, making downloading and building simple. -ResInsight also features an interface to Octave for retrieval of data from ResInsight, processing using Octave, and communication of data back into ResInsight for further handling and visualization. +- Eclipse binary output (*.GRID, *.EGRID files with corresponding *.INIT, *.XNNN, and *.UNRST files) +- Selected Eclipse input file sections +- Grid information with cell property data sets -Octave : [http://www.gnu.org/software/octave/](http://www.gnu.org/software/octave/) +## Technology Stack -Equinor/libecl : [https://github.com/Equinor/libecl](https://github.com/Equinor/libecl) +ResInsight utilizes: +- **Equinor/resdata** and **OPM/opm-common** libraries for Eclipse result file access +- **Qt** for the application framework +- **Qwt** for plotting functionality +- **vcpkg** for dependency management -### Supported Platforms -ResInsight is designed to be cross-platform. Efforts have been made to ensure that code will compile and run on most Linux and Windows platforms. Currently, automated tests are run regularly on Red Hat Enterprise Linux (RHEL) 7, CentOS 7, Ubuntu 16.04, 18.04 and 20.04 as well as Windows 10 and Windows Server 2019. +## Platform Support -### Documentation +ResInsight is cross-platform with automated testing on: +- Red Hat Enterprise Linux (RHEL) +- Ubuntu +- Windows 11 -See the [ ResInsight ](http://resinsight.org/) website and the [ Users Guide ](http://resinsight.org/docs/home/) for project documentation. +## Documentation -[ ResInsight Tutorials](https://github.com/CeetronSolutions/resinsight-tutorials) +- [ResInsight Website](http://resinsight.org/) +- [ResInsight Python API](http://api.resinsight.org/) +- [User Guide](http://resinsight.org/docs/home/) +- [Tutorials](https://github.com/CeetronSolutions/resinsight-tutorials) + +## Development ### Source Code +``` +git clone git://github.com/OPM/ResInsight.git +``` - git clone git://github.com/OPM/ResInsight.git +### Dependencies +Most dependencies are managed using vcpkg as defined in [vcpkg.json](https://github.com/OPM/ResInsight/blob/dev/vcpkg.json) -### Contribution -Contributions are very welcome, although it might take some time for the team to accept pull requests that is not in the main line of the projects focus. +### Contributing +Contributions are welcome! Please: +- Use the `dev` branch for contributions and pull requests +- Note that the `master` branch is kept stable and updated only for releases -Please use the dev branch for contributions and pull requests, as it is the branch dedicated to the day to day development. +### Building +See the [Build Instructions](https://resinsight.org/releases/build-from-source/build-instructions-ubuntu/) for detailed setup information. -The master branch is supposed to be stable, and is updated when we want to publish a new stable release. +## License -Release branches that might pop up are dedicated bug fix branches for the release in question. - -### Building ResInsight - -See [ Build Instructions ](https://resinsight.org/getting-started/download-and-install/buildinstructions/) +ResInsight is co-developed by Equinor ASA, Ceetron Solutions AS, and Ceetron AS. The software is copyrighted by Ceetron and Equinor and licensed under GPL 3+. See the COPYING file for details. diff --git a/ResInsightVersion.cmake b/ResInsightVersion.cmake index 301b89a36c..0042d8dff3 100644 --- a/ResInsightVersion.cmake +++ b/ResInsightVersion.cmake @@ -1,18 +1,18 @@ -set(RESINSIGHT_MAJOR_VERSION 2024) -set(RESINSIGHT_MINOR_VERSION 12) -set(RESINSIGHT_PATCH_VERSION 2) +set(RESINSIGHT_MAJOR_VERSION 2025) +set(RESINSIGHT_MINOR_VERSION 04) +set(RESINSIGHT_PATCH_VERSION 0) # Opional text with no restrictions #set(RESINSIGHT_VERSION_TEXT "-dev") -#set(RESINSIGHT_VERSION_TEXT "-RC_2") +# set(RESINSIGHT_VERSION_TEXT "-RC_4") # Optional text # Must be unique and increasing within one combination of major/minor/patch version # The uniqueness of this text is independent of RESINSIGHT_VERSION_TEXT # Format of text must be ".xx" -#set(RESINSIGHT_DEV_VERSION ".06") +#set(RESINSIGHT_DEV_VERSION ".05") # https://github.com/CRAVA/crava/tree/master/libs/nrlib set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f") diff --git a/ThirdParty/Ert/lib/ecl/ecl_grid.cpp b/ThirdParty/Ert/lib/ecl/ecl_grid.cpp index 35cfdb272b..f4d91f2f1f 100644 --- a/ThirdParty/Ert/lib/ecl/ecl_grid.cpp +++ b/ThirdParty/Ert/lib/ecl/ecl_grid.cpp @@ -3135,7 +3135,7 @@ static ecl_grid_type * ecl_grid_alloc_EGRID_all_grids(const char * grid_file, bo util_alloc_file_components(grid_file, &path, &basename, NULL); char* init_file_name = ecl_util_alloc_filename(path, basename, ECL_INIT_FILE, false, -1); if (util_file_exists(init_file_name)) { - ecl_file_type* ecl_init_file = ecl_file_open(init_file_name, 0); + ecl_init_file = ecl_file_open(init_file_name, 0); if (ecl_init_file) { ecl_version_enum version = ecl_file_get_ecl_version(ecl_init_file); if (version == INTERSECT) { diff --git a/ThirdParty/custom-opm-common/CMakeLists.txt b/ThirdParty/custom-opm-common/CMakeLists.txt index d13eea7271..4d9812f164 100644 --- a/ThirdParty/custom-opm-common/CMakeLists.txt +++ b/ThirdParty/custom-opm-common/CMakeLists.txt @@ -7,139 +7,113 @@ else() set(CMAKE_CXX_EXTENSIONS OFF) endif() - if(MSVC) - add_definitions( "/wd4996 /wd4244 /wd4267 /wd4101 /wd4477" ) +if(MSVC) + add_definitions( + "/wd4996 /wd4244 /wd4267 /wd4101 /wd4477 /wd4661 -D_USE_MATH_DEFINES" + ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /permissive-") endif(MSVC) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-switch -Wno-sign-compare -Wno-deprecated-copy -Wno-missing-field-initializers") + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -Wno-switch -Wno-sign-compare -Wno-deprecated-copy -Wno-missing-field-initializers" + ) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-missing-field-initializers -Wno-deprecated-copy") + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-missing-field-initializers -Wno-deprecated-copy" + ) endif() -project (custom-opm-common) - -find_package(Boost) - -include_directories( - opm-common - opm-common/external/cjson - generated-opm-common - generated-opm-common/include -) - - add_definitions(-DFMT_HEADER_ONLY) - include_directories(SYSTEM ../fmtlib/include) - -# Set defines to include requred files +# Set defines to include required files for ResInsight. Make sure that these +# defines are set before including the opm-common CMakeLists set(ENABLE_ECL_INPUT true) -#set(ENABLE_ECL_OUTPUT true) +set(ENABLE_ECL_OUTPUT true) +set(BUILD_TESTING false) +set(ENABLE_MOCKSIM false) +set(OPM_ENABLE_PYTHON false) +set(OPM_INSTALL_PYTHON false) +set(OPM_ENABLE_EMBEDDED_PYTHON false) +set(OPM_ENABLE_DUNE false) +set(BUILD_EXAMPLES false) +if(CREATE_OPM_COMMON_KEYWORDS) + # In ResInsight, we need a subset of the files in opm-common. We also need to + # generate the keywords. The flag CREATE_OPM_COMMON_KEYWORDS is set in the + # main CMakeLists.txt file. When this flag is set, the opm-common is added to + # the solution. Build a test target to trigger the c++ code generation using + # the tool genkw, use CarfinTest.exe Copy files generated code from + # build/ThirdParty/custom-opm-common/opm-common: copy ParserInit.cpp and + # config.h to source folder ThirdParty/custom-opm-common/generated-opm-common/ + # copy the folders "ParserKeywords" and "include" to source folder + # ThirdParty/custom-opm-common/generated-opm-common/ + add_subdirectory(opm-common) + message( + STATUS + "opm-common is added to the solution used to create keywords from JSON files" + ) -include(opm-common/CMakeLists_files.cmake) +else(CREATE_OPM_COMMON_KEYWORDS) -set(opm_parser_source_files_short_path - ${MAIN_SOURCE_FILES} -) + project(custom-opm-common) -foreach (file ${opm_parser_source_files_short_path} ) - list(APPEND opm_parser_source_files_long_path "opm-common/${file}" ) -endforeach() + find_package(Boost) -set(opm_parser_source_files - ${opm_parser_source_files_long_path} - ${opm_parser_generated_source_files} -) + list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/opm-common/cmake/Modules) -# Append generated sources -list(INSERT opm-common_SOURCES 0 generated-opm-common/ParserInit.cpp) -foreach (name A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) - list(INSERT opm-common_SOURCES 0 generated-opm-common/ParserKeywords/${name}.cpp) -endforeach() - -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) - list(APPEND ADDITIONAL_LINK_LIBRARIES stdc++fs) + if(NOT cjson_FOUND) + include(DownloadCjson) endif() -endif() - if(MSVC) - list(APPEND opm-common_SOURCES opm-common/cross-platform/windows/Substitutes.cpp ) -endif(MSVC) + include_directories(${cjson_SOURCE_DIR}) + list(APPEND opm-common_SOURCES ${cjson_SOURCE_DIR}/cJSON.c) -add_library(${PROJECT_NAME} - STATIC - ${opm_parser_source_files_long_path} - ${opm-common_SOURCES} + include_directories( + opm-common generated-opm-common generated-opm-common/include + ) - ## Missing files when only ENABLE_ECL_INPUT is defined - opm-common/src/opm/io/eclipse/EclFile.cpp - opm-common/src/opm/io/eclipse/EclOutput.cpp - opm-common/src/opm/io/eclipse/EclUtil.cpp - opm-common/src/opm/io/eclipse/EGrid.cpp - opm-common/src/opm/io/eclipse/ESmry.cpp - opm-common/src/opm/io/eclipse/ExtESmry.cpp - opm-common/src/opm/io/eclipse/EInit.cpp - opm-common/src/opm/io/eclipse/ERft.cpp + add_definitions(-DFMT_HEADER_ONLY) - # Required for use of static function RstConnection::inverse_peaceman - opm-common/src/opm/io/eclipse/rst/connection.cpp + include(opm-common/CMakeLists_files.cmake) - # Required for use of RstHeader::restart_info - opm-common/src/opm/io/eclipse/rst/action.cpp - opm-common/src/opm/io/eclipse/rst/aquifer.cpp - opm-common/src/opm/io/eclipse/rst/connection.cpp - opm-common/src/opm/io/eclipse/rst/group.cpp - opm-common/src/opm/io/eclipse/rst/header.cpp - opm-common/src/opm/io/eclipse/rst/network.cpp - opm-common/src/opm/io/eclipse/rst/segment.cpp - opm-common/src/opm/io/eclipse/rst/state.cpp - opm-common/src/opm/io/eclipse/rst/udq.cpp - opm-common/src/opm/io/eclipse/rst/well.cpp - opm-common/src/opm/output/eclipse/InteHEAD.cpp - opm-common/src/opm/output/eclipse/UDQDims.cpp - opm-common/src/opm/output/eclipse/CreateActionRSTDims.cpp + set(opm_parser_source_files_short_path ${MAIN_SOURCE_FILES}) - # 2022.06 additional includes - opm-common/src/opm/io/eclipse/ERst.cpp - opm-common/src/opm/io/eclipse/RestartFileView.cpp - opm-common/cross-platform/windows/Substitutes.cpp - -) + foreach(file ${opm_parser_source_files_short_path}) + list(APPEND opm_parser_source_files_long_path "opm-common/${file}") + endforeach() -if(RESINSIGHT_ENABLE_UNITY_BUILD) + set(opm_parser_source_files ${opm_parser_source_files_long_path} + ${opm_parser_generated_source_files} + ) - set(UNITY_EXCLUDE_FILES - opm-common/src/opm/parser/eclipse/Deck/UDAValue.cpp - opm-common/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp - opm-common/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.cpp - opm-common/src/opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.cpp - opm-common/src/opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.cpp - opm-common/src/opm/io/eclipse/EclOutput.cpp - opm-common/src/opm/io/eclipse/ESmry.cpp - opm-common/src/opm/io/eclipse/EGrid.cpp - ) + # Add generated files These files are generated by the parser generator genkw + file(GLOB ALL_FILES_IN_FOLDER generated-opm-common/ParserKeywords/*.cpp) + list(APPEND opm-common_SOURCES ${ALL_FILES_IN_FOLDER}) + list(APPEND opm-common_SOURCES generated-opm-common/ParserInit.cpp) - foreach(fileToExclude ${UNITY_EXCLUDE_FILES}) - set_source_files_properties(${fileToExclude} - PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE) - endforeach(fileToExclude) -endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) + list(APPEND ADDITIONAL_LINK_LIBRARIES stdc++fs) + endif() + endif() -find_path(BOOST_SPIRIT_INCLUDE_DIRS "boost/spirit.hpp" HINTS ${Boost_INCLUDE_DIRS}) + add_library( + ${PROJECT_NAME} STATIC ${opm_parser_source_files_long_path} + ${opm-common_SOURCES} + ) -target_link_libraries(custom-opm-common - ${ADDITIONAL_LINK_LIBRARIES} -) + find_path(BOOST_SPIRIT_INCLUDE_DIRS "boost/spirit.hpp" + HINTS ${Boost_INCLUDE_DIRS} + ) -target_include_directories(custom-opm-common - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/opm-common - ${CMAKE_CURRENT_SOURCE_DIR}/generated-opm-common/include - PRIVATE - ${BOOST_SPIRIT_INCLUDE_DIRS} - -) \ No newline at end of file + target_link_libraries(custom-opm-common ${ADDITIONAL_LINK_LIBRARIES}) + + target_include_directories( + custom-opm-common + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/opm-common + ${CMAKE_CURRENT_SOURCE_DIR}/generated-opm-common/include + PRIVATE ${BOOST_SPIRIT_INCLUDE_DIRS} + ) + +endif(CREATE_OPM_COMMON_KEYWORDS) diff --git a/ThirdParty/custom-opm-common/CMakeLists_files.cmake b/ThirdParty/custom-opm-common/CMakeLists_files.cmake deleted file mode 100644 index 5a2cdda979..0000000000 --- a/ThirdParty/custom-opm-common/CMakeLists_files.cmake +++ /dev/null @@ -1,815 +0,0 @@ -# This file sets up five lists: -# MAIN_SOURCE_FILES List of compilation units which will be included in -# the library. If it isn't on this list, it won't be -# part of the library. Please try to keep it sorted to -# maintain sanity. -# -# TEST_SOURCE_FILES List of programs that will be run as unit tests. -# -# TEST_DATA_FILES Files from the source three that should be made -# available in the corresponding location in the build -# tree in order to run tests there. -# -# EXAMPLE_SOURCE_FILES Other programs that will be compiled as part of the -# build, but which is not part of the library nor is -# run as tests. -# -# PUBLIC_HEADER_FILES List of public header files that should be -# distributed together with the library. The source -# files can of course include other files than these; -# you should only add to this list if the *user* of -# the library needs it. -# -# CROSS_COMPILE_FILES List of header files providing substitutes for -# functions exclusively available on Linux build -# systems. - -list (APPEND MAIN_SOURCE_FILES - src/opm/common/data/SimulationDataContainer.cpp - src/opm/common/OpmLog/CounterLog.cpp - src/opm/common/OpmLog/EclipsePRTLog.cpp - src/opm/common/OpmLog/LogBackend.cpp - src/opm/common/OpmLog/Logger.cpp - src/opm/common/OpmLog/LogUtil.cpp - src/opm/common/OpmLog/OpmLog.cpp - src/opm/common/OpmLog/StreamLog.cpp - src/opm/common/OpmLog/TimerLog.cpp - src/opm/common/utility/ActiveGridCells.cpp - src/opm/common/utility/FileSystem.cpp - src/opm/common/utility/numeric/MonotCubicInterpolator.cpp - src/opm/common/utility/parameters/Parameter.cpp - src/opm/common/utility/parameters/ParameterGroup.cpp - src/opm/common/utility/parameters/ParameterTools.cpp - src/opm/common/utility/numeric/calculateCellVol.cpp - src/opm/common/utility/TimeService.cpp -) -if(ENABLE_ECL_INPUT) - list(APPEND MAIN_SOURCE_FILES - src/opm/io/eclipse/SummaryNode.cpp - src/opm/json/JsonObject.cpp - src/opm/parser/eclipse/Deck/Deck.cpp - src/opm/parser/eclipse/Deck/DeckItem.cpp - src/opm/parser/eclipse/Deck/DeckValue.cpp - src/opm/parser/eclipse/Deck/DeckKeyword.cpp - src/opm/parser/eclipse/Deck/DeckRecord.cpp - src/opm/parser/eclipse/Deck/DeckOutput.cpp - src/opm/parser/eclipse/Deck/DeckSection.cpp - src/opm/parser/eclipse/Deck/UDAValue.cpp - src/opm/parser/eclipse/Python/Python.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp - src/opm/parser/eclipse/EclipseState/AquiferConfig.cpp - src/opm/parser/eclipse/EclipseState/AquiferCT.cpp - src/opm/parser/eclipse/EclipseState/Aquifetp.cpp - src/opm/parser/eclipse/EclipseState/Aquancon.cpp - src/opm/parser/eclipse/EclipseState/checkDeck.cpp - src/opm/parser/eclipse/EclipseState/EclipseConfig.cpp - src/opm/parser/eclipse/EclipseState/EclipseState.cpp - src/opm/parser/eclipse/EclipseState/EndpointScaling.cpp - src/opm/parser/eclipse/EclipseState/Edit/EDITNNC.cpp - src/opm/parser/eclipse/EclipseState/Grid/FieldProps.cpp - src/opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.cpp - src/opm/parser/eclipse/EclipseState/Grid/Box.cpp - src/opm/parser/eclipse/EclipseState/Grid/BoxManager.cpp - src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp - src/opm/parser/eclipse/EclipseState/Grid/FaceDir.cpp - src/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp - src/opm/parser/eclipse/EclipseState/Grid/Fault.cpp - src/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp - src/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp - src/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.cpp - src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp - src/opm/parser/eclipse/EclipseState/Grid/Operate.cpp - src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp - src/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp - src/opm/parser/eclipse/EclipseState/Grid/setKeywordBox.cpp - src/opm/parser/eclipse/EclipseState/Grid/TransMult.cpp - src/opm/parser/eclipse/EclipseState/InitConfig/Equil.cpp - src/opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.cpp - src/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp - src/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp - src/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.cpp - src/opm/parser/eclipse/EclipseState/Runspec.cpp - src/opm/parser/eclipse/EclipseState/TracerConfig.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/Actdims.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/Actions.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionParser.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Action/Condition.cpp - src/opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateModel.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/GConSale.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/GConSump.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Group/GTNode.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/injection.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MessageLimits.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/icd.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/updatingConnectionsWithSegments.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.cpp - src/opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.cpp - src/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/RFTConfig.cpp - src/opm/parser/eclipse/EclipseState/Schedule/RPTConfig.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp - src/opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.cpp - src/opm/parser/eclipse/EclipseState/Schedule/SummaryState.cpp - src/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/Connection.cpp - src/opm/parser/eclipse/EclipseState/Schedule/eval_uda.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/Well.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WList.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellEconProductionLimits.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellFoamProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellInjectionProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellPolymerProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellBrineProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellTracerProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.cpp - src/opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.cpp - src/opm/parser/eclipse/EclipseState/SimulationConfig/BCConfig.cpp - src/opm/parser/eclipse/EclipseState/SimulationConfig/RockConfig.cpp - src/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp - src/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp - src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp - src/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp - src/opm/parser/eclipse/EclipseState/Tables/DenT.cpp - src/opm/parser/eclipse/EclipseState/Tables/JFunc.cpp - src/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp - src/opm/parser/eclipse/EclipseState/Tables/SimpleTable.cpp - src/opm/parser/eclipse/EclipseState/Tables/PolyInjTables.cpp - src/opm/parser/eclipse/EclipseState/Tables/StandardCond.cpp - src/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp - src/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp - src/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp - src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp - src/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp - src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp - src/opm/parser/eclipse/EclipseState/Tables/Rock2dTable.cpp - src/opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.cpp - src/opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.cpp - src/opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.cpp - src/opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParser.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.cpp - src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.cpp - src/opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.cpp - src/opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.cpp - src/opm/parser/eclipse/Parser/ErrorGuard.cpp - src/opm/parser/eclipse/Parser/ParseContext.cpp - src/opm/parser/eclipse/Parser/Parser.cpp - src/opm/parser/eclipse/Parser/ParserEnums.cpp - src/opm/parser/eclipse/Parser/ParserItem.cpp - src/opm/parser/eclipse/Parser/ParserKeyword.cpp - src/opm/parser/eclipse/Parser/ParserRecord.cpp - src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp - src/opm/parser/eclipse/Parser/raw/RawRecord.cpp - src/opm/parser/eclipse/Parser/raw/StarToken.cpp - src/opm/parser/eclipse/Units/Dimension.cpp - src/opm/parser/eclipse/Units/UnitSystem.cpp - src/opm/parser/eclipse/Utility/Functional.cpp - src/opm/parser/eclipse/Utility/Stringview.cpp - ) - - -# This list is only used to register a CMake dependency between the the python -# extension and the corresponding C++ wrapper files. The cpp files actually -# listed here are repeated in the actual definition of the extension in the -# setup.py file. - list( APPEND PYTHON_CXX_SOURCE_FILES - python/cxx/connection.cpp - python/cxx/converters.cpp - python/cxx/deck.cpp - python/cxx/deck_keyword.cpp - python/cxx/eclipse_io.cpp - python/cxx/field_props.cpp - python/cxx/eclipse_config.cpp - python/cxx/eclipse_grid.cpp - python/cxx/eclipse_state.cpp - python/cxx/export.cpp - python/cxx/group.cpp - python/cxx/log.cpp - python/cxx/parsecontext.cpp - python/cxx/parser.cpp - python/cxx/schedule.cpp - python/cxx/summary_state.cpp - python/cxx/table_manager.cpp - python/cxx/unit_system.cpp - python/cxx/well.cpp - ) - - if (OPM_ENABLE_EMBEDDED_PYTHON) - set_source_files_properties(${PYTHON_CXX_SOURCE_FILES} PROPERTIES COMPILE_FLAGS -Wno-shadow) - set_source_files_properties(src/opm/parser/eclipse/Python/PythonInterp.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow) - set_source_files_properties(src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow) - list( APPEND MAIN_SOURCE_FILES - src/opm/parser/eclipse/Python/PythonInterp.cpp - src/opm/parser/eclipse/Python/PyRunModule.cpp - ${PYTHON_CXX_SOURCE_FILES}) - endif() - - list( APPEND PYTHON_CXX_DEPENDS ${PYTHON_CXX_SOURCE_FILES} - python/cxx/converters.hpp - python/cxx/export.hpp) - - if(NOT cjson_FOUND) - list(APPEND MAIN_SOURCE_FILES external/cjson/cJSON.c) - endif() -endif() -if(ENABLE_ECL_OUTPUT) - list( APPEND MAIN_SOURCE_FILES - src/opm/io/eclipse/EclFile.cpp - src/opm/io/eclipse/EclOutput.cpp - src/opm/io/eclipse/EclUtil.cpp - src/opm/io/eclipse/EGrid.cpp - src/opm/io/eclipse/ERft.cpp - src/opm/io/eclipse/ERst.cpp - src/opm/io/eclipse/ERsm.cpp - src/opm/io/eclipse/ESmry.cpp - src/opm/io/eclipse/ESmry_write_rsm.cpp - src/opm/io/eclipse/OutputStream.cpp - src/opm/io/eclipse/SummaryNode.cpp - src/opm/io/eclipse/rst/connection.cpp - src/opm/io/eclipse/rst/group.cpp - src/opm/io/eclipse/rst/header.cpp - src/opm/io/eclipse/rst/segment.cpp - src/opm/io/eclipse/rst/state.cpp - src/opm/io/eclipse/rst/well.cpp - src/opm/output/eclipse/AggregateActionxData.cpp - src/opm/output/eclipse/AggregateConnectionData.cpp - src/opm/output/eclipse/AggregateGroupData.cpp - src/opm/output/eclipse/AggregateMSWData.cpp - src/opm/output/eclipse/AggregateUDQData.cpp - src/opm/output/eclipse/AggregateWellData.cpp - src/opm/output/eclipse/CreateActionxDims.cpp - src/opm/output/eclipse/CreateDoubHead.cpp - src/opm/output/eclipse/CreateInteHead.cpp - src/opm/output/eclipse/CreateLogiHead.cpp - src/opm/output/eclipse/CreateUdqDims.cpp - src/opm/output/eclipse/DoubHEAD.cpp - src/opm/output/eclipse/EclipseGridInspector.cpp - src/opm/output/eclipse/EclipseIO.cpp - src/opm/output/eclipse/InteHEAD.cpp - src/opm/output/eclipse/LinearisedOutputTable.cpp - src/opm/output/eclipse/LoadRestart.cpp - src/opm/output/eclipse/LogiHEAD.cpp - src/opm/output/eclipse/RestartIO.cpp - src/opm/output/eclipse/Summary.cpp - src/opm/output/eclipse/Tables.cpp - src/opm/output/eclipse/RegionCache.cpp - src/opm/output/eclipse/RestartValue.cpp - src/opm/output/eclipse/WriteInit.cpp - src/opm/output/eclipse/WriteRFT.cpp - src/opm/output/eclipse/WriteRPT.cpp - src/opm/output/eclipse/report/WELSPECS.cpp - src/opm/output/data/Solution.cpp - ) -endif() - -list (APPEND TEST_SOURCE_FILES - tests/test_ActiveGridCells.cpp - tests/test_calculateCellVol.cpp - tests/test_cmp.cpp - tests/test_cubic.cpp - tests/test_messagelimiter.cpp - tests/test_nonuniformtablelinear.cpp - tests/test_OpmLog.cpp - tests/test_param.cpp - tests/test_RootFinders.cpp - tests/test_SimulationDataContainer.cpp - tests/test_sparsevector.cpp - tests/test_uniformtablelinear.cpp -) -if(ENABLE_ECL_INPUT) - list(APPEND TEST_SOURCE_FILES - tests/rst_test.cpp - tests/test_ERsm.cpp - tests/parser/ACTIONX.cpp - tests/parser/ADDREGTests.cpp - tests/parser/AquiferTests.cpp - tests/parser/BoxTests.cpp - tests/parser/ColumnSchemaTests.cpp - tests/parser/ConnectionTests.cpp - tests/parser/COMPSEGUnits.cpp - tests/parser/CopyRegTests.cpp - tests/parser/DeckValueTests.cpp - tests/parser/DeckTests.cpp - tests/parser/DynamicStateTests.cpp - tests/parser/DynamicVectorTests.cpp - tests/parser/EclipseGridTests.cpp - tests/parser/EmbeddedPython.cpp - tests/parser/EqualRegTests.cpp - tests/parser/EventTests.cpp - tests/parser/FaceDirTests.cpp - tests/parser/FaultTests.cpp - tests/parser/FieldPropsTests.cpp - tests/parser/FoamTests.cpp - tests/parser/FunctionalTests.cpp - tests/parser/GeomodifierTests.cpp - tests/parser/GroupTests.cpp - tests/parser/InitConfigTest.cpp - tests/parser/IOConfigTests.cpp - tests/parser/MessageLimitTests.cpp - tests/parser/MultiRegTests.cpp - tests/parser/MultisegmentWellTests.cpp - tests/parser/MULTREGTScannerTests.cpp - tests/parser/OrderedMapTests.cpp - tests/parser/ParseContextTests.cpp - tests/parser/ParseContext_EXIT1.cpp - tests/parser/ParseDATAWithDefault.cpp - tests/parser/PYACTION.cpp - tests/parser/RawKeywordTests.cpp - tests/parser/test_ReportConfig.cpp - tests/parser/ResinsightTest.cpp - tests/parser/RestartConfigTests.cpp - tests/parser/RFTConfigTests.cpp - tests/parser/RockTableTests.cpp - tests/parser/RunspecTests.cpp - tests/parser/SaltTableTests.cpp - tests/parser/ScheduleRestartTests.cpp - tests/parser/ScheduleTests.cpp - tests/parser/SectionTests.cpp - tests/parser/SimpleTableTests.cpp - tests/parser/SimulationConfigTest.cpp - tests/parser/StarTokenTests.cpp - tests/parser/StringTests.cpp - tests/parser/SummaryConfigTests.cpp - tests/parser/TabdimsTests.cpp - tests/parser/TableColumnTests.cpp - tests/parser/TableContainerTests.cpp - tests/parser/TableManagerTests.cpp - tests/parser/TableSchemaTests.cpp - tests/parser/ThresholdPressureTest.cpp - tests/parser/TimeMapTest.cpp - tests/parser/TracerTests.cpp - tests/parser/TransMultTests.cpp - tests/parser/TuningTests.cpp - tests/parser/UDQTests.cpp - tests/parser/UnitTests.cpp - tests/parser/ValueTests.cpp - tests/parser/WellSolventTests.cpp - tests/parser/WellTracerTests.cpp - tests/parser/WellTests.cpp - tests/parser/WLIST.cpp - tests/parser/WTEST.cpp) -endif() -if(ENABLE_ECL_OUTPUT) - list (APPEND TEST_SOURCE_FILES - tests/test_AggregateActionxData.cpp - tests/test_AggregateWellData.cpp - tests/test_AggregateGroupData.cpp - tests/test_AggregateMSWData.cpp - tests/test_AggregateConnectionData.cpp - tests/test_AggregateUDQData.cpp - tests/test_ArrayDimChecker.cpp - tests/test_EclipseIO.cpp - tests/test_DoubHEAD.cpp - tests/test_InteHEAD.cpp - tests/test_LinearisedOutputTable.cpp - tests/test_LogiHEAD.cpp - tests/test_OutputStream.cpp - tests/test_regionCache.cpp - tests/test_PaddedOutputString.cpp - tests/test_Restart.cpp - tests/test_RFT.cpp - tests/test_rst.cpp - tests/test_Solution.cpp - tests/test_Summary.cpp - tests/test_Summary_Group.cpp - tests/test_Tables.cpp - tests/test_Wells.cpp - tests/test_WindowedArray.cpp - tests/test_restartwellinfo.cpp - ) -endif() - -list (APPEND TEST_DATA_FILES - tests/testdata.param -) -if(ENABLE_ECL_OUTPUT) - list (APPEND TEST_DATA_FILES - tests/expect-wdims.chldg.err.out - tests/expect-wdims.err.out - tests/BASE_SIM.DATA - tests/BASE_SIM_THPRES.DATA - tests/RESTART_SIM.DATA - tests/summary_deck.DATA - tests/group_group.DATA - tests/testblackoilstate3.DATA - tests/testrft.DATA - tests/table_deck.DATA - tests/summary_deck_non_constant_porosity.DATA - tests/SUMMARY_EFF_FAC.DATA - tests/SPE1CASE1.DATA - tests/SPE1CASE1.SMSPEC - tests/SPE1CASE1A.SMSPEC - tests/SPE9_CP_PACKED.DATA - tests/SOFR_TEST.DATA - tests/UDQ_TEST_WCONPROD_IUAD-2.DATA - tests/UDQ_ACTIONX_TEST1.DATA - tests/UDQ_ACTIONX_TEST1_U.DATA - tests/include_example_pvt.txt - tests/include_example_summary.txt - tests/include_sgof.txt - tests/include_swof.txt - tests/include_grid_3x5x4.grdecl - tests/SPE1CASE2.DATA - tests/SPE1CASE2_RESTART.DATA - tests/SPE1CASE2.X0060 - tests/PYACTION.DATA - tests/act1.py - tests/MSW.DATA - tests/EXIT_TEST.DATA - tests/action_syntax_error.py - tests/action_missing_run.py - tests/EMBEDDED_PYTHON.DATA - tests/wclose.py - tests/msim/MSIM_PYACTION.DATA - tests/msim/action1.py - tests/msim/action2.py - ) -endif() - -list (APPEND EXAMPLE_SOURCE_FILES -) -if(ENABLE_ECL_INPUT) - list (APPEND TEST_DATA_FILES - tests/ECLFILE.INIT - tests/ECLFILE.FINIT - tests/SPE1CASE1.EGRID - tests/SPE1CASE1.RFT - tests/SPE1_TESTCASE.UNRST - tests/SPE1_TESTCASE.FUNRST - tests/SPE1_TESTCASE.F0025 - tests/SPE1_TESTCASE.X0025 - tests/SPE1CASE1.UNSMRY - tests/SPE1CASE1A.UNSMRY - tests/SPE1CASE1_RST60.SMSPEC - tests/SPE1CASE1_RST60.UNSMRY - tests/MODEL2_RESTART.DATA - tests/restart/MODEL2.UNRST - ) - list (APPEND EXAMPLE_SOURCE_FILES - #examples/opmi.cpp - #examples/opmpack.cpp - #examples/opmhash.cpp - ) -endif() - -# programs listed here will not only be compiled, but also marked for -# installation -list (APPEND PROGRAM_SOURCE_FILES -) -if(ENABLE_ECL_INPUT) - list (APPEND PROGRAM_SOURCE_FILES - examples/opmi.cpp - examples/opmpack.cpp - examples/opmhash.cpp - ) -endif() - -list( APPEND PUBLIC_HEADER_FILES - opm/common/ErrorMacros.hpp - opm/common/Exceptions.hpp - opm/common/data/SimulationDataContainer.hpp - opm/common/OpmLog/CounterLog.hpp - opm/common/OpmLog/EclipsePRTLog.hpp - opm/common/OpmLog/LogBackend.hpp - opm/common/OpmLog/Logger.hpp - opm/common/OpmLog/LogUtil.hpp - opm/common/OpmLog/MessageFormatter.hpp - opm/common/OpmLog/MessageLimiter.hpp - opm/common/OpmLog/Location.hpp - opm/common/OpmLog/OpmLog.hpp - opm/common/OpmLog/StreamLog.hpp - opm/common/OpmLog/TimerLog.hpp - opm/common/utility/ActiveGridCells.hpp - opm/common/utility/FileSystem.hpp - opm/common/utility/numeric/cmp.hpp - opm/common/utility/platform_dependent/disable_warnings.h - opm/common/utility/platform_dependent/reenable_warnings.h - opm/common/utility/numeric/blas_lapack.h - opm/common/utility/numeric/buildUniformMonotoneTable.hpp - opm/common/utility/numeric/linearInterpolation.hpp - opm/common/utility/numeric/MonotCubicInterpolator.hpp - opm/common/utility/numeric/NonuniformTableLinear.hpp - opm/common/utility/numeric/RootFinders.hpp - opm/common/utility/numeric/SparseVector.hpp - opm/common/utility/numeric/UniformTableLinear.hpp - opm/common/utility/parameters/ParameterGroup.hpp - opm/common/utility/parameters/ParameterGroup_impl.hpp - opm/common/utility/parameters/Parameter.hpp - opm/common/utility/parameters/ParameterMapItem.hpp - opm/common/utility/parameters/ParameterRequirement.hpp - opm/common/utility/parameters/ParameterStrings.hpp - opm/common/utility/parameters/ParameterTools.hpp - opm/common/utility/numeric/calculateCellVol.hpp - opm/common/utility/String.hpp - opm/common/utility/TimeService.hpp -) -if(ENABLE_ECL_INPUT) - list(APPEND PUBLIC_HEADER_FILES - opm/io/eclipse/SummaryNode.hpp - opm/json/JsonObject.hpp - opm/parser/eclipse/Utility/Stringview.hpp - opm/parser/eclipse/Utility/Functional.hpp - opm/parser/eclipse/Utility/Typetools.hpp - opm/parser/eclipse/Generator/KeywordGenerator.hpp - opm/parser/eclipse/Generator/KeywordLoader.hpp - opm/parser/eclipse/Units/UnitSystem.hpp - opm/parser/eclipse/Units/Units.hpp - opm/parser/eclipse/Units/Dimension.hpp - opm/parser/eclipse/Parser/ErrorGuard.hpp - opm/parser/eclipse/Parser/ParserItem.hpp - opm/parser/eclipse/Parser/Parser.hpp - opm/parser/eclipse/Parser/ParserRecord.hpp - opm/parser/eclipse/Parser/ParserKeyword.hpp - opm/parser/eclipse/Parser/InputErrorAction.hpp - opm/parser/eclipse/Parser/ParserEnums.hpp - opm/parser/eclipse/Parser/ParseContext.hpp - opm/parser/eclipse/Parser/ParserConst.hpp - opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp - opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp - opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp - opm/parser/eclipse/EclipseState/Util/Value.hpp - opm/parser/eclipse/EclipseState/Util/IOrderSet.hpp - opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp - opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp - opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp - opm/parser/eclipse/EclipseState/Grid/GridDims.hpp - opm/parser/eclipse/EclipseState/Grid/TransMult.hpp - opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp - opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp - opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp - opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp - opm/parser/eclipse/EclipseState/Grid/Fault.hpp - opm/parser/eclipse/EclipseState/Grid/Box.hpp - opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp - opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp - opm/parser/eclipse/EclipseState/Grid/NNC.hpp - opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp - opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp - opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp - opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp - opm/parser/eclipse/EclipseState/EndpointScaling.hpp - opm/parser/eclipse/EclipseState/TracerConfig.hpp - opm/parser/eclipse/EclipseState/Tables/DenT.hpp - opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp - opm/parser/eclipse/EclipseState/Tables/StandardCond.hpp - opm/parser/eclipse/EclipseState/Tables/PolyInjTable.hpp - opm/parser/eclipse/EclipseState/Tables/PdvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/TlpmixpaTable.hpp - opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp - opm/parser/eclipse/EclipseState/Tables/MsfnTable.hpp - opm/parser/eclipse/EclipseState/Tables/GasvisctTable.hpp - opm/parser/eclipse/EclipseState/Tables/Regdims.hpp - opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp - opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp - opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.hpp - opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.hpp - opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.hpp - opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlymwinjTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp - opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/SkprwatTable.hpp - opm/parser/eclipse/EclipseState/Tables/SkprpolyTable.hpp - opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp - opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp - opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp - opm/parser/eclipse/EclipseState/Tables/TableManager.hpp - opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp - opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp - opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp - opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp - opm/parser/eclipse/EclipseState/Tables/JFunc.hpp - opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp - opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp - opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp - opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp - opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp - opm/parser/eclipse/EclipseState/Tables/EnkrvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp - opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp - opm/parser/eclipse/EclipseState/Tables/WatvisctTable.hpp - opm/parser/eclipse/EclipseState/Tables/TableEnums.hpp - opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp - opm/parser/eclipse/EclipseState/Tables/AqutabTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp - opm/parser/eclipse/EclipseState/Tables/FoamadsTable.hpp - opm/parser/eclipse/EclipseState/Tables/FoammobTable.hpp - opm/parser/eclipse/EclipseState/Tables/PbvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp - opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp - opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp - opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp - opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp - opm/parser/eclipse/EclipseState/Tables/OilvisctTable.hpp - opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp - opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp - opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp - opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp - opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp - opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp - opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp - opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp - opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp - opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp - opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp - opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp - opm/parser/eclipse/EclipseState/Tables/ImptvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp - opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp - opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp - opm/parser/eclipse/EclipseState/Tables/TracerVdTable.hpp - opm/parser/eclipse/EclipseState/EclipseState.hpp - opm/parser/eclipse/EclipseState/EclipseConfig.hpp - opm/parser/eclipse/EclipseState/Aquancon.hpp - opm/parser/eclipse/EclipseState/AquiferConfig.hpp - opm/parser/eclipse/EclipseState/AquiferCT.hpp - opm/parser/eclipse/EclipseState/Aquifetp.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/Actdims.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/Condition.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp - opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp - opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp - opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp - opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp - opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/ProductionControls.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/InjectionControls.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WList.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellEconProductionLimits.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellFoamProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellBrineProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellInjectionProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellPolymerProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellTracerProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp - opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp - opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp - opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp - opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp - opm/parser/eclipse/EclipseState/Schedule/RPTConfig.hpp - opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp - opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp - opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/GTNode.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/GConSale.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/GConSump.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.hpp - opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateModel.hpp - opm/parser/eclipse/EclipseState/Schedule/MessageLimits.hpp - opm/parser/eclipse/EclipseState/Schedule/Events.hpp - opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp - opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/updatingConnectionsWithSegments.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.hpp - opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp - opm/parser/eclipse/EclipseState/SimulationConfig/BCConfig.hpp - opm/parser/eclipse/EclipseState/SimulationConfig/RockConfig.hpp - opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp - opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp - opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp - opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp - opm/parser/eclipse/EclipseState/checkDeck.hpp - opm/parser/eclipse/EclipseState/Runspec.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp - opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp - opm/parser/eclipse/Deck/DeckItem.hpp - opm/parser/eclipse/Deck/Deck.hpp - opm/parser/eclipse/Deck/DeckSection.hpp - opm/parser/eclipse/Deck/DeckOutput.hpp - opm/parser/eclipse/Deck/DeckValue.hpp - opm/parser/eclipse/Deck/DeckKeyword.hpp - opm/parser/eclipse/Deck/DeckRecord.hpp - opm/parser/eclipse/Deck/UDAValue.hpp - opm/parser/eclipse/Deck/value_status.hpp - opm/parser/eclipse/Python/Python.hpp) -endif() -if(ENABLE_ECL_OUTPUT) - list(APPEND PUBLIC_HEADER_FILES - opm/io/eclipse/EclFile.hpp - opm/io/eclipse/EclIOdata.hpp - opm/io/eclipse/EclOutput.hpp - opm/io/eclipse/EclUtil.hpp - opm/io/eclipse/EGrid.hpp - opm/io/eclipse/ERft.hpp - opm/io/eclipse/ERst.hpp - opm/io/eclipse/ERsm.hpp - opm/io/eclipse/ESmry.hpp - opm/io/eclipse/PaddedOutputString.hpp - opm/io/eclipse/OutputStream.hpp - opm/io/eclipse/SummaryNode.hpp - opm/io/eclipse/rst/connection.hpp - opm/io/eclipse/rst/group.hpp - opm/io/eclipse/rst/header.hpp - opm/io/eclipse/rst/segment.hpp - opm/io/eclipse/rst/state.hpp - opm/io/eclipse/rst/well.hpp - opm/output/data/Aquifer.hpp - opm/output/data/Cells.hpp - opm/output/data/Solution.hpp - opm/output/data/Wells.hpp - opm/output/data/Groups.hpp - opm/output/eclipse/VectorItems/aquifer.hpp - opm/output/eclipse/VectorItems/connection.hpp - opm/output/eclipse/VectorItems/group.hpp - opm/output/eclipse/VectorItems/intehead.hpp - opm/output/eclipse/VectorItems/logihead.hpp - opm/output/eclipse/VectorItems/msw.hpp - opm/output/eclipse/VectorItems/tabdims.hpp - opm/output/eclipse/VectorItems/well.hpp - opm/output/eclipse/AggregateActionxData.hpp - opm/output/eclipse/AggregateGroupData.hpp - opm/output/eclipse/AggregateConnectionData.hpp - opm/output/eclipse/AggregateMSWData.hpp - opm/output/eclipse/AggregateUDQData.hpp - opm/output/eclipse/AggregateWellData.hpp - opm/output/eclipse/DoubHEAD.hpp - opm/output/eclipse/EclipseGridInspector.hpp - opm/output/eclipse/EclipseIO.hpp - opm/output/eclipse/EclipseIOUtil.hpp - opm/output/eclipse/InteHEAD.hpp - opm/output/eclipse/LinearisedOutputTable.hpp - opm/output/eclipse/LogiHEAD.hpp - opm/output/eclipse/RegionCache.hpp - opm/output/eclipse/RestartIO.hpp - opm/output/eclipse/RestartValue.hpp - opm/output/eclipse/Summary.hpp - opm/output/eclipse/Tables.hpp - opm/output/eclipse/WindowedArray.hpp - opm/output/eclipse/WriteInit.hpp - opm/output/eclipse/WriteRFT.hpp - opm/output/eclipse/WriteRPT.hpp - opm/output/eclipse/WriteRestartHelpers.hpp - opm/output/OutputWriter.hpp - ) -endif() - -if(ENABLE_ECL_INPUT OR ENABLE_ECL_OUTPUT) - list(APPEND TEST_SOURCE_FILES - tests/test_SummaryNode.cpp -) -endif() - -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - list( APPEND PUBLIC_HEADER_FILES - cross-platform/windows/Substitutes.hpp - ) -endif() diff --git a/ThirdParty/custom-opm-common/custom-opm-parser-tests/opm-parser-BasicTest.cpp b/ThirdParty/custom-opm-common/custom-opm-parser-tests/opm-parser-BasicTest.cpp index e0fcd9517d..80afd8e678 100644 --- a/ThirdParty/custom-opm-common/custom-opm-parser-tests/opm-parser-BasicTest.cpp +++ b/ThirdParty/custom-opm-common/custom-opm-parser-tests/opm-parser-BasicTest.cpp @@ -7,6 +7,7 @@ #include "opm/input/eclipse/Schedule/VFPInjTable.hpp" #include "opm/input/eclipse/Schedule/VFPProdTable.hpp" #include "opm/input/eclipse/Parser/Parser.hpp" +#include "opm/input/eclipse/Parser/InputErrorAction.hpp" #include "opm/input/eclipse/Deck/Deck.hpp" #include @@ -101,7 +102,7 @@ TEST(OpmParserTest, ReadAndParseWSEGLINK) std::string testFilePath = std::string(TEST_DATA_DIR) + "/test_wseglink.DATA"; - Opm::ParseContext parseContext(Opm::InputError::Action::WARN); + Opm::ParseContext parseContext(Opm::InputErrorAction::WARN); auto deck = parser.parseFile(testFilePath, parseContext); std::string myKeyword = "WSEGLINK"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserInit.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserInit.cpp index 90f419eb34..95eead4210 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserInit.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserInit.cpp @@ -1,1163 +1,67 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace Opm { namespace ParserKeywords { void addDefaultKeywords(Parser& p); void addDefaultKeywords(Parser& p) { - Builtin keywords; - p.addParserKeyword( keywords.ACTDIMS ); - p.addParserKeyword( keywords.ACTION ); - p.addParserKeyword( keywords.ACTIONG ); - p.addParserKeyword( keywords.ACTIONR ); - p.addParserKeyword( keywords.ACTIONS ); - p.addParserKeyword( keywords.ACTIONW ); - p.addParserKeyword( keywords.ACTIONX ); - p.addParserKeyword( keywords.ACTNUM ); - p.addParserKeyword( keywords.ACTPARAM ); - p.addParserKeyword( keywords.ADD ); - p.addParserKeyword( keywords.ADDREG ); - p.addParserKeyword( keywords.ADDZCORN ); - p.addParserKeyword( keywords.ADSALNOD ); - p.addParserKeyword( keywords.ADSORP ); - p.addParserKeyword( keywords.AITS ); - p.addParserKeyword( keywords.AITSOFF ); - p.addParserKeyword( keywords.ALKADS ); - p.addParserKeyword( keywords.ALKALINE ); - p.addParserKeyword( keywords.ALKROCK ); - p.addParserKeyword( keywords.ALL ); - p.addParserKeyword( keywords.ALPOLADS ); - p.addParserKeyword( keywords.ALSURFAD ); - p.addParserKeyword( keywords.ALSURFST ); - p.addParserKeyword( keywords.AMALGAM ); - p.addParserKeyword( keywords.API ); - p.addParserKeyword( keywords.APIGROUP ); - p.addParserKeyword( keywords.APILIM ); - p.addParserKeyword( keywords.APIVD ); - p.addParserKeyword( keywords.AQANCONL ); - p.addParserKeyword( keywords.AQANNC ); - p.addParserKeyword( keywords.AQANTRC ); - p.addParserKeyword( keywords.AQUALIST ); - p.addParserKeyword( keywords.AQUANCON ); - p.addParserKeyword( keywords.AQUCHGAS ); - p.addParserKeyword( keywords.AQUCHWAT ); - p.addParserKeyword( keywords.AQUCON ); - p.addParserKeyword( keywords.AQUCT ); - p.addParserKeyword( keywords.AQUCWFAC ); - p.addParserKeyword( keywords.AQUDIMS ); - p.addParserKeyword( keywords.AQUFET ); - p.addParserKeyword( keywords.AQUFETP ); - p.addParserKeyword( keywords.AQUFLUX ); - p.addParserKeyword( keywords.AQUIFER_PROBE_ANALYTIC ); - p.addParserKeyword( keywords.AQUIFER_PROBE_ANALYTIC_NAMED ); - p.addParserKeyword( keywords.AQUIFER_PROBE_NUMERIC ); - p.addParserKeyword( keywords.AQUNNC ); - p.addParserKeyword( keywords.AQUNUM ); - p.addParserKeyword( keywords.AQUTAB ); - p.addParserKeyword( keywords.AUTOCOAR ); - p.addParserKeyword( keywords.AUTOREF ); - p.addParserKeyword( keywords.BC ); - p.addParserKeyword( keywords.BDENSITY ); - p.addParserKeyword( keywords.BGGI ); - p.addParserKeyword( keywords.BIGMODEL ); - p.addParserKeyword( keywords.BLACKOIL ); - p.addParserKeyword( keywords.BLOCK_PROBE ); - p.addParserKeyword( keywords.BLOCK_PROBE300 ); - p.addParserKeyword( keywords.BOGI ); - p.addParserKeyword( keywords.BOUNDARY ); - p.addParserKeyword( keywords.BOX ); - p.addParserKeyword( keywords.BPARA ); - p.addParserKeyword( keywords.BPIDIMS ); - p.addParserKeyword( keywords.BRANPROP ); - p.addParserKeyword( keywords.BRINE ); - p.addParserKeyword( keywords.BTOBALFA ); - p.addParserKeyword( keywords.BTOBALFV ); - p.addParserKeyword( keywords.CALTRAC ); - p.addParserKeyword( keywords.CARFIN ); - p.addParserKeyword( keywords.CART ); - p.addParserKeyword( keywords.CBMOPTS ); - p.addParserKeyword( keywords.CECON ); - p.addParserKeyword( keywords.CECONT ); - p.addParserKeyword( keywords.CIRCLE ); - p.addParserKeyword( keywords.CO2STOR ); - p.addParserKeyword( keywords.CO2STORE ); - p.addParserKeyword( keywords.COAL ); - p.addParserKeyword( keywords.COALADS ); - p.addParserKeyword( keywords.COALNUM ); - p.addParserKeyword( keywords.COALPP ); - p.addParserKeyword( keywords.COARSEN ); - p.addParserKeyword( keywords.COLLAPSE ); - p.addParserKeyword( keywords.COLUMNS ); - p.addParserKeyword( keywords.COMPDAT ); - p.addParserKeyword( keywords.COMPDATX ); - p.addParserKeyword( keywords.COMPFLSH ); - p.addParserKeyword( keywords.COMPIMB ); - p.addParserKeyword( keywords.COMPINJK ); - p.addParserKeyword( keywords.COMPLMPL ); - p.addParserKeyword( keywords.COMPLUMP ); - p.addParserKeyword( keywords.COMPOFF ); - p.addParserKeyword( keywords.COMPORD ); - p.addParserKeyword( keywords.COMPRIV ); - p.addParserKeyword( keywords.COMPRP ); - p.addParserKeyword( keywords.COMPRPL ); - p.addParserKeyword( keywords.COMPS ); - p.addParserKeyword( keywords.COMPSEGL ); - p.addParserKeyword( keywords.COMPSEGS ); - p.addParserKeyword( keywords.COMPVE ); - p.addParserKeyword( keywords.COMPVEL ); - p.addParserKeyword( keywords.CONNECTION_PROBE ); - p.addParserKeyword( keywords.COORD ); - p.addParserKeyword( keywords.COORDSYS ); - p.addParserKeyword( keywords.COPY ); - p.addParserKeyword( keywords.COPYBOX ); - p.addParserKeyword( keywords.COPYREG ); - p.addParserKeyword( keywords.CPIFACT ); - p.addParserKeyword( keywords.CPIFACTL ); - p.addParserKeyword( keywords.CPR ); - p.addParserKeyword( keywords.CREF ); - p.addParserKeyword( keywords.CREFS ); - p.addParserKeyword( keywords.CRITPERM ); - p.addParserKeyword( keywords.CSKIN ); - p.addParserKeyword( keywords.DATE ); - p.addParserKeyword( keywords.DATES ); - p.addParserKeyword( keywords.DATUM ); - p.addParserKeyword( keywords.DATUMR ); - p.addParserKeyword( keywords.DATUMRX ); - p.addParserKeyword( keywords.DCQDEFN ); - p.addParserKeyword( keywords.DEBUG_ ); - p.addParserKeyword( keywords.DELAYACT ); - p.addParserKeyword( keywords.DENSITY ); - p.addParserKeyword( keywords.DEPTH ); - p.addParserKeyword( keywords.DEPTHTAB ); - p.addParserKeyword( keywords.DEPTHZ ); - p.addParserKeyword( keywords.DIAGDISP ); - p.addParserKeyword( keywords.DIFF ); - p.addParserKeyword( keywords.DIFFC ); - p.addParserKeyword( keywords.DIFFCOAL ); - p.addParserKeyword( keywords.DIFFDP ); - p.addParserKeyword( keywords.DIFFMMF ); - p.addParserKeyword( keywords.DIFFMR ); - p.addParserKeyword( keywords.DIFFMTHT ); - p.addParserKeyword( keywords.DIFFMX ); - p.addParserKeyword( keywords.DIFFMY ); - p.addParserKeyword( keywords.DIFFMZ ); - p.addParserKeyword( keywords.DIFFR ); - p.addParserKeyword( keywords.DIFFTHT ); - p.addParserKeyword( keywords.DIFFUSE ); - p.addParserKeyword( keywords.DIFFX ); - p.addParserKeyword( keywords.DIFFY ); - p.addParserKeyword( keywords.DIFFZ ); - p.addParserKeyword( keywords.DIMENS ); - p.addParserKeyword( keywords.DIMPES ); - p.addParserKeyword( keywords.DIMPLICT ); - p.addParserKeyword( keywords.DISGAS ); - p.addParserKeyword( keywords.DISPDIMS ); - p.addParserKeyword( keywords.DISPERSE ); - p.addParserKeyword( keywords.DOMAINS ); - p.addParserKeyword( keywords.DPGRID ); - p.addParserKeyword( keywords.DPKRMOD ); - p.addParserKeyword( keywords.DPNUM ); - p.addParserKeyword( keywords.DR ); - p.addParserKeyword( keywords.DREF ); - p.addParserKeyword( keywords.DREFS ); - p.addParserKeyword( keywords.DRILPRI ); - p.addParserKeyword( keywords.DRSDT ); - p.addParserKeyword( keywords.DRSDTCON ); - p.addParserKeyword( keywords.DRSDTR ); - p.addParserKeyword( keywords.DRV ); - p.addParserKeyword( keywords.DRVDT ); - p.addParserKeyword( keywords.DRVDTR ); - p.addParserKeyword( keywords.DSPDEINT ); - p.addParserKeyword( keywords.DTHETA ); - p.addParserKeyword( keywords.DTHETAV ); - p.addParserKeyword( keywords.DUALPERM ); - p.addParserKeyword( keywords.DUALPORO ); - p.addParserKeyword( keywords.DUMPCUPL ); - p.addParserKeyword( keywords.DUMPFLUX ); - p.addParserKeyword( keywords.DX ); - p.addParserKeyword( keywords.DXV ); - p.addParserKeyword( keywords.DY ); - p.addParserKeyword( keywords.DYNAMICR ); - p.addParserKeyword( keywords.DYNRDIMS ); - p.addParserKeyword( keywords.DYV ); - p.addParserKeyword( keywords.DZ ); - p.addParserKeyword( keywords.DZMATRIX ); - p.addParserKeyword( keywords.DZMTRX ); - p.addParserKeyword( keywords.DZMTRXV ); - p.addParserKeyword( keywords.DZNET ); - p.addParserKeyword( keywords.DZV ); - p.addParserKeyword( keywords.ECHO ); - p.addParserKeyword( keywords.ECLMC ); - p.addParserKeyword( keywords.EDIT ); - p.addParserKeyword( keywords.EDITNNC ); - p.addParserKeyword( keywords.EDITNNCR ); - p.addParserKeyword( keywords.EHYSTR ); - p.addParserKeyword( keywords.EHYSTRR ); - p.addParserKeyword( keywords.END ); - p.addParserKeyword( keywords.ENDACTIO ); - p.addParserKeyword( keywords.ENDBOX ); - p.addParserKeyword( keywords.ENDDYN ); - p.addParserKeyword( keywords.ENDFIN ); - p.addParserKeyword( keywords.ENDINC ); - p.addParserKeyword( keywords.ENDNUM ); - p.addParserKeyword( keywords.ENDPOINT_SPECIFIERS ); - p.addParserKeyword( keywords.ENDSCALE ); - p.addParserKeyword( keywords.ENDSKIP ); - p.addParserKeyword( keywords.ENKRVD ); - p.addParserKeyword( keywords.ENPCVD ); - p.addParserKeyword( keywords.ENPTVD ); - p.addParserKeyword( keywords.ENSPCVD ); - p.addParserKeyword( keywords.EPSDBGS ); - p.addParserKeyword( keywords.EPSDEBUG ); - p.addParserKeyword( keywords.EQLDIMS ); - p.addParserKeyword( keywords.EQLNUM ); - p.addParserKeyword( keywords.EQLOPTS ); - p.addParserKeyword( keywords.EQLZCORN ); - p.addParserKeyword( keywords.EQUALREG ); - p.addParserKeyword( keywords.EQUALS ); - p.addParserKeyword( keywords.EQUIL ); - p.addParserKeyword( keywords.ESSNODE ); - p.addParserKeyword( keywords.EXCAVATE ); - p.addParserKeyword( keywords.EXCEL ); - p.addParserKeyword( keywords.EXIT ); - p.addParserKeyword( keywords.EXTFIN ); - p.addParserKeyword( keywords.EXTHOST ); - p.addParserKeyword( keywords.EXTRAPMS ); - p.addParserKeyword( keywords.EXTREPGL ); - p.addParserKeyword( keywords.FAULTDIM ); - p.addParserKeyword( keywords.FAULTS ); - p.addParserKeyword( keywords.FBHPDEF ); - p.addParserKeyword( keywords.FHERCHBL ); - p.addParserKeyword( keywords.FIELD ); - p.addParserKeyword( keywords.FIELD_PROBE ); - p.addParserKeyword( keywords.FILEUNIT ); - p.addParserKeyword( keywords.FILLEPS ); - p.addParserKeyword( keywords.FIPNUM ); - p.addParserKeyword( keywords.FIPOWG ); - p.addParserKeyword( keywords.FIPSEP ); - p.addParserKeyword( keywords.FIP_PROBE ); - p.addParserKeyword( keywords.FLUXNUM ); - p.addParserKeyword( keywords.FLUXREG ); - p.addParserKeyword( keywords.FLUXTYPE ); - p.addParserKeyword( keywords.FMTHMD ); - p.addParserKeyword( keywords.FMTIN ); - p.addParserKeyword( keywords.FMTOUT ); - p.addParserKeyword( keywords.FMWSET ); - p.addParserKeyword( keywords.FOAM ); - p.addParserKeyword( keywords.FOAMADS ); - p.addParserKeyword( keywords.FOAMDCYO ); - p.addParserKeyword( keywords.FOAMDCYW ); - p.addParserKeyword( keywords.FOAMFCN ); - p.addParserKeyword( keywords.FOAMFRM ); - p.addParserKeyword( keywords.FOAMFSC ); - p.addParserKeyword( keywords.FOAMFSO ); - p.addParserKeyword( keywords.FOAMFST ); - p.addParserKeyword( keywords.FOAMFSW ); - p.addParserKeyword( keywords.FOAMMOB ); - p.addParserKeyword( keywords.FOAMMOBP ); - p.addParserKeyword( keywords.FOAMMOBS ); - p.addParserKeyword( keywords.FOAMOPTS ); - p.addParserKeyword( keywords.FOAMROCK ); - p.addParserKeyword( keywords.FORMFEED ); - p.addParserKeyword( keywords.FRICTION ); - p.addParserKeyword( keywords.FULLIMP ); - p.addParserKeyword( keywords.GAS ); - p.addParserKeyword( keywords.GASBEGIN ); - p.addParserKeyword( keywords.GASCONC ); - p.addParserKeyword( keywords.GASDENT ); - p.addParserKeyword( keywords.GASEND ); - p.addParserKeyword( keywords.GASFCOMP ); - p.addParserKeyword( keywords.GASFDECR ); - p.addParserKeyword( keywords.GASFDELC ); - p.addParserKeyword( keywords.GASFIELD ); - p.addParserKeyword( keywords.GASFTARG ); - p.addParserKeyword( keywords.GASJT ); - p.addParserKeyword( keywords.GASMONTH ); - p.addParserKeyword( keywords.GASPERIO ); - p.addParserKeyword( keywords.GASSATC ); - p.addParserKeyword( keywords.GASVISCT ); - p.addParserKeyword( keywords.GASYEAR ); - p.addParserKeyword( keywords.GCALECON ); - p.addParserKeyword( keywords.GCOMPIDX ); - p.addParserKeyword( keywords.GCONCAL ); - p.addParserKeyword( keywords.GCONENG ); - p.addParserKeyword( keywords.GCONINJE ); - p.addParserKeyword( keywords.GCONPRI ); - p.addParserKeyword( keywords.GCONPROD ); - p.addParserKeyword( keywords.GCONSALE ); - p.addParserKeyword( keywords.GCONSUMP ); - p.addParserKeyword( keywords.GCONTOL ); - p.addParserKeyword( keywords.GCUTBACK ); - p.addParserKeyword( keywords.GCUTBACT ); - p.addParserKeyword( keywords.GCVD ); - p.addParserKeyword( keywords.GDCQ ); - p.addParserKeyword( keywords.GDCQECON ); - p.addParserKeyword( keywords.GDFILE ); - p.addParserKeyword( keywords.GDIMS ); - p.addParserKeyword( keywords.GDORIENT ); - p.addParserKeyword( keywords.GDRILPOT ); - p.addParserKeyword( keywords.GECON ); - p.addParserKeyword( keywords.GECONT ); - p.addParserKeyword( keywords.GEFAC ); - p.addParserKeyword( keywords.GETDATA ); - p.addParserKeyword( keywords.GETGLOB ); - p.addParserKeyword( keywords.GI ); - p.addParserKeyword( keywords.GIALL ); - p.addParserKeyword( keywords.GIMODEL ); - p.addParserKeyword( keywords.GINODE ); - p.addParserKeyword( keywords.GLIFTLIM ); - p.addParserKeyword( keywords.GLIFTOPT ); - p.addParserKeyword( keywords.GMWSET ); - p.addParserKeyword( keywords.GNETDP ); - p.addParserKeyword( keywords.GNETINJE ); - p.addParserKeyword( keywords.GNETPUMP ); - p.addParserKeyword( keywords.GPMAINT ); - p.addParserKeyword( keywords.GRADGRUP ); - p.addParserKeyword( keywords.GRADRESV ); - p.addParserKeyword( keywords.GRADRFT ); - p.addParserKeyword( keywords.GRADWELL ); - p.addParserKeyword( keywords.GRAVCONS ); - p.addParserKeyword( keywords.GRAVDR ); - p.addParserKeyword( keywords.GRAVDRB ); - p.addParserKeyword( keywords.GRAVDRM ); - p.addParserKeyword( keywords.GRAVITY ); - p.addParserKeyword( keywords.GRDREACH ); - p.addParserKeyword( keywords.GRID ); - p.addParserKeyword( keywords.GRIDFILE ); - p.addParserKeyword( keywords.GRIDOPTS ); - p.addParserKeyword( keywords.GRIDUNIT ); - p.addParserKeyword( keywords.GROUP_PROBE ); - p.addParserKeyword( keywords.GRUPMAST ); - p.addParserKeyword( keywords.GRUPNET ); - p.addParserKeyword( keywords.GRUPRIG ); - p.addParserKeyword( keywords.GRUPSLAV ); - p.addParserKeyword( keywords.GRUPTARG ); - p.addParserKeyword( keywords.GRUPTREE ); - p.addParserKeyword( keywords.GSATINJE ); - p.addParserKeyword( keywords.GSATPROD ); - p.addParserKeyword( keywords.GSEPCOND ); - p.addParserKeyword( keywords.GSSCPTST ); - p.addParserKeyword( keywords.GSWINGF ); - p.addParserKeyword( keywords.GTADD ); - p.addParserKeyword( keywords.GTMULT ); - p.addParserKeyword( keywords.GUIDECAL ); - p.addParserKeyword( keywords.GUIDERAT ); - p.addParserKeyword( keywords.GUPFREQ ); - p.addParserKeyword( keywords.GWRTWCV ); - p.addParserKeyword( keywords.HALFTRAN ); - p.addParserKeyword( keywords.HAxxxxxx ); - p.addParserKeyword( keywords.HBNUM ); - p.addParserKeyword( keywords.HDISP ); - p.addParserKeyword( keywords.HEATCR ); - p.addParserKeyword( keywords.HEATCRT ); - p.addParserKeyword( keywords.HMAQUCT ); - p.addParserKeyword( keywords.HMAQUFET ); - p.addParserKeyword( keywords.HMAQUNUM ); - p.addParserKeyword( keywords.HMDIMS ); - p.addParserKeyword( keywords.HMFAULTS ); - p.addParserKeyword( keywords.HMMLAQUN ); - p.addParserKeyword( keywords.HMMLCTAQ ); - p.addParserKeyword( keywords.HMMLFTAQ ); - p.addParserKeyword( keywords.HMMLTWCN ); - p.addParserKeyword( keywords.HMMULTFT ); - p.addParserKeyword( keywords.HMMULTSG ); - p.addParserKeyword( keywords.HMMULTxx ); - p.addParserKeyword( keywords.HMPROPS ); - p.addParserKeyword( keywords.HMROCK ); - p.addParserKeyword( keywords.HMROCKT ); - p.addParserKeyword( keywords.HMRREF ); - p.addParserKeyword( keywords.HMWELCON ); - p.addParserKeyword( keywords.HMWPIMLT ); - p.addParserKeyword( keywords.HMxxxxxx ); - p.addParserKeyword( keywords.HRFIN ); - p.addParserKeyword( keywords.HWKRO ); - p.addParserKeyword( keywords.HWKRORG ); - p.addParserKeyword( keywords.HWKRORW ); - p.addParserKeyword( keywords.HWKRW ); - p.addParserKeyword( keywords.HWKRWR ); - p.addParserKeyword( keywords.HWPCW ); - p.addParserKeyword( keywords.HWSNUM ); - p.addParserKeyword( keywords.HWSOGCR ); - p.addParserKeyword( keywords.HWSOWCR ); - p.addParserKeyword( keywords.HWSWCR ); - p.addParserKeyword( keywords.HWSWL ); - p.addParserKeyword( keywords.HWSWLPC ); - p.addParserKeyword( keywords.HWSWU ); - p.addParserKeyword( keywords.HXFIN ); - p.addParserKeyword( keywords.HYDRHEAD ); - p.addParserKeyword( keywords.HYFIN ); - p.addParserKeyword( keywords.HYMOBGDR ); - p.addParserKeyword( keywords.HYST ); - p.addParserKeyword( keywords.HYSTCHCK ); - p.addParserKeyword( keywords.HZFIN ); - p.addParserKeyword( keywords.IHOST ); - p.addParserKeyword( keywords.IMBNUM ); - p.addParserKeyword( keywords.IMBNUMMF ); - p.addParserKeyword( keywords.IMKRVD ); - p.addParserKeyword( keywords.IMPCVD ); - p.addParserKeyword( keywords.IMPES ); - p.addParserKeyword( keywords.IMPLICIT ); - p.addParserKeyword( keywords.IMPORT ); - p.addParserKeyword( keywords.IMPTVD ); - p.addParserKeyword( keywords.IMSPCVD ); - p.addParserKeyword( keywords.INCLUDE ); - p.addParserKeyword( keywords.INIT ); - p.addParserKeyword( keywords.INRAD ); - p.addParserKeyword( keywords.INSPEC ); - p.addParserKeyword( keywords.INTPC ); - p.addParserKeyword( keywords.IONROCK ); - p.addParserKeyword( keywords.IONXROCK ); - p.addParserKeyword( keywords.IONXSURF ); - p.addParserKeyword( keywords.IPCG ); - p.addParserKeyword( keywords.IPCW ); - p.addParserKeyword( keywords.ISGCR ); - p.addParserKeyword( keywords.ISGL ); - p.addParserKeyword( keywords.ISGLPC ); - p.addParserKeyword( keywords.ISGU ); - p.addParserKeyword( keywords.ISOGCR ); - p.addParserKeyword( keywords.ISOLNUM ); - p.addParserKeyword( keywords.ISOWCR ); - p.addParserKeyword( keywords.ISWCR ); - p.addParserKeyword( keywords.ISWL ); - p.addParserKeyword( keywords.ISWLPC ); - p.addParserKeyword( keywords.ISWU ); - p.addParserKeyword( keywords.JFUNC ); - p.addParserKeyword( keywords.JFUNCR ); - p.addParserKeyword( keywords.KRNUM ); - p.addParserKeyword( keywords.KRNUMMF ); - p.addParserKeyword( keywords.LAB ); - p.addParserKeyword( keywords.LANGMPL ); - p.addParserKeyword( keywords.LANGMUIR ); - p.addParserKeyword( keywords.LANGSOLV ); - p.addParserKeyword( keywords.LCUNIT ); - p.addParserKeyword( keywords.LGR ); - p.addParserKeyword( keywords.LGRCOPY ); - p.addParserKeyword( keywords.LGRFREE ); - p.addParserKeyword( keywords.LGRLOCK ); - p.addParserKeyword( keywords.LGROFF ); - p.addParserKeyword( keywords.LGRON ); - p.addParserKeyword( keywords.LICENSES ); - p.addParserKeyword( keywords.LIFTOPT ); - p.addParserKeyword( keywords.LINCOM ); - p.addParserKeyword( keywords.LINKPERM ); - p.addParserKeyword( keywords.LIVEOIL ); - p.addParserKeyword( keywords.LKRO ); - p.addParserKeyword( keywords.LKRORG ); - p.addParserKeyword( keywords.LKRORW ); - p.addParserKeyword( keywords.LKRW ); - p.addParserKeyword( keywords.LKRWR ); - p.addParserKeyword( keywords.LOAD ); - p.addParserKeyword( keywords.LOWSALT ); - p.addParserKeyword( keywords.LPCW ); - p.addParserKeyword( keywords.LSALTFNC ); - p.addParserKeyword( keywords.LSLTWNUM ); - p.addParserKeyword( keywords.LSNUM ); - p.addParserKeyword( keywords.LSOGCR ); - p.addParserKeyword( keywords.LSOWCR ); - p.addParserKeyword( keywords.LSWCR ); - p.addParserKeyword( keywords.LSWL ); - p.addParserKeyword( keywords.LSWLPC ); - p.addParserKeyword( keywords.LSWU ); - p.addParserKeyword( keywords.LTOSIGMA ); - p.addParserKeyword( keywords.LWKRO ); - p.addParserKeyword( keywords.LWKRORG ); - p.addParserKeyword( keywords.LWKRORW ); - p.addParserKeyword( keywords.LWKRW ); - p.addParserKeyword( keywords.LWKRWR ); - p.addParserKeyword( keywords.LWPCW ); - p.addParserKeyword( keywords.LWSLTNUM ); - p.addParserKeyword( keywords.LWSNUM ); - p.addParserKeyword( keywords.LWSOGCR ); - p.addParserKeyword( keywords.LWSOWCR ); - p.addParserKeyword( keywords.LWSWCR ); - p.addParserKeyword( keywords.LWSWL ); - p.addParserKeyword( keywords.LWSWLPC ); - p.addParserKeyword( keywords.LWSWU ); - p.addParserKeyword( keywords.LX ); - p.addParserKeyword( keywords.LXFIN ); - p.addParserKeyword( keywords.LY ); - p.addParserKeyword( keywords.LYFIN ); - p.addParserKeyword( keywords.LZ ); - p.addParserKeyword( keywords.LZFIN ); - p.addParserKeyword( keywords.MAPAXES ); - p.addParserKeyword( keywords.MAPUNITS ); - p.addParserKeyword( keywords.MASSFLOW ); - p.addParserKeyword( keywords.MATCORR ); - p.addParserKeyword( keywords.MAXVALUE ); - p.addParserKeyword( keywords.MEMORY ); - p.addParserKeyword( keywords.MESSAGE ); - p.addParserKeyword( keywords.MESSAGES ); - p.addParserKeyword( keywords.MESSOPTS ); - p.addParserKeyword( keywords.MESSSRVC ); - p.addParserKeyword( keywords.METRIC ); - p.addParserKeyword( keywords.MICP ); - p.addParserKeyword( keywords.MICPPARA ); - p.addParserKeyword( keywords.MINNNCT ); - p.addParserKeyword( keywords.MINNPCOL ); - p.addParserKeyword( keywords.MINPORV ); - p.addParserKeyword( keywords.MINPV ); - p.addParserKeyword( keywords.MINPVFIL ); - p.addParserKeyword( keywords.MINPVV ); - p.addParserKeyword( keywords.MINVALUE ); - p.addParserKeyword( keywords.MISC ); - p.addParserKeyword( keywords.MISCIBLE ); - p.addParserKeyword( keywords.MISCNUM ); - p.addParserKeyword( keywords.MLANG ); - p.addParserKeyword( keywords.MLANGSLV ); - p.addParserKeyword( keywords.MONITOR ); - p.addParserKeyword( keywords.MPFANUM ); - p.addParserKeyword( keywords.MPFNNC ); - p.addParserKeyword( keywords.MSFN ); - p.addParserKeyword( keywords.MSGFILE ); - p.addParserKeyword( keywords.MSUM_PROBE ); - p.addParserKeyword( keywords.MULSGGD ); - p.addParserKeyword( keywords.MULSGGDV ); - p.addParserKeyword( keywords.MULTFLT ); - p.addParserKeyword( keywords.MULTIN ); - p.addParserKeyword( keywords.MULTIPLY ); - p.addParserKeyword( keywords.MULTIREG ); - p.addParserKeyword( keywords.MULTNUM ); - p.addParserKeyword( keywords.MULTOUT ); - p.addParserKeyword( keywords.MULTOUTS ); - p.addParserKeyword( keywords.MULTPV ); - p.addParserKeyword( keywords.MULTREAL ); - p.addParserKeyword( keywords.MULTREGD ); - p.addParserKeyword( keywords.MULTREGH ); - p.addParserKeyword( keywords.MULTREGP ); - p.addParserKeyword( keywords.MULTREGT ); - p.addParserKeyword( keywords.MULTSIG ); - p.addParserKeyword( keywords.MULTSIGV ); - p.addParserKeyword( keywords.MULT_XYZ ); - p.addParserKeyword( keywords.MW ); - p.addParserKeyword( keywords.MWS ); - p.addParserKeyword( keywords.NARROW ); - p.addParserKeyword( keywords.NCONSUMP ); - p.addParserKeyword( keywords.NEFAC ); - p.addParserKeyword( keywords.NETBALAN ); - p.addParserKeyword( keywords.NETCOMPA ); - p.addParserKeyword( keywords.NETWORK ); - p.addParserKeyword( keywords.NEWTRAN ); - p.addParserKeyword( keywords.NEXTSTEP ); - p.addParserKeyword( keywords.NEXTSTPL ); - p.addParserKeyword( keywords.NINENUM ); - p.addParserKeyword( keywords.NINEPOIN ); - p.addParserKeyword( keywords.NMATOPTS ); - p.addParserKeyword( keywords.NMATRIX ); - p.addParserKeyword( keywords.NMESSAGE ); - p.addParserKeyword( keywords.NNC ); - p.addParserKeyword( keywords.NNEWTF ); - p.addParserKeyword( keywords.NOCASC ); - p.addParserKeyword( keywords.NODEPROP ); - p.addParserKeyword( keywords.NODPPM ); - p.addParserKeyword( keywords.NOECHO ); - p.addParserKeyword( keywords.NOGGF ); - p.addParserKeyword( keywords.NOGRAV ); - p.addParserKeyword( keywords.NOHMD ); - p.addParserKeyword( keywords.NOHMO ); - p.addParserKeyword( keywords.NOHYST ); - p.addParserKeyword( keywords.NOINSPEC ); - p.addParserKeyword( keywords.NOMONITO ); - p.addParserKeyword( keywords.NONNC ); - p.addParserKeyword( keywords.NORSSPEC ); - p.addParserKeyword( keywords.NOSIM ); - p.addParserKeyword( keywords.NOWARN ); - p.addParserKeyword( keywords.NOWARNEP ); - p.addParserKeyword( keywords.NRSOUT ); - p.addParserKeyword( keywords.NSTACK ); - p.addParserKeyword( keywords.NTG ); - p.addParserKeyword( keywords.NUMRES ); - p.addParserKeyword( keywords.NUPCOL ); - p.addParserKeyword( keywords.NWATREM ); - p.addParserKeyword( keywords.NXFIN ); - p.addParserKeyword( keywords.NYFIN ); - p.addParserKeyword( keywords.NZFIN ); - p.addParserKeyword( keywords.OCOMPIDX ); - p.addParserKeyword( keywords.OFM ); - p.addParserKeyword( keywords.OIL ); - p.addParserKeyword( keywords.OILAPI ); - p.addParserKeyword( keywords.OILCOMPR ); - p.addParserKeyword( keywords.OILDENT ); - p.addParserKeyword( keywords.OILJT ); - p.addParserKeyword( keywords.OILMW ); - p.addParserKeyword( keywords.OILVISCT ); - p.addParserKeyword( keywords.OILVTIM ); - p.addParserKeyword( keywords.OLDTRAN ); - p.addParserKeyword( keywords.OLDTRANR ); - p.addParserKeyword( keywords.OPERATE ); - p.addParserKeyword( keywords.OPERATER ); - p.addParserKeyword( keywords.OPERNUM ); - p.addParserKeyword( keywords.OPTIONS ); - p.addParserKeyword( keywords.OPTIONS3 ); - p.addParserKeyword( keywords.OUTRAD ); - p.addParserKeyword( keywords.OUTSOL ); - p.addParserKeyword( keywords.OVERBURD ); - p.addParserKeyword( keywords.PARALLEL ); - p.addParserKeyword( keywords.PARAOPTS ); - p.addParserKeyword( keywords.PARTTRAC ); - p.addParserKeyword( keywords.PATHS ); - p.addParserKeyword( keywords.PBUB ); - p.addParserKeyword( keywords.PBVD ); - p.addParserKeyword( keywords.PCG ); - p.addParserKeyword( keywords.PCG32D ); - p.addParserKeyword( keywords.PCW ); - p.addParserKeyword( keywords.PCW32D ); - p.addParserKeyword( keywords.PDEW ); - p.addParserKeyword( keywords.PDVD ); - p.addParserKeyword( keywords.PEBI ); - p.addParserKeyword( keywords.PECOEFS ); - p.addParserKeyword( keywords.PEDIMS ); - p.addParserKeyword( keywords.PEGTABX ); - p.addParserKeyword( keywords.PEKTABX ); - p.addParserKeyword( keywords.PENUM ); - p.addParserKeyword( keywords.PERFORMANCE_PROBE ); - p.addParserKeyword( keywords.PERMAVE ); - p.addParserKeyword( keywords.PERMFACT ); - p.addParserKeyword( keywords.PERMJFUN ); - p.addParserKeyword( keywords.PERMR ); - p.addParserKeyword( keywords.PERMTHT ); - p.addParserKeyword( keywords.PERMX ); - p.addParserKeyword( keywords.PERMXY ); - p.addParserKeyword( keywords.PERMY ); - p.addParserKeyword( keywords.PERMYZ ); - p.addParserKeyword( keywords.PERMZ ); - p.addParserKeyword( keywords.PERMZX ); - p.addParserKeyword( keywords.PETGRID ); - p.addParserKeyword( keywords.PETOPTS ); - p.addParserKeyword( keywords.PICOND ); - p.addParserKeyword( keywords.PIMTDIMS ); - p.addParserKeyword( keywords.PIMULTAB ); - p.addParserKeyword( keywords.PINCH ); - p.addParserKeyword( keywords.PINCHNUM ); - p.addParserKeyword( keywords.PINCHOUT ); - p.addParserKeyword( keywords.PINCHREG ); - p.addParserKeyword( keywords.PINCHXY ); - p.addParserKeyword( keywords.PINTDIMS ); - p.addParserKeyword( keywords.PLMIXNUM ); - p.addParserKeyword( keywords.PLMIXPAR ); - p.addParserKeyword( keywords.PLYADS ); - p.addParserKeyword( keywords.PLYADSS ); - p.addParserKeyword( keywords.PLYATEMP ); - p.addParserKeyword( keywords.PLYCAMAX ); - p.addParserKeyword( keywords.PLYDHFLF ); - p.addParserKeyword( keywords.PLYESAL ); - p.addParserKeyword( keywords.PLYKRRF ); - p.addParserKeyword( keywords.PLYMAX ); - p.addParserKeyword( keywords.PLYMWINJ ); - p.addParserKeyword( keywords.PLYOPTS ); - p.addParserKeyword( keywords.PLYRMDEN ); - p.addParserKeyword( keywords.PLYROCK ); - p.addParserKeyword( keywords.PLYROCKM ); - p.addParserKeyword( keywords.PLYSHEAR ); - p.addParserKeyword( keywords.PLYSHLOG ); - p.addParserKeyword( keywords.PLYTRRF ); - p.addParserKeyword( keywords.PLYTRRFA ); - p.addParserKeyword( keywords.PLYVISC ); - p.addParserKeyword( keywords.PLYVISCS ); - p.addParserKeyword( keywords.PLYVISCT ); - p.addParserKeyword( keywords.PLYVMH ); - p.addParserKeyword( keywords.PLYVSCST ); - p.addParserKeyword( keywords.PMAX ); - p.addParserKeyword( keywords.PMISC ); - p.addParserKeyword( keywords.POLYMER ); - p.addParserKeyword( keywords.POLYMW ); - p.addParserKeyword( keywords.PORO ); - p.addParserKeyword( keywords.PORV ); - p.addParserKeyword( keywords.PPCWMAX ); - p.addParserKeyword( keywords.PRECSALT ); - p.addParserKeyword( keywords.PREF ); - p.addParserKeyword( keywords.PREFS ); - p.addParserKeyword( keywords.PRESSURE ); - p.addParserKeyword( keywords.PRIORITY ); - p.addParserKeyword( keywords.PROPS ); - p.addParserKeyword( keywords.PRORDER ); - p.addParserKeyword( keywords.PRVD ); - p.addParserKeyword( keywords.PSTEADY ); - p.addParserKeyword( keywords.PSWRG ); - p.addParserKeyword( keywords.PSWRO ); - p.addParserKeyword( keywords.PVCDO ); - p.addParserKeyword( keywords.PVCO ); - p.addParserKeyword( keywords.PVDG ); - p.addParserKeyword( keywords.PVDO ); - p.addParserKeyword( keywords.PVDS ); - p.addParserKeyword( keywords.PVTG ); - p.addParserKeyword( keywords.PVTGW ); - p.addParserKeyword( keywords.PVTGWO ); - p.addParserKeyword( keywords.PVTNUM ); - p.addParserKeyword( keywords.PVTO ); - p.addParserKeyword( keywords.PVTSOL ); - p.addParserKeyword( keywords.PVTW ); - p.addParserKeyword( keywords.PVTWSALT ); - p.addParserKeyword( keywords.PVT_M ); - p.addParserKeyword( keywords.PVZG ); - p.addParserKeyword( keywords.PYACTION ); - p.addParserKeyword( keywords.PYINPUT ); - p.addParserKeyword( keywords.QDRILL ); - p.addParserKeyword( keywords.QHRATING ); - p.addParserKeyword( keywords.QMOBIL ); - p.addParserKeyword( keywords.RADFIN ); - p.addParserKeyword( keywords.RADFIN4 ); - p.addParserKeyword( keywords.RADIAL ); - p.addParserKeyword( keywords.RAINFALL ); - p.addParserKeyword( keywords.RBEDCONT ); - p.addParserKeyword( keywords.RCMASTS ); - p.addParserKeyword( keywords.REACHES ); - p.addParserKeyword( keywords.READDATA ); - p.addParserKeyword( keywords.REFINE ); - p.addParserKeyword( keywords.REGDIMS ); - p.addParserKeyword( keywords.REGION2REGION_PROBE ); - p.addParserKeyword( keywords.REGION2REGION_PROBE_E300 ); - p.addParserKeyword( keywords.REGIONS ); - p.addParserKeyword( keywords.REGION_PROBE ); - p.addParserKeyword( keywords.RESIDNUM ); - p.addParserKeyword( keywords.RESTART ); - p.addParserKeyword( keywords.RESVNUM ); - p.addParserKeyword( keywords.RHO ); - p.addParserKeyword( keywords.RIVDEBUG ); - p.addParserKeyword( keywords.RIVERSYS ); - p.addParserKeyword( keywords.RIVRDIMS ); - p.addParserKeyword( keywords.RIVRPROP ); - p.addParserKeyword( keywords.RIVRXSEC ); - p.addParserKeyword( keywords.RIVSALT ); - p.addParserKeyword( keywords.RIVTRACE ); - p.addParserKeyword( keywords.RKTRMDIR ); - p.addParserKeyword( keywords.ROCK ); - p.addParserKeyword( keywords.ROCK2D ); - p.addParserKeyword( keywords.ROCK2DTR ); - p.addParserKeyword( keywords.ROCKCOMP ); - p.addParserKeyword( keywords.ROCKFRAC ); - p.addParserKeyword( keywords.ROCKNUM ); - p.addParserKeyword( keywords.ROCKOPTS ); - p.addParserKeyword( keywords.ROCKPAMA ); - p.addParserKeyword( keywords.ROCKTAB ); - p.addParserKeyword( keywords.ROCKTABH ); - p.addParserKeyword( keywords.ROCKTABW ); - p.addParserKeyword( keywords.ROCKTHSG ); - p.addParserKeyword( keywords.ROCKTSIG ); - p.addParserKeyword( keywords.ROCKV ); - p.addParserKeyword( keywords.ROCKWNOD ); - p.addParserKeyword( keywords.RPTCPL ); - p.addParserKeyword( keywords.RPTGRID ); - p.addParserKeyword( keywords.RPTGRIDL ); - p.addParserKeyword( keywords.RPTHMD ); - p.addParserKeyword( keywords.RPTHMG ); - p.addParserKeyword( keywords.RPTHMW ); - p.addParserKeyword( keywords.RPTINIT ); - p.addParserKeyword( keywords.RPTISOL ); - p.addParserKeyword( keywords.RPTONLY ); - p.addParserKeyword( keywords.RPTONLYO ); - p.addParserKeyword( keywords.RPTPROPS ); - p.addParserKeyword( keywords.RPTREGS ); - p.addParserKeyword( keywords.RPTRST ); - p.addParserKeyword( keywords.RPTRUNSP ); - p.addParserKeyword( keywords.RPTSCHED ); - p.addParserKeyword( keywords.RPTSMRY ); - p.addParserKeyword( keywords.RPTSOL ); - p.addParserKeyword( keywords.RS ); - p.addParserKeyword( keywords.RSCONST ); - p.addParserKeyword( keywords.RSCONSTT ); - p.addParserKeyword( keywords.RSGI ); - p.addParserKeyword( keywords.RSSPEC ); - p.addParserKeyword( keywords.RSVD ); - p.addParserKeyword( keywords.RTEMP ); - p.addParserKeyword( keywords.RTEMPA ); - p.addParserKeyword( keywords.RTEMPVD ); - p.addParserKeyword( keywords.RUNSPEC ); - p.addParserKeyword( keywords.RUNSUM ); - p.addParserKeyword( keywords.RV ); - p.addParserKeyword( keywords.RVCONST ); - p.addParserKeyword( keywords.RVCONSTT ); - p.addParserKeyword( keywords.RVGI ); - p.addParserKeyword( keywords.RVVD ); - p.addParserKeyword( keywords.RVW ); - p.addParserKeyword( keywords.RWGSALT ); - p.addParserKeyword( keywords.SALINITY ); - p.addParserKeyword( keywords.SALT ); - p.addParserKeyword( keywords.SALTNODE ); - p.addParserKeyword( keywords.SALTP ); - p.addParserKeyword( keywords.SALTPVD ); - p.addParserKeyword( keywords.SALTREST ); - p.addParserKeyword( keywords.SALTSOL ); - p.addParserKeyword( keywords.SALTVD ); - p.addParserKeyword( keywords.SAMG ); - p.addParserKeyword( keywords.SATNUM ); - p.addParserKeyword( keywords.SATOPTS ); - p.addParserKeyword( keywords.SAVE ); - p.addParserKeyword( keywords.SBIOF ); - p.addParserKeyword( keywords.SCALC ); - p.addParserKeyword( keywords.SCALECRS ); - p.addParserKeyword( keywords.SCALELIM ); - p.addParserKeyword( keywords.SCDATAB ); - p.addParserKeyword( keywords.SCDETAB ); - p.addParserKeyword( keywords.SCDPDIMS ); - p.addParserKeyword( keywords.SCDPTAB ); - p.addParserKeyword( keywords.SCDPTRAC ); - p.addParserKeyword( keywords.SCHEDULE ); - p.addParserKeyword( keywords.SCVD ); - p.addParserKeyword( keywords.SDENSITY ); - p.addParserKeyword( keywords.SEGMENT_PROBE ); - p.addParserKeyword( keywords.SEPARATE ); - p.addParserKeyword( keywords.SEPVALS ); - p.addParserKeyword( keywords.SFOAM ); - p.addParserKeyword( keywords.SGAS ); - p.addParserKeyword( keywords.SGCR ); - p.addParserKeyword( keywords.SGCWMIS ); - p.addParserKeyword( keywords.SGF32D ); - p.addParserKeyword( keywords.SGFN ); - p.addParserKeyword( keywords.SGL ); - p.addParserKeyword( keywords.SGLPC ); - p.addParserKeyword( keywords.SGOF ); - p.addParserKeyword( keywords.SGOFLET ); - p.addParserKeyword( keywords.SGU ); - p.addParserKeyword( keywords.SGWFN ); - p.addParserKeyword( keywords.SHRATE ); - p.addParserKeyword( keywords.SIGMA ); - p.addParserKeyword( keywords.SIGMAGDV ); - p.addParserKeyword( keywords.SIGMATH ); - p.addParserKeyword( keywords.SIGMAV ); - p.addParserKeyword( keywords.SIMULATE ); - p.addParserKeyword( keywords.SKIP ); - p.addParserKeyword( keywords.SKIP100 ); - p.addParserKeyword( keywords.SKIP300 ); - p.addParserKeyword( keywords.SKIPREST ); - p.addParserKeyword( keywords.SKPRPOLY ); - p.addParserKeyword( keywords.SKPRWAT ); - p.addParserKeyword( keywords.SKRO ); - p.addParserKeyword( keywords.SKRORG ); - p.addParserKeyword( keywords.SKRORW ); - p.addParserKeyword( keywords.SKRW ); - p.addParserKeyword( keywords.SKRWR ); - p.addParserKeyword( keywords.SLAVES ); - p.addParserKeyword( keywords.SLGOF ); - p.addParserKeyword( keywords.SMICR ); - p.addParserKeyword( keywords.SMRYDIMS ); - p.addParserKeyword( keywords.SMULTX ); - p.addParserKeyword( keywords.SMULTY ); - p.addParserKeyword( keywords.SMULTZ ); - p.addParserKeyword( keywords.SOCRS ); - p.addParserKeyword( keywords.SOF2 ); - p.addParserKeyword( keywords.SOF3 ); - p.addParserKeyword( keywords.SOF32D ); - p.addParserKeyword( keywords.SOGCR ); - p.addParserKeyword( keywords.SOIL ); - p.addParserKeyword( keywords.SOLUTION ); - p.addParserKeyword( keywords.SOLVCONC ); - p.addParserKeyword( keywords.SOLVDIMS ); - p.addParserKeyword( keywords.SOLVDIRS ); - p.addParserKeyword( keywords.SOLVENT ); - p.addParserKeyword( keywords.SOLVFRAC ); - p.addParserKeyword( keywords.SOLVNUM ); - p.addParserKeyword( keywords.SOMGAS ); - p.addParserKeyword( keywords.SOMWAT ); - p.addParserKeyword( keywords.SORWMIS ); - p.addParserKeyword( keywords.SOWCR ); - p.addParserKeyword( keywords.SOXYG ); - p.addParserKeyword( keywords.SPECGRID ); - p.addParserKeyword( keywords.SPECHEAT ); - p.addParserKeyword( keywords.SPECROCK ); - p.addParserKeyword( keywords.SPIDER ); - p.addParserKeyword( keywords.SPOLY ); - p.addParserKeyword( keywords.SPOLYMW ); - p.addParserKeyword( keywords.SSFN ); - p.addParserKeyword( keywords.SSGCR ); - p.addParserKeyword( keywords.SSGL ); - p.addParserKeyword( keywords.SSOGCR ); - p.addParserKeyword( keywords.SSOL ); - p.addParserKeyword( keywords.SSOWCR ); - p.addParserKeyword( keywords.SSWCR ); - p.addParserKeyword( keywords.SSWL ); - p.addParserKeyword( keywords.SSWU ); - p.addParserKeyword( keywords.START ); - p.addParserKeyword( keywords.STCOND ); - p.addParserKeyword( keywords.STOG ); - p.addParserKeyword( keywords.STONE ); - p.addParserKeyword( keywords.STONE1 ); - p.addParserKeyword( keywords.STONE1EX ); - p.addParserKeyword( keywords.STONE2 ); - p.addParserKeyword( keywords.STOW ); - p.addParserKeyword( keywords.STWG ); - p.addParserKeyword( keywords.SUMMARY ); - p.addParserKeyword( keywords.SUMTHIN ); - p.addParserKeyword( keywords.SUREA ); - p.addParserKeyword( keywords.SURF ); - p.addParserKeyword( keywords.SURFACT ); - p.addParserKeyword( keywords.SURFACTW ); - p.addParserKeyword( keywords.SURFADDW ); - p.addParserKeyword( keywords.SURFADS ); - p.addParserKeyword( keywords.SURFCAPD ); - p.addParserKeyword( keywords.SURFESAL ); - p.addParserKeyword( keywords.SURFNUM ); - p.addParserKeyword( keywords.SURFOPTS ); - p.addParserKeyword( keywords.SURFROCK ); - p.addParserKeyword( keywords.SURFST ); - p.addParserKeyword( keywords.SURFSTES ); - p.addParserKeyword( keywords.SURFVISC ); - p.addParserKeyword( keywords.SURFWNUM ); - p.addParserKeyword( keywords.SWAT ); - p.addParserKeyword( keywords.SWATINIT ); - p.addParserKeyword( keywords.SWCR ); - p.addParserKeyword( keywords.SWF32D ); - p.addParserKeyword( keywords.SWFN ); - p.addParserKeyword( keywords.SWINGFAC ); - p.addParserKeyword( keywords.SWL ); - p.addParserKeyword( keywords.SWLPC ); - p.addParserKeyword( keywords.SWOF ); - p.addParserKeyword( keywords.SWOFLET ); - p.addParserKeyword( keywords.SWU ); - p.addParserKeyword( keywords.TABDIMS ); - p.addParserKeyword( keywords.TBLK ); - p.addParserKeyword( keywords.TEMP ); - p.addParserKeyword( keywords.TEMPI ); - p.addParserKeyword( keywords.TEMPNODE ); - p.addParserKeyword( keywords.TEMPTVD ); - p.addParserKeyword( keywords.TEMPVD ); - p.addParserKeyword( keywords.THCGAS ); - p.addParserKeyword( keywords.THCOIL ); - p.addParserKeyword( keywords.THCONR ); - p.addParserKeyword( keywords.THCONSF ); - p.addParserKeyword( keywords.THCROCK ); - p.addParserKeyword( keywords.THCWATER ); - p.addParserKeyword( keywords.THERMAL ); - p.addParserKeyword( keywords.THPRES ); - p.addParserKeyword( keywords.THPRESFT ); - p.addParserKeyword( keywords.TIGHTEN ); - p.addParserKeyword( keywords.TIGHTENP ); - p.addParserKeyword( keywords.TIME ); - p.addParserKeyword( keywords.TITLE ); - p.addParserKeyword( keywords.TLMIXPAR ); - p.addParserKeyword( keywords.TLPMIXPA ); - p.addParserKeyword( keywords.TNUM ); - p.addParserKeyword( keywords.TOLCRIT ); - p.addParserKeyword( keywords.TOPS ); - p.addParserKeyword( keywords.TPAMEPS ); - p.addParserKeyword( keywords.TPAMEPSS ); - p.addParserKeyword( keywords.TRACER ); - p.addParserKeyword( keywords.TRACERKM ); - p.addParserKeyword( keywords.TRACERKP ); - p.addParserKeyword( keywords.TRACERS ); - p.addParserKeyword( keywords.TRACITVD ); - p.addParserKeyword( keywords.TRACTVD ); - p.addParserKeyword( keywords.TRADS ); - p.addParserKeyword( keywords.TRANGL ); - p.addParserKeyword( keywords.TRANR ); - p.addParserKeyword( keywords.TRANTHT ); - p.addParserKeyword( keywords.TRANX ); - p.addParserKeyword( keywords.TRANY ); - p.addParserKeyword( keywords.TRANZ ); - p.addParserKeyword( keywords.TRDCY ); - p.addParserKeyword( keywords.TRDIF ); - p.addParserKeyword( keywords.TRDIS ); - p.addParserKeyword( keywords.TREF ); - p.addParserKeyword( keywords.TREFS ); - p.addParserKeyword( keywords.TRKPF ); - p.addParserKeyword( keywords.TRNHD ); - p.addParserKeyword( keywords.TRPLPORO ); - p.addParserKeyword( keywords.TRROCK ); - p.addParserKeyword( keywords.TSTEP ); - p.addParserKeyword( keywords.TUNING ); - p.addParserKeyword( keywords.TUNINGDP ); - p.addParserKeyword( keywords.TUNINGH ); - p.addParserKeyword( keywords.TUNINGL ); - p.addParserKeyword( keywords.TUNINGS ); - p.addParserKeyword( keywords.TVDP ); - p.addParserKeyword( keywords.TZONE ); - p.addParserKeyword( keywords.UDADIMS ); - p.addParserKeyword( keywords.UDQ ); - p.addParserKeyword( keywords.UDQDIMS ); - p.addParserKeyword( keywords.UDQPARAM ); - p.addParserKeyword( keywords.UDT ); - p.addParserKeyword( keywords.UDTDIMS ); - p.addParserKeyword( keywords.UNCODHMD ); - p.addParserKeyword( keywords.UNIFIN ); - p.addParserKeyword( keywords.UNIFOUT ); - p.addParserKeyword( keywords.UNIFOUTS ); - p.addParserKeyword( keywords.UNIFSAVE ); - p.addParserKeyword( keywords.USECUPL ); - p.addParserKeyword( keywords.USEFLUX ); - p.addParserKeyword( keywords.USENOFLO ); - p.addParserKeyword( keywords.VAPOIL ); - p.addParserKeyword( keywords.VAPPARS ); - p.addParserKeyword( keywords.VAPWAT ); - p.addParserKeyword( keywords.VDFLOW ); - p.addParserKeyword( keywords.VDFLOWR ); - p.addParserKeyword( keywords.VE ); - p.addParserKeyword( keywords.VEDEBUG ); - p.addParserKeyword( keywords.VEFIN ); - p.addParserKeyword( keywords.VEFRAC ); - p.addParserKeyword( keywords.VEFRACP ); - p.addParserKeyword( keywords.VEFRACPV ); - p.addParserKeyword( keywords.VEFRACV ); - p.addParserKeyword( keywords.VFPCHK ); - p.addParserKeyword( keywords.VFPIDIMS ); - p.addParserKeyword( keywords.VFPINJ ); - p.addParserKeyword( keywords.VFPPDIMS ); - p.addParserKeyword( keywords.VFPPROD ); - p.addParserKeyword( keywords.VFPTABL ); - p.addParserKeyword( keywords.VISAGE ); - p.addParserKeyword( keywords.VISCD ); - p.addParserKeyword( keywords.VISCREF ); - p.addParserKeyword( keywords.VISDATES ); - p.addParserKeyword( keywords.VISOPTS ); - p.addParserKeyword( keywords.WAGHYSTR ); - p.addParserKeyword( keywords.WAITBAL ); - p.addParserKeyword( keywords.WALKALIN ); - p.addParserKeyword( keywords.WALQCALC ); - p.addParserKeyword( keywords.WAPI ); - p.addParserKeyword( keywords.WARN ); - p.addParserKeyword( keywords.WATDENT ); - p.addParserKeyword( keywords.WATER ); - p.addParserKeyword( keywords.WATJT ); - p.addParserKeyword( keywords.WATVISCT ); - p.addParserKeyword( keywords.WBHGLR ); - p.addParserKeyword( keywords.WBOREVOL ); - p.addParserKeyword( keywords.WCALCVAL ); - p.addParserKeyword( keywords.WCONHIST ); - p.addParserKeyword( keywords.WCONINJ ); - p.addParserKeyword( keywords.WCONINJE ); - p.addParserKeyword( keywords.WCONINJH ); - p.addParserKeyword( keywords.WCONINJP ); - p.addParserKeyword( keywords.WCONPROD ); - p.addParserKeyword( keywords.WCUTBACK ); - p.addParserKeyword( keywords.WCUTBACT ); - p.addParserKeyword( keywords.WCYCLE ); - p.addParserKeyword( keywords.WDFAC ); - p.addParserKeyword( keywords.WDFACCOR ); - p.addParserKeyword( keywords.WDRILPRI ); - p.addParserKeyword( keywords.WDRILRES ); - p.addParserKeyword( keywords.WDRILTIM ); - p.addParserKeyword( keywords.WECON ); - p.addParserKeyword( keywords.WECONINJ ); - p.addParserKeyword( keywords.WECONT ); - p.addParserKeyword( keywords.WEFAC ); - p.addParserKeyword( keywords.WELCNTL ); - p.addParserKeyword( keywords.WELDEBUG ); - p.addParserKeyword( keywords.WELDRAW ); - p.addParserKeyword( keywords.WELEVNT ); - p.addParserKeyword( keywords.WELLDIMS ); - p.addParserKeyword( keywords.WELL_COMPLETION_PROBE ); - p.addParserKeyword( keywords.WELL_PROBE ); - p.addParserKeyword( keywords.WELMOVEL ); - p.addParserKeyword( keywords.WELOPEN ); - p.addParserKeyword( keywords.WELOPENL ); - p.addParserKeyword( keywords.WELPI ); - p.addParserKeyword( keywords.WELPRI ); - p.addParserKeyword( keywords.WELSEGS ); - p.addParserKeyword( keywords.WELSOMIN ); - p.addParserKeyword( keywords.WELSPECL ); - p.addParserKeyword( keywords.WELSPECS ); - p.addParserKeyword( keywords.WELTARG ); - p.addParserKeyword( keywords.WFOAM ); - p.addParserKeyword( keywords.WFRICSEG ); - p.addParserKeyword( keywords.WFRICSGL ); - p.addParserKeyword( keywords.WFRICTN ); - p.addParserKeyword( keywords.WFRICTNL ); - p.addParserKeyword( keywords.WGASPROD ); - p.addParserKeyword( keywords.WGORPEN ); - p.addParserKeyword( keywords.WGRUPCON ); - p.addParserKeyword( keywords.WH2NUM ); - p.addParserKeyword( keywords.WH3NUM ); - p.addParserKeyword( keywords.WHEDREFD ); - p.addParserKeyword( keywords.WHISTCTL ); - p.addParserKeyword( keywords.WHTEMP ); - p.addParserKeyword( keywords.WINJMULT ); - p.addParserKeyword( keywords.WINJTEMP ); - p.addParserKeyword( keywords.WLIFT ); - p.addParserKeyword( keywords.WLIFTOPT ); - p.addParserKeyword( keywords.WLIMTOL ); - p.addParserKeyword( keywords.WLIST ); - p.addParserKeyword( keywords.WLISTARG ); - p.addParserKeyword( keywords.WLISTNAM ); - p.addParserKeyword( keywords.WMICP ); - p.addParserKeyword( keywords.WNETCTRL ); - p.addParserKeyword( keywords.WNETDP ); - p.addParserKeyword( keywords.WORKLIM ); - p.addParserKeyword( keywords.WORKTHP ); - p.addParserKeyword( keywords.WPAVE ); - p.addParserKeyword( keywords.WPAVEDEP ); - p.addParserKeyword( keywords.WPIMULT ); - p.addParserKeyword( keywords.WPIMULTL ); - p.addParserKeyword( keywords.WPITAB ); - p.addParserKeyword( keywords.WPLUG ); - p.addParserKeyword( keywords.WPMITAB ); - p.addParserKeyword( keywords.WPOLYMER ); - p.addParserKeyword( keywords.WPOLYRED ); - p.addParserKeyword( keywords.WPOTCALC ); - p.addParserKeyword( keywords.WREGROUP ); - p.addParserKeyword( keywords.WRFT ); - p.addParserKeyword( keywords.WRFTPLT ); - p.addParserKeyword( keywords.WSALT ); - p.addParserKeyword( keywords.WSCCLEAN ); - p.addParserKeyword( keywords.WSCCLENL ); - p.addParserKeyword( keywords.WSCTAB ); - p.addParserKeyword( keywords.WSEGAICD ); - p.addParserKeyword( keywords.WSEGDFIN ); - p.addParserKeyword( keywords.WSEGDFMD ); - p.addParserKeyword( keywords.WSEGDFPA ); - p.addParserKeyword( keywords.WSEGDIMS ); - p.addParserKeyword( keywords.WSEGEXSS ); - p.addParserKeyword( keywords.WSEGFLIM ); - p.addParserKeyword( keywords.WSEGFMOD ); - p.addParserKeyword( keywords.WSEGINIT ); - p.addParserKeyword( keywords.WSEGITER ); - p.addParserKeyword( keywords.WSEGLABY ); - p.addParserKeyword( keywords.WSEGLINK ); - p.addParserKeyword( keywords.WSEGMULT ); - p.addParserKeyword( keywords.WSEGPROP ); - p.addParserKeyword( keywords.WSEGSEP ); - p.addParserKeyword( keywords.WSEGSICD ); - p.addParserKeyword( keywords.WSEGSOLV ); - p.addParserKeyword( keywords.WSEGTABL ); - p.addParserKeyword( keywords.WSEGVALV ); - p.addParserKeyword( keywords.WSKPTAB ); - p.addParserKeyword( keywords.WSOLVENT ); - p.addParserKeyword( keywords.WSURFACT ); - p.addParserKeyword( keywords.WTADD ); - p.addParserKeyword( keywords.WTEMP ); - p.addParserKeyword( keywords.WTEMPQ ); - p.addParserKeyword( keywords.WTEST ); - p.addParserKeyword( keywords.WTHPMAX ); - p.addParserKeyword( keywords.WTMULT ); - p.addParserKeyword( keywords.WTRACER ); - p.addParserKeyword( keywords.WVFPDP ); - p.addParserKeyword( keywords.WVFPEXP ); - p.addParserKeyword( keywords.WWPAVE ); - p.addParserKeyword( keywords.ZCORN ); - p.addParserKeyword( keywords.ZFACT1 ); - p.addParserKeyword( keywords.ZFACT1S ); - p.addParserKeyword( keywords.ZFACTOR ); - p.addParserKeyword( keywords.ZFACTORS ); - p.addParserKeyword( keywords.ZIPP2OFF ); - p.addParserKeyword( keywords.ZIPPY2 ); + addDefaultKeywordsA(p); + addDefaultKeywordsB(p); + addDefaultKeywordsC(p); + addDefaultKeywordsD(p); + addDefaultKeywordsE(p); + addDefaultKeywordsF(p); + addDefaultKeywordsG(p); + addDefaultKeywordsH(p); + addDefaultKeywordsI(p); + addDefaultKeywordsJ(p); + addDefaultKeywordsK(p); + addDefaultKeywordsL(p); + addDefaultKeywordsM(p); + addDefaultKeywordsN(p); + addDefaultKeywordsO(p); + addDefaultKeywordsP(p); + addDefaultKeywordsQ(p); + addDefaultKeywordsR(p); + addDefaultKeywordsS(p); + addDefaultKeywordsT(p); + addDefaultKeywordsU(p); + addDefaultKeywordsV(p); + addDefaultKeywordsW(p); + addDefaultKeywordsX(p); + addDefaultKeywordsY(p); + addDefaultKeywordsZ(p); } } void Parser::addDefaultKeywords() { - ParserKeywords::addDefaultKeywords(*this); + ParserKeywords::addDefaultKeywords(*this); } } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/A.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/A.cpp index 014c1df2ed..d70688a35c 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/A.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/A.cpp @@ -11,6 +11,43 @@ #include namespace Opm { namespace ParserKeywords { +ACF::ACF() : ParserKeyword("ACF", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("ACF"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string ACF::keywordName = "ACF"; +const std::string ACF::DATA::itemName = "DATA"; + + +ACTCO2S::ACTCO2S() : ParserKeyword("ACTCO2S", KeywordSize(1, false)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("ACTCO2S"); + { + ParserRecord record; + { + ParserItem item("ACTIVITY_MODEL", ParserItem::itype::INT); + item.setDefault( 3 ); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string ACTCO2S::keywordName = "ACTCO2S"; +const std::string ACTCO2S::ACTIVITY_MODEL::itemName = "ACTIVITY_MODEL"; + + ACTDIMS::ACTDIMS() : ParserKeyword("ACTDIMS", KeywordSize(1, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -42,13 +79,9 @@ ACTDIMS::ACTDIMS() : ParserKeyword("ACTDIMS", KeywordSize(1, false)) { } const std::string ACTDIMS::keywordName = "ACTDIMS"; const std::string ACTDIMS::MAX_ACTION::itemName = "MAX_ACTION"; -const int ACTDIMS::MAX_ACTION::defaultValue = 2; const std::string ACTDIMS::MAX_ACTION_LINES::itemName = "MAX_ACTION_LINES"; -const int ACTDIMS::MAX_ACTION_LINES::defaultValue = 50; const std::string ACTDIMS::MAX_ACTION_LINE_CHARACTERS::itemName = "MAX_ACTION_LINE_CHARACTERS"; -const int ACTDIMS::MAX_ACTION_LINE_CHARACTERS::defaultValue = 80; const std::string ACTDIMS::MAX_ACTION_COND::itemName = "MAX_ACTION_COND"; -const int ACTDIMS::MAX_ACTION_COND::defaultValue = 3; ACTION::ACTION() : ParserKeyword("ACTION", KeywordSize(1, false)) { @@ -129,9 +162,7 @@ const std::string ACTIONG::QUANTITY::itemName = "QUANTITY"; const std::string ACTIONG::OPERATOR::itemName = "OPERATOR"; const std::string ACTIONG::TRIGGER_VALUE::itemName = "TRIGGER_VALUE"; const std::string ACTIONG::REPETITIONS::itemName = "REPETITIONS"; -const int ACTIONG::REPETITIONS::defaultValue = 1; const std::string ACTIONG::INCREMENT::itemName = "INCREMENT"; -const double ACTIONG::INCREMENT::defaultValue = 0; ACTIONR::ACTIONR() : ParserKeyword("ACTIONR", KeywordSize(1, false)) { @@ -185,9 +216,7 @@ const std::string ACTIONR::QUANTITY::itemName = "QUANTITY"; const std::string ACTIONR::OPERATOR::itemName = "OPERATOR"; const std::string ACTIONR::TRIGGER_VALUE::itemName = "TRIGGER_VALUE"; const std::string ACTIONR::REPETITIONS::itemName = "REPETITIONS"; -const int ACTIONR::REPETITIONS::defaultValue = 1; const std::string ACTIONR::INCREMENT::itemName = "INCREMENT"; -const double ACTIONR::INCREMENT::defaultValue = 0; ACTIONS::ACTIONS() : ParserKeyword("ACTIONS", KeywordSize(1, false)) { @@ -241,9 +270,7 @@ const std::string ACTIONS::QUANTITY::itemName = "QUANTITY"; const std::string ACTIONS::OPERATOR::itemName = "OPERATOR"; const std::string ACTIONS::TRIGGER_VALUE::itemName = "TRIGGER_VALUE"; const std::string ACTIONS::REPETITIONS::itemName = "REPETITIONS"; -const int ACTIONS::REPETITIONS::defaultValue = 1; const std::string ACTIONS::INCREMENT::itemName = "INCREMENT"; -const double ACTIONS::INCREMENT::defaultValue = 0; ACTIONW::ACTIONW() : ParserKeyword("ACTIONW", KeywordSize(1, false)) { @@ -292,9 +319,7 @@ const std::string ACTIONW::QUANTITY::itemName = "QUANTITY"; const std::string ACTIONW::OPERATOR::itemName = "OPERATOR"; const std::string ACTIONW::TRIGGER_VALUE::itemName = "TRIGGER_VALUE"; const std::string ACTIONW::REPETITIONS::itemName = "REPETITIONS"; -const int ACTIONW::REPETITIONS::defaultValue = 1; const std::string ACTIONW::INCREMENT::itemName = "INCREMENT"; -const double ACTIONW::INCREMENT::defaultValue = 0; ACTIONX::ACTIONX() : ParserKeyword("ACTIONX", KeywordSize(SLASH_TERMINATED)) { @@ -333,9 +358,7 @@ ACTIONX::ACTIONX() : ParserKeyword("ACTIONX", KeywordSize(SLASH_TERMINATED)) { const std::string ACTIONX::keywordName = "ACTIONX"; const std::string ACTIONX::NAME::itemName = "NAME"; const std::string ACTIONX::NUM::itemName = "NUM"; -const int ACTIONX::NUM::defaultValue = 1; const std::string ACTIONX::MIN_WAIT::itemName = "MIN_WAIT"; -const double ACTIONX::MIN_WAIT::defaultValue = 0; const std::string ACTIONX::CONDITION::itemName = "CONDITION"; @@ -374,7 +397,6 @@ ACTPARAM::ACTPARAM() : ParserKeyword("ACTPARAM", KeywordSize(1, false)) { } const std::string ACTPARAM::keywordName = "ACTPARAM"; const std::string ACTPARAM::data::itemName = "data"; -const double ACTPARAM::data::defaultValue = 0.000100; ADD::ADD() : ParserKeyword("ADD", KeywordSize(SLASH_TERMINATED)) { @@ -471,7 +493,6 @@ ADDREG::ADDREG() : ParserKeyword("ADDREG", KeywordSize(SLASH_TERMINATED)) { const std::string ADDREG::keywordName = "ADDREG"; const std::string ADDREG::ARRAY::itemName = "ARRAY"; const std::string ADDREG::SHIFT::itemName = "SHIFT"; -const double ADDREG::SHIFT::defaultValue = 0; const std::string ADDREG::REGION_NUMBER::itemName = "REGION_NUMBER"; const std::string ADDREG::REGION_NAME::itemName = "REGION_NAME"; const std::string ADDREG::REGION_NAME::defaultValue = "M"; @@ -627,9 +648,7 @@ const std::string ADSORP::A1::itemName = "A1"; const std::string ADSORP::A2::itemName = "A2"; const std::string ADSORP::B::itemName = "B"; const std::string ADSORP::M::itemName = "M"; -const double ADSORP::M::defaultValue = 0.500000; const std::string ADSORP::N::itemName = "N"; -const double ADSORP::N::defaultValue = 0.500000; const std::string ADSORP::K_REF::itemName = "K_REF"; @@ -806,7 +825,6 @@ APIGROUP::APIGROUP() : ParserKeyword("APIGROUP", KeywordSize(1, false)) { } const std::string APIGROUP::keywordName = "APIGROUP"; const std::string APIGROUP::MAX_OIL_PVT_GROUP_COUNT::itemName = "MAX_OIL_PVT_GROUP_COUNT"; -const int APIGROUP::MAX_OIL_PVT_GROUP_COUNT::defaultValue = 1; APILIM::APILIM() : ParserKeyword("APILIM", KeywordSize(1, false)) { @@ -849,7 +867,6 @@ const std::string APILIM::SCOPE::defaultValue = "BOTH"; const std::string APILIM::LOWER_API_LIMIT::itemName = "LOWER_API_LIMIT"; const std::string APILIM::UPPER_API_LIMIT::itemName = "UPPER_API_LIMIT"; const std::string APILIM::NUM_ROWS::itemName = "NUM_ROWS"; -const int APILIM::NUM_ROWS::defaultValue = 10; APIVD::APIVD() : ParserKeyword("APIVD", KeywordSize("EQLDIMS", "NTEQUL", false, 0)) { @@ -944,7 +961,6 @@ const std::string AQANCONL::UPPER_K::itemName = "UPPER_K"; const std::string AQANCONL::FACE_INDX::itemName = "FACE_INDX"; const std::string AQANCONL::AQUIFER_INFLUX_COEFF::itemName = "AQUIFER_INFLUX_COEFF"; const std::string AQANCONL::AQUIFER_INFLUX_MULT::itemName = "AQUIFER_INFLUX_MULT"; -const double AQANCONL::AQUIFER_INFLUX_MULT::defaultValue = 1.000000; const std::string AQANCONL::ALLOW::itemName = "ALLOW"; @@ -985,7 +1001,6 @@ const std::string AQANNC::IX::itemName = "IX"; const std::string AQANNC::IY::itemName = "IY"; const std::string AQANNC::IZ::itemName = "IZ"; const std::string AQANNC::AREA::itemName = "AREA"; -const double AQANNC::AREA::defaultValue = 0; AQANTRC::AQANTRC() : ParserKeyword("AQANTRC", KeywordSize(SLASH_TERMINATED)) { @@ -1107,7 +1122,6 @@ const std::string AQUANCON::K2::itemName = "K2"; const std::string AQUANCON::FACE::itemName = "FACE"; const std::string AQUANCON::INFLUX_COEFF::itemName = "INFLUX_COEFF"; const std::string AQUANCON::INFLUX_MULT::itemName = "INFLUX_MULT"; -const double AQUANCON::INFLUX_MULT::defaultValue = 1.000000; const std::string AQUANCON::CONNECT_ADJOINING_ACTIVE_CELL::itemName = "CONNECT_ADJOINING_ACTIVE_CELL"; const std::string AQUANCON::CONNECT_ADJOINING_ACTIVE_CELL::defaultValue = "NO"; @@ -1157,7 +1171,6 @@ const std::string AQUCHGAS::DATUM_DEPTH::itemName = "DATUM_DEPTH"; const std::string AQUCHGAS::GAS_PRESSURE::itemName = "GAS_PRESSURE"; const std::string AQUCHGAS::AQUIFER_PROD_INDEX::itemName = "AQUIFER_PROD_INDEX"; const std::string AQUCHGAS::TABLE_NUM::itemName = "TABLE_NUM"; -const int AQUCHGAS::TABLE_NUM::defaultValue = 1; const std::string AQUCHGAS::TEMPERATURE::itemName = "TEMPERATURE"; @@ -1253,23 +1266,16 @@ const std::string AQUCHWAT::INPUT_4::itemName = "INPUT_4"; const std::string AQUCHWAT::ITEM4::itemName = "ITEM4"; const std::string AQUCHWAT::AQUIFER_PROD_INDEX::itemName = "AQUIFER_PROD_INDEX"; const std::string AQUCHWAT::TABLE_NUM::itemName = "TABLE_NUM"; -const int AQUCHWAT::TABLE_NUM::defaultValue = 1; const std::string AQUCHWAT::INIT_SALT_CONC::itemName = "INIT_SALT_CONC"; -const double AQUCHWAT::INIT_SALT_CONC::defaultValue = 1.000000; const std::string AQUCHWAT::MINIMUM::itemName = "MINIMUM"; -const double AQUCHWAT::MINIMUM::defaultValue = -99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string AQUCHWAT::MAXIMUM::itemName = "MAXIMUM"; -const double AQUCHWAT::MAXIMUM::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string AQUCHWAT::IGNORE_CAP_PRESSURE::itemName = "IGNORE_CAP_PRESSURE"; const std::string AQUCHWAT::IGNORE_CAP_PRESSURE::defaultValue = "NO"; const std::string AQUCHWAT::MIN_FLOW_PR_CONN::itemName = "MIN_FLOW_PR_CONN"; -const double AQUCHWAT::MIN_FLOW_PR_CONN::defaultValue = -99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string AQUCHWAT::MAX_FLOW_PR_CONN::itemName = "MAX_FLOW_PR_CONN"; -const double AQUCHWAT::MAX_FLOW_PR_CONN::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string AQUCHWAT::REMOVE_DEPTH_TERM::itemName = "REMOVE_DEPTH_TERM"; const std::string AQUCHWAT::REMOVE_DEPTH_TERM::defaultValue = "NO"; const std::string AQUCHWAT::IMPORT_MAX_MIN_FLOW_RATE::itemName = "IMPORT_MAX_MIN_FLOW_RATE"; -const int AQUCHWAT::IMPORT_MAX_MIN_FLOW_RATE::defaultValue = 0; const std::string AQUCHWAT::TEMPERATURE::itemName = "TEMPERATURE"; @@ -1349,15 +1355,11 @@ const std::string AQUCON::K1::itemName = "K1"; const std::string AQUCON::K2::itemName = "K2"; const std::string AQUCON::CONNECT_FACE::itemName = "CONNECT_FACE"; const std::string AQUCON::TRANS_MULT::itemName = "TRANS_MULT"; -const double AQUCON::TRANS_MULT::defaultValue = 1.000000; const std::string AQUCON::TRANS_OPTION::itemName = "TRANS_OPTION"; -const int AQUCON::TRANS_OPTION::defaultValue = 0; const std::string AQUCON::ALLOW_INTERNAL_CELLS::itemName = "ALLOW_INTERNAL_CELLS"; const std::string AQUCON::ALLOW_INTERNAL_CELLS::defaultValue = "NO"; const std::string AQUCON::VEFRAC::itemName = "VEFRAC"; -const double AQUCON::VEFRAC::defaultValue = 1.000000; const std::string AQUCON::VEFRACP::itemName = "VEFRACP"; -const double AQUCON::VEFRACP::defaultValue = 1.000000; AQUCT::AQUCT() : ParserKeyword("AQUCT", KeywordSize(SLASH_TERMINATED)) { @@ -1448,18 +1450,13 @@ const std::string AQUCT::DAT_DEPTH::itemName = "DAT_DEPTH"; const std::string AQUCT::P_INI::itemName = "P_INI"; const std::string AQUCT::PERM_AQ::itemName = "PERM_AQ"; const std::string AQUCT::PORO_AQ::itemName = "PORO_AQ"; -const double AQUCT::PORO_AQ::defaultValue = 1.000000; const std::string AQUCT::C_T::itemName = "C_T"; const std::string AQUCT::RAD::itemName = "RAD"; const std::string AQUCT::THICKNESS_AQ::itemName = "THICKNESS_AQ"; const std::string AQUCT::INFLUENCE_ANGLE::itemName = "INFLUENCE_ANGLE"; -const double AQUCT::INFLUENCE_ANGLE::defaultValue = 360.000000; const std::string AQUCT::TABLE_NUM_WATER_PRESS::itemName = "TABLE_NUM_WATER_PRESS"; -const int AQUCT::TABLE_NUM_WATER_PRESS::defaultValue = 1; const std::string AQUCT::TABLE_NUM_INFLUENCE_FN::itemName = "TABLE_NUM_INFLUENCE_FN"; -const int AQUCT::TABLE_NUM_INFLUENCE_FN::defaultValue = 1; const std::string AQUCT::INI_SALT::itemName = "INI_SALT"; -const double AQUCT::INI_SALT::defaultValue = 0; const std::string AQUCT::TEMP_AQUIFER::itemName = "TEMP_AQUIFER"; @@ -1486,9 +1483,7 @@ AQUCWFAC::AQUCWFAC() : ParserKeyword("AQUCWFAC", KeywordSize(SLASH_TERMINATED)) } const std::string AQUCWFAC::keywordName = "AQUCWFAC"; const std::string AQUCWFAC::ADD_TO_DEPTH::itemName = "ADD_TO_DEPTH"; -const double AQUCWFAC::ADD_TO_DEPTH::defaultValue = 0; const std::string AQUCWFAC::MULTIPLY::itemName = "MULTIPLY"; -const double AQUCWFAC::MULTIPLY::defaultValue = 1.000000; AQUDIMS::AQUDIMS() : ParserKeyword("AQUDIMS", KeywordSize(1, false)) { @@ -1542,21 +1537,13 @@ AQUDIMS::AQUDIMS() : ParserKeyword("AQUDIMS", KeywordSize(1, false)) { } const std::string AQUDIMS::keywordName = "AQUDIMS"; const std::string AQUDIMS::MXNAQN::itemName = "MXNAQN"; -const int AQUDIMS::MXNAQN::defaultValue = 1; const std::string AQUDIMS::MXNAQC::itemName = "MXNAQC"; -const int AQUDIMS::MXNAQC::defaultValue = 1; const std::string AQUDIMS::NIFTBL::itemName = "NIFTBL"; -const int AQUDIMS::NIFTBL::defaultValue = 1; const std::string AQUDIMS::NRIFTB::itemName = "NRIFTB"; -const int AQUDIMS::NRIFTB::defaultValue = 36; const std::string AQUDIMS::NANAQU::itemName = "NANAQU"; -const int AQUDIMS::NANAQU::defaultValue = 1; const std::string AQUDIMS::NCAMAX::itemName = "NCAMAX"; -const int AQUDIMS::NCAMAX::defaultValue = 1; const std::string AQUDIMS::MXNALI::itemName = "MXNALI"; -const int AQUDIMS::MXNALI::defaultValue = 0; const std::string AQUDIMS::MXAAQL::itemName = "MXAAQL"; -const int AQUDIMS::MXAAQL::defaultValue = 0; AQUFET::AQUFET() : ParserKeyword("AQUFET", KeywordSize(SLASH_TERMINATED)) { @@ -1646,7 +1633,6 @@ const std::string AQUFET::LOWER_K::itemName = "LOWER_K"; const std::string AQUFET::UPPER_K::itemName = "UPPER_K"; const std::string AQUFET::FACE_INDX::itemName = "FACE_INDX"; const std::string AQUFET::SC_0::itemName = "SC_0"; -const double AQUFET::SC_0::defaultValue = 0; AQUFETP::AQUFETP() : ParserKeyword("AQUFETP", KeywordSize(SLASH_TERMINATED)) { @@ -1712,13 +1698,11 @@ const std::string AQUFETP::V0::itemName = "V0"; const std::string AQUFETP::C_T::itemName = "C_T"; const std::string AQUFETP::PI::itemName = "PI"; const std::string AQUFETP::TABLE_NUM_WATER_PRESS::itemName = "TABLE_NUM_WATER_PRESS"; -const int AQUFETP::TABLE_NUM_WATER_PRESS::defaultValue = 1; const std::string AQUFETP::SALINITY::itemName = "SALINITY"; -const double AQUFETP::SALINITY::defaultValue = 0; const std::string AQUFETP::TEMP::itemName = "TEMP"; -AQUFLUX::AQUFLUX() : ParserKeyword("AQUFLUX", KeywordSize("AQUDIMS", "NANAQU", false, 0)) { +AQUFLUX::AQUFLUX() : ParserKeyword("AQUFLUX", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SOLUTION"); addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -1730,8 +1714,8 @@ AQUFLUX::AQUFLUX() : ParserKeyword("AQUFLUX", KeywordSize("AQUDIMS", "NANAQU", f record.addItem(item); } { - ParserItem item("DAT_DEPTH", ParserItem::itype::DOUBLE); - item.push_backDimension("Length"); + ParserItem item("FLUX", ParserItem::itype::DOUBLE); + item.push_backDimension("LiquidSurfaceVolume/Time*Length*Length"); record.addItem(item); } { @@ -1755,9 +1739,8 @@ AQUFLUX::AQUFLUX() : ParserKeyword("AQUFLUX", KeywordSize("AQUDIMS", "NANAQU", f } const std::string AQUFLUX::keywordName = "AQUFLUX"; const std::string AQUFLUX::AQUIFER_ID::itemName = "AQUIFER_ID"; -const std::string AQUFLUX::DAT_DEPTH::itemName = "DAT_DEPTH"; +const std::string AQUFLUX::FLUX::itemName = "FLUX"; const std::string AQUFLUX::SC_0::itemName = "SC_0"; -const double AQUFLUX::SC_0::defaultValue = 0; const std::string AQUFLUX::TEMP::itemName = "TEMP"; const std::string AQUFLUX::PRESSURE::itemName = "PRESSURE"; @@ -1907,7 +1890,6 @@ const std::string AQUNNC::JX::itemName = "JX"; const std::string AQUNNC::JY::itemName = "JY"; const std::string AQUNNC::JZ::itemName = "JZ"; const std::string AQUNNC::TRAN::itemName = "TRAN"; -const double AQUNNC::TRAN::defaultValue = 0; const std::string AQUNNC::IST1::itemName = "IST1"; const std::string AQUNNC::IST2::itemName = "IST2"; const std::string AQUNNC::IPT1::itemName = "IPT1"; @@ -2103,13 +2085,9 @@ AUTOREF::AUTOREF() : ParserKeyword("AUTOREF", KeywordSize(SLASH_TERMINATED)) { } const std::string AUTOREF::keywordName = "AUTOREF"; const std::string AUTOREF::NX::itemName = "NX"; -const int AUTOREF::NX::defaultValue = 1; const std::string AUTOREF::NY::itemName = "NY"; -const int AUTOREF::NY::defaultValue = 1; const std::string AUTOREF::NZ::itemName = "NZ"; -const int AUTOREF::NZ::defaultValue = 1; const std::string AUTOREF::OPTION_TRANS_MULT::itemName = "OPTION_TRANS_MULT"; -const double AUTOREF::OPTION_TRANS_MULT::defaultValue = 0; } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/B.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/B.cpp index 5e25a580a3..d42fdcaa6b 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/B.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/B.cpp @@ -42,11 +42,11 @@ BC::BC() : ParserKeyword("BC", KeywordSize(SLASH_TERMINATED)) { record.addItem(item); } { - ParserItem item("TYPE", ParserItem::itype::STRING); + ParserItem item("DIRECTION", ParserItem::itype::STRING); record.addItem(item); } { - ParserItem item("DIRECTION", ParserItem::itype::STRING); + ParserItem item("TYPE", ParserItem::itype::STRING); record.addItem(item); } { @@ -60,6 +60,17 @@ BC::BC() : ParserKeyword("BC", KeywordSize(SLASH_TERMINATED)) { item.push_backDimension("Mass/Time*Length*Length"); record.addItem(item); } + { + ParserItem item("PRESSURE", ParserItem::itype::DOUBLE); + item.setDefault( double(1.000000) ); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("TEMPERATURE", ParserItem::itype::DOUBLE); + item.push_backDimension("Temperature"); + record.addItem(item); + } addRecord( record ); } } @@ -70,12 +81,181 @@ const std::string BC::J1::itemName = "J1"; const std::string BC::J2::itemName = "J2"; const std::string BC::K1::itemName = "K1"; const std::string BC::K2::itemName = "K2"; -const std::string BC::TYPE::itemName = "TYPE"; const std::string BC::DIRECTION::itemName = "DIRECTION"; +const std::string BC::TYPE::itemName = "TYPE"; const std::string BC::COMPONENT::itemName = "COMPONENT"; const std::string BC::COMPONENT::defaultValue = "NONE"; const std::string BC::RATE::itemName = "RATE"; -const double BC::RATE::defaultValue = 0; +const std::string BC::PRESSURE::itemName = "PRESSURE"; +const std::string BC::TEMPERATURE::itemName = "TEMPERATURE"; + + +BCCON::BCCON() : ParserKeyword("BCCON", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("BCCON"); + { + ParserRecord record; + { + ParserItem item("INDEX", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("I1", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("I2", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("J1", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("J2", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("K1", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("K2", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("DIRECTION", ParserItem::itype::STRING); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string BCCON::keywordName = "BCCON"; +const std::string BCCON::INDEX::itemName = "INDEX"; +const std::string BCCON::I1::itemName = "I1"; +const std::string BCCON::I2::itemName = "I2"; +const std::string BCCON::J1::itemName = "J1"; +const std::string BCCON::J2::itemName = "J2"; +const std::string BCCON::K1::itemName = "K1"; +const std::string BCCON::K2::itemName = "K2"; +const std::string BCCON::DIRECTION::itemName = "DIRECTION"; + + +BCPROP::BCPROP() : ParserKeyword("BCPROP", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("BCPROP"); + { + ParserRecord record; + { + ParserItem item("INDEX", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("TYPE", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("COMPONENT", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); + record.addItem(item); + } + { + ParserItem item("RATE", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Mass/Time*Length*Length"); + record.addItem(item); + } + { + ParserItem item("PRESSURE", ParserItem::itype::DOUBLE); + item.setDefault( double(1.000000) ); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("TEMPERATURE", ParserItem::itype::DOUBLE); + item.push_backDimension("Temperature"); + record.addItem(item); + } + { + ParserItem item("MECHTYPE", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); + record.addItem(item); + } + { + ParserItem item("FIXEDX", ParserItem::itype::INT); + item.setDefault( 1 ); + record.addItem(item); + } + { + ParserItem item("FIXEDY", ParserItem::itype::INT); + item.setDefault( 1 ); + record.addItem(item); + } + { + ParserItem item("FIXEDZ", ParserItem::itype::INT); + item.setDefault( 1 ); + record.addItem(item); + } + { + ParserItem item("STRESSXX", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("STRESSYY", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("STRESSZZ", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("DISPX", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("DISPY", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("DISPZ", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Length"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string BCPROP::keywordName = "BCPROP"; +const std::string BCPROP::INDEX::itemName = "INDEX"; +const std::string BCPROP::TYPE::itemName = "TYPE"; +const std::string BCPROP::COMPONENT::itemName = "COMPONENT"; +const std::string BCPROP::COMPONENT::defaultValue = "NONE"; +const std::string BCPROP::RATE::itemName = "RATE"; +const std::string BCPROP::PRESSURE::itemName = "PRESSURE"; +const std::string BCPROP::TEMPERATURE::itemName = "TEMPERATURE"; +const std::string BCPROP::MECHTYPE::itemName = "MECHTYPE"; +const std::string BCPROP::MECHTYPE::defaultValue = "NONE"; +const std::string BCPROP::FIXEDX::itemName = "FIXEDX"; +const std::string BCPROP::FIXEDY::itemName = "FIXEDY"; +const std::string BCPROP::FIXEDZ::itemName = "FIXEDZ"; +const std::string BCPROP::STRESSXX::itemName = "STRESSXX"; +const std::string BCPROP::STRESSYY::itemName = "STRESSYY"; +const std::string BCPROP::STRESSZZ::itemName = "STRESSZZ"; +const std::string BCPROP::DISPX::itemName = "DISPX"; +const std::string BCPROP::DISPY::itemName = "DISPY"; +const std::string BCPROP::DISPZ::itemName = "DISPZ"; BDENSITY::BDENSITY() : ParserKeyword("BDENSITY", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -122,6 +302,26 @@ const std::string BGGI::GAS_PRESSURE::itemName = "GAS_PRESSURE"; const std::string BGGI::DATA::itemName = "DATA"; +BIC::BIC() : ParserKeyword("BIC", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("BIC"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.setDefault( double(0) ); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string BIC::keywordName = "BIC"; +const std::string BIC::DATA::itemName = "DATA"; + + BIGMODEL::BIGMODEL() : ParserKeyword("BIGMODEL", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -130,6 +330,25 @@ BIGMODEL::BIGMODEL() : ParserKeyword("BIGMODEL", KeywordSize(0, false)) { const std::string BIGMODEL::keywordName = "BIGMODEL"; +BIOTCOEF::BIOTCOEF() : ParserKeyword("BIOTCOEF", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("BIOTCOEF"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string BIOTCOEF::keywordName = "BIOTCOEF"; +const std::string BIOTCOEF::data::itemName = "data"; + + BLACKOIL::BLACKOIL() : ParserKeyword("BLACKOIL", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -143,44 +362,46 @@ BLOCK_PROBE::BLOCK_PROBE() : ParserKeyword("BLOCK_PROBE", KeywordSize(SLASH_TERM clearDeckNames(); addDeckName("BVELWK"); addDeckName("BFLOOK"); - addDeckName("BSOIL"); addDeckName("BOSAT"); + addDeckName("BSOIL"); addDeckName("BGIP"); addDeckName("BVOIL"); addDeckName("BGKR"); addDeckName("BOIP"); addDeckName("BOIPL"); addDeckName("BGPR"); - addDeckName("BSCN_X"); addDeckName("BGIPG"); + addDeckName("BSCN_X"); addDeckName("BOVIS"); - addDeckName("BOIPG"); addDeckName("BWVIS"); + addDeckName("BOIPG"); addDeckName("BRSSAT"); addDeckName("BPPO"); addDeckName("BPDEW"); addDeckName("BDENO"); - addDeckName("BVELOJ"); + addDeckName("BFLOWJ"); addDeckName("BODEN"); + addDeckName("BVELOJ"); addDeckName("BVELWI"); addDeckName("BFLOOI"); addDeckName("BGDEN"); addDeckName("BVELWJ"); addDeckName("BFLOOJ"); addDeckName("BFLOWI"); - addDeckName("LBHDF_X"); addDeckName("BVELOI"); + addDeckName("LBHDF_X"); + addDeckName("BFLOWK"); addDeckName("BVELOK"); addDeckName("BPPC"); - addDeckName("BTRADCAT"); addDeckName("BFLOGK"); + addDeckName("BTRADCAT"); addDeckName("BWSAT"); - addDeckName("BSWAT"); addDeckName("BGSAT"); + addDeckName("BSWAT"); addDeckName("BPR"); addDeckName("BWIP"); - addDeckName("BEWV_SAL"); addDeckName("BPPW"); + addDeckName("BEWV_SAL"); addDeckName("BWKR"); addDeckName("BVWAT"); addDeckName("BDENW"); @@ -212,8 +433,8 @@ BLOCK_PROBE::BLOCK_PROBE() : ParserKeyword("BLOCK_PROBE", KeywordSize(SLASH_TERM addDeckName("BGPC"); addDeckName("BGTRP"); addDeckName("BGTPD"); - addDeckName("BOPV"); addDeckName("BGSHY"); + addDeckName("BOPV"); addDeckName("BGSTRP"); addDeckName("BWSHY"); addDeckName("BWSMA"); @@ -234,14 +455,14 @@ BLOCK_PROBE::BLOCK_PROBE() : ParserKeyword("BLOCK_PROBE", KeywordSize(SLASH_TERM addDeckName("BRTM"); addDeckName("BPORVMOD"); addDeckName("BPERMMOD"); - addDeckName("BSCN"); addDeckName("BAPI"); + addDeckName("BSCN"); addDeckName("BSIP"); addDeckName("BCAD"); addDeckName("BTCNFANI"); addDeckName("BTCNFCAT"); - addDeckName("BTCASUR"); addDeckName("BTSADCAT"); + addDeckName("BTCASUR"); addDeckName("BESALSUR"); addDeckName("BESALPLY"); addDeckName("BTCNFHEA"); @@ -259,8 +480,8 @@ BLOCK_PROBE::BLOCK_PROBE() : ParserKeyword("BLOCK_PROBE", KeywordSize(SLASH_TERM addDeckName("BNSAT"); addDeckName("BNIP"); addDeckName("BNKR"); - addDeckName("BTPADALK"); addDeckName("BTCNFSUR"); + addDeckName("BTPADALK"); addDeckName("BTIPTSUR"); addDeckName("BTADSUR"); addDeckName("BTSTSUR"); @@ -400,7 +621,6 @@ const std::string BOUNDARY::JY2::itemName = "JY2"; const std::string BOUNDARY::KZ1::itemName = "KZ1"; const std::string BOUNDARY::KZ2::itemName = "KZ2"; const std::string BOUNDARY::ORIENTATION_INDEX::itemName = "ORIENTATION_INDEX"; -const int BOUNDARY::ORIENTATION_INDEX::defaultValue = 1; const std::string BOUNDARY::DUAL_PORO_FLAG::itemName = "DUAL_PORO_FLAG"; const std::string BOUNDARY::DUAL_PORO_FLAG::defaultValue = "BOTH"; @@ -481,13 +701,17 @@ BPIDIMS::BPIDIMS() : ParserKeyword("BPIDIMS", KeywordSize(1, false)) { } const std::string BPIDIMS::keywordName = "BPIDIMS"; const std::string BPIDIMS::MXNBIP::itemName = "MXNBIP"; -const int BPIDIMS::MXNBIP::defaultValue = 10; const std::string BPIDIMS::MXNLBI::itemName = "MXNLBI"; -const int BPIDIMS::MXNLBI::defaultValue = 1; BRANPROP::BRANPROP() : ParserKeyword("BRANPROP", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); + setProhibitedKeywords({ + "GRUPNET", + }); + setRequiredKeywords({ + "NETWORK", + }); clearDeckNames(); addDeckName("BRANPROP"); { @@ -522,7 +746,6 @@ const std::string BRANPROP::DOWNTREE_NODE::itemName = "DOWNTREE_NODE"; const std::string BRANPROP::UPTREE_NODE::itemName = "UPTREE_NODE"; const std::string BRANPROP::VFP_TABLE::itemName = "VFP_TABLE"; const std::string BRANPROP::ALQ::itemName = "ALQ"; -const double BRANPROP::ALQ::defaultValue = 0; const std::string BRANPROP::ALQ_SURFACE_DENSITY::itemName = "ALQ_SURFACE_DENSITY"; const std::string BRANPROP::ALQ_SURFACE_DENSITY::defaultValue = "NONE"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinA.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinA.cpp new file mode 100644 index 0000000000..727822a9b1 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinA.cpp @@ -0,0 +1,111 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_ACF() { return ACF(); } +const ::Opm::ParserKeyword Builtin::get_ACTCO2S() { return ACTCO2S(); } +const ::Opm::ParserKeyword Builtin::get_ACTDIMS() { return ACTDIMS(); } +const ::Opm::ParserKeyword Builtin::get_ACTION() { return ACTION(); } +const ::Opm::ParserKeyword Builtin::get_ACTIONG() { return ACTIONG(); } +const ::Opm::ParserKeyword Builtin::get_ACTIONR() { return ACTIONR(); } +const ::Opm::ParserKeyword Builtin::get_ACTIONS() { return ACTIONS(); } +const ::Opm::ParserKeyword Builtin::get_ACTIONW() { return ACTIONW(); } +const ::Opm::ParserKeyword Builtin::get_ACTIONX() { return ACTIONX(); } +const ::Opm::ParserKeyword Builtin::get_ACTNUM() { return ACTNUM(); } +const ::Opm::ParserKeyword Builtin::get_ACTPARAM() { return ACTPARAM(); } +const ::Opm::ParserKeyword Builtin::get_ADD() { return ADD(); } +const ::Opm::ParserKeyword Builtin::get_ADDREG() { return ADDREG(); } +const ::Opm::ParserKeyword Builtin::get_ADDZCORN() { return ADDZCORN(); } +const ::Opm::ParserKeyword Builtin::get_ADSALNOD() { return ADSALNOD(); } +const ::Opm::ParserKeyword Builtin::get_ADSORP() { return ADSORP(); } +const ::Opm::ParserKeyword Builtin::get_AITS() { return AITS(); } +const ::Opm::ParserKeyword Builtin::get_AITSOFF() { return AITSOFF(); } +const ::Opm::ParserKeyword Builtin::get_ALKADS() { return ALKADS(); } +const ::Opm::ParserKeyword Builtin::get_ALKALINE() { return ALKALINE(); } +const ::Opm::ParserKeyword Builtin::get_ALKROCK() { return ALKROCK(); } +const ::Opm::ParserKeyword Builtin::get_ALL() { return ALL(); } +const ::Opm::ParserKeyword Builtin::get_ALPOLADS() { return ALPOLADS(); } +const ::Opm::ParserKeyword Builtin::get_ALSURFAD() { return ALSURFAD(); } +const ::Opm::ParserKeyword Builtin::get_ALSURFST() { return ALSURFST(); } +const ::Opm::ParserKeyword Builtin::get_AMALGAM() { return AMALGAM(); } +const ::Opm::ParserKeyword Builtin::get_API() { return API(); } +const ::Opm::ParserKeyword Builtin::get_APIGROUP() { return APIGROUP(); } +const ::Opm::ParserKeyword Builtin::get_APILIM() { return APILIM(); } +const ::Opm::ParserKeyword Builtin::get_APIVD() { return APIVD(); } +const ::Opm::ParserKeyword Builtin::get_AQANCONL() { return AQANCONL(); } +const ::Opm::ParserKeyword Builtin::get_AQANNC() { return AQANNC(); } +const ::Opm::ParserKeyword Builtin::get_AQANTRC() { return AQANTRC(); } +const ::Opm::ParserKeyword Builtin::get_AQUALIST() { return AQUALIST(); } +const ::Opm::ParserKeyword Builtin::get_AQUANCON() { return AQUANCON(); } +const ::Opm::ParserKeyword Builtin::get_AQUCHGAS() { return AQUCHGAS(); } +const ::Opm::ParserKeyword Builtin::get_AQUCHWAT() { return AQUCHWAT(); } +const ::Opm::ParserKeyword Builtin::get_AQUCON() { return AQUCON(); } +const ::Opm::ParserKeyword Builtin::get_AQUCT() { return AQUCT(); } +const ::Opm::ParserKeyword Builtin::get_AQUCWFAC() { return AQUCWFAC(); } +const ::Opm::ParserKeyword Builtin::get_AQUDIMS() { return AQUDIMS(); } +const ::Opm::ParserKeyword Builtin::get_AQUFET() { return AQUFET(); } +const ::Opm::ParserKeyword Builtin::get_AQUFETP() { return AQUFETP(); } +const ::Opm::ParserKeyword Builtin::get_AQUFLUX() { return AQUFLUX(); } +const ::Opm::ParserKeyword Builtin::get_AQUIFER_PROBE_ANALYTIC() { return AQUIFER_PROBE_ANALYTIC(); } +const ::Opm::ParserKeyword Builtin::get_AQUIFER_PROBE_ANALYTIC_NAMED() { return AQUIFER_PROBE_ANALYTIC_NAMED(); } +const ::Opm::ParserKeyword Builtin::get_AQUIFER_PROBE_NUMERIC() { return AQUIFER_PROBE_NUMERIC(); } +const ::Opm::ParserKeyword Builtin::get_AQUNNC() { return AQUNNC(); } +const ::Opm::ParserKeyword Builtin::get_AQUNUM() { return AQUNUM(); } +const ::Opm::ParserKeyword Builtin::get_AQUTAB() { return AQUTAB(); } +const ::Opm::ParserKeyword Builtin::get_AUTOCOAR() { return AUTOCOAR(); } +const ::Opm::ParserKeyword Builtin::get_AUTOREF() { return AUTOREF(); } + +void Builtin::emplaceA() const { + this->keywords.emplace("ACF", ACF()); + this->keywords.emplace("ACTCO2S", ACTCO2S()); + this->keywords.emplace("ACTDIMS", ACTDIMS()); + this->keywords.emplace("ACTION", ACTION()); + this->keywords.emplace("ACTIONG", ACTIONG()); + this->keywords.emplace("ACTIONR", ACTIONR()); + this->keywords.emplace("ACTIONS", ACTIONS()); + this->keywords.emplace("ACTIONW", ACTIONW()); + this->keywords.emplace("ACTIONX", ACTIONX()); + this->keywords.emplace("ACTNUM", ACTNUM()); + this->keywords.emplace("ACTPARAM", ACTPARAM()); + this->keywords.emplace("ADD", ADD()); + this->keywords.emplace("ADDREG", ADDREG()); + this->keywords.emplace("ADDZCORN", ADDZCORN()); + this->keywords.emplace("ADSALNOD", ADSALNOD()); + this->keywords.emplace("ADSORP", ADSORP()); + this->keywords.emplace("AITS", AITS()); + this->keywords.emplace("AITSOFF", AITSOFF()); + this->keywords.emplace("ALKADS", ALKADS()); + this->keywords.emplace("ALKALINE", ALKALINE()); + this->keywords.emplace("ALKROCK", ALKROCK()); + this->keywords.emplace("ALL", ALL()); + this->keywords.emplace("ALPOLADS", ALPOLADS()); + this->keywords.emplace("ALSURFAD", ALSURFAD()); + this->keywords.emplace("ALSURFST", ALSURFST()); + this->keywords.emplace("AMALGAM", AMALGAM()); + this->keywords.emplace("API", API()); + this->keywords.emplace("APIGROUP", APIGROUP()); + this->keywords.emplace("APILIM", APILIM()); + this->keywords.emplace("APIVD", APIVD()); + this->keywords.emplace("AQANCONL", AQANCONL()); + this->keywords.emplace("AQANNC", AQANNC()); + this->keywords.emplace("AQANTRC", AQANTRC()); + this->keywords.emplace("AQUALIST", AQUALIST()); + this->keywords.emplace("AQUANCON", AQUANCON()); + this->keywords.emplace("AQUCHGAS", AQUCHGAS()); + this->keywords.emplace("AQUCHWAT", AQUCHWAT()); + this->keywords.emplace("AQUCON", AQUCON()); + this->keywords.emplace("AQUCT", AQUCT()); + this->keywords.emplace("AQUCWFAC", AQUCWFAC()); + this->keywords.emplace("AQUDIMS", AQUDIMS()); + this->keywords.emplace("AQUFET", AQUFET()); + this->keywords.emplace("AQUFETP", AQUFETP()); + this->keywords.emplace("AQUFLUX", AQUFLUX()); + this->keywords.emplace("AQUIFER_PROBE_ANALYTIC", AQUIFER_PROBE_ANALYTIC()); + this->keywords.emplace("AQUIFER_PROBE_ANALYTIC_NAMED", AQUIFER_PROBE_ANALYTIC_NAMED()); + this->keywords.emplace("AQUIFER_PROBE_NUMERIC", AQUIFER_PROBE_NUMERIC()); + this->keywords.emplace("AQUNNC", AQUNNC()); + this->keywords.emplace("AQUNUM", AQUNUM()); + this->keywords.emplace("AQUTAB", AQUTAB()); + this->keywords.emplace("AUTOCOAR", AUTOCOAR()); + this->keywords.emplace("AUTOREF", AUTOREF()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinB.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinB.cpp new file mode 100644 index 0000000000..adfec4728f --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinB.cpp @@ -0,0 +1,47 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_BC() { return BC(); } +const ::Opm::ParserKeyword Builtin::get_BCCON() { return BCCON(); } +const ::Opm::ParserKeyword Builtin::get_BCPROP() { return BCPROP(); } +const ::Opm::ParserKeyword Builtin::get_BDENSITY() { return BDENSITY(); } +const ::Opm::ParserKeyword Builtin::get_BGGI() { return BGGI(); } +const ::Opm::ParserKeyword Builtin::get_BIC() { return BIC(); } +const ::Opm::ParserKeyword Builtin::get_BIGMODEL() { return BIGMODEL(); } +const ::Opm::ParserKeyword Builtin::get_BIOTCOEF() { return BIOTCOEF(); } +const ::Opm::ParserKeyword Builtin::get_BLACKOIL() { return BLACKOIL(); } +const ::Opm::ParserKeyword Builtin::get_BLOCK_PROBE() { return BLOCK_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_BLOCK_PROBE300() { return BLOCK_PROBE300(); } +const ::Opm::ParserKeyword Builtin::get_BOGI() { return BOGI(); } +const ::Opm::ParserKeyword Builtin::get_BOUNDARY() { return BOUNDARY(); } +const ::Opm::ParserKeyword Builtin::get_BOX() { return BOX(); } +const ::Opm::ParserKeyword Builtin::get_BPARA() { return BPARA(); } +const ::Opm::ParserKeyword Builtin::get_BPIDIMS() { return BPIDIMS(); } +const ::Opm::ParserKeyword Builtin::get_BRANPROP() { return BRANPROP(); } +const ::Opm::ParserKeyword Builtin::get_BRINE() { return BRINE(); } +const ::Opm::ParserKeyword Builtin::get_BTOBALFA() { return BTOBALFA(); } +const ::Opm::ParserKeyword Builtin::get_BTOBALFV() { return BTOBALFV(); } + +void Builtin::emplaceB() const { + this->keywords.emplace("BC", BC()); + this->keywords.emplace("BCCON", BCCON()); + this->keywords.emplace("BCPROP", BCPROP()); + this->keywords.emplace("BDENSITY", BDENSITY()); + this->keywords.emplace("BGGI", BGGI()); + this->keywords.emplace("BIC", BIC()); + this->keywords.emplace("BIGMODEL", BIGMODEL()); + this->keywords.emplace("BIOTCOEF", BIOTCOEF()); + this->keywords.emplace("BLACKOIL", BLACKOIL()); + this->keywords.emplace("BLOCK_PROBE", BLOCK_PROBE()); + this->keywords.emplace("BLOCK_PROBE300", BLOCK_PROBE300()); + this->keywords.emplace("BOGI", BOGI()); + this->keywords.emplace("BOUNDARY", BOUNDARY()); + this->keywords.emplace("BOX", BOX()); + this->keywords.emplace("BPARA", BPARA()); + this->keywords.emplace("BPIDIMS", BPIDIMS()); + this->keywords.emplace("BRANPROP", BRANPROP()); + this->keywords.emplace("BRINE", BRINE()); + this->keywords.emplace("BTOBALFA", BTOBALFA()); + this->keywords.emplace("BTOBALFV", BTOBALFV()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinC.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinC.cpp new file mode 100644 index 0000000000..6c2a1cd0c3 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinC.cpp @@ -0,0 +1,109 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_CALTRAC() { return CALTRAC(); } +const ::Opm::ParserKeyword Builtin::get_CARFIN() { return CARFIN(); } +const ::Opm::ParserKeyword Builtin::get_CART() { return CART(); } +const ::Opm::ParserKeyword Builtin::get_CBMOPTS() { return CBMOPTS(); } +const ::Opm::ParserKeyword Builtin::get_CECON() { return CECON(); } +const ::Opm::ParserKeyword Builtin::get_CECONT() { return CECONT(); } +const ::Opm::ParserKeyword Builtin::get_CIRCLE() { return CIRCLE(); } +const ::Opm::ParserKeyword Builtin::get_CNAMES() { return CNAMES(); } +const ::Opm::ParserKeyword Builtin::get_CO2SOL() { return CO2SOL(); } +const ::Opm::ParserKeyword Builtin::get_CO2STOR() { return CO2STOR(); } +const ::Opm::ParserKeyword Builtin::get_CO2STORE() { return CO2STORE(); } +const ::Opm::ParserKeyword Builtin::get_COAL() { return COAL(); } +const ::Opm::ParserKeyword Builtin::get_COALADS() { return COALADS(); } +const ::Opm::ParserKeyword Builtin::get_COALNUM() { return COALNUM(); } +const ::Opm::ParserKeyword Builtin::get_COALPP() { return COALPP(); } +const ::Opm::ParserKeyword Builtin::get_COARSEN() { return COARSEN(); } +const ::Opm::ParserKeyword Builtin::get_COLLAPSE() { return COLLAPSE(); } +const ::Opm::ParserKeyword Builtin::get_COLUMNS() { return COLUMNS(); } +const ::Opm::ParserKeyword Builtin::get_COMPDAT() { return COMPDAT(); } +const ::Opm::ParserKeyword Builtin::get_COMPDATX() { return COMPDATX(); } +const ::Opm::ParserKeyword Builtin::get_COMPFLSH() { return COMPFLSH(); } +const ::Opm::ParserKeyword Builtin::get_COMPIMB() { return COMPIMB(); } +const ::Opm::ParserKeyword Builtin::get_COMPINJK() { return COMPINJK(); } +const ::Opm::ParserKeyword Builtin::get_COMPLMPL() { return COMPLMPL(); } +const ::Opm::ParserKeyword Builtin::get_COMPLUMP() { return COMPLUMP(); } +const ::Opm::ParserKeyword Builtin::get_COMPOFF() { return COMPOFF(); } +const ::Opm::ParserKeyword Builtin::get_COMPORD() { return COMPORD(); } +const ::Opm::ParserKeyword Builtin::get_COMPRIV() { return COMPRIV(); } +const ::Opm::ParserKeyword Builtin::get_COMPRP() { return COMPRP(); } +const ::Opm::ParserKeyword Builtin::get_COMPRPL() { return COMPRPL(); } +const ::Opm::ParserKeyword Builtin::get_COMPS() { return COMPS(); } +const ::Opm::ParserKeyword Builtin::get_COMPSEGL() { return COMPSEGL(); } +const ::Opm::ParserKeyword Builtin::get_COMPSEGS() { return COMPSEGS(); } +const ::Opm::ParserKeyword Builtin::get_COMPTRAJ() { return COMPTRAJ(); } +const ::Opm::ParserKeyword Builtin::get_COMPVE() { return COMPVE(); } +const ::Opm::ParserKeyword Builtin::get_COMPVEL() { return COMPVEL(); } +const ::Opm::ParserKeyword Builtin::get_CONNECTION_PROBE() { return CONNECTION_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_CONNECTION_PROBE_OPM() { return CONNECTION_PROBE_OPM(); } +const ::Opm::ParserKeyword Builtin::get_COORD() { return COORD(); } +const ::Opm::ParserKeyword Builtin::get_COORDSYS() { return COORDSYS(); } +const ::Opm::ParserKeyword Builtin::get_COPY() { return COPY(); } +const ::Opm::ParserKeyword Builtin::get_COPYBOX() { return COPYBOX(); } +const ::Opm::ParserKeyword Builtin::get_COPYREG() { return COPYREG(); } +const ::Opm::ParserKeyword Builtin::get_CPIFACT() { return CPIFACT(); } +const ::Opm::ParserKeyword Builtin::get_CPIFACTL() { return CPIFACTL(); } +const ::Opm::ParserKeyword Builtin::get_CPR() { return CPR(); } +const ::Opm::ParserKeyword Builtin::get_CREF() { return CREF(); } +const ::Opm::ParserKeyword Builtin::get_CREFW() { return CREFW(); } +const ::Opm::ParserKeyword Builtin::get_CREFWS() { return CREFWS(); } +const ::Opm::ParserKeyword Builtin::get_CRITPERM() { return CRITPERM(); } +const ::Opm::ParserKeyword Builtin::get_CSKIN() { return CSKIN(); } + +void Builtin::emplaceC() const { + this->keywords.emplace("CALTRAC", CALTRAC()); + this->keywords.emplace("CARFIN", CARFIN()); + this->keywords.emplace("CART", CART()); + this->keywords.emplace("CBMOPTS", CBMOPTS()); + this->keywords.emplace("CECON", CECON()); + this->keywords.emplace("CECONT", CECONT()); + this->keywords.emplace("CIRCLE", CIRCLE()); + this->keywords.emplace("CNAMES", CNAMES()); + this->keywords.emplace("CO2SOL", CO2SOL()); + this->keywords.emplace("CO2STOR", CO2STOR()); + this->keywords.emplace("CO2STORE", CO2STORE()); + this->keywords.emplace("COAL", COAL()); + this->keywords.emplace("COALADS", COALADS()); + this->keywords.emplace("COALNUM", COALNUM()); + this->keywords.emplace("COALPP", COALPP()); + this->keywords.emplace("COARSEN", COARSEN()); + this->keywords.emplace("COLLAPSE", COLLAPSE()); + this->keywords.emplace("COLUMNS", COLUMNS()); + this->keywords.emplace("COMPDAT", COMPDAT()); + this->keywords.emplace("COMPDATX", COMPDATX()); + this->keywords.emplace("COMPFLSH", COMPFLSH()); + this->keywords.emplace("COMPIMB", COMPIMB()); + this->keywords.emplace("COMPINJK", COMPINJK()); + this->keywords.emplace("COMPLMPL", COMPLMPL()); + this->keywords.emplace("COMPLUMP", COMPLUMP()); + this->keywords.emplace("COMPOFF", COMPOFF()); + this->keywords.emplace("COMPORD", COMPORD()); + this->keywords.emplace("COMPRIV", COMPRIV()); + this->keywords.emplace("COMPRP", COMPRP()); + this->keywords.emplace("COMPRPL", COMPRPL()); + this->keywords.emplace("COMPS", COMPS()); + this->keywords.emplace("COMPSEGL", COMPSEGL()); + this->keywords.emplace("COMPSEGS", COMPSEGS()); + this->keywords.emplace("COMPTRAJ", COMPTRAJ()); + this->keywords.emplace("COMPVE", COMPVE()); + this->keywords.emplace("COMPVEL", COMPVEL()); + this->keywords.emplace("CONNECTION_PROBE", CONNECTION_PROBE()); + this->keywords.emplace("CONNECTION_PROBE_OPM", CONNECTION_PROBE_OPM()); + this->keywords.emplace("COORD", COORD()); + this->keywords.emplace("COORDSYS", COORDSYS()); + this->keywords.emplace("COPY", COPY()); + this->keywords.emplace("COPYBOX", COPYBOX()); + this->keywords.emplace("COPYREG", COPYREG()); + this->keywords.emplace("CPIFACT", CPIFACT()); + this->keywords.emplace("CPIFACTL", CPIFACTL()); + this->keywords.emplace("CPR", CPR()); + this->keywords.emplace("CREF", CREF()); + this->keywords.emplace("CREFW", CREFW()); + this->keywords.emplace("CREFWS", CREFWS()); + this->keywords.emplace("CRITPERM", CRITPERM()); + this->keywords.emplace("CSKIN", CSKIN()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinD.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinD.cpp new file mode 100644 index 0000000000..1dabd0d9ec --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinD.cpp @@ -0,0 +1,157 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_DATE() { return DATE(); } +const ::Opm::ParserKeyword Builtin::get_DATES() { return DATES(); } +const ::Opm::ParserKeyword Builtin::get_DATUM() { return DATUM(); } +const ::Opm::ParserKeyword Builtin::get_DATUMR() { return DATUMR(); } +const ::Opm::ParserKeyword Builtin::get_DATUMRX() { return DATUMRX(); } +const ::Opm::ParserKeyword Builtin::get_DCQDEFN() { return DCQDEFN(); } +const ::Opm::ParserKeyword Builtin::get_DEBUG_() { return DEBUG_(); } +const ::Opm::ParserKeyword Builtin::get_DELAYACT() { return DELAYACT(); } +const ::Opm::ParserKeyword Builtin::get_DENAQA() { return DENAQA(); } +const ::Opm::ParserKeyword Builtin::get_DENSITY() { return DENSITY(); } +const ::Opm::ParserKeyword Builtin::get_DEPTH() { return DEPTH(); } +const ::Opm::ParserKeyword Builtin::get_DEPTHTAB() { return DEPTHTAB(); } +const ::Opm::ParserKeyword Builtin::get_DEPTHZ() { return DEPTHZ(); } +const ::Opm::ParserKeyword Builtin::get_DIAGDISP() { return DIAGDISP(); } +const ::Opm::ParserKeyword Builtin::get_DIFF() { return DIFF(); } +const ::Opm::ParserKeyword Builtin::get_DIFFAGAS() { return DIFFAGAS(); } +const ::Opm::ParserKeyword Builtin::get_DIFFAWAT() { return DIFFAWAT(); } +const ::Opm::ParserKeyword Builtin::get_DIFFC() { return DIFFC(); } +const ::Opm::ParserKeyword Builtin::get_DIFFCGAS() { return DIFFCGAS(); } +const ::Opm::ParserKeyword Builtin::get_DIFFCOAL() { return DIFFCOAL(); } +const ::Opm::ParserKeyword Builtin::get_DIFFCWAT() { return DIFFCWAT(); } +const ::Opm::ParserKeyword Builtin::get_DIFFDP() { return DIFFDP(); } +const ::Opm::ParserKeyword Builtin::get_DIFFMMF() { return DIFFMMF(); } +const ::Opm::ParserKeyword Builtin::get_DIFFMR() { return DIFFMR(); } +const ::Opm::ParserKeyword Builtin::get_DIFFMTHT() { return DIFFMTHT(); } +const ::Opm::ParserKeyword Builtin::get_DIFFMX() { return DIFFMX(); } +const ::Opm::ParserKeyword Builtin::get_DIFFMY() { return DIFFMY(); } +const ::Opm::ParserKeyword Builtin::get_DIFFMZ() { return DIFFMZ(); } +const ::Opm::ParserKeyword Builtin::get_DIFFR() { return DIFFR(); } +const ::Opm::ParserKeyword Builtin::get_DIFFTHT() { return DIFFTHT(); } +const ::Opm::ParserKeyword Builtin::get_DIFFUSE() { return DIFFUSE(); } +const ::Opm::ParserKeyword Builtin::get_DIFFX() { return DIFFX(); } +const ::Opm::ParserKeyword Builtin::get_DIFFY() { return DIFFY(); } +const ::Opm::ParserKeyword Builtin::get_DIFFZ() { return DIFFZ(); } +const ::Opm::ParserKeyword Builtin::get_DIMENS() { return DIMENS(); } +const ::Opm::ParserKeyword Builtin::get_DIMPES() { return DIMPES(); } +const ::Opm::ParserKeyword Builtin::get_DIMPLICT() { return DIMPLICT(); } +const ::Opm::ParserKeyword Builtin::get_DISGAS() { return DISGAS(); } +const ::Opm::ParserKeyword Builtin::get_DISGASW() { return DISGASW(); } +const ::Opm::ParserKeyword Builtin::get_DISPDIMS() { return DISPDIMS(); } +const ::Opm::ParserKeyword Builtin::get_DISPERC() { return DISPERC(); } +const ::Opm::ParserKeyword Builtin::get_DISPERSE() { return DISPERSE(); } +const ::Opm::ParserKeyword Builtin::get_DOMAINS() { return DOMAINS(); } +const ::Opm::ParserKeyword Builtin::get_DPGRID() { return DPGRID(); } +const ::Opm::ParserKeyword Builtin::get_DPKRMOD() { return DPKRMOD(); } +const ::Opm::ParserKeyword Builtin::get_DPNUM() { return DPNUM(); } +const ::Opm::ParserKeyword Builtin::get_DR() { return DR(); } +const ::Opm::ParserKeyword Builtin::get_DREF() { return DREF(); } +const ::Opm::ParserKeyword Builtin::get_DREFS() { return DREFS(); } +const ::Opm::ParserKeyword Builtin::get_DRILPRI() { return DRILPRI(); } +const ::Opm::ParserKeyword Builtin::get_DRSDT() { return DRSDT(); } +const ::Opm::ParserKeyword Builtin::get_DRSDTCON() { return DRSDTCON(); } +const ::Opm::ParserKeyword Builtin::get_DRSDTR() { return DRSDTR(); } +const ::Opm::ParserKeyword Builtin::get_DRV() { return DRV(); } +const ::Opm::ParserKeyword Builtin::get_DRVDT() { return DRVDT(); } +const ::Opm::ParserKeyword Builtin::get_DRVDTR() { return DRVDTR(); } +const ::Opm::ParserKeyword Builtin::get_DSPDEINT() { return DSPDEINT(); } +const ::Opm::ParserKeyword Builtin::get_DTHETA() { return DTHETA(); } +const ::Opm::ParserKeyword Builtin::get_DTHETAV() { return DTHETAV(); } +const ::Opm::ParserKeyword Builtin::get_DUALPERM() { return DUALPERM(); } +const ::Opm::ParserKeyword Builtin::get_DUALPORO() { return DUALPORO(); } +const ::Opm::ParserKeyword Builtin::get_DUMPCUPL() { return DUMPCUPL(); } +const ::Opm::ParserKeyword Builtin::get_DUMPFLUX() { return DUMPFLUX(); } +const ::Opm::ParserKeyword Builtin::get_DX() { return DX(); } +const ::Opm::ParserKeyword Builtin::get_DXV() { return DXV(); } +const ::Opm::ParserKeyword Builtin::get_DY() { return DY(); } +const ::Opm::ParserKeyword Builtin::get_DYNAMICR() { return DYNAMICR(); } +const ::Opm::ParserKeyword Builtin::get_DYNRDIMS() { return DYNRDIMS(); } +const ::Opm::ParserKeyword Builtin::get_DYV() { return DYV(); } +const ::Opm::ParserKeyword Builtin::get_DZ() { return DZ(); } +const ::Opm::ParserKeyword Builtin::get_DZMATRIX() { return DZMATRIX(); } +const ::Opm::ParserKeyword Builtin::get_DZMTRX() { return DZMTRX(); } +const ::Opm::ParserKeyword Builtin::get_DZMTRXV() { return DZMTRXV(); } +const ::Opm::ParserKeyword Builtin::get_DZNET() { return DZNET(); } +const ::Opm::ParserKeyword Builtin::get_DZV() { return DZV(); } + +void Builtin::emplaceD() const { + this->keywords.emplace("DATE", DATE()); + this->keywords.emplace("DATES", DATES()); + this->keywords.emplace("DATUM", DATUM()); + this->keywords.emplace("DATUMR", DATUMR()); + this->keywords.emplace("DATUMRX", DATUMRX()); + this->keywords.emplace("DCQDEFN", DCQDEFN()); + this->keywords.emplace("DEBUG_", DEBUG_()); + this->keywords.emplace("DELAYACT", DELAYACT()); + this->keywords.emplace("DENAQA", DENAQA()); + this->keywords.emplace("DENSITY", DENSITY()); + this->keywords.emplace("DEPTH", DEPTH()); + this->keywords.emplace("DEPTHTAB", DEPTHTAB()); + this->keywords.emplace("DEPTHZ", DEPTHZ()); + this->keywords.emplace("DIAGDISP", DIAGDISP()); + this->keywords.emplace("DIFF", DIFF()); + this->keywords.emplace("DIFFAGAS", DIFFAGAS()); + this->keywords.emplace("DIFFAWAT", DIFFAWAT()); + this->keywords.emplace("DIFFC", DIFFC()); + this->keywords.emplace("DIFFCGAS", DIFFCGAS()); + this->keywords.emplace("DIFFCOAL", DIFFCOAL()); + this->keywords.emplace("DIFFCWAT", DIFFCWAT()); + this->keywords.emplace("DIFFDP", DIFFDP()); + this->keywords.emplace("DIFFMMF", DIFFMMF()); + this->keywords.emplace("DIFFMR", DIFFMR()); + this->keywords.emplace("DIFFMTHT", DIFFMTHT()); + this->keywords.emplace("DIFFMX", DIFFMX()); + this->keywords.emplace("DIFFMY", DIFFMY()); + this->keywords.emplace("DIFFMZ", DIFFMZ()); + this->keywords.emplace("DIFFR", DIFFR()); + this->keywords.emplace("DIFFTHT", DIFFTHT()); + this->keywords.emplace("DIFFUSE", DIFFUSE()); + this->keywords.emplace("DIFFX", DIFFX()); + this->keywords.emplace("DIFFY", DIFFY()); + this->keywords.emplace("DIFFZ", DIFFZ()); + this->keywords.emplace("DIMENS", DIMENS()); + this->keywords.emplace("DIMPES", DIMPES()); + this->keywords.emplace("DIMPLICT", DIMPLICT()); + this->keywords.emplace("DISGAS", DISGAS()); + this->keywords.emplace("DISGASW", DISGASW()); + this->keywords.emplace("DISPDIMS", DISPDIMS()); + this->keywords.emplace("DISPERC", DISPERC()); + this->keywords.emplace("DISPERSE", DISPERSE()); + this->keywords.emplace("DOMAINS", DOMAINS()); + this->keywords.emplace("DPGRID", DPGRID()); + this->keywords.emplace("DPKRMOD", DPKRMOD()); + this->keywords.emplace("DPNUM", DPNUM()); + this->keywords.emplace("DR", DR()); + this->keywords.emplace("DREF", DREF()); + this->keywords.emplace("DREFS", DREFS()); + this->keywords.emplace("DRILPRI", DRILPRI()); + this->keywords.emplace("DRSDT", DRSDT()); + this->keywords.emplace("DRSDTCON", DRSDTCON()); + this->keywords.emplace("DRSDTR", DRSDTR()); + this->keywords.emplace("DRV", DRV()); + this->keywords.emplace("DRVDT", DRVDT()); + this->keywords.emplace("DRVDTR", DRVDTR()); + this->keywords.emplace("DSPDEINT", DSPDEINT()); + this->keywords.emplace("DTHETA", DTHETA()); + this->keywords.emplace("DTHETAV", DTHETAV()); + this->keywords.emplace("DUALPERM", DUALPERM()); + this->keywords.emplace("DUALPORO", DUALPORO()); + this->keywords.emplace("DUMPCUPL", DUMPCUPL()); + this->keywords.emplace("DUMPFLUX", DUMPFLUX()); + this->keywords.emplace("DX", DX()); + this->keywords.emplace("DXV", DXV()); + this->keywords.emplace("DY", DY()); + this->keywords.emplace("DYNAMICR", DYNAMICR()); + this->keywords.emplace("DYNRDIMS", DYNRDIMS()); + this->keywords.emplace("DYV", DYV()); + this->keywords.emplace("DZ", DZ()); + this->keywords.emplace("DZMATRIX", DZMATRIX()); + this->keywords.emplace("DZMTRX", DZMTRX()); + this->keywords.emplace("DZMTRXV", DZMTRXV()); + this->keywords.emplace("DZNET", DZNET()); + this->keywords.emplace("DZV", DZV()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinE.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinE.cpp new file mode 100644 index 0000000000..e6ee50253b --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinE.cpp @@ -0,0 +1,87 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_ECHO() { return ECHO(); } +const ::Opm::ParserKeyword Builtin::get_ECLMC() { return ECLMC(); } +const ::Opm::ParserKeyword Builtin::get_EDIT() { return EDIT(); } +const ::Opm::ParserKeyword Builtin::get_EDITNNC() { return EDITNNC(); } +const ::Opm::ParserKeyword Builtin::get_EDITNNCR() { return EDITNNCR(); } +const ::Opm::ParserKeyword Builtin::get_EHYSTR() { return EHYSTR(); } +const ::Opm::ParserKeyword Builtin::get_EHYSTRR() { return EHYSTRR(); } +const ::Opm::ParserKeyword Builtin::get_END() { return END(); } +const ::Opm::ParserKeyword Builtin::get_ENDACTIO() { return ENDACTIO(); } +const ::Opm::ParserKeyword Builtin::get_ENDBOX() { return ENDBOX(); } +const ::Opm::ParserKeyword Builtin::get_ENDDYN() { return ENDDYN(); } +const ::Opm::ParserKeyword Builtin::get_ENDFIN() { return ENDFIN(); } +const ::Opm::ParserKeyword Builtin::get_ENDINC() { return ENDINC(); } +const ::Opm::ParserKeyword Builtin::get_ENDNUM() { return ENDNUM(); } +const ::Opm::ParserKeyword Builtin::get_ENDPOINT_SPECIFIERS() { return ENDPOINT_SPECIFIERS(); } +const ::Opm::ParserKeyword Builtin::get_ENDSCALE() { return ENDSCALE(); } +const ::Opm::ParserKeyword Builtin::get_ENDSKIP() { return ENDSKIP(); } +const ::Opm::ParserKeyword Builtin::get_ENKRVD() { return ENKRVD(); } +const ::Opm::ParserKeyword Builtin::get_ENPCVD() { return ENPCVD(); } +const ::Opm::ParserKeyword Builtin::get_ENPTVD() { return ENPTVD(); } +const ::Opm::ParserKeyword Builtin::get_ENSPCVD() { return ENSPCVD(); } +const ::Opm::ParserKeyword Builtin::get_EOS() { return EOS(); } +const ::Opm::ParserKeyword Builtin::get_EOSNUM() { return EOSNUM(); } +const ::Opm::ParserKeyword Builtin::get_EPSDBGS() { return EPSDBGS(); } +const ::Opm::ParserKeyword Builtin::get_EPSDEBUG() { return EPSDEBUG(); } +const ::Opm::ParserKeyword Builtin::get_EQLDIMS() { return EQLDIMS(); } +const ::Opm::ParserKeyword Builtin::get_EQLNUM() { return EQLNUM(); } +const ::Opm::ParserKeyword Builtin::get_EQLOPTS() { return EQLOPTS(); } +const ::Opm::ParserKeyword Builtin::get_EQLZCORN() { return EQLZCORN(); } +const ::Opm::ParserKeyword Builtin::get_EQUALREG() { return EQUALREG(); } +const ::Opm::ParserKeyword Builtin::get_EQUALS() { return EQUALS(); } +const ::Opm::ParserKeyword Builtin::get_EQUIL() { return EQUIL(); } +const ::Opm::ParserKeyword Builtin::get_ESSNODE() { return ESSNODE(); } +const ::Opm::ParserKeyword Builtin::get_EXCAVATE() { return EXCAVATE(); } +const ::Opm::ParserKeyword Builtin::get_EXCEL() { return EXCEL(); } +const ::Opm::ParserKeyword Builtin::get_EXIT() { return EXIT(); } +const ::Opm::ParserKeyword Builtin::get_EXTFIN() { return EXTFIN(); } +const ::Opm::ParserKeyword Builtin::get_EXTHOST() { return EXTHOST(); } +const ::Opm::ParserKeyword Builtin::get_EXTRAPMS() { return EXTRAPMS(); } +const ::Opm::ParserKeyword Builtin::get_EXTREPGL() { return EXTREPGL(); } + +void Builtin::emplaceE() const { + this->keywords.emplace("ECHO", ECHO()); + this->keywords.emplace("ECLMC", ECLMC()); + this->keywords.emplace("EDIT", EDIT()); + this->keywords.emplace("EDITNNC", EDITNNC()); + this->keywords.emplace("EDITNNCR", EDITNNCR()); + this->keywords.emplace("EHYSTR", EHYSTR()); + this->keywords.emplace("EHYSTRR", EHYSTRR()); + this->keywords.emplace("END", END()); + this->keywords.emplace("ENDACTIO", ENDACTIO()); + this->keywords.emplace("ENDBOX", ENDBOX()); + this->keywords.emplace("ENDDYN", ENDDYN()); + this->keywords.emplace("ENDFIN", ENDFIN()); + this->keywords.emplace("ENDINC", ENDINC()); + this->keywords.emplace("ENDNUM", ENDNUM()); + this->keywords.emplace("ENDPOINT_SPECIFIERS", ENDPOINT_SPECIFIERS()); + this->keywords.emplace("ENDSCALE", ENDSCALE()); + this->keywords.emplace("ENDSKIP", ENDSKIP()); + this->keywords.emplace("ENKRVD", ENKRVD()); + this->keywords.emplace("ENPCVD", ENPCVD()); + this->keywords.emplace("ENPTVD", ENPTVD()); + this->keywords.emplace("ENSPCVD", ENSPCVD()); + this->keywords.emplace("EOS", EOS()); + this->keywords.emplace("EOSNUM", EOSNUM()); + this->keywords.emplace("EPSDBGS", EPSDBGS()); + this->keywords.emplace("EPSDEBUG", EPSDEBUG()); + this->keywords.emplace("EQLDIMS", EQLDIMS()); + this->keywords.emplace("EQLNUM", EQLNUM()); + this->keywords.emplace("EQLOPTS", EQLOPTS()); + this->keywords.emplace("EQLZCORN", EQLZCORN()); + this->keywords.emplace("EQUALREG", EQUALREG()); + this->keywords.emplace("EQUALS", EQUALS()); + this->keywords.emplace("EQUIL", EQUIL()); + this->keywords.emplace("ESSNODE", ESSNODE()); + this->keywords.emplace("EXCAVATE", EXCAVATE()); + this->keywords.emplace("EXCEL", EXCEL()); + this->keywords.emplace("EXIT", EXIT()); + this->keywords.emplace("EXTFIN", EXTFIN()); + this->keywords.emplace("EXTHOST", EXTHOST()); + this->keywords.emplace("EXTRAPMS", EXTRAPMS()); + this->keywords.emplace("EXTREPGL", EXTREPGL()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinF.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinF.cpp new file mode 100644 index 0000000000..06e216775b --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinF.cpp @@ -0,0 +1,85 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_FAULTDIM() { return FAULTDIM(); } +const ::Opm::ParserKeyword Builtin::get_FAULTS() { return FAULTS(); } +const ::Opm::ParserKeyword Builtin::get_FBHPDEF() { return FBHPDEF(); } +const ::Opm::ParserKeyword Builtin::get_FHERCHBL() { return FHERCHBL(); } +const ::Opm::ParserKeyword Builtin::get_FIELD() { return FIELD(); } +const ::Opm::ParserKeyword Builtin::get_FIELDSEP() { return FIELDSEP(); } +const ::Opm::ParserKeyword Builtin::get_FIELD_PROBE() { return FIELD_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_FIELD_PROBE_OPM() { return FIELD_PROBE_OPM(); } +const ::Opm::ParserKeyword Builtin::get_FILEUNIT() { return FILEUNIT(); } +const ::Opm::ParserKeyword Builtin::get_FILLEPS() { return FILLEPS(); } +const ::Opm::ParserKeyword Builtin::get_FIPNUM() { return FIPNUM(); } +const ::Opm::ParserKeyword Builtin::get_FIPOWG() { return FIPOWG(); } +const ::Opm::ParserKeyword Builtin::get_FIPSEP() { return FIPSEP(); } +const ::Opm::ParserKeyword Builtin::get_FIP_PROBE() { return FIP_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_FLUXNUM() { return FLUXNUM(); } +const ::Opm::ParserKeyword Builtin::get_FLUXREG() { return FLUXREG(); } +const ::Opm::ParserKeyword Builtin::get_FLUXTYPE() { return FLUXTYPE(); } +const ::Opm::ParserKeyword Builtin::get_FMTHMD() { return FMTHMD(); } +const ::Opm::ParserKeyword Builtin::get_FMTIN() { return FMTIN(); } +const ::Opm::ParserKeyword Builtin::get_FMTOUT() { return FMTOUT(); } +const ::Opm::ParserKeyword Builtin::get_FMWSET() { return FMWSET(); } +const ::Opm::ParserKeyword Builtin::get_FOAM() { return FOAM(); } +const ::Opm::ParserKeyword Builtin::get_FOAMADS() { return FOAMADS(); } +const ::Opm::ParserKeyword Builtin::get_FOAMDCYO() { return FOAMDCYO(); } +const ::Opm::ParserKeyword Builtin::get_FOAMDCYW() { return FOAMDCYW(); } +const ::Opm::ParserKeyword Builtin::get_FOAMFCN() { return FOAMFCN(); } +const ::Opm::ParserKeyword Builtin::get_FOAMFRM() { return FOAMFRM(); } +const ::Opm::ParserKeyword Builtin::get_FOAMFSC() { return FOAMFSC(); } +const ::Opm::ParserKeyword Builtin::get_FOAMFSO() { return FOAMFSO(); } +const ::Opm::ParserKeyword Builtin::get_FOAMFST() { return FOAMFST(); } +const ::Opm::ParserKeyword Builtin::get_FOAMFSW() { return FOAMFSW(); } +const ::Opm::ParserKeyword Builtin::get_FOAMMOB() { return FOAMMOB(); } +const ::Opm::ParserKeyword Builtin::get_FOAMMOBP() { return FOAMMOBP(); } +const ::Opm::ParserKeyword Builtin::get_FOAMMOBS() { return FOAMMOBS(); } +const ::Opm::ParserKeyword Builtin::get_FOAMOPTS() { return FOAMOPTS(); } +const ::Opm::ParserKeyword Builtin::get_FOAMROCK() { return FOAMROCK(); } +const ::Opm::ParserKeyword Builtin::get_FORMFEED() { return FORMFEED(); } +const ::Opm::ParserKeyword Builtin::get_FRICTION() { return FRICTION(); } +const ::Opm::ParserKeyword Builtin::get_FULLIMP() { return FULLIMP(); } + +void Builtin::emplaceF() const { + this->keywords.emplace("FAULTDIM", FAULTDIM()); + this->keywords.emplace("FAULTS", FAULTS()); + this->keywords.emplace("FBHPDEF", FBHPDEF()); + this->keywords.emplace("FHERCHBL", FHERCHBL()); + this->keywords.emplace("FIELD", FIELD()); + this->keywords.emplace("FIELDSEP", FIELDSEP()); + this->keywords.emplace("FIELD_PROBE", FIELD_PROBE()); + this->keywords.emplace("FIELD_PROBE_OPM", FIELD_PROBE_OPM()); + this->keywords.emplace("FILEUNIT", FILEUNIT()); + this->keywords.emplace("FILLEPS", FILLEPS()); + this->keywords.emplace("FIPNUM", FIPNUM()); + this->keywords.emplace("FIPOWG", FIPOWG()); + this->keywords.emplace("FIPSEP", FIPSEP()); + this->keywords.emplace("FIP_PROBE", FIP_PROBE()); + this->keywords.emplace("FLUXNUM", FLUXNUM()); + this->keywords.emplace("FLUXREG", FLUXREG()); + this->keywords.emplace("FLUXTYPE", FLUXTYPE()); + this->keywords.emplace("FMTHMD", FMTHMD()); + this->keywords.emplace("FMTIN", FMTIN()); + this->keywords.emplace("FMTOUT", FMTOUT()); + this->keywords.emplace("FMWSET", FMWSET()); + this->keywords.emplace("FOAM", FOAM()); + this->keywords.emplace("FOAMADS", FOAMADS()); + this->keywords.emplace("FOAMDCYO", FOAMDCYO()); + this->keywords.emplace("FOAMDCYW", FOAMDCYW()); + this->keywords.emplace("FOAMFCN", FOAMFCN()); + this->keywords.emplace("FOAMFRM", FOAMFRM()); + this->keywords.emplace("FOAMFSC", FOAMFSC()); + this->keywords.emplace("FOAMFSO", FOAMFSO()); + this->keywords.emplace("FOAMFST", FOAMFST()); + this->keywords.emplace("FOAMFSW", FOAMFSW()); + this->keywords.emplace("FOAMMOB", FOAMMOB()); + this->keywords.emplace("FOAMMOBP", FOAMMOBP()); + this->keywords.emplace("FOAMMOBS", FOAMMOBS()); + this->keywords.emplace("FOAMOPTS", FOAMOPTS()); + this->keywords.emplace("FOAMROCK", FOAMROCK()); + this->keywords.emplace("FORMFEED", FORMFEED()); + this->keywords.emplace("FRICTION", FRICTION()); + this->keywords.emplace("FULLIMP", FULLIMP()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinG.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinG.cpp new file mode 100644 index 0000000000..16234fdafe --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinG.cpp @@ -0,0 +1,179 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_GAS() { return GAS(); } +const ::Opm::ParserKeyword Builtin::get_GASBEGIN() { return GASBEGIN(); } +const ::Opm::ParserKeyword Builtin::get_GASCONC() { return GASCONC(); } +const ::Opm::ParserKeyword Builtin::get_GASDENT() { return GASDENT(); } +const ::Opm::ParserKeyword Builtin::get_GASEND() { return GASEND(); } +const ::Opm::ParserKeyword Builtin::get_GASFCOMP() { return GASFCOMP(); } +const ::Opm::ParserKeyword Builtin::get_GASFDECR() { return GASFDECR(); } +const ::Opm::ParserKeyword Builtin::get_GASFDELC() { return GASFDELC(); } +const ::Opm::ParserKeyword Builtin::get_GASFIELD() { return GASFIELD(); } +const ::Opm::ParserKeyword Builtin::get_GASFTARG() { return GASFTARG(); } +const ::Opm::ParserKeyword Builtin::get_GASJT() { return GASJT(); } +const ::Opm::ParserKeyword Builtin::get_GASMONTH() { return GASMONTH(); } +const ::Opm::ParserKeyword Builtin::get_GASPERIO() { return GASPERIO(); } +const ::Opm::ParserKeyword Builtin::get_GASSATC() { return GASSATC(); } +const ::Opm::ParserKeyword Builtin::get_GASVISCT() { return GASVISCT(); } +const ::Opm::ParserKeyword Builtin::get_GASWAT() { return GASWAT(); } +const ::Opm::ParserKeyword Builtin::get_GASYEAR() { return GASYEAR(); } +const ::Opm::ParserKeyword Builtin::get_GCALECON() { return GCALECON(); } +const ::Opm::ParserKeyword Builtin::get_GCOMPIDX() { return GCOMPIDX(); } +const ::Opm::ParserKeyword Builtin::get_GCONCAL() { return GCONCAL(); } +const ::Opm::ParserKeyword Builtin::get_GCONENG() { return GCONENG(); } +const ::Opm::ParserKeyword Builtin::get_GCONINJE() { return GCONINJE(); } +const ::Opm::ParserKeyword Builtin::get_GCONPRI() { return GCONPRI(); } +const ::Opm::ParserKeyword Builtin::get_GCONPROD() { return GCONPROD(); } +const ::Opm::ParserKeyword Builtin::get_GCONSALE() { return GCONSALE(); } +const ::Opm::ParserKeyword Builtin::get_GCONSUMP() { return GCONSUMP(); } +const ::Opm::ParserKeyword Builtin::get_GCONTOL() { return GCONTOL(); } +const ::Opm::ParserKeyword Builtin::get_GCUTBACK() { return GCUTBACK(); } +const ::Opm::ParserKeyword Builtin::get_GCUTBACT() { return GCUTBACT(); } +const ::Opm::ParserKeyword Builtin::get_GCVD() { return GCVD(); } +const ::Opm::ParserKeyword Builtin::get_GDCQ() { return GDCQ(); } +const ::Opm::ParserKeyword Builtin::get_GDCQECON() { return GDCQECON(); } +const ::Opm::ParserKeyword Builtin::get_GDFILE() { return GDFILE(); } +const ::Opm::ParserKeyword Builtin::get_GDIMS() { return GDIMS(); } +const ::Opm::ParserKeyword Builtin::get_GDORIENT() { return GDORIENT(); } +const ::Opm::ParserKeyword Builtin::get_GDRILPOT() { return GDRILPOT(); } +const ::Opm::ParserKeyword Builtin::get_GECON() { return GECON(); } +const ::Opm::ParserKeyword Builtin::get_GECONT() { return GECONT(); } +const ::Opm::ParserKeyword Builtin::get_GEFAC() { return GEFAC(); } +const ::Opm::ParserKeyword Builtin::get_GETDATA() { return GETDATA(); } +const ::Opm::ParserKeyword Builtin::get_GETGLOB() { return GETGLOB(); } +const ::Opm::ParserKeyword Builtin::get_GI() { return GI(); } +const ::Opm::ParserKeyword Builtin::get_GIALL() { return GIALL(); } +const ::Opm::ParserKeyword Builtin::get_GIMODEL() { return GIMODEL(); } +const ::Opm::ParserKeyword Builtin::get_GINODE() { return GINODE(); } +const ::Opm::ParserKeyword Builtin::get_GLIFTLIM() { return GLIFTLIM(); } +const ::Opm::ParserKeyword Builtin::get_GLIFTOPT() { return GLIFTOPT(); } +const ::Opm::ParserKeyword Builtin::get_GMWSET() { return GMWSET(); } +const ::Opm::ParserKeyword Builtin::get_GNETDP() { return GNETDP(); } +const ::Opm::ParserKeyword Builtin::get_GNETINJE() { return GNETINJE(); } +const ::Opm::ParserKeyword Builtin::get_GNETPUMP() { return GNETPUMP(); } +const ::Opm::ParserKeyword Builtin::get_GPMAINT() { return GPMAINT(); } +const ::Opm::ParserKeyword Builtin::get_GRADGRUP() { return GRADGRUP(); } +const ::Opm::ParserKeyword Builtin::get_GRADRESV() { return GRADRESV(); } +const ::Opm::ParserKeyword Builtin::get_GRADRFT() { return GRADRFT(); } +const ::Opm::ParserKeyword Builtin::get_GRADWELL() { return GRADWELL(); } +const ::Opm::ParserKeyword Builtin::get_GRAVCONS() { return GRAVCONS(); } +const ::Opm::ParserKeyword Builtin::get_GRAVDR() { return GRAVDR(); } +const ::Opm::ParserKeyword Builtin::get_GRAVDRB() { return GRAVDRB(); } +const ::Opm::ParserKeyword Builtin::get_GRAVDRM() { return GRAVDRM(); } +const ::Opm::ParserKeyword Builtin::get_GRAVITY() { return GRAVITY(); } +const ::Opm::ParserKeyword Builtin::get_GRDREACH() { return GRDREACH(); } +const ::Opm::ParserKeyword Builtin::get_GRID() { return GRID(); } +const ::Opm::ParserKeyword Builtin::get_GRIDFILE() { return GRIDFILE(); } +const ::Opm::ParserKeyword Builtin::get_GRIDOPTS() { return GRIDOPTS(); } +const ::Opm::ParserKeyword Builtin::get_GRIDUNIT() { return GRIDUNIT(); } +const ::Opm::ParserKeyword Builtin::get_GROUP_PROBE() { return GROUP_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_GROUP_PROBE_OPM() { return GROUP_PROBE_OPM(); } +const ::Opm::ParserKeyword Builtin::get_GRUPMAST() { return GRUPMAST(); } +const ::Opm::ParserKeyword Builtin::get_GRUPNET() { return GRUPNET(); } +const ::Opm::ParserKeyword Builtin::get_GRUPRIG() { return GRUPRIG(); } +const ::Opm::ParserKeyword Builtin::get_GRUPSLAV() { return GRUPSLAV(); } +const ::Opm::ParserKeyword Builtin::get_GRUPTARG() { return GRUPTARG(); } +const ::Opm::ParserKeyword Builtin::get_GRUPTREE() { return GRUPTREE(); } +const ::Opm::ParserKeyword Builtin::get_GSATINJE() { return GSATINJE(); } +const ::Opm::ParserKeyword Builtin::get_GSATPROD() { return GSATPROD(); } +const ::Opm::ParserKeyword Builtin::get_GSEPCOND() { return GSEPCOND(); } +const ::Opm::ParserKeyword Builtin::get_GSF() { return GSF(); } +const ::Opm::ParserKeyword Builtin::get_GSSCPTST() { return GSSCPTST(); } +const ::Opm::ParserKeyword Builtin::get_GSWINGF() { return GSWINGF(); } +const ::Opm::ParserKeyword Builtin::get_GTADD() { return GTADD(); } +const ::Opm::ParserKeyword Builtin::get_GTMULT() { return GTMULT(); } +const ::Opm::ParserKeyword Builtin::get_GUIDECAL() { return GUIDECAL(); } +const ::Opm::ParserKeyword Builtin::get_GUIDERAT() { return GUIDERAT(); } +const ::Opm::ParserKeyword Builtin::get_GUPFREQ() { return GUPFREQ(); } +const ::Opm::ParserKeyword Builtin::get_GWRTWCV() { return GWRTWCV(); } + +void Builtin::emplaceG() const { + this->keywords.emplace("GAS", GAS()); + this->keywords.emplace("GASBEGIN", GASBEGIN()); + this->keywords.emplace("GASCONC", GASCONC()); + this->keywords.emplace("GASDENT", GASDENT()); + this->keywords.emplace("GASEND", GASEND()); + this->keywords.emplace("GASFCOMP", GASFCOMP()); + this->keywords.emplace("GASFDECR", GASFDECR()); + this->keywords.emplace("GASFDELC", GASFDELC()); + this->keywords.emplace("GASFIELD", GASFIELD()); + this->keywords.emplace("GASFTARG", GASFTARG()); + this->keywords.emplace("GASJT", GASJT()); + this->keywords.emplace("GASMONTH", GASMONTH()); + this->keywords.emplace("GASPERIO", GASPERIO()); + this->keywords.emplace("GASSATC", GASSATC()); + this->keywords.emplace("GASVISCT", GASVISCT()); + this->keywords.emplace("GASWAT", GASWAT()); + this->keywords.emplace("GASYEAR", GASYEAR()); + this->keywords.emplace("GCALECON", GCALECON()); + this->keywords.emplace("GCOMPIDX", GCOMPIDX()); + this->keywords.emplace("GCONCAL", GCONCAL()); + this->keywords.emplace("GCONENG", GCONENG()); + this->keywords.emplace("GCONINJE", GCONINJE()); + this->keywords.emplace("GCONPRI", GCONPRI()); + this->keywords.emplace("GCONPROD", GCONPROD()); + this->keywords.emplace("GCONSALE", GCONSALE()); + this->keywords.emplace("GCONSUMP", GCONSUMP()); + this->keywords.emplace("GCONTOL", GCONTOL()); + this->keywords.emplace("GCUTBACK", GCUTBACK()); + this->keywords.emplace("GCUTBACT", GCUTBACT()); + this->keywords.emplace("GCVD", GCVD()); + this->keywords.emplace("GDCQ", GDCQ()); + this->keywords.emplace("GDCQECON", GDCQECON()); + this->keywords.emplace("GDFILE", GDFILE()); + this->keywords.emplace("GDIMS", GDIMS()); + this->keywords.emplace("GDORIENT", GDORIENT()); + this->keywords.emplace("GDRILPOT", GDRILPOT()); + this->keywords.emplace("GECON", GECON()); + this->keywords.emplace("GECONT", GECONT()); + this->keywords.emplace("GEFAC", GEFAC()); + this->keywords.emplace("GETDATA", GETDATA()); + this->keywords.emplace("GETGLOB", GETGLOB()); + this->keywords.emplace("GI", GI()); + this->keywords.emplace("GIALL", GIALL()); + this->keywords.emplace("GIMODEL", GIMODEL()); + this->keywords.emplace("GINODE", GINODE()); + this->keywords.emplace("GLIFTLIM", GLIFTLIM()); + this->keywords.emplace("GLIFTOPT", GLIFTOPT()); + this->keywords.emplace("GMWSET", GMWSET()); + this->keywords.emplace("GNETDP", GNETDP()); + this->keywords.emplace("GNETINJE", GNETINJE()); + this->keywords.emplace("GNETPUMP", GNETPUMP()); + this->keywords.emplace("GPMAINT", GPMAINT()); + this->keywords.emplace("GRADGRUP", GRADGRUP()); + this->keywords.emplace("GRADRESV", GRADRESV()); + this->keywords.emplace("GRADRFT", GRADRFT()); + this->keywords.emplace("GRADWELL", GRADWELL()); + this->keywords.emplace("GRAVCONS", GRAVCONS()); + this->keywords.emplace("GRAVDR", GRAVDR()); + this->keywords.emplace("GRAVDRB", GRAVDRB()); + this->keywords.emplace("GRAVDRM", GRAVDRM()); + this->keywords.emplace("GRAVITY", GRAVITY()); + this->keywords.emplace("GRDREACH", GRDREACH()); + this->keywords.emplace("GRID", GRID()); + this->keywords.emplace("GRIDFILE", GRIDFILE()); + this->keywords.emplace("GRIDOPTS", GRIDOPTS()); + this->keywords.emplace("GRIDUNIT", GRIDUNIT()); + this->keywords.emplace("GROUP_PROBE", GROUP_PROBE()); + this->keywords.emplace("GROUP_PROBE_OPM", GROUP_PROBE_OPM()); + this->keywords.emplace("GRUPMAST", GRUPMAST()); + this->keywords.emplace("GRUPNET", GRUPNET()); + this->keywords.emplace("GRUPRIG", GRUPRIG()); + this->keywords.emplace("GRUPSLAV", GRUPSLAV()); + this->keywords.emplace("GRUPTARG", GRUPTARG()); + this->keywords.emplace("GRUPTREE", GRUPTREE()); + this->keywords.emplace("GSATINJE", GSATINJE()); + this->keywords.emplace("GSATPROD", GSATPROD()); + this->keywords.emplace("GSEPCOND", GSEPCOND()); + this->keywords.emplace("GSF", GSF()); + this->keywords.emplace("GSSCPTST", GSSCPTST()); + this->keywords.emplace("GSWINGF", GSWINGF()); + this->keywords.emplace("GTADD", GTADD()); + this->keywords.emplace("GTMULT", GTMULT()); + this->keywords.emplace("GUIDECAL", GUIDECAL()); + this->keywords.emplace("GUIDERAT", GUIDERAT()); + this->keywords.emplace("GUPFREQ", GUPFREQ()); + this->keywords.emplace("GWRTWCV", GWRTWCV()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinH.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinH.cpp new file mode 100644 index 0000000000..c37dc1deb5 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinH.cpp @@ -0,0 +1,105 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_H2SOL() { return H2SOL(); } +const ::Opm::ParserKeyword Builtin::get_H2STORE() { return H2STORE(); } +const ::Opm::ParserKeyword Builtin::get_HALFTRAN() { return HALFTRAN(); } +const ::Opm::ParserKeyword Builtin::get_HAxxxxxx() { return HAxxxxxx(); } +const ::Opm::ParserKeyword Builtin::get_HBNUM() { return HBNUM(); } +const ::Opm::ParserKeyword Builtin::get_HDISP() { return HDISP(); } +const ::Opm::ParserKeyword Builtin::get_HEATCR() { return HEATCR(); } +const ::Opm::ParserKeyword Builtin::get_HEATCRT() { return HEATCRT(); } +const ::Opm::ParserKeyword Builtin::get_HMAQUCT() { return HMAQUCT(); } +const ::Opm::ParserKeyword Builtin::get_HMAQUFET() { return HMAQUFET(); } +const ::Opm::ParserKeyword Builtin::get_HMAQUNUM() { return HMAQUNUM(); } +const ::Opm::ParserKeyword Builtin::get_HMDIMS() { return HMDIMS(); } +const ::Opm::ParserKeyword Builtin::get_HMFAULTS() { return HMFAULTS(); } +const ::Opm::ParserKeyword Builtin::get_HMMLAQUN() { return HMMLAQUN(); } +const ::Opm::ParserKeyword Builtin::get_HMMLCTAQ() { return HMMLCTAQ(); } +const ::Opm::ParserKeyword Builtin::get_HMMLFTAQ() { return HMMLFTAQ(); } +const ::Opm::ParserKeyword Builtin::get_HMMLTWCN() { return HMMLTWCN(); } +const ::Opm::ParserKeyword Builtin::get_HMMULTFT() { return HMMULTFT(); } +const ::Opm::ParserKeyword Builtin::get_HMMULTSG() { return HMMULTSG(); } +const ::Opm::ParserKeyword Builtin::get_HMMULTxx() { return HMMULTxx(); } +const ::Opm::ParserKeyword Builtin::get_HMPROPS() { return HMPROPS(); } +const ::Opm::ParserKeyword Builtin::get_HMROCK() { return HMROCK(); } +const ::Opm::ParserKeyword Builtin::get_HMROCKT() { return HMROCKT(); } +const ::Opm::ParserKeyword Builtin::get_HMRREF() { return HMRREF(); } +const ::Opm::ParserKeyword Builtin::get_HMWELCON() { return HMWELCON(); } +const ::Opm::ParserKeyword Builtin::get_HMWPIMLT() { return HMWPIMLT(); } +const ::Opm::ParserKeyword Builtin::get_HMxxxxxx() { return HMxxxxxx(); } +const ::Opm::ParserKeyword Builtin::get_HRFIN() { return HRFIN(); } +const ::Opm::ParserKeyword Builtin::get_HWELLS() { return HWELLS(); } +const ::Opm::ParserKeyword Builtin::get_HWKRO() { return HWKRO(); } +const ::Opm::ParserKeyword Builtin::get_HWKRORG() { return HWKRORG(); } +const ::Opm::ParserKeyword Builtin::get_HWKRORW() { return HWKRORW(); } +const ::Opm::ParserKeyword Builtin::get_HWKRW() { return HWKRW(); } +const ::Opm::ParserKeyword Builtin::get_HWKRWR() { return HWKRWR(); } +const ::Opm::ParserKeyword Builtin::get_HWPCW() { return HWPCW(); } +const ::Opm::ParserKeyword Builtin::get_HWSNUM() { return HWSNUM(); } +const ::Opm::ParserKeyword Builtin::get_HWSOGCR() { return HWSOGCR(); } +const ::Opm::ParserKeyword Builtin::get_HWSOWCR() { return HWSOWCR(); } +const ::Opm::ParserKeyword Builtin::get_HWSWCR() { return HWSWCR(); } +const ::Opm::ParserKeyword Builtin::get_HWSWL() { return HWSWL(); } +const ::Opm::ParserKeyword Builtin::get_HWSWLPC() { return HWSWLPC(); } +const ::Opm::ParserKeyword Builtin::get_HWSWU() { return HWSWU(); } +const ::Opm::ParserKeyword Builtin::get_HXFIN() { return HXFIN(); } +const ::Opm::ParserKeyword Builtin::get_HYDRHEAD() { return HYDRHEAD(); } +const ::Opm::ParserKeyword Builtin::get_HYFIN() { return HYFIN(); } +const ::Opm::ParserKeyword Builtin::get_HYMOBGDR() { return HYMOBGDR(); } +const ::Opm::ParserKeyword Builtin::get_HYST() { return HYST(); } +const ::Opm::ParserKeyword Builtin::get_HYSTCHCK() { return HYSTCHCK(); } +const ::Opm::ParserKeyword Builtin::get_HZFIN() { return HZFIN(); } + +void Builtin::emplaceH() const { + this->keywords.emplace("H2SOL", H2SOL()); + this->keywords.emplace("H2STORE", H2STORE()); + this->keywords.emplace("HALFTRAN", HALFTRAN()); + this->keywords.emplace("HAxxxxxx", HAxxxxxx()); + this->keywords.emplace("HBNUM", HBNUM()); + this->keywords.emplace("HDISP", HDISP()); + this->keywords.emplace("HEATCR", HEATCR()); + this->keywords.emplace("HEATCRT", HEATCRT()); + this->keywords.emplace("HMAQUCT", HMAQUCT()); + this->keywords.emplace("HMAQUFET", HMAQUFET()); + this->keywords.emplace("HMAQUNUM", HMAQUNUM()); + this->keywords.emplace("HMDIMS", HMDIMS()); + this->keywords.emplace("HMFAULTS", HMFAULTS()); + this->keywords.emplace("HMMLAQUN", HMMLAQUN()); + this->keywords.emplace("HMMLCTAQ", HMMLCTAQ()); + this->keywords.emplace("HMMLFTAQ", HMMLFTAQ()); + this->keywords.emplace("HMMLTWCN", HMMLTWCN()); + this->keywords.emplace("HMMULTFT", HMMULTFT()); + this->keywords.emplace("HMMULTSG", HMMULTSG()); + this->keywords.emplace("HMMULTxx", HMMULTxx()); + this->keywords.emplace("HMPROPS", HMPROPS()); + this->keywords.emplace("HMROCK", HMROCK()); + this->keywords.emplace("HMROCKT", HMROCKT()); + this->keywords.emplace("HMRREF", HMRREF()); + this->keywords.emplace("HMWELCON", HMWELCON()); + this->keywords.emplace("HMWPIMLT", HMWPIMLT()); + this->keywords.emplace("HMxxxxxx", HMxxxxxx()); + this->keywords.emplace("HRFIN", HRFIN()); + this->keywords.emplace("HWELLS", HWELLS()); + this->keywords.emplace("HWKRO", HWKRO()); + this->keywords.emplace("HWKRORG", HWKRORG()); + this->keywords.emplace("HWKRORW", HWKRORW()); + this->keywords.emplace("HWKRW", HWKRW()); + this->keywords.emplace("HWKRWR", HWKRWR()); + this->keywords.emplace("HWPCW", HWPCW()); + this->keywords.emplace("HWSNUM", HWSNUM()); + this->keywords.emplace("HWSOGCR", HWSOGCR()); + this->keywords.emplace("HWSOWCR", HWSOWCR()); + this->keywords.emplace("HWSWCR", HWSWCR()); + this->keywords.emplace("HWSWL", HWSWL()); + this->keywords.emplace("HWSWLPC", HWSWLPC()); + this->keywords.emplace("HWSWU", HWSWU()); + this->keywords.emplace("HXFIN", HXFIN()); + this->keywords.emplace("HYDRHEAD", HYDRHEAD()); + this->keywords.emplace("HYFIN", HYFIN()); + this->keywords.emplace("HYMOBGDR", HYMOBGDR()); + this->keywords.emplace("HYST", HYST()); + this->keywords.emplace("HYSTCHCK", HYSTCHCK()); + this->keywords.emplace("HZFIN", HZFIN()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinI.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinI.cpp new file mode 100644 index 0000000000..388feb541e --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinI.cpp @@ -0,0 +1,69 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_IHOST() { return IHOST(); } +const ::Opm::ParserKeyword Builtin::get_IMBNUM() { return IMBNUM(); } +const ::Opm::ParserKeyword Builtin::get_IMBNUMMF() { return IMBNUMMF(); } +const ::Opm::ParserKeyword Builtin::get_IMKRVD() { return IMKRVD(); } +const ::Opm::ParserKeyword Builtin::get_IMPCVD() { return IMPCVD(); } +const ::Opm::ParserKeyword Builtin::get_IMPES() { return IMPES(); } +const ::Opm::ParserKeyword Builtin::get_IMPLICIT() { return IMPLICIT(); } +const ::Opm::ParserKeyword Builtin::get_IMPORT() { return IMPORT(); } +const ::Opm::ParserKeyword Builtin::get_IMPTVD() { return IMPTVD(); } +const ::Opm::ParserKeyword Builtin::get_IMSPCVD() { return IMSPCVD(); } +const ::Opm::ParserKeyword Builtin::get_INCLUDE() { return INCLUDE(); } +const ::Opm::ParserKeyword Builtin::get_INIT() { return INIT(); } +const ::Opm::ParserKeyword Builtin::get_INRAD() { return INRAD(); } +const ::Opm::ParserKeyword Builtin::get_INSPEC() { return INSPEC(); } +const ::Opm::ParserKeyword Builtin::get_INTPC() { return INTPC(); } +const ::Opm::ParserKeyword Builtin::get_IONROCK() { return IONROCK(); } +const ::Opm::ParserKeyword Builtin::get_IONXROCK() { return IONXROCK(); } +const ::Opm::ParserKeyword Builtin::get_IONXSURF() { return IONXSURF(); } +const ::Opm::ParserKeyword Builtin::get_IPCG() { return IPCG(); } +const ::Opm::ParserKeyword Builtin::get_IPCW() { return IPCW(); } +const ::Opm::ParserKeyword Builtin::get_ISGCR() { return ISGCR(); } +const ::Opm::ParserKeyword Builtin::get_ISGL() { return ISGL(); } +const ::Opm::ParserKeyword Builtin::get_ISGLPC() { return ISGLPC(); } +const ::Opm::ParserKeyword Builtin::get_ISGU() { return ISGU(); } +const ::Opm::ParserKeyword Builtin::get_ISOGCR() { return ISOGCR(); } +const ::Opm::ParserKeyword Builtin::get_ISOLNUM() { return ISOLNUM(); } +const ::Opm::ParserKeyword Builtin::get_ISOWCR() { return ISOWCR(); } +const ::Opm::ParserKeyword Builtin::get_ISWCR() { return ISWCR(); } +const ::Opm::ParserKeyword Builtin::get_ISWL() { return ISWL(); } +const ::Opm::ParserKeyword Builtin::get_ISWLPC() { return ISWLPC(); } +const ::Opm::ParserKeyword Builtin::get_ISWU() { return ISWU(); } + +void Builtin::emplaceI() const { + this->keywords.emplace("IHOST", IHOST()); + this->keywords.emplace("IMBNUM", IMBNUM()); + this->keywords.emplace("IMBNUMMF", IMBNUMMF()); + this->keywords.emplace("IMKRVD", IMKRVD()); + this->keywords.emplace("IMPCVD", IMPCVD()); + this->keywords.emplace("IMPES", IMPES()); + this->keywords.emplace("IMPLICIT", IMPLICIT()); + this->keywords.emplace("IMPORT", IMPORT()); + this->keywords.emplace("IMPTVD", IMPTVD()); + this->keywords.emplace("IMSPCVD", IMSPCVD()); + this->keywords.emplace("INCLUDE", INCLUDE()); + this->keywords.emplace("INIT", INIT()); + this->keywords.emplace("INRAD", INRAD()); + this->keywords.emplace("INSPEC", INSPEC()); + this->keywords.emplace("INTPC", INTPC()); + this->keywords.emplace("IONROCK", IONROCK()); + this->keywords.emplace("IONXROCK", IONXROCK()); + this->keywords.emplace("IONXSURF", IONXSURF()); + this->keywords.emplace("IPCG", IPCG()); + this->keywords.emplace("IPCW", IPCW()); + this->keywords.emplace("ISGCR", ISGCR()); + this->keywords.emplace("ISGL", ISGL()); + this->keywords.emplace("ISGLPC", ISGLPC()); + this->keywords.emplace("ISGU", ISGU()); + this->keywords.emplace("ISOGCR", ISOGCR()); + this->keywords.emplace("ISOLNUM", ISOLNUM()); + this->keywords.emplace("ISOWCR", ISOWCR()); + this->keywords.emplace("ISWCR", ISWCR()); + this->keywords.emplace("ISWL", ISWL()); + this->keywords.emplace("ISWLPC", ISWLPC()); + this->keywords.emplace("ISWU", ISWU()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinJ.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinJ.cpp new file mode 100644 index 0000000000..a0eb422698 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinJ.cpp @@ -0,0 +1,11 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_JFUNC() { return JFUNC(); } +const ::Opm::ParserKeyword Builtin::get_JFUNCR() { return JFUNCR(); } + +void Builtin::emplaceJ() const { + this->keywords.emplace("JFUNC", JFUNC()); + this->keywords.emplace("JFUNCR", JFUNCR()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinK.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinK.cpp new file mode 100644 index 0000000000..ac31721d49 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinK.cpp @@ -0,0 +1,11 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_KRNUM() { return KRNUM(); } +const ::Opm::ParserKeyword Builtin::get_KRNUMMF() { return KRNUMMF(); } + +void Builtin::emplaceK() const { + this->keywords.emplace("KRNUM", KRNUM()); + this->keywords.emplace("KRNUMMF", KRNUMMF()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinL.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinL.cpp new file mode 100644 index 0000000000..ee02c3c623 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinL.cpp @@ -0,0 +1,115 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_LAB() { return LAB(); } +const ::Opm::ParserKeyword Builtin::get_LANGMPL() { return LANGMPL(); } +const ::Opm::ParserKeyword Builtin::get_LANGMUIR() { return LANGMUIR(); } +const ::Opm::ParserKeyword Builtin::get_LANGSOLV() { return LANGSOLV(); } +const ::Opm::ParserKeyword Builtin::get_LCUNIT() { return LCUNIT(); } +const ::Opm::ParserKeyword Builtin::get_LGR() { return LGR(); } +const ::Opm::ParserKeyword Builtin::get_LGRCOPY() { return LGRCOPY(); } +const ::Opm::ParserKeyword Builtin::get_LGRFREE() { return LGRFREE(); } +const ::Opm::ParserKeyword Builtin::get_LGRLOCK() { return LGRLOCK(); } +const ::Opm::ParserKeyword Builtin::get_LGROFF() { return LGROFF(); } +const ::Opm::ParserKeyword Builtin::get_LGRON() { return LGRON(); } +const ::Opm::ParserKeyword Builtin::get_LICENSES() { return LICENSES(); } +const ::Opm::ParserKeyword Builtin::get_LIFTOPT() { return LIFTOPT(); } +const ::Opm::ParserKeyword Builtin::get_LINCOM() { return LINCOM(); } +const ::Opm::ParserKeyword Builtin::get_LINKPERM() { return LINKPERM(); } +const ::Opm::ParserKeyword Builtin::get_LIVEOIL() { return LIVEOIL(); } +const ::Opm::ParserKeyword Builtin::get_LKRO() { return LKRO(); } +const ::Opm::ParserKeyword Builtin::get_LKRORG() { return LKRORG(); } +const ::Opm::ParserKeyword Builtin::get_LKRORW() { return LKRORW(); } +const ::Opm::ParserKeyword Builtin::get_LKRW() { return LKRW(); } +const ::Opm::ParserKeyword Builtin::get_LKRWR() { return LKRWR(); } +const ::Opm::ParserKeyword Builtin::get_LOAD() { return LOAD(); } +const ::Opm::ParserKeyword Builtin::get_LOWSALT() { return LOWSALT(); } +const ::Opm::ParserKeyword Builtin::get_LPCW() { return LPCW(); } +const ::Opm::ParserKeyword Builtin::get_LSALTFNC() { return LSALTFNC(); } +const ::Opm::ParserKeyword Builtin::get_LSLTWNUM() { return LSLTWNUM(); } +const ::Opm::ParserKeyword Builtin::get_LSNUM() { return LSNUM(); } +const ::Opm::ParserKeyword Builtin::get_LSOGCR() { return LSOGCR(); } +const ::Opm::ParserKeyword Builtin::get_LSOWCR() { return LSOWCR(); } +const ::Opm::ParserKeyword Builtin::get_LSWCR() { return LSWCR(); } +const ::Opm::ParserKeyword Builtin::get_LSWL() { return LSWL(); } +const ::Opm::ParserKeyword Builtin::get_LSWLPC() { return LSWLPC(); } +const ::Opm::ParserKeyword Builtin::get_LSWU() { return LSWU(); } +const ::Opm::ParserKeyword Builtin::get_LTOSIGMA() { return LTOSIGMA(); } +const ::Opm::ParserKeyword Builtin::get_LWKRO() { return LWKRO(); } +const ::Opm::ParserKeyword Builtin::get_LWKRORG() { return LWKRORG(); } +const ::Opm::ParserKeyword Builtin::get_LWKRORW() { return LWKRORW(); } +const ::Opm::ParserKeyword Builtin::get_LWKRW() { return LWKRW(); } +const ::Opm::ParserKeyword Builtin::get_LWKRWR() { return LWKRWR(); } +const ::Opm::ParserKeyword Builtin::get_LWPCW() { return LWPCW(); } +const ::Opm::ParserKeyword Builtin::get_LWSLTNUM() { return LWSLTNUM(); } +const ::Opm::ParserKeyword Builtin::get_LWSNUM() { return LWSNUM(); } +const ::Opm::ParserKeyword Builtin::get_LWSOGCR() { return LWSOGCR(); } +const ::Opm::ParserKeyword Builtin::get_LWSOWCR() { return LWSOWCR(); } +const ::Opm::ParserKeyword Builtin::get_LWSWCR() { return LWSWCR(); } +const ::Opm::ParserKeyword Builtin::get_LWSWL() { return LWSWL(); } +const ::Opm::ParserKeyword Builtin::get_LWSWLPC() { return LWSWLPC(); } +const ::Opm::ParserKeyword Builtin::get_LWSWU() { return LWSWU(); } +const ::Opm::ParserKeyword Builtin::get_LX() { return LX(); } +const ::Opm::ParserKeyword Builtin::get_LXFIN() { return LXFIN(); } +const ::Opm::ParserKeyword Builtin::get_LY() { return LY(); } +const ::Opm::ParserKeyword Builtin::get_LYFIN() { return LYFIN(); } +const ::Opm::ParserKeyword Builtin::get_LZ() { return LZ(); } +const ::Opm::ParserKeyword Builtin::get_LZFIN() { return LZFIN(); } + +void Builtin::emplaceL() const { + this->keywords.emplace("LAB", LAB()); + this->keywords.emplace("LANGMPL", LANGMPL()); + this->keywords.emplace("LANGMUIR", LANGMUIR()); + this->keywords.emplace("LANGSOLV", LANGSOLV()); + this->keywords.emplace("LCUNIT", LCUNIT()); + this->keywords.emplace("LGR", LGR()); + this->keywords.emplace("LGRCOPY", LGRCOPY()); + this->keywords.emplace("LGRFREE", LGRFREE()); + this->keywords.emplace("LGRLOCK", LGRLOCK()); + this->keywords.emplace("LGROFF", LGROFF()); + this->keywords.emplace("LGRON", LGRON()); + this->keywords.emplace("LICENSES", LICENSES()); + this->keywords.emplace("LIFTOPT", LIFTOPT()); + this->keywords.emplace("LINCOM", LINCOM()); + this->keywords.emplace("LINKPERM", LINKPERM()); + this->keywords.emplace("LIVEOIL", LIVEOIL()); + this->keywords.emplace("LKRO", LKRO()); + this->keywords.emplace("LKRORG", LKRORG()); + this->keywords.emplace("LKRORW", LKRORW()); + this->keywords.emplace("LKRW", LKRW()); + this->keywords.emplace("LKRWR", LKRWR()); + this->keywords.emplace("LOAD", LOAD()); + this->keywords.emplace("LOWSALT", LOWSALT()); + this->keywords.emplace("LPCW", LPCW()); + this->keywords.emplace("LSALTFNC", LSALTFNC()); + this->keywords.emplace("LSLTWNUM", LSLTWNUM()); + this->keywords.emplace("LSNUM", LSNUM()); + this->keywords.emplace("LSOGCR", LSOGCR()); + this->keywords.emplace("LSOWCR", LSOWCR()); + this->keywords.emplace("LSWCR", LSWCR()); + this->keywords.emplace("LSWL", LSWL()); + this->keywords.emplace("LSWLPC", LSWLPC()); + this->keywords.emplace("LSWU", LSWU()); + this->keywords.emplace("LTOSIGMA", LTOSIGMA()); + this->keywords.emplace("LWKRO", LWKRO()); + this->keywords.emplace("LWKRORG", LWKRORG()); + this->keywords.emplace("LWKRORW", LWKRORW()); + this->keywords.emplace("LWKRW", LWKRW()); + this->keywords.emplace("LWKRWR", LWKRWR()); + this->keywords.emplace("LWPCW", LWPCW()); + this->keywords.emplace("LWSLTNUM", LWSLTNUM()); + this->keywords.emplace("LWSNUM", LWSNUM()); + this->keywords.emplace("LWSOGCR", LWSOGCR()); + this->keywords.emplace("LWSOWCR", LWSOWCR()); + this->keywords.emplace("LWSWCR", LWSWCR()); + this->keywords.emplace("LWSWL", LWSWL()); + this->keywords.emplace("LWSWLPC", LWSWLPC()); + this->keywords.emplace("LWSWU", LWSWU()); + this->keywords.emplace("LX", LX()); + this->keywords.emplace("LXFIN", LXFIN()); + this->keywords.emplace("LY", LY()); + this->keywords.emplace("LYFIN", LYFIN()); + this->keywords.emplace("LZ", LZ()); + this->keywords.emplace("LZFIN", LZFIN()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinM.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinM.cpp new file mode 100644 index 0000000000..762ecb3b7b --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinM.cpp @@ -0,0 +1,109 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_MAPAXES() { return MAPAXES(); } +const ::Opm::ParserKeyword Builtin::get_MAPUNITS() { return MAPUNITS(); } +const ::Opm::ParserKeyword Builtin::get_MASSFLOW() { return MASSFLOW(); } +const ::Opm::ParserKeyword Builtin::get_MATCORR() { return MATCORR(); } +const ::Opm::ParserKeyword Builtin::get_MAXVALUE() { return MAXVALUE(); } +const ::Opm::ParserKeyword Builtin::get_MECH() { return MECH(); } +const ::Opm::ParserKeyword Builtin::get_MEMORY() { return MEMORY(); } +const ::Opm::ParserKeyword Builtin::get_MESSAGE() { return MESSAGE(); } +const ::Opm::ParserKeyword Builtin::get_MESSAGES() { return MESSAGES(); } +const ::Opm::ParserKeyword Builtin::get_MESSOPTS() { return MESSOPTS(); } +const ::Opm::ParserKeyword Builtin::get_MESSSRVC() { return MESSSRVC(); } +const ::Opm::ParserKeyword Builtin::get_METRIC() { return METRIC(); } +const ::Opm::ParserKeyword Builtin::get_MICP() { return MICP(); } +const ::Opm::ParserKeyword Builtin::get_MICPPARA() { return MICPPARA(); } +const ::Opm::ParserKeyword Builtin::get_MINNNCT() { return MINNNCT(); } +const ::Opm::ParserKeyword Builtin::get_MINNPCOL() { return MINNPCOL(); } +const ::Opm::ParserKeyword Builtin::get_MINPORV() { return MINPORV(); } +const ::Opm::ParserKeyword Builtin::get_MINPV() { return MINPV(); } +const ::Opm::ParserKeyword Builtin::get_MINPVV() { return MINPVV(); } +const ::Opm::ParserKeyword Builtin::get_MINVALUE() { return MINVALUE(); } +const ::Opm::ParserKeyword Builtin::get_MISC() { return MISC(); } +const ::Opm::ParserKeyword Builtin::get_MISCIBLE() { return MISCIBLE(); } +const ::Opm::ParserKeyword Builtin::get_MISCNUM() { return MISCNUM(); } +const ::Opm::ParserKeyword Builtin::get_MLANG() { return MLANG(); } +const ::Opm::ParserKeyword Builtin::get_MLANGSLV() { return MLANGSLV(); } +const ::Opm::ParserKeyword Builtin::get_MONITOR() { return MONITOR(); } +const ::Opm::ParserKeyword Builtin::get_MPFANUM() { return MPFANUM(); } +const ::Opm::ParserKeyword Builtin::get_MPFNNC() { return MPFNNC(); } +const ::Opm::ParserKeyword Builtin::get_MSFN() { return MSFN(); } +const ::Opm::ParserKeyword Builtin::get_MSGFILE() { return MSGFILE(); } +const ::Opm::ParserKeyword Builtin::get_MSUM_PROBE() { return MSUM_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_MULSGGD() { return MULSGGD(); } +const ::Opm::ParserKeyword Builtin::get_MULSGGDV() { return MULSGGDV(); } +const ::Opm::ParserKeyword Builtin::get_MULTFLT() { return MULTFLT(); } +const ::Opm::ParserKeyword Builtin::get_MULTIN() { return MULTIN(); } +const ::Opm::ParserKeyword Builtin::get_MULTIPLY() { return MULTIPLY(); } +const ::Opm::ParserKeyword Builtin::get_MULTIREG() { return MULTIREG(); } +const ::Opm::ParserKeyword Builtin::get_MULTNUM() { return MULTNUM(); } +const ::Opm::ParserKeyword Builtin::get_MULTOUT() { return MULTOUT(); } +const ::Opm::ParserKeyword Builtin::get_MULTOUTS() { return MULTOUTS(); } +const ::Opm::ParserKeyword Builtin::get_MULTPV() { return MULTPV(); } +const ::Opm::ParserKeyword Builtin::get_MULTREAL() { return MULTREAL(); } +const ::Opm::ParserKeyword Builtin::get_MULTREGD() { return MULTREGD(); } +const ::Opm::ParserKeyword Builtin::get_MULTREGH() { return MULTREGH(); } +const ::Opm::ParserKeyword Builtin::get_MULTREGP() { return MULTREGP(); } +const ::Opm::ParserKeyword Builtin::get_MULTREGT() { return MULTREGT(); } +const ::Opm::ParserKeyword Builtin::get_MULTSIG() { return MULTSIG(); } +const ::Opm::ParserKeyword Builtin::get_MULTSIGV() { return MULTSIGV(); } +const ::Opm::ParserKeyword Builtin::get_MULT_XYZ() { return MULT_XYZ(); } +const ::Opm::ParserKeyword Builtin::get_MW() { return MW(); } +const ::Opm::ParserKeyword Builtin::get_MWS() { return MWS(); } + +void Builtin::emplaceM() const { + this->keywords.emplace("MAPAXES", MAPAXES()); + this->keywords.emplace("MAPUNITS", MAPUNITS()); + this->keywords.emplace("MASSFLOW", MASSFLOW()); + this->keywords.emplace("MATCORR", MATCORR()); + this->keywords.emplace("MAXVALUE", MAXVALUE()); + this->keywords.emplace("MECH", MECH()); + this->keywords.emplace("MEMORY", MEMORY()); + this->keywords.emplace("MESSAGE", MESSAGE()); + this->keywords.emplace("MESSAGES", MESSAGES()); + this->keywords.emplace("MESSOPTS", MESSOPTS()); + this->keywords.emplace("MESSSRVC", MESSSRVC()); + this->keywords.emplace("METRIC", METRIC()); + this->keywords.emplace("MICP", MICP()); + this->keywords.emplace("MICPPARA", MICPPARA()); + this->keywords.emplace("MINNNCT", MINNNCT()); + this->keywords.emplace("MINNPCOL", MINNPCOL()); + this->keywords.emplace("MINPORV", MINPORV()); + this->keywords.emplace("MINPV", MINPV()); + this->keywords.emplace("MINPVV", MINPVV()); + this->keywords.emplace("MINVALUE", MINVALUE()); + this->keywords.emplace("MISC", MISC()); + this->keywords.emplace("MISCIBLE", MISCIBLE()); + this->keywords.emplace("MISCNUM", MISCNUM()); + this->keywords.emplace("MLANG", MLANG()); + this->keywords.emplace("MLANGSLV", MLANGSLV()); + this->keywords.emplace("MONITOR", MONITOR()); + this->keywords.emplace("MPFANUM", MPFANUM()); + this->keywords.emplace("MPFNNC", MPFNNC()); + this->keywords.emplace("MSFN", MSFN()); + this->keywords.emplace("MSGFILE", MSGFILE()); + this->keywords.emplace("MSUM_PROBE", MSUM_PROBE()); + this->keywords.emplace("MULSGGD", MULSGGD()); + this->keywords.emplace("MULSGGDV", MULSGGDV()); + this->keywords.emplace("MULTFLT", MULTFLT()); + this->keywords.emplace("MULTIN", MULTIN()); + this->keywords.emplace("MULTIPLY", MULTIPLY()); + this->keywords.emplace("MULTIREG", MULTIREG()); + this->keywords.emplace("MULTNUM", MULTNUM()); + this->keywords.emplace("MULTOUT", MULTOUT()); + this->keywords.emplace("MULTOUTS", MULTOUTS()); + this->keywords.emplace("MULTPV", MULTPV()); + this->keywords.emplace("MULTREAL", MULTREAL()); + this->keywords.emplace("MULTREGD", MULTREGD()); + this->keywords.emplace("MULTREGH", MULTREGH()); + this->keywords.emplace("MULTREGP", MULTREGP()); + this->keywords.emplace("MULTREGT", MULTREGT()); + this->keywords.emplace("MULTSIG", MULTSIG()); + this->keywords.emplace("MULTSIGV", MULTSIGV()); + this->keywords.emplace("MULT_XYZ", MULT_XYZ()); + this->keywords.emplace("MW", MW()); + this->keywords.emplace("MWS", MWS()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinN.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinN.cpp new file mode 100644 index 0000000000..c8284b4916 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinN.cpp @@ -0,0 +1,93 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_NARROW() { return NARROW(); } +const ::Opm::ParserKeyword Builtin::get_NCOMPS() { return NCOMPS(); } +const ::Opm::ParserKeyword Builtin::get_NCONSUMP() { return NCONSUMP(); } +const ::Opm::ParserKeyword Builtin::get_NEFAC() { return NEFAC(); } +const ::Opm::ParserKeyword Builtin::get_NETBALAN() { return NETBALAN(); } +const ::Opm::ParserKeyword Builtin::get_NETCOMPA() { return NETCOMPA(); } +const ::Opm::ParserKeyword Builtin::get_NETWORK() { return NETWORK(); } +const ::Opm::ParserKeyword Builtin::get_NETWORK_PROBE() { return NETWORK_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_NEWTRAN() { return NEWTRAN(); } +const ::Opm::ParserKeyword Builtin::get_NEXTSTEP() { return NEXTSTEP(); } +const ::Opm::ParserKeyword Builtin::get_NEXTSTPL() { return NEXTSTPL(); } +const ::Opm::ParserKeyword Builtin::get_NINENUM() { return NINENUM(); } +const ::Opm::ParserKeyword Builtin::get_NINEPOIN() { return NINEPOIN(); } +const ::Opm::ParserKeyword Builtin::get_NMATOPTS() { return NMATOPTS(); } +const ::Opm::ParserKeyword Builtin::get_NMATRIX() { return NMATRIX(); } +const ::Opm::ParserKeyword Builtin::get_NMESSAGE() { return NMESSAGE(); } +const ::Opm::ParserKeyword Builtin::get_NNC() { return NNC(); } +const ::Opm::ParserKeyword Builtin::get_NNEWTF() { return NNEWTF(); } +const ::Opm::ParserKeyword Builtin::get_NOCASC() { return NOCASC(); } +const ::Opm::ParserKeyword Builtin::get_NODEPROP() { return NODEPROP(); } +const ::Opm::ParserKeyword Builtin::get_NODPPM() { return NODPPM(); } +const ::Opm::ParserKeyword Builtin::get_NOECHO() { return NOECHO(); } +const ::Opm::ParserKeyword Builtin::get_NOGGF() { return NOGGF(); } +const ::Opm::ParserKeyword Builtin::get_NOGRAV() { return NOGRAV(); } +const ::Opm::ParserKeyword Builtin::get_NOHMD() { return NOHMD(); } +const ::Opm::ParserKeyword Builtin::get_NOHMO() { return NOHMO(); } +const ::Opm::ParserKeyword Builtin::get_NOHYST() { return NOHYST(); } +const ::Opm::ParserKeyword Builtin::get_NOINSPEC() { return NOINSPEC(); } +const ::Opm::ParserKeyword Builtin::get_NOMONITO() { return NOMONITO(); } +const ::Opm::ParserKeyword Builtin::get_NONNC() { return NONNC(); } +const ::Opm::ParserKeyword Builtin::get_NORSSPEC() { return NORSSPEC(); } +const ::Opm::ParserKeyword Builtin::get_NOSIM() { return NOSIM(); } +const ::Opm::ParserKeyword Builtin::get_NOWARN() { return NOWARN(); } +const ::Opm::ParserKeyword Builtin::get_NOWARNEP() { return NOWARNEP(); } +const ::Opm::ParserKeyword Builtin::get_NRSOUT() { return NRSOUT(); } +const ::Opm::ParserKeyword Builtin::get_NSTACK() { return NSTACK(); } +const ::Opm::ParserKeyword Builtin::get_NTG() { return NTG(); } +const ::Opm::ParserKeyword Builtin::get_NUMRES() { return NUMRES(); } +const ::Opm::ParserKeyword Builtin::get_NUPCOL() { return NUPCOL(); } +const ::Opm::ParserKeyword Builtin::get_NWATREM() { return NWATREM(); } +const ::Opm::ParserKeyword Builtin::get_NXFIN() { return NXFIN(); } +const ::Opm::ParserKeyword Builtin::get_NYFIN() { return NYFIN(); } +const ::Opm::ParserKeyword Builtin::get_NZFIN() { return NZFIN(); } + +void Builtin::emplaceN() const { + this->keywords.emplace("NARROW", NARROW()); + this->keywords.emplace("NCOMPS", NCOMPS()); + this->keywords.emplace("NCONSUMP", NCONSUMP()); + this->keywords.emplace("NEFAC", NEFAC()); + this->keywords.emplace("NETBALAN", NETBALAN()); + this->keywords.emplace("NETCOMPA", NETCOMPA()); + this->keywords.emplace("NETWORK", NETWORK()); + this->keywords.emplace("NETWORK_PROBE", NETWORK_PROBE()); + this->keywords.emplace("NEWTRAN", NEWTRAN()); + this->keywords.emplace("NEXTSTEP", NEXTSTEP()); + this->keywords.emplace("NEXTSTPL", NEXTSTPL()); + this->keywords.emplace("NINENUM", NINENUM()); + this->keywords.emplace("NINEPOIN", NINEPOIN()); + this->keywords.emplace("NMATOPTS", NMATOPTS()); + this->keywords.emplace("NMATRIX", NMATRIX()); + this->keywords.emplace("NMESSAGE", NMESSAGE()); + this->keywords.emplace("NNC", NNC()); + this->keywords.emplace("NNEWTF", NNEWTF()); + this->keywords.emplace("NOCASC", NOCASC()); + this->keywords.emplace("NODEPROP", NODEPROP()); + this->keywords.emplace("NODPPM", NODPPM()); + this->keywords.emplace("NOECHO", NOECHO()); + this->keywords.emplace("NOGGF", NOGGF()); + this->keywords.emplace("NOGRAV", NOGRAV()); + this->keywords.emplace("NOHMD", NOHMD()); + this->keywords.emplace("NOHMO", NOHMO()); + this->keywords.emplace("NOHYST", NOHYST()); + this->keywords.emplace("NOINSPEC", NOINSPEC()); + this->keywords.emplace("NOMONITO", NOMONITO()); + this->keywords.emplace("NONNC", NONNC()); + this->keywords.emplace("NORSSPEC", NORSSPEC()); + this->keywords.emplace("NOSIM", NOSIM()); + this->keywords.emplace("NOWARN", NOWARN()); + this->keywords.emplace("NOWARNEP", NOWARNEP()); + this->keywords.emplace("NRSOUT", NRSOUT()); + this->keywords.emplace("NSTACK", NSTACK()); + this->keywords.emplace("NTG", NTG()); + this->keywords.emplace("NUMRES", NUMRES()); + this->keywords.emplace("NUPCOL", NUPCOL()); + this->keywords.emplace("NWATREM", NWATREM()); + this->keywords.emplace("NXFIN", NXFIN()); + this->keywords.emplace("NYFIN", NYFIN()); + this->keywords.emplace("NZFIN", NZFIN()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinO.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinO.cpp new file mode 100644 index 0000000000..10872c02a7 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinO.cpp @@ -0,0 +1,47 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_OCOMPIDX() { return OCOMPIDX(); } +const ::Opm::ParserKeyword Builtin::get_OFM() { return OFM(); } +const ::Opm::ParserKeyword Builtin::get_OIL() { return OIL(); } +const ::Opm::ParserKeyword Builtin::get_OILAPI() { return OILAPI(); } +const ::Opm::ParserKeyword Builtin::get_OILCOMPR() { return OILCOMPR(); } +const ::Opm::ParserKeyword Builtin::get_OILDENT() { return OILDENT(); } +const ::Opm::ParserKeyword Builtin::get_OILJT() { return OILJT(); } +const ::Opm::ParserKeyword Builtin::get_OILMW() { return OILMW(); } +const ::Opm::ParserKeyword Builtin::get_OILVISCT() { return OILVISCT(); } +const ::Opm::ParserKeyword Builtin::get_OILVTIM() { return OILVTIM(); } +const ::Opm::ParserKeyword Builtin::get_OLDTRAN() { return OLDTRAN(); } +const ::Opm::ParserKeyword Builtin::get_OLDTRANR() { return OLDTRANR(); } +const ::Opm::ParserKeyword Builtin::get_OPERATE() { return OPERATE(); } +const ::Opm::ParserKeyword Builtin::get_OPERATER() { return OPERATER(); } +const ::Opm::ParserKeyword Builtin::get_OPERNUM() { return OPERNUM(); } +const ::Opm::ParserKeyword Builtin::get_OPTIONS() { return OPTIONS(); } +const ::Opm::ParserKeyword Builtin::get_OPTIONS3() { return OPTIONS3(); } +const ::Opm::ParserKeyword Builtin::get_OUTRAD() { return OUTRAD(); } +const ::Opm::ParserKeyword Builtin::get_OUTSOL() { return OUTSOL(); } +const ::Opm::ParserKeyword Builtin::get_OVERBURD() { return OVERBURD(); } + +void Builtin::emplaceO() const { + this->keywords.emplace("OCOMPIDX", OCOMPIDX()); + this->keywords.emplace("OFM", OFM()); + this->keywords.emplace("OIL", OIL()); + this->keywords.emplace("OILAPI", OILAPI()); + this->keywords.emplace("OILCOMPR", OILCOMPR()); + this->keywords.emplace("OILDENT", OILDENT()); + this->keywords.emplace("OILJT", OILJT()); + this->keywords.emplace("OILMW", OILMW()); + this->keywords.emplace("OILVISCT", OILVISCT()); + this->keywords.emplace("OILVTIM", OILVTIM()); + this->keywords.emplace("OLDTRAN", OLDTRAN()); + this->keywords.emplace("OLDTRANR", OLDTRANR()); + this->keywords.emplace("OPERATE", OPERATE()); + this->keywords.emplace("OPERATER", OPERATER()); + this->keywords.emplace("OPERNUM", OPERNUM()); + this->keywords.emplace("OPTIONS", OPTIONS()); + this->keywords.emplace("OPTIONS3", OPTIONS3()); + this->keywords.emplace("OUTRAD", OUTRAD()); + this->keywords.emplace("OUTSOL", OUTSOL()); + this->keywords.emplace("OVERBURD", OVERBURD()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinP.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinP.cpp new file mode 100644 index 0000000000..bcce11eacc --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinP.cpp @@ -0,0 +1,215 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_PARALLEL() { return PARALLEL(); } +const ::Opm::ParserKeyword Builtin::get_PARAOPTS() { return PARAOPTS(); } +const ::Opm::ParserKeyword Builtin::get_PARTTRAC() { return PARTTRAC(); } +const ::Opm::ParserKeyword Builtin::get_PATHS() { return PATHS(); } +const ::Opm::ParserKeyword Builtin::get_PBUB() { return PBUB(); } +const ::Opm::ParserKeyword Builtin::get_PBVD() { return PBVD(); } +const ::Opm::ParserKeyword Builtin::get_PCFACT() { return PCFACT(); } +const ::Opm::ParserKeyword Builtin::get_PCG() { return PCG(); } +const ::Opm::ParserKeyword Builtin::get_PCG32D() { return PCG32D(); } +const ::Opm::ParserKeyword Builtin::get_PCRIT() { return PCRIT(); } +const ::Opm::ParserKeyword Builtin::get_PCW() { return PCW(); } +const ::Opm::ParserKeyword Builtin::get_PCW32D() { return PCW32D(); } +const ::Opm::ParserKeyword Builtin::get_PDEW() { return PDEW(); } +const ::Opm::ParserKeyword Builtin::get_PDVD() { return PDVD(); } +const ::Opm::ParserKeyword Builtin::get_PEBI() { return PEBI(); } +const ::Opm::ParserKeyword Builtin::get_PECOEFS() { return PECOEFS(); } +const ::Opm::ParserKeyword Builtin::get_PEDIMS() { return PEDIMS(); } +const ::Opm::ParserKeyword Builtin::get_PEGTABX() { return PEGTABX(); } +const ::Opm::ParserKeyword Builtin::get_PEKTABX() { return PEKTABX(); } +const ::Opm::ParserKeyword Builtin::get_PENUM() { return PENUM(); } +const ::Opm::ParserKeyword Builtin::get_PERFORMANCE_PROBE() { return PERFORMANCE_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_PERMAVE() { return PERMAVE(); } +const ::Opm::ParserKeyword Builtin::get_PERMFACT() { return PERMFACT(); } +const ::Opm::ParserKeyword Builtin::get_PERMJFUN() { return PERMJFUN(); } +const ::Opm::ParserKeyword Builtin::get_PERMR() { return PERMR(); } +const ::Opm::ParserKeyword Builtin::get_PERMTHT() { return PERMTHT(); } +const ::Opm::ParserKeyword Builtin::get_PERMX() { return PERMX(); } +const ::Opm::ParserKeyword Builtin::get_PERMXY() { return PERMXY(); } +const ::Opm::ParserKeyword Builtin::get_PERMY() { return PERMY(); } +const ::Opm::ParserKeyword Builtin::get_PERMYZ() { return PERMYZ(); } +const ::Opm::ParserKeyword Builtin::get_PERMZ() { return PERMZ(); } +const ::Opm::ParserKeyword Builtin::get_PERMZX() { return PERMZX(); } +const ::Opm::ParserKeyword Builtin::get_PETGRID() { return PETGRID(); } +const ::Opm::ParserKeyword Builtin::get_PETOPTS() { return PETOPTS(); } +const ::Opm::ParserKeyword Builtin::get_PICOND() { return PICOND(); } +const ::Opm::ParserKeyword Builtin::get_PIMTDIMS() { return PIMTDIMS(); } +const ::Opm::ParserKeyword Builtin::get_PIMULTAB() { return PIMULTAB(); } +const ::Opm::ParserKeyword Builtin::get_PINCH() { return PINCH(); } +const ::Opm::ParserKeyword Builtin::get_PINCHNUM() { return PINCHNUM(); } +const ::Opm::ParserKeyword Builtin::get_PINCHOUT() { return PINCHOUT(); } +const ::Opm::ParserKeyword Builtin::get_PINCHREG() { return PINCHREG(); } +const ::Opm::ParserKeyword Builtin::get_PINCHXY() { return PINCHXY(); } +const ::Opm::ParserKeyword Builtin::get_PINTDIMS() { return PINTDIMS(); } +const ::Opm::ParserKeyword Builtin::get_PLMIXNUM() { return PLMIXNUM(); } +const ::Opm::ParserKeyword Builtin::get_PLMIXPAR() { return PLMIXPAR(); } +const ::Opm::ParserKeyword Builtin::get_PLYADS() { return PLYADS(); } +const ::Opm::ParserKeyword Builtin::get_PLYADSS() { return PLYADSS(); } +const ::Opm::ParserKeyword Builtin::get_PLYATEMP() { return PLYATEMP(); } +const ::Opm::ParserKeyword Builtin::get_PLYCAMAX() { return PLYCAMAX(); } +const ::Opm::ParserKeyword Builtin::get_PLYDHFLF() { return PLYDHFLF(); } +const ::Opm::ParserKeyword Builtin::get_PLYESAL() { return PLYESAL(); } +const ::Opm::ParserKeyword Builtin::get_PLYKRRF() { return PLYKRRF(); } +const ::Opm::ParserKeyword Builtin::get_PLYMAX() { return PLYMAX(); } +const ::Opm::ParserKeyword Builtin::get_PLYMWINJ() { return PLYMWINJ(); } +const ::Opm::ParserKeyword Builtin::get_PLYOPTS() { return PLYOPTS(); } +const ::Opm::ParserKeyword Builtin::get_PLYRMDEN() { return PLYRMDEN(); } +const ::Opm::ParserKeyword Builtin::get_PLYROCK() { return PLYROCK(); } +const ::Opm::ParserKeyword Builtin::get_PLYROCKM() { return PLYROCKM(); } +const ::Opm::ParserKeyword Builtin::get_PLYSHEAR() { return PLYSHEAR(); } +const ::Opm::ParserKeyword Builtin::get_PLYSHLOG() { return PLYSHLOG(); } +const ::Opm::ParserKeyword Builtin::get_PLYTRRF() { return PLYTRRF(); } +const ::Opm::ParserKeyword Builtin::get_PLYTRRFA() { return PLYTRRFA(); } +const ::Opm::ParserKeyword Builtin::get_PLYVISC() { return PLYVISC(); } +const ::Opm::ParserKeyword Builtin::get_PLYVISCS() { return PLYVISCS(); } +const ::Opm::ParserKeyword Builtin::get_PLYVISCT() { return PLYVISCT(); } +const ::Opm::ParserKeyword Builtin::get_PLYVMH() { return PLYVMH(); } +const ::Opm::ParserKeyword Builtin::get_PLYVSCST() { return PLYVSCST(); } +const ::Opm::ParserKeyword Builtin::get_PMAX() { return PMAX(); } +const ::Opm::ParserKeyword Builtin::get_PMISC() { return PMISC(); } +const ::Opm::ParserKeyword Builtin::get_POELCOEF() { return POELCOEF(); } +const ::Opm::ParserKeyword Builtin::get_POLYMER() { return POLYMER(); } +const ::Opm::ParserKeyword Builtin::get_POLYMW() { return POLYMW(); } +const ::Opm::ParserKeyword Builtin::get_PORO() { return PORO(); } +const ::Opm::ParserKeyword Builtin::get_PORV() { return PORV(); } +const ::Opm::ParserKeyword Builtin::get_PPCWMAX() { return PPCWMAX(); } +const ::Opm::ParserKeyword Builtin::get_PRATIO() { return PRATIO(); } +const ::Opm::ParserKeyword Builtin::get_PRECSALT() { return PRECSALT(); } +const ::Opm::ParserKeyword Builtin::get_PREF() { return PREF(); } +const ::Opm::ParserKeyword Builtin::get_PREFS() { return PREFS(); } +const ::Opm::ParserKeyword Builtin::get_PRESSURE() { return PRESSURE(); } +const ::Opm::ParserKeyword Builtin::get_PRIORITY() { return PRIORITY(); } +const ::Opm::ParserKeyword Builtin::get_PROPS() { return PROPS(); } +const ::Opm::ParserKeyword Builtin::get_PRORDER() { return PRORDER(); } +const ::Opm::ParserKeyword Builtin::get_PRVD() { return PRVD(); } +const ::Opm::ParserKeyword Builtin::get_PSTEADY() { return PSTEADY(); } +const ::Opm::ParserKeyword Builtin::get_PSWRG() { return PSWRG(); } +const ::Opm::ParserKeyword Builtin::get_PSWRO() { return PSWRO(); } +const ::Opm::ParserKeyword Builtin::get_PVCDO() { return PVCDO(); } +const ::Opm::ParserKeyword Builtin::get_PVCO() { return PVCO(); } +const ::Opm::ParserKeyword Builtin::get_PVDG() { return PVDG(); } +const ::Opm::ParserKeyword Builtin::get_PVDO() { return PVDO(); } +const ::Opm::ParserKeyword Builtin::get_PVDS() { return PVDS(); } +const ::Opm::ParserKeyword Builtin::get_PVTG() { return PVTG(); } +const ::Opm::ParserKeyword Builtin::get_PVTGW() { return PVTGW(); } +const ::Opm::ParserKeyword Builtin::get_PVTGWO() { return PVTGWO(); } +const ::Opm::ParserKeyword Builtin::get_PVTNUM() { return PVTNUM(); } +const ::Opm::ParserKeyword Builtin::get_PVTO() { return PVTO(); } +const ::Opm::ParserKeyword Builtin::get_PVTSOL() { return PVTSOL(); } +const ::Opm::ParserKeyword Builtin::get_PVTW() { return PVTW(); } +const ::Opm::ParserKeyword Builtin::get_PVTWSALT() { return PVTWSALT(); } +const ::Opm::ParserKeyword Builtin::get_PVT_M() { return PVT_M(); } +const ::Opm::ParserKeyword Builtin::get_PVZG() { return PVZG(); } +const ::Opm::ParserKeyword Builtin::get_PYACTION() { return PYACTION(); } +const ::Opm::ParserKeyword Builtin::get_PYINPUT() { return PYINPUT(); } + +void Builtin::emplaceP() const { + this->keywords.emplace("PARALLEL", PARALLEL()); + this->keywords.emplace("PARAOPTS", PARAOPTS()); + this->keywords.emplace("PARTTRAC", PARTTRAC()); + this->keywords.emplace("PATHS", PATHS()); + this->keywords.emplace("PBUB", PBUB()); + this->keywords.emplace("PBVD", PBVD()); + this->keywords.emplace("PCFACT", PCFACT()); + this->keywords.emplace("PCG", PCG()); + this->keywords.emplace("PCG32D", PCG32D()); + this->keywords.emplace("PCRIT", PCRIT()); + this->keywords.emplace("PCW", PCW()); + this->keywords.emplace("PCW32D", PCW32D()); + this->keywords.emplace("PDEW", PDEW()); + this->keywords.emplace("PDVD", PDVD()); + this->keywords.emplace("PEBI", PEBI()); + this->keywords.emplace("PECOEFS", PECOEFS()); + this->keywords.emplace("PEDIMS", PEDIMS()); + this->keywords.emplace("PEGTABX", PEGTABX()); + this->keywords.emplace("PEKTABX", PEKTABX()); + this->keywords.emplace("PENUM", PENUM()); + this->keywords.emplace("PERFORMANCE_PROBE", PERFORMANCE_PROBE()); + this->keywords.emplace("PERMAVE", PERMAVE()); + this->keywords.emplace("PERMFACT", PERMFACT()); + this->keywords.emplace("PERMJFUN", PERMJFUN()); + this->keywords.emplace("PERMR", PERMR()); + this->keywords.emplace("PERMTHT", PERMTHT()); + this->keywords.emplace("PERMX", PERMX()); + this->keywords.emplace("PERMXY", PERMXY()); + this->keywords.emplace("PERMY", PERMY()); + this->keywords.emplace("PERMYZ", PERMYZ()); + this->keywords.emplace("PERMZ", PERMZ()); + this->keywords.emplace("PERMZX", PERMZX()); + this->keywords.emplace("PETGRID", PETGRID()); + this->keywords.emplace("PETOPTS", PETOPTS()); + this->keywords.emplace("PICOND", PICOND()); + this->keywords.emplace("PIMTDIMS", PIMTDIMS()); + this->keywords.emplace("PIMULTAB", PIMULTAB()); + this->keywords.emplace("PINCH", PINCH()); + this->keywords.emplace("PINCHNUM", PINCHNUM()); + this->keywords.emplace("PINCHOUT", PINCHOUT()); + this->keywords.emplace("PINCHREG", PINCHREG()); + this->keywords.emplace("PINCHXY", PINCHXY()); + this->keywords.emplace("PINTDIMS", PINTDIMS()); + this->keywords.emplace("PLMIXNUM", PLMIXNUM()); + this->keywords.emplace("PLMIXPAR", PLMIXPAR()); + this->keywords.emplace("PLYADS", PLYADS()); + this->keywords.emplace("PLYADSS", PLYADSS()); + this->keywords.emplace("PLYATEMP", PLYATEMP()); + this->keywords.emplace("PLYCAMAX", PLYCAMAX()); + this->keywords.emplace("PLYDHFLF", PLYDHFLF()); + this->keywords.emplace("PLYESAL", PLYESAL()); + this->keywords.emplace("PLYKRRF", PLYKRRF()); + this->keywords.emplace("PLYMAX", PLYMAX()); + this->keywords.emplace("PLYMWINJ", PLYMWINJ()); + this->keywords.emplace("PLYOPTS", PLYOPTS()); + this->keywords.emplace("PLYRMDEN", PLYRMDEN()); + this->keywords.emplace("PLYROCK", PLYROCK()); + this->keywords.emplace("PLYROCKM", PLYROCKM()); + this->keywords.emplace("PLYSHEAR", PLYSHEAR()); + this->keywords.emplace("PLYSHLOG", PLYSHLOG()); + this->keywords.emplace("PLYTRRF", PLYTRRF()); + this->keywords.emplace("PLYTRRFA", PLYTRRFA()); + this->keywords.emplace("PLYVISC", PLYVISC()); + this->keywords.emplace("PLYVISCS", PLYVISCS()); + this->keywords.emplace("PLYVISCT", PLYVISCT()); + this->keywords.emplace("PLYVMH", PLYVMH()); + this->keywords.emplace("PLYVSCST", PLYVSCST()); + this->keywords.emplace("PMAX", PMAX()); + this->keywords.emplace("PMISC", PMISC()); + this->keywords.emplace("POELCOEF", POELCOEF()); + this->keywords.emplace("POLYMER", POLYMER()); + this->keywords.emplace("POLYMW", POLYMW()); + this->keywords.emplace("PORO", PORO()); + this->keywords.emplace("PORV", PORV()); + this->keywords.emplace("PPCWMAX", PPCWMAX()); + this->keywords.emplace("PRATIO", PRATIO()); + this->keywords.emplace("PRECSALT", PRECSALT()); + this->keywords.emplace("PREF", PREF()); + this->keywords.emplace("PREFS", PREFS()); + this->keywords.emplace("PRESSURE", PRESSURE()); + this->keywords.emplace("PRIORITY", PRIORITY()); + this->keywords.emplace("PROPS", PROPS()); + this->keywords.emplace("PRORDER", PRORDER()); + this->keywords.emplace("PRVD", PRVD()); + this->keywords.emplace("PSTEADY", PSTEADY()); + this->keywords.emplace("PSWRG", PSWRG()); + this->keywords.emplace("PSWRO", PSWRO()); + this->keywords.emplace("PVCDO", PVCDO()); + this->keywords.emplace("PVCO", PVCO()); + this->keywords.emplace("PVDG", PVDG()); + this->keywords.emplace("PVDO", PVDO()); + this->keywords.emplace("PVDS", PVDS()); + this->keywords.emplace("PVTG", PVTG()); + this->keywords.emplace("PVTGW", PVTGW()); + this->keywords.emplace("PVTGWO", PVTGWO()); + this->keywords.emplace("PVTNUM", PVTNUM()); + this->keywords.emplace("PVTO", PVTO()); + this->keywords.emplace("PVTSOL", PVTSOL()); + this->keywords.emplace("PVTW", PVTW()); + this->keywords.emplace("PVTWSALT", PVTWSALT()); + this->keywords.emplace("PVT_M", PVT_M()); + this->keywords.emplace("PVZG", PVZG()); + this->keywords.emplace("PYACTION", PYACTION()); + this->keywords.emplace("PYINPUT", PYINPUT()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinQ.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinQ.cpp new file mode 100644 index 0000000000..7861e1b478 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinQ.cpp @@ -0,0 +1,13 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_QDRILL() { return QDRILL(); } +const ::Opm::ParserKeyword Builtin::get_QHRATING() { return QHRATING(); } +const ::Opm::ParserKeyword Builtin::get_QMOBIL() { return QMOBIL(); } + +void Builtin::emplaceQ() const { + this->keywords.emplace("QDRILL", QDRILL()); + this->keywords.emplace("QHRATING", QHRATING()); + this->keywords.emplace("QMOBIL", QMOBIL()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinR.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinR.cpp new file mode 100644 index 0000000000..4d38dea0c4 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinR.cpp @@ -0,0 +1,163 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_RADFIN() { return RADFIN(); } +const ::Opm::ParserKeyword Builtin::get_RADFIN4() { return RADFIN4(); } +const ::Opm::ParserKeyword Builtin::get_RADIAL() { return RADIAL(); } +const ::Opm::ParserKeyword Builtin::get_RAINFALL() { return RAINFALL(); } +const ::Opm::ParserKeyword Builtin::get_RBEDCONT() { return RBEDCONT(); } +const ::Opm::ParserKeyword Builtin::get_RCMASTS() { return RCMASTS(); } +const ::Opm::ParserKeyword Builtin::get_REACHES() { return REACHES(); } +const ::Opm::ParserKeyword Builtin::get_READDATA() { return READDATA(); } +const ::Opm::ParserKeyword Builtin::get_REFINE() { return REFINE(); } +const ::Opm::ParserKeyword Builtin::get_REGDIMS() { return REGDIMS(); } +const ::Opm::ParserKeyword Builtin::get_REGION2REGION_PROBE() { return REGION2REGION_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_REGION2REGION_PROBE_E300() { return REGION2REGION_PROBE_E300(); } +const ::Opm::ParserKeyword Builtin::get_REGIONS() { return REGIONS(); } +const ::Opm::ParserKeyword Builtin::get_REGION_PROBE() { return REGION_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_REGION_PROBE_OPM() { return REGION_PROBE_OPM(); } +const ::Opm::ParserKeyword Builtin::get_RESIDNUM() { return RESIDNUM(); } +const ::Opm::ParserKeyword Builtin::get_RESTART() { return RESTART(); } +const ::Opm::ParserKeyword Builtin::get_RESVNUM() { return RESVNUM(); } +const ::Opm::ParserKeyword Builtin::get_RHO() { return RHO(); } +const ::Opm::ParserKeyword Builtin::get_RIVDEBUG() { return RIVDEBUG(); } +const ::Opm::ParserKeyword Builtin::get_RIVERSYS() { return RIVERSYS(); } +const ::Opm::ParserKeyword Builtin::get_RIVRDIMS() { return RIVRDIMS(); } +const ::Opm::ParserKeyword Builtin::get_RIVRPROP() { return RIVRPROP(); } +const ::Opm::ParserKeyword Builtin::get_RIVRXSEC() { return RIVRXSEC(); } +const ::Opm::ParserKeyword Builtin::get_RIVSALT() { return RIVSALT(); } +const ::Opm::ParserKeyword Builtin::get_RIVTRACE() { return RIVTRACE(); } +const ::Opm::ParserKeyword Builtin::get_RKTRMDIR() { return RKTRMDIR(); } +const ::Opm::ParserKeyword Builtin::get_ROCK() { return ROCK(); } +const ::Opm::ParserKeyword Builtin::get_ROCK2D() { return ROCK2D(); } +const ::Opm::ParserKeyword Builtin::get_ROCK2DTR() { return ROCK2DTR(); } +const ::Opm::ParserKeyword Builtin::get_ROCKCOMP() { return ROCKCOMP(); } +const ::Opm::ParserKeyword Builtin::get_ROCKFRAC() { return ROCKFRAC(); } +const ::Opm::ParserKeyword Builtin::get_ROCKNUM() { return ROCKNUM(); } +const ::Opm::ParserKeyword Builtin::get_ROCKOPTS() { return ROCKOPTS(); } +const ::Opm::ParserKeyword Builtin::get_ROCKPAMA() { return ROCKPAMA(); } +const ::Opm::ParserKeyword Builtin::get_ROCKTAB() { return ROCKTAB(); } +const ::Opm::ParserKeyword Builtin::get_ROCKTABH() { return ROCKTABH(); } +const ::Opm::ParserKeyword Builtin::get_ROCKTABW() { return ROCKTABW(); } +const ::Opm::ParserKeyword Builtin::get_ROCKTHSG() { return ROCKTHSG(); } +const ::Opm::ParserKeyword Builtin::get_ROCKTSIG() { return ROCKTSIG(); } +const ::Opm::ParserKeyword Builtin::get_ROCKV() { return ROCKV(); } +const ::Opm::ParserKeyword Builtin::get_ROCKWNOD() { return ROCKWNOD(); } +const ::Opm::ParserKeyword Builtin::get_RPTCPL() { return RPTCPL(); } +const ::Opm::ParserKeyword Builtin::get_RPTGRID() { return RPTGRID(); } +const ::Opm::ParserKeyword Builtin::get_RPTGRIDL() { return RPTGRIDL(); } +const ::Opm::ParserKeyword Builtin::get_RPTHMD() { return RPTHMD(); } +const ::Opm::ParserKeyword Builtin::get_RPTHMG() { return RPTHMG(); } +const ::Opm::ParserKeyword Builtin::get_RPTHMW() { return RPTHMW(); } +const ::Opm::ParserKeyword Builtin::get_RPTINIT() { return RPTINIT(); } +const ::Opm::ParserKeyword Builtin::get_RPTISOL() { return RPTISOL(); } +const ::Opm::ParserKeyword Builtin::get_RPTONLY() { return RPTONLY(); } +const ::Opm::ParserKeyword Builtin::get_RPTONLYO() { return RPTONLYO(); } +const ::Opm::ParserKeyword Builtin::get_RPTPROPS() { return RPTPROPS(); } +const ::Opm::ParserKeyword Builtin::get_RPTREGS() { return RPTREGS(); } +const ::Opm::ParserKeyword Builtin::get_RPTRST() { return RPTRST(); } +const ::Opm::ParserKeyword Builtin::get_RPTRUNSP() { return RPTRUNSP(); } +const ::Opm::ParserKeyword Builtin::get_RPTSCHED() { return RPTSCHED(); } +const ::Opm::ParserKeyword Builtin::get_RPTSMRY() { return RPTSMRY(); } +const ::Opm::ParserKeyword Builtin::get_RPTSOL() { return RPTSOL(); } +const ::Opm::ParserKeyword Builtin::get_RS() { return RS(); } +const ::Opm::ParserKeyword Builtin::get_RSCONST() { return RSCONST(); } +const ::Opm::ParserKeyword Builtin::get_RSCONSTT() { return RSCONSTT(); } +const ::Opm::ParserKeyword Builtin::get_RSGI() { return RSGI(); } +const ::Opm::ParserKeyword Builtin::get_RSSPEC() { return RSSPEC(); } +const ::Opm::ParserKeyword Builtin::get_RSVD() { return RSVD(); } +const ::Opm::ParserKeyword Builtin::get_RTEMP() { return RTEMP(); } +const ::Opm::ParserKeyword Builtin::get_RTEMPA() { return RTEMPA(); } +const ::Opm::ParserKeyword Builtin::get_RTEMPVD() { return RTEMPVD(); } +const ::Opm::ParserKeyword Builtin::get_RUNSPEC() { return RUNSPEC(); } +const ::Opm::ParserKeyword Builtin::get_RUNSUM() { return RUNSUM(); } +const ::Opm::ParserKeyword Builtin::get_RV() { return RV(); } +const ::Opm::ParserKeyword Builtin::get_RVCONST() { return RVCONST(); } +const ::Opm::ParserKeyword Builtin::get_RVCONSTT() { return RVCONSTT(); } +const ::Opm::ParserKeyword Builtin::get_RVGI() { return RVGI(); } +const ::Opm::ParserKeyword Builtin::get_RVVD() { return RVVD(); } +const ::Opm::ParserKeyword Builtin::get_RVW() { return RVW(); } +const ::Opm::ParserKeyword Builtin::get_RVWVD() { return RVWVD(); } +const ::Opm::ParserKeyword Builtin::get_RWGSALT() { return RWGSALT(); } + +void Builtin::emplaceR() const { + this->keywords.emplace("RADFIN", RADFIN()); + this->keywords.emplace("RADFIN4", RADFIN4()); + this->keywords.emplace("RADIAL", RADIAL()); + this->keywords.emplace("RAINFALL", RAINFALL()); + this->keywords.emplace("RBEDCONT", RBEDCONT()); + this->keywords.emplace("RCMASTS", RCMASTS()); + this->keywords.emplace("REACHES", REACHES()); + this->keywords.emplace("READDATA", READDATA()); + this->keywords.emplace("REFINE", REFINE()); + this->keywords.emplace("REGDIMS", REGDIMS()); + this->keywords.emplace("REGION2REGION_PROBE", REGION2REGION_PROBE()); + this->keywords.emplace("REGION2REGION_PROBE_E300", REGION2REGION_PROBE_E300()); + this->keywords.emplace("REGIONS", REGIONS()); + this->keywords.emplace("REGION_PROBE", REGION_PROBE()); + this->keywords.emplace("REGION_PROBE_OPM", REGION_PROBE_OPM()); + this->keywords.emplace("RESIDNUM", RESIDNUM()); + this->keywords.emplace("RESTART", RESTART()); + this->keywords.emplace("RESVNUM", RESVNUM()); + this->keywords.emplace("RHO", RHO()); + this->keywords.emplace("RIVDEBUG", RIVDEBUG()); + this->keywords.emplace("RIVERSYS", RIVERSYS()); + this->keywords.emplace("RIVRDIMS", RIVRDIMS()); + this->keywords.emplace("RIVRPROP", RIVRPROP()); + this->keywords.emplace("RIVRXSEC", RIVRXSEC()); + this->keywords.emplace("RIVSALT", RIVSALT()); + this->keywords.emplace("RIVTRACE", RIVTRACE()); + this->keywords.emplace("RKTRMDIR", RKTRMDIR()); + this->keywords.emplace("ROCK", ROCK()); + this->keywords.emplace("ROCK2D", ROCK2D()); + this->keywords.emplace("ROCK2DTR", ROCK2DTR()); + this->keywords.emplace("ROCKCOMP", ROCKCOMP()); + this->keywords.emplace("ROCKFRAC", ROCKFRAC()); + this->keywords.emplace("ROCKNUM", ROCKNUM()); + this->keywords.emplace("ROCKOPTS", ROCKOPTS()); + this->keywords.emplace("ROCKPAMA", ROCKPAMA()); + this->keywords.emplace("ROCKTAB", ROCKTAB()); + this->keywords.emplace("ROCKTABH", ROCKTABH()); + this->keywords.emplace("ROCKTABW", ROCKTABW()); + this->keywords.emplace("ROCKTHSG", ROCKTHSG()); + this->keywords.emplace("ROCKTSIG", ROCKTSIG()); + this->keywords.emplace("ROCKV", ROCKV()); + this->keywords.emplace("ROCKWNOD", ROCKWNOD()); + this->keywords.emplace("RPTCPL", RPTCPL()); + this->keywords.emplace("RPTGRID", RPTGRID()); + this->keywords.emplace("RPTGRIDL", RPTGRIDL()); + this->keywords.emplace("RPTHMD", RPTHMD()); + this->keywords.emplace("RPTHMG", RPTHMG()); + this->keywords.emplace("RPTHMW", RPTHMW()); + this->keywords.emplace("RPTINIT", RPTINIT()); + this->keywords.emplace("RPTISOL", RPTISOL()); + this->keywords.emplace("RPTONLY", RPTONLY()); + this->keywords.emplace("RPTONLYO", RPTONLYO()); + this->keywords.emplace("RPTPROPS", RPTPROPS()); + this->keywords.emplace("RPTREGS", RPTREGS()); + this->keywords.emplace("RPTRST", RPTRST()); + this->keywords.emplace("RPTRUNSP", RPTRUNSP()); + this->keywords.emplace("RPTSCHED", RPTSCHED()); + this->keywords.emplace("RPTSMRY", RPTSMRY()); + this->keywords.emplace("RPTSOL", RPTSOL()); + this->keywords.emplace("RS", RS()); + this->keywords.emplace("RSCONST", RSCONST()); + this->keywords.emplace("RSCONSTT", RSCONSTT()); + this->keywords.emplace("RSGI", RSGI()); + this->keywords.emplace("RSSPEC", RSSPEC()); + this->keywords.emplace("RSVD", RSVD()); + this->keywords.emplace("RTEMP", RTEMP()); + this->keywords.emplace("RTEMPA", RTEMPA()); + this->keywords.emplace("RTEMPVD", RTEMPVD()); + this->keywords.emplace("RUNSPEC", RUNSPEC()); + this->keywords.emplace("RUNSUM", RUNSUM()); + this->keywords.emplace("RV", RV()); + this->keywords.emplace("RVCONST", RVCONST()); + this->keywords.emplace("RVCONSTT", RVCONSTT()); + this->keywords.emplace("RVGI", RVGI()); + this->keywords.emplace("RVVD", RVVD()); + this->keywords.emplace("RVW", RVW()); + this->keywords.emplace("RVWVD", RVWVD()); + this->keywords.emplace("RWGSALT", RWGSALT()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinS.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinS.cpp new file mode 100644 index 0000000000..7c08d37298 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinS.cpp @@ -0,0 +1,283 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_SALINITY() { return SALINITY(); } +const ::Opm::ParserKeyword Builtin::get_SALT() { return SALT(); } +const ::Opm::ParserKeyword Builtin::get_SALTMF() { return SALTMF(); } +const ::Opm::ParserKeyword Builtin::get_SALTNODE() { return SALTNODE(); } +const ::Opm::ParserKeyword Builtin::get_SALTP() { return SALTP(); } +const ::Opm::ParserKeyword Builtin::get_SALTPVD() { return SALTPVD(); } +const ::Opm::ParserKeyword Builtin::get_SALTREST() { return SALTREST(); } +const ::Opm::ParserKeyword Builtin::get_SALTSOL() { return SALTSOL(); } +const ::Opm::ParserKeyword Builtin::get_SALTVD() { return SALTVD(); } +const ::Opm::ParserKeyword Builtin::get_SAMG() { return SAMG(); } +const ::Opm::ParserKeyword Builtin::get_SATNUM() { return SATNUM(); } +const ::Opm::ParserKeyword Builtin::get_SATOPTS() { return SATOPTS(); } +const ::Opm::ParserKeyword Builtin::get_SAVE() { return SAVE(); } +const ::Opm::ParserKeyword Builtin::get_SBIOF() { return SBIOF(); } +const ::Opm::ParserKeyword Builtin::get_SCALC() { return SCALC(); } +const ::Opm::ParserKeyword Builtin::get_SCALECRS() { return SCALECRS(); } +const ::Opm::ParserKeyword Builtin::get_SCALELIM() { return SCALELIM(); } +const ::Opm::ParserKeyword Builtin::get_SCDATAB() { return SCDATAB(); } +const ::Opm::ParserKeyword Builtin::get_SCDETAB() { return SCDETAB(); } +const ::Opm::ParserKeyword Builtin::get_SCDPDIMS() { return SCDPDIMS(); } +const ::Opm::ParserKeyword Builtin::get_SCDPTAB() { return SCDPTAB(); } +const ::Opm::ParserKeyword Builtin::get_SCDPTRAC() { return SCDPTRAC(); } +const ::Opm::ParserKeyword Builtin::get_SCHEDULE() { return SCHEDULE(); } +const ::Opm::ParserKeyword Builtin::get_SCVD() { return SCVD(); } +const ::Opm::ParserKeyword Builtin::get_SDENSITY() { return SDENSITY(); } +const ::Opm::ParserKeyword Builtin::get_SEGMENT_PROBE() { return SEGMENT_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_SEPARATE() { return SEPARATE(); } +const ::Opm::ParserKeyword Builtin::get_SEPVALS() { return SEPVALS(); } +const ::Opm::ParserKeyword Builtin::get_SFOAM() { return SFOAM(); } +const ::Opm::ParserKeyword Builtin::get_SGAS() { return SGAS(); } +const ::Opm::ParserKeyword Builtin::get_SGCR() { return SGCR(); } +const ::Opm::ParserKeyword Builtin::get_SGCWMIS() { return SGCWMIS(); } +const ::Opm::ParserKeyword Builtin::get_SGF32D() { return SGF32D(); } +const ::Opm::ParserKeyword Builtin::get_SGFN() { return SGFN(); } +const ::Opm::ParserKeyword Builtin::get_SGL() { return SGL(); } +const ::Opm::ParserKeyword Builtin::get_SGLPC() { return SGLPC(); } +const ::Opm::ParserKeyword Builtin::get_SGOF() { return SGOF(); } +const ::Opm::ParserKeyword Builtin::get_SGOFLET() { return SGOFLET(); } +const ::Opm::ParserKeyword Builtin::get_SGU() { return SGU(); } +const ::Opm::ParserKeyword Builtin::get_SGWFN() { return SGWFN(); } +const ::Opm::ParserKeyword Builtin::get_SHRATE() { return SHRATE(); } +const ::Opm::ParserKeyword Builtin::get_SIGMA() { return SIGMA(); } +const ::Opm::ParserKeyword Builtin::get_SIGMAGDV() { return SIGMAGDV(); } +const ::Opm::ParserKeyword Builtin::get_SIGMATH() { return SIGMATH(); } +const ::Opm::ParserKeyword Builtin::get_SIGMAV() { return SIGMAV(); } +const ::Opm::ParserKeyword Builtin::get_SIMULATE() { return SIMULATE(); } +const ::Opm::ParserKeyword Builtin::get_SKIP() { return SKIP(); } +const ::Opm::ParserKeyword Builtin::get_SKIP100() { return SKIP100(); } +const ::Opm::ParserKeyword Builtin::get_SKIP300() { return SKIP300(); } +const ::Opm::ParserKeyword Builtin::get_SKIPREST() { return SKIPREST(); } +const ::Opm::ParserKeyword Builtin::get_SKPRPOLY() { return SKPRPOLY(); } +const ::Opm::ParserKeyword Builtin::get_SKPRWAT() { return SKPRWAT(); } +const ::Opm::ParserKeyword Builtin::get_SKRO() { return SKRO(); } +const ::Opm::ParserKeyword Builtin::get_SKRORG() { return SKRORG(); } +const ::Opm::ParserKeyword Builtin::get_SKRORW() { return SKRORW(); } +const ::Opm::ParserKeyword Builtin::get_SKRW() { return SKRW(); } +const ::Opm::ParserKeyword Builtin::get_SKRWR() { return SKRWR(); } +const ::Opm::ParserKeyword Builtin::get_SLAVES() { return SLAVES(); } +const ::Opm::ParserKeyword Builtin::get_SLGOF() { return SLGOF(); } +const ::Opm::ParserKeyword Builtin::get_SMICR() { return SMICR(); } +const ::Opm::ParserKeyword Builtin::get_SMRYDIMS() { return SMRYDIMS(); } +const ::Opm::ParserKeyword Builtin::get_SMULTX() { return SMULTX(); } +const ::Opm::ParserKeyword Builtin::get_SMULTY() { return SMULTY(); } +const ::Opm::ParserKeyword Builtin::get_SMULTZ() { return SMULTZ(); } +const ::Opm::ParserKeyword Builtin::get_SOCRS() { return SOCRS(); } +const ::Opm::ParserKeyword Builtin::get_SOF2() { return SOF2(); } +const ::Opm::ParserKeyword Builtin::get_SOF3() { return SOF3(); } +const ::Opm::ParserKeyword Builtin::get_SOF32D() { return SOF32D(); } +const ::Opm::ParserKeyword Builtin::get_SOGCR() { return SOGCR(); } +const ::Opm::ParserKeyword Builtin::get_SOIL() { return SOIL(); } +const ::Opm::ParserKeyword Builtin::get_SOLID() { return SOLID(); } +const ::Opm::ParserKeyword Builtin::get_SOLUTION() { return SOLUTION(); } +const ::Opm::ParserKeyword Builtin::get_SOLVCONC() { return SOLVCONC(); } +const ::Opm::ParserKeyword Builtin::get_SOLVDIMS() { return SOLVDIMS(); } +const ::Opm::ParserKeyword Builtin::get_SOLVDIRS() { return SOLVDIRS(); } +const ::Opm::ParserKeyword Builtin::get_SOLVENT() { return SOLVENT(); } +const ::Opm::ParserKeyword Builtin::get_SOLVFRAC() { return SOLVFRAC(); } +const ::Opm::ParserKeyword Builtin::get_SOLVNUM() { return SOLVNUM(); } +const ::Opm::ParserKeyword Builtin::get_SOMGAS() { return SOMGAS(); } +const ::Opm::ParserKeyword Builtin::get_SOMWAT() { return SOMWAT(); } +const ::Opm::ParserKeyword Builtin::get_SORWMIS() { return SORWMIS(); } +const ::Opm::ParserKeyword Builtin::get_SOURCE() { return SOURCE(); } +const ::Opm::ParserKeyword Builtin::get_SOWCR() { return SOWCR(); } +const ::Opm::ParserKeyword Builtin::get_SOXYG() { return SOXYG(); } +const ::Opm::ParserKeyword Builtin::get_SPECGRID() { return SPECGRID(); } +const ::Opm::ParserKeyword Builtin::get_SPECHEAT() { return SPECHEAT(); } +const ::Opm::ParserKeyword Builtin::get_SPECROCK() { return SPECROCK(); } +const ::Opm::ParserKeyword Builtin::get_SPIDER() { return SPIDER(); } +const ::Opm::ParserKeyword Builtin::get_SPOLY() { return SPOLY(); } +const ::Opm::ParserKeyword Builtin::get_SPOLYMW() { return SPOLYMW(); } +const ::Opm::ParserKeyword Builtin::get_SSFN() { return SSFN(); } +const ::Opm::ParserKeyword Builtin::get_SSGCR() { return SSGCR(); } +const ::Opm::ParserKeyword Builtin::get_SSGL() { return SSGL(); } +const ::Opm::ParserKeyword Builtin::get_SSOGCR() { return SSOGCR(); } +const ::Opm::ParserKeyword Builtin::get_SSOL() { return SSOL(); } +const ::Opm::ParserKeyword Builtin::get_SSOWCR() { return SSOWCR(); } +const ::Opm::ParserKeyword Builtin::get_SSWCR() { return SSWCR(); } +const ::Opm::ParserKeyword Builtin::get_SSWL() { return SSWL(); } +const ::Opm::ParserKeyword Builtin::get_SSWU() { return SSWU(); } +const ::Opm::ParserKeyword Builtin::get_START() { return START(); } +const ::Opm::ParserKeyword Builtin::get_STCOND() { return STCOND(); } +const ::Opm::ParserKeyword Builtin::get_STOG() { return STOG(); } +const ::Opm::ParserKeyword Builtin::get_STONE() { return STONE(); } +const ::Opm::ParserKeyword Builtin::get_STONE1() { return STONE1(); } +const ::Opm::ParserKeyword Builtin::get_STONE1EX() { return STONE1EX(); } +const ::Opm::ParserKeyword Builtin::get_STONE2() { return STONE2(); } +const ::Opm::ParserKeyword Builtin::get_STOW() { return STOW(); } +const ::Opm::ParserKeyword Builtin::get_STREQUIL() { return STREQUIL(); } +const ::Opm::ParserKeyword Builtin::get_STRESSEQUILNUM() { return STRESSEQUILNUM(); } +const ::Opm::ParserKeyword Builtin::get_STWG() { return STWG(); } +const ::Opm::ParserKeyword Builtin::get_SUMMARY() { return SUMMARY(); } +const ::Opm::ParserKeyword Builtin::get_SUMTHIN() { return SUMTHIN(); } +const ::Opm::ParserKeyword Builtin::get_SUREA() { return SUREA(); } +const ::Opm::ParserKeyword Builtin::get_SURF() { return SURF(); } +const ::Opm::ParserKeyword Builtin::get_SURFACT() { return SURFACT(); } +const ::Opm::ParserKeyword Builtin::get_SURFACTW() { return SURFACTW(); } +const ::Opm::ParserKeyword Builtin::get_SURFADDW() { return SURFADDW(); } +const ::Opm::ParserKeyword Builtin::get_SURFADS() { return SURFADS(); } +const ::Opm::ParserKeyword Builtin::get_SURFCAPD() { return SURFCAPD(); } +const ::Opm::ParserKeyword Builtin::get_SURFESAL() { return SURFESAL(); } +const ::Opm::ParserKeyword Builtin::get_SURFNUM() { return SURFNUM(); } +const ::Opm::ParserKeyword Builtin::get_SURFOPTS() { return SURFOPTS(); } +const ::Opm::ParserKeyword Builtin::get_SURFROCK() { return SURFROCK(); } +const ::Opm::ParserKeyword Builtin::get_SURFST() { return SURFST(); } +const ::Opm::ParserKeyword Builtin::get_SURFSTES() { return SURFSTES(); } +const ::Opm::ParserKeyword Builtin::get_SURFVISC() { return SURFVISC(); } +const ::Opm::ParserKeyword Builtin::get_SURFWNUM() { return SURFWNUM(); } +const ::Opm::ParserKeyword Builtin::get_SWAT() { return SWAT(); } +const ::Opm::ParserKeyword Builtin::get_SWATINIT() { return SWATINIT(); } +const ::Opm::ParserKeyword Builtin::get_SWCR() { return SWCR(); } +const ::Opm::ParserKeyword Builtin::get_SWF32D() { return SWF32D(); } +const ::Opm::ParserKeyword Builtin::get_SWFN() { return SWFN(); } +const ::Opm::ParserKeyword Builtin::get_SWINGFAC() { return SWINGFAC(); } +const ::Opm::ParserKeyword Builtin::get_SWL() { return SWL(); } +const ::Opm::ParserKeyword Builtin::get_SWLPC() { return SWLPC(); } +const ::Opm::ParserKeyword Builtin::get_SWOF() { return SWOF(); } +const ::Opm::ParserKeyword Builtin::get_SWOFLET() { return SWOFLET(); } +const ::Opm::ParserKeyword Builtin::get_SWU() { return SWU(); } + +void Builtin::emplaceS() const { + this->keywords.emplace("SALINITY", SALINITY()); + this->keywords.emplace("SALT", SALT()); + this->keywords.emplace("SALTMF", SALTMF()); + this->keywords.emplace("SALTNODE", SALTNODE()); + this->keywords.emplace("SALTP", SALTP()); + this->keywords.emplace("SALTPVD", SALTPVD()); + this->keywords.emplace("SALTREST", SALTREST()); + this->keywords.emplace("SALTSOL", SALTSOL()); + this->keywords.emplace("SALTVD", SALTVD()); + this->keywords.emplace("SAMG", SAMG()); + this->keywords.emplace("SATNUM", SATNUM()); + this->keywords.emplace("SATOPTS", SATOPTS()); + this->keywords.emplace("SAVE", SAVE()); + this->keywords.emplace("SBIOF", SBIOF()); + this->keywords.emplace("SCALC", SCALC()); + this->keywords.emplace("SCALECRS", SCALECRS()); + this->keywords.emplace("SCALELIM", SCALELIM()); + this->keywords.emplace("SCDATAB", SCDATAB()); + this->keywords.emplace("SCDETAB", SCDETAB()); + this->keywords.emplace("SCDPDIMS", SCDPDIMS()); + this->keywords.emplace("SCDPTAB", SCDPTAB()); + this->keywords.emplace("SCDPTRAC", SCDPTRAC()); + this->keywords.emplace("SCHEDULE", SCHEDULE()); + this->keywords.emplace("SCVD", SCVD()); + this->keywords.emplace("SDENSITY", SDENSITY()); + this->keywords.emplace("SEGMENT_PROBE", SEGMENT_PROBE()); + this->keywords.emplace("SEPARATE", SEPARATE()); + this->keywords.emplace("SEPVALS", SEPVALS()); + this->keywords.emplace("SFOAM", SFOAM()); + this->keywords.emplace("SGAS", SGAS()); + this->keywords.emplace("SGCR", SGCR()); + this->keywords.emplace("SGCWMIS", SGCWMIS()); + this->keywords.emplace("SGF32D", SGF32D()); + this->keywords.emplace("SGFN", SGFN()); + this->keywords.emplace("SGL", SGL()); + this->keywords.emplace("SGLPC", SGLPC()); + this->keywords.emplace("SGOF", SGOF()); + this->keywords.emplace("SGOFLET", SGOFLET()); + this->keywords.emplace("SGU", SGU()); + this->keywords.emplace("SGWFN", SGWFN()); + this->keywords.emplace("SHRATE", SHRATE()); + this->keywords.emplace("SIGMA", SIGMA()); + this->keywords.emplace("SIGMAGDV", SIGMAGDV()); + this->keywords.emplace("SIGMATH", SIGMATH()); + this->keywords.emplace("SIGMAV", SIGMAV()); + this->keywords.emplace("SIMULATE", SIMULATE()); + this->keywords.emplace("SKIP", SKIP()); + this->keywords.emplace("SKIP100", SKIP100()); + this->keywords.emplace("SKIP300", SKIP300()); + this->keywords.emplace("SKIPREST", SKIPREST()); + this->keywords.emplace("SKPRPOLY", SKPRPOLY()); + this->keywords.emplace("SKPRWAT", SKPRWAT()); + this->keywords.emplace("SKRO", SKRO()); + this->keywords.emplace("SKRORG", SKRORG()); + this->keywords.emplace("SKRORW", SKRORW()); + this->keywords.emplace("SKRW", SKRW()); + this->keywords.emplace("SKRWR", SKRWR()); + this->keywords.emplace("SLAVES", SLAVES()); + this->keywords.emplace("SLGOF", SLGOF()); + this->keywords.emplace("SMICR", SMICR()); + this->keywords.emplace("SMRYDIMS", SMRYDIMS()); + this->keywords.emplace("SMULTX", SMULTX()); + this->keywords.emplace("SMULTY", SMULTY()); + this->keywords.emplace("SMULTZ", SMULTZ()); + this->keywords.emplace("SOCRS", SOCRS()); + this->keywords.emplace("SOF2", SOF2()); + this->keywords.emplace("SOF3", SOF3()); + this->keywords.emplace("SOF32D", SOF32D()); + this->keywords.emplace("SOGCR", SOGCR()); + this->keywords.emplace("SOIL", SOIL()); + this->keywords.emplace("SOLID", SOLID()); + this->keywords.emplace("SOLUTION", SOLUTION()); + this->keywords.emplace("SOLVCONC", SOLVCONC()); + this->keywords.emplace("SOLVDIMS", SOLVDIMS()); + this->keywords.emplace("SOLVDIRS", SOLVDIRS()); + this->keywords.emplace("SOLVENT", SOLVENT()); + this->keywords.emplace("SOLVFRAC", SOLVFRAC()); + this->keywords.emplace("SOLVNUM", SOLVNUM()); + this->keywords.emplace("SOMGAS", SOMGAS()); + this->keywords.emplace("SOMWAT", SOMWAT()); + this->keywords.emplace("SORWMIS", SORWMIS()); + this->keywords.emplace("SOURCE", SOURCE()); + this->keywords.emplace("SOWCR", SOWCR()); + this->keywords.emplace("SOXYG", SOXYG()); + this->keywords.emplace("SPECGRID", SPECGRID()); + this->keywords.emplace("SPECHEAT", SPECHEAT()); + this->keywords.emplace("SPECROCK", SPECROCK()); + this->keywords.emplace("SPIDER", SPIDER()); + this->keywords.emplace("SPOLY", SPOLY()); + this->keywords.emplace("SPOLYMW", SPOLYMW()); + this->keywords.emplace("SSFN", SSFN()); + this->keywords.emplace("SSGCR", SSGCR()); + this->keywords.emplace("SSGL", SSGL()); + this->keywords.emplace("SSOGCR", SSOGCR()); + this->keywords.emplace("SSOL", SSOL()); + this->keywords.emplace("SSOWCR", SSOWCR()); + this->keywords.emplace("SSWCR", SSWCR()); + this->keywords.emplace("SSWL", SSWL()); + this->keywords.emplace("SSWU", SSWU()); + this->keywords.emplace("START", START()); + this->keywords.emplace("STCOND", STCOND()); + this->keywords.emplace("STOG", STOG()); + this->keywords.emplace("STONE", STONE()); + this->keywords.emplace("STONE1", STONE1()); + this->keywords.emplace("STONE1EX", STONE1EX()); + this->keywords.emplace("STONE2", STONE2()); + this->keywords.emplace("STOW", STOW()); + this->keywords.emplace("STREQUIL", STREQUIL()); + this->keywords.emplace("STRESSEQUILNUM", STRESSEQUILNUM()); + this->keywords.emplace("STWG", STWG()); + this->keywords.emplace("SUMMARY", SUMMARY()); + this->keywords.emplace("SUMTHIN", SUMTHIN()); + this->keywords.emplace("SUREA", SUREA()); + this->keywords.emplace("SURF", SURF()); + this->keywords.emplace("SURFACT", SURFACT()); + this->keywords.emplace("SURFACTW", SURFACTW()); + this->keywords.emplace("SURFADDW", SURFADDW()); + this->keywords.emplace("SURFADS", SURFADS()); + this->keywords.emplace("SURFCAPD", SURFCAPD()); + this->keywords.emplace("SURFESAL", SURFESAL()); + this->keywords.emplace("SURFNUM", SURFNUM()); + this->keywords.emplace("SURFOPTS", SURFOPTS()); + this->keywords.emplace("SURFROCK", SURFROCK()); + this->keywords.emplace("SURFST", SURFST()); + this->keywords.emplace("SURFSTES", SURFSTES()); + this->keywords.emplace("SURFVISC", SURFVISC()); + this->keywords.emplace("SURFWNUM", SURFWNUM()); + this->keywords.emplace("SWAT", SWAT()); + this->keywords.emplace("SWATINIT", SWATINIT()); + this->keywords.emplace("SWCR", SWCR()); + this->keywords.emplace("SWF32D", SWF32D()); + this->keywords.emplace("SWFN", SWFN()); + this->keywords.emplace("SWINGFAC", SWINGFAC()); + this->keywords.emplace("SWL", SWL()); + this->keywords.emplace("SWLPC", SWLPC()); + this->keywords.emplace("SWOF", SWOF()); + this->keywords.emplace("SWOFLET", SWOFLET()); + this->keywords.emplace("SWU", SWU()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinT.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinT.cpp new file mode 100644 index 0000000000..c423a754d3 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinT.cpp @@ -0,0 +1,129 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_TABDIMS() { return TABDIMS(); } +const ::Opm::ParserKeyword Builtin::get_TBLK() { return TBLK(); } +const ::Opm::ParserKeyword Builtin::get_TCRIT() { return TCRIT(); } +const ::Opm::ParserKeyword Builtin::get_TEMP() { return TEMP(); } +const ::Opm::ParserKeyword Builtin::get_TEMPI() { return TEMPI(); } +const ::Opm::ParserKeyword Builtin::get_TEMPNODE() { return TEMPNODE(); } +const ::Opm::ParserKeyword Builtin::get_TEMPTVD() { return TEMPTVD(); } +const ::Opm::ParserKeyword Builtin::get_TEMPVD() { return TEMPVD(); } +const ::Opm::ParserKeyword Builtin::get_THCGAS() { return THCGAS(); } +const ::Opm::ParserKeyword Builtin::get_THCO2MIX() { return THCO2MIX(); } +const ::Opm::ParserKeyword Builtin::get_THCOIL() { return THCOIL(); } +const ::Opm::ParserKeyword Builtin::get_THCONR() { return THCONR(); } +const ::Opm::ParserKeyword Builtin::get_THCONSF() { return THCONSF(); } +const ::Opm::ParserKeyword Builtin::get_THCROCK() { return THCROCK(); } +const ::Opm::ParserKeyword Builtin::get_THCWATER() { return THCWATER(); } +const ::Opm::ParserKeyword Builtin::get_THELCOEF() { return THELCOEF(); } +const ::Opm::ParserKeyword Builtin::get_THERMAL() { return THERMAL(); } +const ::Opm::ParserKeyword Builtin::get_THERMEXR() { return THERMEXR(); } +const ::Opm::ParserKeyword Builtin::get_THPRES() { return THPRES(); } +const ::Opm::ParserKeyword Builtin::get_THPRESFT() { return THPRESFT(); } +const ::Opm::ParserKeyword Builtin::get_TIGHTEN() { return TIGHTEN(); } +const ::Opm::ParserKeyword Builtin::get_TIGHTENP() { return TIGHTENP(); } +const ::Opm::ParserKeyword Builtin::get_TIME() { return TIME(); } +const ::Opm::ParserKeyword Builtin::get_TITLE() { return TITLE(); } +const ::Opm::ParserKeyword Builtin::get_TLMIXPAR() { return TLMIXPAR(); } +const ::Opm::ParserKeyword Builtin::get_TLPMIXPA() { return TLPMIXPA(); } +const ::Opm::ParserKeyword Builtin::get_TNUM() { return TNUM(); } +const ::Opm::ParserKeyword Builtin::get_TOLCRIT() { return TOLCRIT(); } +const ::Opm::ParserKeyword Builtin::get_TOPS() { return TOPS(); } +const ::Opm::ParserKeyword Builtin::get_TPAMEPS() { return TPAMEPS(); } +const ::Opm::ParserKeyword Builtin::get_TPAMEPSS() { return TPAMEPSS(); } +const ::Opm::ParserKeyword Builtin::get_TRACER() { return TRACER(); } +const ::Opm::ParserKeyword Builtin::get_TRACERKM() { return TRACERKM(); } +const ::Opm::ParserKeyword Builtin::get_TRACERKP() { return TRACERKP(); } +const ::Opm::ParserKeyword Builtin::get_TRACERS() { return TRACERS(); } +const ::Opm::ParserKeyword Builtin::get_TRACITVD() { return TRACITVD(); } +const ::Opm::ParserKeyword Builtin::get_TRACTVD() { return TRACTVD(); } +const ::Opm::ParserKeyword Builtin::get_TRADS() { return TRADS(); } +const ::Opm::ParserKeyword Builtin::get_TRANGL() { return TRANGL(); } +const ::Opm::ParserKeyword Builtin::get_TRANR() { return TRANR(); } +const ::Opm::ParserKeyword Builtin::get_TRANTHT() { return TRANTHT(); } +const ::Opm::ParserKeyword Builtin::get_TRANX() { return TRANX(); } +const ::Opm::ParserKeyword Builtin::get_TRANY() { return TRANY(); } +const ::Opm::ParserKeyword Builtin::get_TRANZ() { return TRANZ(); } +const ::Opm::ParserKeyword Builtin::get_TRDCY() { return TRDCY(); } +const ::Opm::ParserKeyword Builtin::get_TRDIF() { return TRDIF(); } +const ::Opm::ParserKeyword Builtin::get_TRDIS() { return TRDIS(); } +const ::Opm::ParserKeyword Builtin::get_TREF() { return TREF(); } +const ::Opm::ParserKeyword Builtin::get_TREFS() { return TREFS(); } +const ::Opm::ParserKeyword Builtin::get_TRKPF() { return TRKPF(); } +const ::Opm::ParserKeyword Builtin::get_TRNHD() { return TRNHD(); } +const ::Opm::ParserKeyword Builtin::get_TRPLPORO() { return TRPLPORO(); } +const ::Opm::ParserKeyword Builtin::get_TRROCK() { return TRROCK(); } +const ::Opm::ParserKeyword Builtin::get_TSTEP() { return TSTEP(); } +const ::Opm::ParserKeyword Builtin::get_TUNING() { return TUNING(); } +const ::Opm::ParserKeyword Builtin::get_TUNINGDP() { return TUNINGDP(); } +const ::Opm::ParserKeyword Builtin::get_TUNINGH() { return TUNINGH(); } +const ::Opm::ParserKeyword Builtin::get_TUNINGL() { return TUNINGL(); } +const ::Opm::ParserKeyword Builtin::get_TUNINGS() { return TUNINGS(); } +const ::Opm::ParserKeyword Builtin::get_TVDP() { return TVDP(); } +const ::Opm::ParserKeyword Builtin::get_TZONE() { return TZONE(); } + +void Builtin::emplaceT() const { + this->keywords.emplace("TABDIMS", TABDIMS()); + this->keywords.emplace("TBLK", TBLK()); + this->keywords.emplace("TCRIT", TCRIT()); + this->keywords.emplace("TEMP", TEMP()); + this->keywords.emplace("TEMPI", TEMPI()); + this->keywords.emplace("TEMPNODE", TEMPNODE()); + this->keywords.emplace("TEMPTVD", TEMPTVD()); + this->keywords.emplace("TEMPVD", TEMPVD()); + this->keywords.emplace("THCGAS", THCGAS()); + this->keywords.emplace("THCO2MIX", THCO2MIX()); + this->keywords.emplace("THCOIL", THCOIL()); + this->keywords.emplace("THCONR", THCONR()); + this->keywords.emplace("THCONSF", THCONSF()); + this->keywords.emplace("THCROCK", THCROCK()); + this->keywords.emplace("THCWATER", THCWATER()); + this->keywords.emplace("THELCOEF", THELCOEF()); + this->keywords.emplace("THERMAL", THERMAL()); + this->keywords.emplace("THERMEXR", THERMEXR()); + this->keywords.emplace("THPRES", THPRES()); + this->keywords.emplace("THPRESFT", THPRESFT()); + this->keywords.emplace("TIGHTEN", TIGHTEN()); + this->keywords.emplace("TIGHTENP", TIGHTENP()); + this->keywords.emplace("TIME", TIME()); + this->keywords.emplace("TITLE", TITLE()); + this->keywords.emplace("TLMIXPAR", TLMIXPAR()); + this->keywords.emplace("TLPMIXPA", TLPMIXPA()); + this->keywords.emplace("TNUM", TNUM()); + this->keywords.emplace("TOLCRIT", TOLCRIT()); + this->keywords.emplace("TOPS", TOPS()); + this->keywords.emplace("TPAMEPS", TPAMEPS()); + this->keywords.emplace("TPAMEPSS", TPAMEPSS()); + this->keywords.emplace("TRACER", TRACER()); + this->keywords.emplace("TRACERKM", TRACERKM()); + this->keywords.emplace("TRACERKP", TRACERKP()); + this->keywords.emplace("TRACERS", TRACERS()); + this->keywords.emplace("TRACITVD", TRACITVD()); + this->keywords.emplace("TRACTVD", TRACTVD()); + this->keywords.emplace("TRADS", TRADS()); + this->keywords.emplace("TRANGL", TRANGL()); + this->keywords.emplace("TRANR", TRANR()); + this->keywords.emplace("TRANTHT", TRANTHT()); + this->keywords.emplace("TRANX", TRANX()); + this->keywords.emplace("TRANY", TRANY()); + this->keywords.emplace("TRANZ", TRANZ()); + this->keywords.emplace("TRDCY", TRDCY()); + this->keywords.emplace("TRDIF", TRDIF()); + this->keywords.emplace("TRDIS", TRDIS()); + this->keywords.emplace("TREF", TREF()); + this->keywords.emplace("TREFS", TREFS()); + this->keywords.emplace("TRKPF", TRKPF()); + this->keywords.emplace("TRNHD", TRNHD()); + this->keywords.emplace("TRPLPORO", TRPLPORO()); + this->keywords.emplace("TRROCK", TRROCK()); + this->keywords.emplace("TSTEP", TSTEP()); + this->keywords.emplace("TUNING", TUNING()); + this->keywords.emplace("TUNINGDP", TUNINGDP()); + this->keywords.emplace("TUNINGH", TUNINGH()); + this->keywords.emplace("TUNINGL", TUNINGL()); + this->keywords.emplace("TUNINGS", TUNINGS()); + this->keywords.emplace("TVDP", TVDP()); + this->keywords.emplace("TZONE", TZONE()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinU.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinU.cpp new file mode 100644 index 0000000000..d09d057704 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinU.cpp @@ -0,0 +1,35 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_UDADIMS() { return UDADIMS(); } +const ::Opm::ParserKeyword Builtin::get_UDQ() { return UDQ(); } +const ::Opm::ParserKeyword Builtin::get_UDQDIMS() { return UDQDIMS(); } +const ::Opm::ParserKeyword Builtin::get_UDQPARAM() { return UDQPARAM(); } +const ::Opm::ParserKeyword Builtin::get_UDT() { return UDT(); } +const ::Opm::ParserKeyword Builtin::get_UDTDIMS() { return UDTDIMS(); } +const ::Opm::ParserKeyword Builtin::get_UNCODHMD() { return UNCODHMD(); } +const ::Opm::ParserKeyword Builtin::get_UNIFIN() { return UNIFIN(); } +const ::Opm::ParserKeyword Builtin::get_UNIFOUT() { return UNIFOUT(); } +const ::Opm::ParserKeyword Builtin::get_UNIFOUTS() { return UNIFOUTS(); } +const ::Opm::ParserKeyword Builtin::get_UNIFSAVE() { return UNIFSAVE(); } +const ::Opm::ParserKeyword Builtin::get_USECUPL() { return USECUPL(); } +const ::Opm::ParserKeyword Builtin::get_USEFLUX() { return USEFLUX(); } +const ::Opm::ParserKeyword Builtin::get_USENOFLO() { return USENOFLO(); } + +void Builtin::emplaceU() const { + this->keywords.emplace("UDADIMS", UDADIMS()); + this->keywords.emplace("UDQ", UDQ()); + this->keywords.emplace("UDQDIMS", UDQDIMS()); + this->keywords.emplace("UDQPARAM", UDQPARAM()); + this->keywords.emplace("UDT", UDT()); + this->keywords.emplace("UDTDIMS", UDTDIMS()); + this->keywords.emplace("UNCODHMD", UNCODHMD()); + this->keywords.emplace("UNIFIN", UNIFIN()); + this->keywords.emplace("UNIFOUT", UNIFOUT()); + this->keywords.emplace("UNIFOUTS", UNIFOUTS()); + this->keywords.emplace("UNIFSAVE", UNIFSAVE()); + this->keywords.emplace("USECUPL", USECUPL()); + this->keywords.emplace("USEFLUX", USEFLUX()); + this->keywords.emplace("USENOFLO", USENOFLO()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinV.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinV.cpp new file mode 100644 index 0000000000..fc80855470 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinV.cpp @@ -0,0 +1,57 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_VAPOIL() { return VAPOIL(); } +const ::Opm::ParserKeyword Builtin::get_VAPPARS() { return VAPPARS(); } +const ::Opm::ParserKeyword Builtin::get_VAPWAT() { return VAPWAT(); } +const ::Opm::ParserKeyword Builtin::get_VCRIT() { return VCRIT(); } +const ::Opm::ParserKeyword Builtin::get_VDFLOW() { return VDFLOW(); } +const ::Opm::ParserKeyword Builtin::get_VDFLOWR() { return VDFLOWR(); } +const ::Opm::ParserKeyword Builtin::get_VE() { return VE(); } +const ::Opm::ParserKeyword Builtin::get_VEDEBUG() { return VEDEBUG(); } +const ::Opm::ParserKeyword Builtin::get_VEFIN() { return VEFIN(); } +const ::Opm::ParserKeyword Builtin::get_VEFRAC() { return VEFRAC(); } +const ::Opm::ParserKeyword Builtin::get_VEFRACP() { return VEFRACP(); } +const ::Opm::ParserKeyword Builtin::get_VEFRACPV() { return VEFRACPV(); } +const ::Opm::ParserKeyword Builtin::get_VEFRACV() { return VEFRACV(); } +const ::Opm::ParserKeyword Builtin::get_VFPCHK() { return VFPCHK(); } +const ::Opm::ParserKeyword Builtin::get_VFPIDIMS() { return VFPIDIMS(); } +const ::Opm::ParserKeyword Builtin::get_VFPINJ() { return VFPINJ(); } +const ::Opm::ParserKeyword Builtin::get_VFPPDIMS() { return VFPPDIMS(); } +const ::Opm::ParserKeyword Builtin::get_VFPPROD() { return VFPPROD(); } +const ::Opm::ParserKeyword Builtin::get_VFPTABL() { return VFPTABL(); } +const ::Opm::ParserKeyword Builtin::get_VISAGE() { return VISAGE(); } +const ::Opm::ParserKeyword Builtin::get_VISCAQA() { return VISCAQA(); } +const ::Opm::ParserKeyword Builtin::get_VISCD() { return VISCD(); } +const ::Opm::ParserKeyword Builtin::get_VISCREF() { return VISCREF(); } +const ::Opm::ParserKeyword Builtin::get_VISDATES() { return VISDATES(); } +const ::Opm::ParserKeyword Builtin::get_VISOPTS() { return VISOPTS(); } + +void Builtin::emplaceV() const { + this->keywords.emplace("VAPOIL", VAPOIL()); + this->keywords.emplace("VAPPARS", VAPPARS()); + this->keywords.emplace("VAPWAT", VAPWAT()); + this->keywords.emplace("VCRIT", VCRIT()); + this->keywords.emplace("VDFLOW", VDFLOW()); + this->keywords.emplace("VDFLOWR", VDFLOWR()); + this->keywords.emplace("VE", VE()); + this->keywords.emplace("VEDEBUG", VEDEBUG()); + this->keywords.emplace("VEFIN", VEFIN()); + this->keywords.emplace("VEFRAC", VEFRAC()); + this->keywords.emplace("VEFRACP", VEFRACP()); + this->keywords.emplace("VEFRACPV", VEFRACPV()); + this->keywords.emplace("VEFRACV", VEFRACV()); + this->keywords.emplace("VFPCHK", VFPCHK()); + this->keywords.emplace("VFPIDIMS", VFPIDIMS()); + this->keywords.emplace("VFPINJ", VFPINJ()); + this->keywords.emplace("VFPPDIMS", VFPPDIMS()); + this->keywords.emplace("VFPPROD", VFPPROD()); + this->keywords.emplace("VFPTABL", VFPTABL()); + this->keywords.emplace("VISAGE", VISAGE()); + this->keywords.emplace("VISCAQA", VISCAQA()); + this->keywords.emplace("VISCD", VISCD()); + this->keywords.emplace("VISCREF", VISCREF()); + this->keywords.emplace("VISDATES", VISDATES()); + this->keywords.emplace("VISOPTS", VISOPTS()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinW.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinW.cpp new file mode 100644 index 0000000000..d7b2463860 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinW.cpp @@ -0,0 +1,271 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_WAGHYSTR() { return WAGHYSTR(); } +const ::Opm::ParserKeyword Builtin::get_WAITBAL() { return WAITBAL(); } +const ::Opm::ParserKeyword Builtin::get_WALKALIN() { return WALKALIN(); } +const ::Opm::ParserKeyword Builtin::get_WALQCALC() { return WALQCALC(); } +const ::Opm::ParserKeyword Builtin::get_WAPI() { return WAPI(); } +const ::Opm::ParserKeyword Builtin::get_WARN() { return WARN(); } +const ::Opm::ParserKeyword Builtin::get_WATDENT() { return WATDENT(); } +const ::Opm::ParserKeyword Builtin::get_WATER() { return WATER(); } +const ::Opm::ParserKeyword Builtin::get_WATJT() { return WATJT(); } +const ::Opm::ParserKeyword Builtin::get_WATVISCT() { return WATVISCT(); } +const ::Opm::ParserKeyword Builtin::get_WBHGLR() { return WBHGLR(); } +const ::Opm::ParserKeyword Builtin::get_WBOREVOL() { return WBOREVOL(); } +const ::Opm::ParserKeyword Builtin::get_WCALCVAL() { return WCALCVAL(); } +const ::Opm::ParserKeyword Builtin::get_WCONHIST() { return WCONHIST(); } +const ::Opm::ParserKeyword Builtin::get_WCONINJ() { return WCONINJ(); } +const ::Opm::ParserKeyword Builtin::get_WCONINJE() { return WCONINJE(); } +const ::Opm::ParserKeyword Builtin::get_WCONINJH() { return WCONINJH(); } +const ::Opm::ParserKeyword Builtin::get_WCONINJP() { return WCONINJP(); } +const ::Opm::ParserKeyword Builtin::get_WCONPROD() { return WCONPROD(); } +const ::Opm::ParserKeyword Builtin::get_WCUTBACK() { return WCUTBACK(); } +const ::Opm::ParserKeyword Builtin::get_WCUTBACT() { return WCUTBACT(); } +const ::Opm::ParserKeyword Builtin::get_WCYCLE() { return WCYCLE(); } +const ::Opm::ParserKeyword Builtin::get_WDFAC() { return WDFAC(); } +const ::Opm::ParserKeyword Builtin::get_WDFACCOR() { return WDFACCOR(); } +const ::Opm::ParserKeyword Builtin::get_WDRILPRI() { return WDRILPRI(); } +const ::Opm::ParserKeyword Builtin::get_WDRILRES() { return WDRILRES(); } +const ::Opm::ParserKeyword Builtin::get_WDRILTIM() { return WDRILTIM(); } +const ::Opm::ParserKeyword Builtin::get_WECON() { return WECON(); } +const ::Opm::ParserKeyword Builtin::get_WECONINJ() { return WECONINJ(); } +const ::Opm::ParserKeyword Builtin::get_WECONT() { return WECONT(); } +const ::Opm::ParserKeyword Builtin::get_WEFAC() { return WEFAC(); } +const ::Opm::ParserKeyword Builtin::get_WELCNTL() { return WELCNTL(); } +const ::Opm::ParserKeyword Builtin::get_WELDEBUG() { return WELDEBUG(); } +const ::Opm::ParserKeyword Builtin::get_WELDRAW() { return WELDRAW(); } +const ::Opm::ParserKeyword Builtin::get_WELEVNT() { return WELEVNT(); } +const ::Opm::ParserKeyword Builtin::get_WELLDIMS() { return WELLDIMS(); } +const ::Opm::ParserKeyword Builtin::get_WELLSTRE() { return WELLSTRE(); } +const ::Opm::ParserKeyword Builtin::get_WELL_COMPLETION_PROBE() { return WELL_COMPLETION_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_WELL_PROBE() { return WELL_PROBE(); } +const ::Opm::ParserKeyword Builtin::get_WELL_PROBE_COMP() { return WELL_PROBE_COMP(); } +const ::Opm::ParserKeyword Builtin::get_WELL_PROBE_OPM() { return WELL_PROBE_OPM(); } +const ::Opm::ParserKeyword Builtin::get_WELMOVEL() { return WELMOVEL(); } +const ::Opm::ParserKeyword Builtin::get_WELOPEN() { return WELOPEN(); } +const ::Opm::ParserKeyword Builtin::get_WELOPENL() { return WELOPENL(); } +const ::Opm::ParserKeyword Builtin::get_WELPI() { return WELPI(); } +const ::Opm::ParserKeyword Builtin::get_WELPRI() { return WELPRI(); } +const ::Opm::ParserKeyword Builtin::get_WELSEGS() { return WELSEGS(); } +const ::Opm::ParserKeyword Builtin::get_WELSOMIN() { return WELSOMIN(); } +const ::Opm::ParserKeyword Builtin::get_WELSPECL() { return WELSPECL(); } +const ::Opm::ParserKeyword Builtin::get_WELSPECS() { return WELSPECS(); } +const ::Opm::ParserKeyword Builtin::get_WELTARG() { return WELTARG(); } +const ::Opm::ParserKeyword Builtin::get_WELTRAJ() { return WELTRAJ(); } +const ::Opm::ParserKeyword Builtin::get_WFOAM() { return WFOAM(); } +const ::Opm::ParserKeyword Builtin::get_WFRICSEG() { return WFRICSEG(); } +const ::Opm::ParserKeyword Builtin::get_WFRICSGL() { return WFRICSGL(); } +const ::Opm::ParserKeyword Builtin::get_WFRICTN() { return WFRICTN(); } +const ::Opm::ParserKeyword Builtin::get_WFRICTNL() { return WFRICTNL(); } +const ::Opm::ParserKeyword Builtin::get_WGASPROD() { return WGASPROD(); } +const ::Opm::ParserKeyword Builtin::get_WGORPEN() { return WGORPEN(); } +const ::Opm::ParserKeyword Builtin::get_WGRUPCON() { return WGRUPCON(); } +const ::Opm::ParserKeyword Builtin::get_WH2NUM() { return WH2NUM(); } +const ::Opm::ParserKeyword Builtin::get_WH3NUM() { return WH3NUM(); } +const ::Opm::ParserKeyword Builtin::get_WHEDREFD() { return WHEDREFD(); } +const ::Opm::ParserKeyword Builtin::get_WHISTCTL() { return WHISTCTL(); } +const ::Opm::ParserKeyword Builtin::get_WHTEMP() { return WHTEMP(); } +const ::Opm::ParserKeyword Builtin::get_WINJCLN() { return WINJCLN(); } +const ::Opm::ParserKeyword Builtin::get_WINJDAM() { return WINJDAM(); } +const ::Opm::ParserKeyword Builtin::get_WINJFCNC() { return WINJFCNC(); } +const ::Opm::ParserKeyword Builtin::get_WINJGAS() { return WINJGAS(); } +const ::Opm::ParserKeyword Builtin::get_WINJMULT() { return WINJMULT(); } +const ::Opm::ParserKeyword Builtin::get_WINJTEMP() { return WINJTEMP(); } +const ::Opm::ParserKeyword Builtin::get_WLIFT() { return WLIFT(); } +const ::Opm::ParserKeyword Builtin::get_WLIFTOPT() { return WLIFTOPT(); } +const ::Opm::ParserKeyword Builtin::get_WLIMTOL() { return WLIMTOL(); } +const ::Opm::ParserKeyword Builtin::get_WLIST() { return WLIST(); } +const ::Opm::ParserKeyword Builtin::get_WLISTARG() { return WLISTARG(); } +const ::Opm::ParserKeyword Builtin::get_WLISTNAM() { return WLISTNAM(); } +const ::Opm::ParserKeyword Builtin::get_WMICP() { return WMICP(); } +const ::Opm::ParserKeyword Builtin::get_WNETCTRL() { return WNETCTRL(); } +const ::Opm::ParserKeyword Builtin::get_WNETDP() { return WNETDP(); } +const ::Opm::ParserKeyword Builtin::get_WORKLIM() { return WORKLIM(); } +const ::Opm::ParserKeyword Builtin::get_WORKTHP() { return WORKTHP(); } +const ::Opm::ParserKeyword Builtin::get_WPAVE() { return WPAVE(); } +const ::Opm::ParserKeyword Builtin::get_WPAVEDEP() { return WPAVEDEP(); } +const ::Opm::ParserKeyword Builtin::get_WPIMULT() { return WPIMULT(); } +const ::Opm::ParserKeyword Builtin::get_WPIMULTL() { return WPIMULTL(); } +const ::Opm::ParserKeyword Builtin::get_WPITAB() { return WPITAB(); } +const ::Opm::ParserKeyword Builtin::get_WPLUG() { return WPLUG(); } +const ::Opm::ParserKeyword Builtin::get_WPMITAB() { return WPMITAB(); } +const ::Opm::ParserKeyword Builtin::get_WPOLYMER() { return WPOLYMER(); } +const ::Opm::ParserKeyword Builtin::get_WPOLYRED() { return WPOLYRED(); } +const ::Opm::ParserKeyword Builtin::get_WPOTCALC() { return WPOTCALC(); } +const ::Opm::ParserKeyword Builtin::get_WREGROUP() { return WREGROUP(); } +const ::Opm::ParserKeyword Builtin::get_WRFT() { return WRFT(); } +const ::Opm::ParserKeyword Builtin::get_WRFTPLT() { return WRFTPLT(); } +const ::Opm::ParserKeyword Builtin::get_WSALT() { return WSALT(); } +const ::Opm::ParserKeyword Builtin::get_WSCCLEAN() { return WSCCLEAN(); } +const ::Opm::ParserKeyword Builtin::get_WSCCLENL() { return WSCCLENL(); } +const ::Opm::ParserKeyword Builtin::get_WSCTAB() { return WSCTAB(); } +const ::Opm::ParserKeyword Builtin::get_WSEGAICD() { return WSEGAICD(); } +const ::Opm::ParserKeyword Builtin::get_WSEGDFIN() { return WSEGDFIN(); } +const ::Opm::ParserKeyword Builtin::get_WSEGDFMD() { return WSEGDFMD(); } +const ::Opm::ParserKeyword Builtin::get_WSEGDFPA() { return WSEGDFPA(); } +const ::Opm::ParserKeyword Builtin::get_WSEGDIMS() { return WSEGDIMS(); } +const ::Opm::ParserKeyword Builtin::get_WSEGEXSS() { return WSEGEXSS(); } +const ::Opm::ParserKeyword Builtin::get_WSEGFLIM() { return WSEGFLIM(); } +const ::Opm::ParserKeyword Builtin::get_WSEGFMOD() { return WSEGFMOD(); } +const ::Opm::ParserKeyword Builtin::get_WSEGINIT() { return WSEGINIT(); } +const ::Opm::ParserKeyword Builtin::get_WSEGITER() { return WSEGITER(); } +const ::Opm::ParserKeyword Builtin::get_WSEGLABY() { return WSEGLABY(); } +const ::Opm::ParserKeyword Builtin::get_WSEGLINK() { return WSEGLINK(); } +const ::Opm::ParserKeyword Builtin::get_WSEGMULT() { return WSEGMULT(); } +const ::Opm::ParserKeyword Builtin::get_WSEGPROP() { return WSEGPROP(); } +const ::Opm::ParserKeyword Builtin::get_WSEGSEP() { return WSEGSEP(); } +const ::Opm::ParserKeyword Builtin::get_WSEGSICD() { return WSEGSICD(); } +const ::Opm::ParserKeyword Builtin::get_WSEGSOLV() { return WSEGSOLV(); } +const ::Opm::ParserKeyword Builtin::get_WSEGTABL() { return WSEGTABL(); } +const ::Opm::ParserKeyword Builtin::get_WSEGVALV() { return WSEGVALV(); } +const ::Opm::ParserKeyword Builtin::get_WSF() { return WSF(); } +const ::Opm::ParserKeyword Builtin::get_WSKPTAB() { return WSKPTAB(); } +const ::Opm::ParserKeyword Builtin::get_WSOLVENT() { return WSOLVENT(); } +const ::Opm::ParserKeyword Builtin::get_WSURFACT() { return WSURFACT(); } +const ::Opm::ParserKeyword Builtin::get_WTADD() { return WTADD(); } +const ::Opm::ParserKeyword Builtin::get_WTEMP() { return WTEMP(); } +const ::Opm::ParserKeyword Builtin::get_WTEMPQ() { return WTEMPQ(); } +const ::Opm::ParserKeyword Builtin::get_WTEST() { return WTEST(); } +const ::Opm::ParserKeyword Builtin::get_WTHPMAX() { return WTHPMAX(); } +const ::Opm::ParserKeyword Builtin::get_WTMULT() { return WTMULT(); } +const ::Opm::ParserKeyword Builtin::get_WTRACER() { return WTRACER(); } +const ::Opm::ParserKeyword Builtin::get_WVFPDP() { return WVFPDP(); } +const ::Opm::ParserKeyword Builtin::get_WVFPEXP() { return WVFPEXP(); } +const ::Opm::ParserKeyword Builtin::get_WWPAVE() { return WWPAVE(); } + +void Builtin::emplaceW() const { + this->keywords.emplace("WAGHYSTR", WAGHYSTR()); + this->keywords.emplace("WAITBAL", WAITBAL()); + this->keywords.emplace("WALKALIN", WALKALIN()); + this->keywords.emplace("WALQCALC", WALQCALC()); + this->keywords.emplace("WAPI", WAPI()); + this->keywords.emplace("WARN", WARN()); + this->keywords.emplace("WATDENT", WATDENT()); + this->keywords.emplace("WATER", WATER()); + this->keywords.emplace("WATJT", WATJT()); + this->keywords.emplace("WATVISCT", WATVISCT()); + this->keywords.emplace("WBHGLR", WBHGLR()); + this->keywords.emplace("WBOREVOL", WBOREVOL()); + this->keywords.emplace("WCALCVAL", WCALCVAL()); + this->keywords.emplace("WCONHIST", WCONHIST()); + this->keywords.emplace("WCONINJ", WCONINJ()); + this->keywords.emplace("WCONINJE", WCONINJE()); + this->keywords.emplace("WCONINJH", WCONINJH()); + this->keywords.emplace("WCONINJP", WCONINJP()); + this->keywords.emplace("WCONPROD", WCONPROD()); + this->keywords.emplace("WCUTBACK", WCUTBACK()); + this->keywords.emplace("WCUTBACT", WCUTBACT()); + this->keywords.emplace("WCYCLE", WCYCLE()); + this->keywords.emplace("WDFAC", WDFAC()); + this->keywords.emplace("WDFACCOR", WDFACCOR()); + this->keywords.emplace("WDRILPRI", WDRILPRI()); + this->keywords.emplace("WDRILRES", WDRILRES()); + this->keywords.emplace("WDRILTIM", WDRILTIM()); + this->keywords.emplace("WECON", WECON()); + this->keywords.emplace("WECONINJ", WECONINJ()); + this->keywords.emplace("WECONT", WECONT()); + this->keywords.emplace("WEFAC", WEFAC()); + this->keywords.emplace("WELCNTL", WELCNTL()); + this->keywords.emplace("WELDEBUG", WELDEBUG()); + this->keywords.emplace("WELDRAW", WELDRAW()); + this->keywords.emplace("WELEVNT", WELEVNT()); + this->keywords.emplace("WELLDIMS", WELLDIMS()); + this->keywords.emplace("WELLSTRE", WELLSTRE()); + this->keywords.emplace("WELL_COMPLETION_PROBE", WELL_COMPLETION_PROBE()); + this->keywords.emplace("WELL_PROBE", WELL_PROBE()); + this->keywords.emplace("WELL_PROBE_COMP", WELL_PROBE_COMP()); + this->keywords.emplace("WELL_PROBE_OPM", WELL_PROBE_OPM()); + this->keywords.emplace("WELMOVEL", WELMOVEL()); + this->keywords.emplace("WELOPEN", WELOPEN()); + this->keywords.emplace("WELOPENL", WELOPENL()); + this->keywords.emplace("WELPI", WELPI()); + this->keywords.emplace("WELPRI", WELPRI()); + this->keywords.emplace("WELSEGS", WELSEGS()); + this->keywords.emplace("WELSOMIN", WELSOMIN()); + this->keywords.emplace("WELSPECL", WELSPECL()); + this->keywords.emplace("WELSPECS", WELSPECS()); + this->keywords.emplace("WELTARG", WELTARG()); + this->keywords.emplace("WELTRAJ", WELTRAJ()); + this->keywords.emplace("WFOAM", WFOAM()); + this->keywords.emplace("WFRICSEG", WFRICSEG()); + this->keywords.emplace("WFRICSGL", WFRICSGL()); + this->keywords.emplace("WFRICTN", WFRICTN()); + this->keywords.emplace("WFRICTNL", WFRICTNL()); + this->keywords.emplace("WGASPROD", WGASPROD()); + this->keywords.emplace("WGORPEN", WGORPEN()); + this->keywords.emplace("WGRUPCON", WGRUPCON()); + this->keywords.emplace("WH2NUM", WH2NUM()); + this->keywords.emplace("WH3NUM", WH3NUM()); + this->keywords.emplace("WHEDREFD", WHEDREFD()); + this->keywords.emplace("WHISTCTL", WHISTCTL()); + this->keywords.emplace("WHTEMP", WHTEMP()); + this->keywords.emplace("WINJCLN", WINJCLN()); + this->keywords.emplace("WINJDAM", WINJDAM()); + this->keywords.emplace("WINJFCNC", WINJFCNC()); + this->keywords.emplace("WINJGAS", WINJGAS()); + this->keywords.emplace("WINJMULT", WINJMULT()); + this->keywords.emplace("WINJTEMP", WINJTEMP()); + this->keywords.emplace("WLIFT", WLIFT()); + this->keywords.emplace("WLIFTOPT", WLIFTOPT()); + this->keywords.emplace("WLIMTOL", WLIMTOL()); + this->keywords.emplace("WLIST", WLIST()); + this->keywords.emplace("WLISTARG", WLISTARG()); + this->keywords.emplace("WLISTNAM", WLISTNAM()); + this->keywords.emplace("WMICP", WMICP()); + this->keywords.emplace("WNETCTRL", WNETCTRL()); + this->keywords.emplace("WNETDP", WNETDP()); + this->keywords.emplace("WORKLIM", WORKLIM()); + this->keywords.emplace("WORKTHP", WORKTHP()); + this->keywords.emplace("WPAVE", WPAVE()); + this->keywords.emplace("WPAVEDEP", WPAVEDEP()); + this->keywords.emplace("WPIMULT", WPIMULT()); + this->keywords.emplace("WPIMULTL", WPIMULTL()); + this->keywords.emplace("WPITAB", WPITAB()); + this->keywords.emplace("WPLUG", WPLUG()); + this->keywords.emplace("WPMITAB", WPMITAB()); + this->keywords.emplace("WPOLYMER", WPOLYMER()); + this->keywords.emplace("WPOLYRED", WPOLYRED()); + this->keywords.emplace("WPOTCALC", WPOTCALC()); + this->keywords.emplace("WREGROUP", WREGROUP()); + this->keywords.emplace("WRFT", WRFT()); + this->keywords.emplace("WRFTPLT", WRFTPLT()); + this->keywords.emplace("WSALT", WSALT()); + this->keywords.emplace("WSCCLEAN", WSCCLEAN()); + this->keywords.emplace("WSCCLENL", WSCCLENL()); + this->keywords.emplace("WSCTAB", WSCTAB()); + this->keywords.emplace("WSEGAICD", WSEGAICD()); + this->keywords.emplace("WSEGDFIN", WSEGDFIN()); + this->keywords.emplace("WSEGDFMD", WSEGDFMD()); + this->keywords.emplace("WSEGDFPA", WSEGDFPA()); + this->keywords.emplace("WSEGDIMS", WSEGDIMS()); + this->keywords.emplace("WSEGEXSS", WSEGEXSS()); + this->keywords.emplace("WSEGFLIM", WSEGFLIM()); + this->keywords.emplace("WSEGFMOD", WSEGFMOD()); + this->keywords.emplace("WSEGINIT", WSEGINIT()); + this->keywords.emplace("WSEGITER", WSEGITER()); + this->keywords.emplace("WSEGLABY", WSEGLABY()); + this->keywords.emplace("WSEGLINK", WSEGLINK()); + this->keywords.emplace("WSEGMULT", WSEGMULT()); + this->keywords.emplace("WSEGPROP", WSEGPROP()); + this->keywords.emplace("WSEGSEP", WSEGSEP()); + this->keywords.emplace("WSEGSICD", WSEGSICD()); + this->keywords.emplace("WSEGSOLV", WSEGSOLV()); + this->keywords.emplace("WSEGTABL", WSEGTABL()); + this->keywords.emplace("WSEGVALV", WSEGVALV()); + this->keywords.emplace("WSF", WSF()); + this->keywords.emplace("WSKPTAB", WSKPTAB()); + this->keywords.emplace("WSOLVENT", WSOLVENT()); + this->keywords.emplace("WSURFACT", WSURFACT()); + this->keywords.emplace("WTADD", WTADD()); + this->keywords.emplace("WTEMP", WTEMP()); + this->keywords.emplace("WTEMPQ", WTEMPQ()); + this->keywords.emplace("WTEST", WTEST()); + this->keywords.emplace("WTHPMAX", WTHPMAX()); + this->keywords.emplace("WTMULT", WTMULT()); + this->keywords.emplace("WTRACER", WTRACER()); + this->keywords.emplace("WVFPDP", WVFPDP()); + this->keywords.emplace("WVFPEXP", WVFPEXP()); + this->keywords.emplace("WWPAVE", WWPAVE()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinX.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinX.cpp new file mode 100644 index 0000000000..e3f0979e22 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinX.cpp @@ -0,0 +1,9 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_XMF() { return XMF(); } + +void Builtin::emplaceX() const { + this->keywords.emplace("XMF", XMF()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinY.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinY.cpp new file mode 100644 index 0000000000..f8c5ab7ee6 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinY.cpp @@ -0,0 +1,11 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_YMF() { return YMF(); } +const ::Opm::ParserKeyword Builtin::get_YMODULE() { return YMODULE(); } + +void Builtin::emplaceY() const { + this->keywords.emplace("YMF", YMF()); + this->keywords.emplace("YMODULE", YMODULE()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinZ.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinZ.cpp new file mode 100644 index 0000000000..84e2d085f0 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/BuiltinZ.cpp @@ -0,0 +1,25 @@ +#include +#include +namespace Opm { namespace ParserKeywords { +const ::Opm::ParserKeyword Builtin::get_ZCORN() { return ZCORN(); } +const ::Opm::ParserKeyword Builtin::get_ZFACT1() { return ZFACT1(); } +const ::Opm::ParserKeyword Builtin::get_ZFACT1S() { return ZFACT1S(); } +const ::Opm::ParserKeyword Builtin::get_ZFACTOR() { return ZFACTOR(); } +const ::Opm::ParserKeyword Builtin::get_ZFACTORS() { return ZFACTORS(); } +const ::Opm::ParserKeyword Builtin::get_ZIPP2OFF() { return ZIPP2OFF(); } +const ::Opm::ParserKeyword Builtin::get_ZIPPY2() { return ZIPPY2(); } +const ::Opm::ParserKeyword Builtin::get_ZMF() { return ZMF(); } +const ::Opm::ParserKeyword Builtin::get_ZMFVD() { return ZMFVD(); } + +void Builtin::emplaceZ() const { + this->keywords.emplace("ZCORN", ZCORN()); + this->keywords.emplace("ZFACT1", ZFACT1()); + this->keywords.emplace("ZFACT1S", ZFACT1S()); + this->keywords.emplace("ZFACTOR", ZFACTOR()); + this->keywords.emplace("ZFACTORS", ZFACTORS()); + this->keywords.emplace("ZIPP2OFF", ZIPP2OFF()); + this->keywords.emplace("ZIPPY2", ZIPPY2()); + this->keywords.emplace("ZMF", ZMF()); + this->keywords.emplace("ZMFVD", ZMFVD()); +} +} } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/C.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/C.cpp index 7772a2420c..e2b691d57b 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/C.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/C.cpp @@ -182,7 +182,6 @@ const std::string CBMOPTS::APPLICATION::defaultValue = "PMPVK"; const std::string CBMOPTS::PRESSURE_CHOP::itemName = "PRESSURE_CHOP"; const std::string CBMOPTS::PRESSURE_CHOP::defaultValue = "NOPMPCHP"; const std::string CBMOPTS::MIN_PORE_VOLUME::itemName = "MIN_PORE_VOLUME"; -const double CBMOPTS::MIN_PORE_VOLUME::defaultValue = 5e-06; CECON::CECON() : ParserKeyword("CECON", KeywordSize(SLASH_TERMINATED)) { @@ -261,27 +260,18 @@ CECON::CECON() : ParserKeyword("CECON", KeywordSize(SLASH_TERMINATED)) { const std::string CECON::keywordName = "CECON"; const std::string CECON::WELLNAME::itemName = "WELLNAME"; const std::string CECON::I::itemName = "I"; -const int CECON::I::defaultValue = 0; const std::string CECON::J::itemName = "J"; -const int CECON::J::defaultValue = 0; const std::string CECON::K1::itemName = "K1"; -const int CECON::K1::defaultValue = 0; const std::string CECON::K2::itemName = "K2"; -const int CECON::K2::defaultValue = 0; const std::string CECON::MAX_WCUT::itemName = "MAX_WCUT"; -const double CECON::MAX_WCUT::defaultValue = 0; const std::string CECON::MAX_GOR::itemName = "MAX_GOR"; -const double CECON::MAX_GOR::defaultValue = 0; const std::string CECON::MAX_WGR::itemName = "MAX_WGR"; -const double CECON::MAX_WGR::defaultValue = 0; const std::string CECON::WORKOVER_PROCEDURE::itemName = "WORKOVER_PROCEDURE"; const std::string CECON::WORKOVER_PROCEDURE::defaultValue = "CON"; const std::string CECON::CHECK_STOPPED::itemName = "CHECK_STOPPED"; const std::string CECON::CHECK_STOPPED::defaultValue = "NO"; const std::string CECON::MIN_OIL::itemName = "MIN_OIL"; -const double CECON::MIN_OIL::defaultValue = -100000000000000000000.000000; const std::string CECON::MIN_GAS::itemName = "MIN_GAS"; -const double CECON::MIN_GAS::defaultValue = -100000000000000000000.000000; const std::string CECON::FOLLOW_ON_WELL::itemName = "FOLLOW_ON_WELL"; const std::string CECON::FOLLOW_ON_WELL::defaultValue = ""; @@ -371,30 +361,20 @@ CECONT::CECONT() : ParserKeyword("CECONT", KeywordSize(DOUBLE_SLASH_TERMINATED)) const std::string CECONT::keywordName = "CECONT"; const std::string CECONT::WELL::itemName = "WELL"; const std::string CECONT::I::itemName = "I"; -const int CECONT::I::defaultValue = 0; const std::string CECONT::J::itemName = "J"; -const int CECONT::J::defaultValue = 0; const std::string CECONT::K_UPPER::itemName = "K_UPPER"; -const int CECONT::K_UPPER::defaultValue = 0; const std::string CECONT::K_LOWER::itemName = "K_LOWER"; -const int CECONT::K_LOWER::defaultValue = 0; const std::string CECONT::PROCEDURE::itemName = "PROCEDURE"; const std::string CECONT::PROCEDURE::defaultValue = "CON"; const std::string CECONT::CHECK_STOPPED_WELLS::itemName = "CHECK_STOPPED_WELLS"; const std::string CECONT::CHECK_STOPPED_WELLS::defaultValue = "NO"; const std::string CECONT::TRACER::itemName = "TRACER"; const std::string CECONT::MAX_TOTAL_TRACER_RATE::itemName = "MAX_TOTAL_TRACER_RATE"; -const double CECONT::MAX_TOTAL_TRACER_RATE::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string CECONT::MAX_TOTAL_TRACER_CONC::itemName = "MAX_TOTAL_TRACER_CONC"; -const double CECONT::MAX_TOTAL_TRACER_CONC::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string CECONT::MAX_FREE_TRACER_RATE::itemName = "MAX_FREE_TRACER_RATE"; -const double CECONT::MAX_FREE_TRACER_RATE::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string CECONT::MAX_FREE_TRACER_CONC::itemName = "MAX_FREE_TRACER_CONC"; -const double CECONT::MAX_FREE_TRACER_CONC::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string CECONT::MAX_SOL_TRACER_RATE::itemName = "MAX_SOL_TRACER_RATE"; -const double CECONT::MAX_SOL_TRACER_RATE::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string CECONT::MAX_SOL_TRACER_CONC::itemName = "MAX_SOL_TRACER_CONC"; -const double CECONT::MAX_SOL_TRACER_CONC::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; CIRCLE::CIRCLE() : ParserKeyword("CIRCLE", KeywordSize(0, false)) { @@ -405,6 +385,32 @@ CIRCLE::CIRCLE() : ParserKeyword("CIRCLE", KeywordSize(0, false)) { const std::string CIRCLE::keywordName = "CIRCLE"; +CNAMES::CNAMES() : ParserKeyword("CNAMES", KeywordSize(1, false)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("CNAMES"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::STRING); + item.setSizeType(ParserItem::item_size::ALL); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string CNAMES::keywordName = "CNAMES"; +const std::string CNAMES::data::itemName = "data"; + + +CO2SOL::CO2SOL() : ParserKeyword("CO2SOL", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("CO2SOL"); +} +const std::string CO2SOL::keywordName = "CO2SOL"; + + CO2STOR::CO2STOR() : ParserKeyword("CO2STOR", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -562,7 +568,6 @@ COLLAPSE::COLLAPSE() : ParserKeyword("COLLAPSE", KeywordSize(SLASH_TERMINATED)) } const std::string COLLAPSE::keywordName = "COLLAPSE"; const std::string COLLAPSE::VALUE::itemName = "VALUE"; -const int COLLAPSE::VALUE::defaultValue = 1; COLUMNS::COLUMNS() : ParserKeyword("COLUMNS", KeywordSize(1, false)) { @@ -593,9 +598,7 @@ COLUMNS::COLUMNS() : ParserKeyword("COLUMNS", KeywordSize(1, false)) { } const std::string COLUMNS::keywordName = "COLUMNS"; const std::string COLUMNS::LEFT_MARGIN::itemName = "LEFT_MARGIN"; -const int COLUMNS::LEFT_MARGIN::defaultValue = 1; const std::string COLUMNS::RIGHT_MARGIN::itemName = "RIGHT_MARGIN"; -const int COLUMNS::RIGHT_MARGIN::defaultValue = 132; COMPDAT::COMPDAT() : ParserKeyword("COMPDAT", KeywordSize(SLASH_TERMINATED)) { @@ -660,7 +663,8 @@ COMPDAT::COMPDAT() : ParserKeyword("COMPDAT", KeywordSize(SLASH_TERMINATED)) { } { ParserItem item("D_FACTOR", ParserItem::itype::DOUBLE); - item.push_backDimension("1"); + item.setDefault( double(0) ); + item.push_backDimension("Time/GasSurfaceVolume"); record.addItem(item); } { @@ -679,21 +683,16 @@ COMPDAT::COMPDAT() : ParserKeyword("COMPDAT", KeywordSize(SLASH_TERMINATED)) { const std::string COMPDAT::keywordName = "COMPDAT"; const std::string COMPDAT::WELL::itemName = "WELL"; const std::string COMPDAT::I::itemName = "I"; -const int COMPDAT::I::defaultValue = 0; const std::string COMPDAT::J::itemName = "J"; -const int COMPDAT::J::defaultValue = 0; const std::string COMPDAT::K1::itemName = "K1"; const std::string COMPDAT::K2::itemName = "K2"; const std::string COMPDAT::STATE::itemName = "STATE"; const std::string COMPDAT::STATE::defaultValue = "OPEN"; const std::string COMPDAT::SAT_TABLE::itemName = "SAT_TABLE"; -const int COMPDAT::SAT_TABLE::defaultValue = 0; const std::string COMPDAT::CONNECTION_TRANSMISSIBILITY_FACTOR::itemName = "CONNECTION_TRANSMISSIBILITY_FACTOR"; const std::string COMPDAT::DIAMETER::itemName = "DIAMETER"; const std::string COMPDAT::Kh::itemName = "Kh"; -const double COMPDAT::Kh::defaultValue = -1.000000; const std::string COMPDAT::SKIN::itemName = "SKIN"; -const double COMPDAT::SKIN::defaultValue = 0; const std::string COMPDAT::D_FACTOR::itemName = "D_FACTOR"; const std::string COMPDAT::DIR::itemName = "DIR"; const std::string COMPDAT::DIR::defaultValue = "Z"; @@ -787,21 +786,16 @@ const std::string COMPDATX::keywordName = "COMPDATX"; const std::string COMPDATX::WELL::itemName = "WELL"; const std::string COMPDATX::LGR::itemName = "LGR"; const std::string COMPDATX::I::itemName = "I"; -const int COMPDATX::I::defaultValue = 0; const std::string COMPDATX::J::itemName = "J"; -const int COMPDATX::J::defaultValue = 0; const std::string COMPDATX::K1::itemName = "K1"; const std::string COMPDATX::K2::itemName = "K2"; const std::string COMPDATX::STATE::itemName = "STATE"; const std::string COMPDATX::STATE::defaultValue = "OPEN"; const std::string COMPDATX::SAT_TABLE::itemName = "SAT_TABLE"; -const int COMPDATX::SAT_TABLE::defaultValue = 0; const std::string COMPDATX::CONNECTION_TRANSMISSIBILITY_FACTOR::itemName = "CONNECTION_TRANSMISSIBILITY_FACTOR"; const std::string COMPDATX::DIAMETER::itemName = "DIAMETER"; const std::string COMPDATX::Kh::itemName = "Kh"; -const double COMPDATX::Kh::defaultValue = -1.000000; const std::string COMPDATX::SKIN::itemName = "SKIN"; -const double COMPDATX::SKIN::defaultValue = 0; const std::string COMPDATX::D_FACTOR::itemName = "D_FACTOR"; const std::string COMPDATX::DIR::itemName = "DIR"; const std::string COMPDATX::DIR::defaultValue = "Z"; @@ -861,19 +855,12 @@ COMPFLSH::COMPFLSH() : ParserKeyword("COMPFLSH", KeywordSize(SLASH_TERMINATED)) const std::string COMPFLSH::keywordName = "COMPFLSH"; const std::string COMPFLSH::WELL::itemName = "WELL"; const std::string COMPFLSH::I::itemName = "I"; -const int COMPFLSH::I::defaultValue = 0; const std::string COMPFLSH::J::itemName = "J"; -const int COMPFLSH::J::defaultValue = 0; const std::string COMPFLSH::UPPER_K::itemName = "UPPER_K"; -const int COMPFLSH::UPPER_K::defaultValue = 0; const std::string COMPFLSH::LOWER_K::itemName = "LOWER_K"; -const int COMPFLSH::LOWER_K::defaultValue = 0; const std::string COMPFLSH::F1::itemName = "F1"; -const double COMPFLSH::F1::defaultValue = 1.000000; const std::string COMPFLSH::F2::itemName = "F2"; -const double COMPFLSH::F2::defaultValue = 1.000000; const std::string COMPFLSH::FLASH_PVTNUM::itemName = "FLASH_PVTNUM"; -const int COMPFLSH::FLASH_PVTNUM::defaultValue = 0; COMPIMB::COMPIMB() : ParserKeyword("COMPIMB", KeywordSize(SLASH_TERMINATED)) { @@ -915,13 +902,10 @@ COMPIMB::COMPIMB() : ParserKeyword("COMPIMB", KeywordSize(SLASH_TERMINATED)) { const std::string COMPIMB::keywordName = "COMPIMB"; const std::string COMPIMB::WELL::itemName = "WELL"; const std::string COMPIMB::I::itemName = "I"; -const int COMPIMB::I::defaultValue = 0; const std::string COMPIMB::J::itemName = "J"; -const int COMPIMB::J::defaultValue = 0; const std::string COMPIMB::K1::itemName = "K1"; const std::string COMPIMB::K2::itemName = "K2"; const std::string COMPIMB::SAT_TABLE::itemName = "SAT_TABLE"; -const int COMPIMB::SAT_TABLE::defaultValue = 0; COMPINJK::COMPINJK() : ParserKeyword("COMPINJK", KeywordSize(SLASH_TERMINATED)) { @@ -966,15 +950,10 @@ COMPINJK::COMPINJK() : ParserKeyword("COMPINJK", KeywordSize(SLASH_TERMINATED)) const std::string COMPINJK::keywordName = "COMPINJK"; const std::string COMPINJK::WELL::itemName = "WELL"; const std::string COMPINJK::I::itemName = "I"; -const int COMPINJK::I::defaultValue = 0; const std::string COMPINJK::J::itemName = "J"; -const int COMPINJK::J::defaultValue = 0; const std::string COMPINJK::K_UPPER::itemName = "K_UPPER"; -const int COMPINJK::K_UPPER::defaultValue = 0; const std::string COMPINJK::K_LOWER::itemName = "K_LOWER"; -const int COMPINJK::K_LOWER::defaultValue = 0; const std::string COMPINJK::REL_PERM::itemName = "REL_PERM"; -const double COMPINJK::REL_PERM::defaultValue = 0; COMPLMPL::COMPLMPL() : ParserKeyword("COMPLMPL", KeywordSize(SLASH_TERMINATED)) { @@ -1024,13 +1003,9 @@ const std::string COMPLMPL::WELL::itemName = "WELL"; const std::string COMPLMPL::GRID::itemName = "GRID"; const std::string COMPLMPL::GRID::defaultValue = ""; const std::string COMPLMPL::I::itemName = "I"; -const int COMPLMPL::I::defaultValue = 0; const std::string COMPLMPL::J::itemName = "J"; -const int COMPLMPL::J::defaultValue = 0; const std::string COMPLMPL::UPPER_K::itemName = "UPPER_K"; -const int COMPLMPL::UPPER_K::defaultValue = 0; const std::string COMPLMPL::LOWER_K::itemName = "LOWER_K"; -const int COMPLMPL::LOWER_K::defaultValue = 0; const std::string COMPLMPL::COMPLETION_NUMBER::itemName = "COMPLETION_NUMBER"; @@ -1074,13 +1049,9 @@ COMPLUMP::COMPLUMP() : ParserKeyword("COMPLUMP", KeywordSize(SLASH_TERMINATED)) const std::string COMPLUMP::keywordName = "COMPLUMP"; const std::string COMPLUMP::WELL::itemName = "WELL"; const std::string COMPLUMP::I::itemName = "I"; -const int COMPLUMP::I::defaultValue = 0; const std::string COMPLUMP::J::itemName = "J"; -const int COMPLUMP::J::defaultValue = 0; const std::string COMPLUMP::K1::itemName = "K1"; -const int COMPLUMP::K1::defaultValue = 0; const std::string COMPLUMP::K2::itemName = "K2"; -const int COMPLUMP::K2::defaultValue = 0; const std::string COMPLUMP::N::itemName = "N"; @@ -1208,13 +1179,9 @@ COMPRP::COMPRP() : ParserKeyword("COMPRP", KeywordSize(SLASH_TERMINATED)) { const std::string COMPRP::keywordName = "COMPRP"; const std::string COMPRP::WELL::itemName = "WELL"; const std::string COMPRP::I::itemName = "I"; -const int COMPRP::I::defaultValue = 0; const std::string COMPRP::J::itemName = "J"; -const int COMPRP::J::defaultValue = 0; const std::string COMPRP::K_UPPER::itemName = "K_UPPER"; -const int COMPRP::K_UPPER::defaultValue = 0; const std::string COMPRP::K_LOWER::itemName = "K_LOWER"; -const int COMPRP::K_LOWER::defaultValue = 0; const std::string COMPRP::SAT_TABLE_NUM::itemName = "SAT_TABLE_NUM"; const std::string COMPRP::SWMIN::itemName = "SWMIN"; const std::string COMPRP::SWMAX::itemName = "SWMAX"; @@ -1287,13 +1254,9 @@ const std::string COMPRPL::keywordName = "COMPRPL"; const std::string COMPRPL::WELL::itemName = "WELL"; const std::string COMPRPL::LOCAL_GRID::itemName = "LOCAL_GRID"; const std::string COMPRPL::I::itemName = "I"; -const int COMPRPL::I::defaultValue = 0; const std::string COMPRPL::J::itemName = "J"; -const int COMPRPL::J::defaultValue = 0; const std::string COMPRPL::K_UPPER::itemName = "K_UPPER"; -const int COMPRPL::K_UPPER::defaultValue = 0; const std::string COMPRPL::K_LOWER::itemName = "K_LOWER"; -const int COMPRPL::K_LOWER::defaultValue = 0; const std::string COMPRPL::SAT_TABLE_NUM::itemName = "SAT_TABLE_NUM"; const std::string COMPRPL::SWMIN::itemName = "SWMIN"; const std::string COMPRPL::SWMAX::itemName = "SWMAX"; @@ -1400,7 +1363,6 @@ const std::string COMPSEGL::DISTANCE_END::itemName = "DISTANCE_END"; const std::string COMPSEGL::DIRECTION::itemName = "DIRECTION"; const std::string COMPSEGL::END_IJK::itemName = "END_IJK"; const std::string COMPSEGL::CENTER_DEPTH::itemName = "CENTER_DEPTH"; -const double COMPSEGL::CENTER_DEPTH::defaultValue = 0; const std::string COMPSEGL::THERMAL_LENGTH::itemName = "THERMAL_LENGTH"; const std::string COMPSEGL::SEGMENT_NUMBER::itemName = "SEGMENT_NUMBER"; @@ -1482,11 +1444,106 @@ const std::string COMPSEGS::DISTANCE_END::itemName = "DISTANCE_END"; const std::string COMPSEGS::DIRECTION::itemName = "DIRECTION"; const std::string COMPSEGS::END_IJK::itemName = "END_IJK"; const std::string COMPSEGS::CENTER_DEPTH::itemName = "CENTER_DEPTH"; -const double COMPSEGS::CENTER_DEPTH::defaultValue = 0; const std::string COMPSEGS::THERMAL_LENGTH::itemName = "THERMAL_LENGTH"; const std::string COMPSEGS::SEGMENT_NUMBER::itemName = "SEGMENT_NUMBER"; +COMPTRAJ::COMPTRAJ() : ParserKeyword("COMPTRAJ", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + setRequiredKeywords({ + "WELTRAJ", + }); + clearDeckNames(); + addDeckName("COMPTRAJ"); + { + ParserRecord record; + { + ParserItem item("WELL", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("BRANCH_NUMBER", ParserItem::itype::INT); + item.setDefault( 1 ); + record.addItem(item); + } + { + ParserItem item("PERF_TOP", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("PERF_BOT", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("PERF_REF", ParserItem::itype::STRING); + item.setDefault( std::string("TVD") ); + record.addItem(item); + } + { + ParserItem item("COMPLETION_NUMBER", ParserItem::itype::INT); + item.setDefault( 1 ); + record.addItem(item); + } + { + ParserItem item("STATE", ParserItem::itype::STRING); + item.setDefault( std::string("OPEN") ); + record.addItem(item); + } + { + ParserItem item("SAT_TABLE", ParserItem::itype::INT); + item.setDefault( 0 ); + record.addItem(item); + } + { + ParserItem item("CONNECTION_TRANSMISSIBILITY_FACTOR", ParserItem::itype::DOUBLE); + item.push_backDimension("Viscosity*ReservoirVolume/Time*Pressure"); + record.addItem(item); + } + { + ParserItem item("DIAMETER", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("Kh", ParserItem::itype::DOUBLE); + item.setDefault( double(-1.000000) ); + item.push_backDimension("Permeability*Length"); + record.addItem(item); + } + { + ParserItem item("SKIN", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("D_FACTOR", ParserItem::itype::DOUBLE); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string COMPTRAJ::keywordName = "COMPTRAJ"; +const std::string COMPTRAJ::WELL::itemName = "WELL"; +const std::string COMPTRAJ::BRANCH_NUMBER::itemName = "BRANCH_NUMBER"; +const std::string COMPTRAJ::PERF_TOP::itemName = "PERF_TOP"; +const std::string COMPTRAJ::PERF_BOT::itemName = "PERF_BOT"; +const std::string COMPTRAJ::PERF_REF::itemName = "PERF_REF"; +const std::string COMPTRAJ::PERF_REF::defaultValue = "TVD"; +const std::string COMPTRAJ::COMPLETION_NUMBER::itemName = "COMPLETION_NUMBER"; +const std::string COMPTRAJ::STATE::itemName = "STATE"; +const std::string COMPTRAJ::STATE::defaultValue = "OPEN"; +const std::string COMPTRAJ::SAT_TABLE::itemName = "SAT_TABLE"; +const std::string COMPTRAJ::CONNECTION_TRANSMISSIBILITY_FACTOR::itemName = "CONNECTION_TRANSMISSIBILITY_FACTOR"; +const std::string COMPTRAJ::DIAMETER::itemName = "DIAMETER"; +const std::string COMPTRAJ::Kh::itemName = "Kh"; +const std::string COMPTRAJ::SKIN::itemName = "SKIN"; +const std::string COMPTRAJ::D_FACTOR::itemName = "D_FACTOR"; + + COMPVE::COMPVE() : ParserKeyword("COMPVE", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -1562,13 +1619,9 @@ COMPVE::COMPVE() : ParserKeyword("COMPVE", KeywordSize(SLASH_TERMINATED)) { const std::string COMPVE::keywordName = "COMPVE"; const std::string COMPVE::WELL::itemName = "WELL"; const std::string COMPVE::I::itemName = "I"; -const int COMPVE::I::defaultValue = 0; const std::string COMPVE::J::itemName = "J"; -const int COMPVE::J::defaultValue = 0; const std::string COMPVE::K_UPPER::itemName = "K_UPPER"; -const int COMPVE::K_UPPER::defaultValue = 0; const std::string COMPVE::K_LOWER::itemName = "K_LOWER"; -const int COMPVE::K_LOWER::defaultValue = 0; const std::string COMPVE::SAT_TABLE_NUM::itemName = "SAT_TABLE_NUM"; const std::string COMPVE::CVEFRAC::itemName = "CVEFRAC"; const std::string COMPVE::DTOP::itemName = "DTOP"; @@ -1576,7 +1629,6 @@ const std::string COMPVE::DBOT::itemName = "DBOT"; const std::string COMPVE::FLAG::itemName = "FLAG"; const std::string COMPVE::FLAG::defaultValue = "NO"; const std::string COMPVE::S_D::itemName = "S_D"; -const double COMPVE::S_D::defaultValue = 0; const std::string COMPVE::GTOP::itemName = "GTOP"; const std::string COMPVE::GBOT::itemName = "GBOT"; @@ -1661,13 +1713,9 @@ const std::string COMPVEL::keywordName = "COMPVEL"; const std::string COMPVEL::WELL::itemName = "WELL"; const std::string COMPVEL::LOCAL::itemName = "LOCAL"; const std::string COMPVEL::I::itemName = "I"; -const int COMPVEL::I::defaultValue = 0; const std::string COMPVEL::J::itemName = "J"; -const int COMPVEL::J::defaultValue = 0; const std::string COMPVEL::K_UPPER::itemName = "K_UPPER"; -const int COMPVEL::K_UPPER::defaultValue = 0; const std::string COMPVEL::K_LOWER::itemName = "K_LOWER"; -const int COMPVEL::K_LOWER::defaultValue = 0; const std::string COMPVEL::SAT_TABLE_NUM::itemName = "SAT_TABLE_NUM"; const std::string COMPVEL::CVEFRAC::itemName = "CVEFRAC"; const std::string COMPVEL::DTOP::itemName = "DTOP"; @@ -1675,7 +1723,6 @@ const std::string COMPVEL::DBOT::itemName = "DBOT"; const std::string COMPVEL::FLAG::itemName = "FLAG"; const std::string COMPVEL::FLAG::defaultValue = "NO"; const std::string COMPVEL::S_D::itemName = "S_D"; -const double COMPVEL::S_D::defaultValue = 0; const std::string COMPVEL::GTOP::itemName = "GTOP"; const std::string COMPVEL::GBOT::itemName = "GBOT"; @@ -1826,6 +1873,45 @@ const std::string CONNECTION_PROBE::J::itemName = "J"; const std::string CONNECTION_PROBE::K::itemName = "K"; +CONNECTION_PROBE_OPM::CONNECTION_PROBE_OPM() : ParserKeyword("CONNECTION_PROBE_OPM", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("CINJFVT"); + addDeckName("CFCPORO"); + addDeckName("CFCPERM"); + addDeckName("CFCRAD"); + addDeckName("CFCSKIN"); + addDeckName("CFCWIDTH"); + addDeckName("CFCAOF"); + addDeckName("CINJFVR"); + { + ParserRecord record; + { + ParserItem item("WELL", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("I", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("J", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("K", ParserItem::itype::INT); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string CONNECTION_PROBE_OPM::keywordName = "CONNECTION_PROBE_OPM"; +const std::string CONNECTION_PROBE_OPM::WELL::itemName = "WELL"; +const std::string CONNECTION_PROBE_OPM::I::itemName = "I"; +const std::string CONNECTION_PROBE_OPM::J::itemName = "J"; +const std::string CONNECTION_PROBE_OPM::K::itemName = "K"; + + COORD::COORD() : ParserKeyword("COORD", KeywordSize(1, false)) { addValidSectionName("GRID"); setProhibitedKeywords({ @@ -1893,9 +1979,7 @@ const std::string COORDSYS::CIRCLE_COMPLETION::defaultValue = "INCOMP"; const std::string COORDSYS::CONNECTION::itemName = "CONNECTION"; const std::string COORDSYS::CONNECTION::defaultValue = "SEPARATE"; const std::string COORDSYS::R1::itemName = "R1"; -const int COORDSYS::R1::defaultValue = 0; const std::string COORDSYS::R2::itemName = "R2"; -const int COORDSYS::R2::defaultValue = 0; COPY::COPY() : ParserKeyword("COPY", KeywordSize(SLASH_TERMINATED)) { @@ -2034,9 +2118,9 @@ const std::string COPYBOX::KY2D::itemName = "KY2D"; COPYREG::COPYREG() : ParserKeyword("COPYREG", KeywordSize(SLASH_TERMINATED)) { - addValidSectionName("PROPS"); - addValidSectionName("EDIT"); addValidSectionName("GRID"); + addValidSectionName("EDIT"); + addValidSectionName("PROPS"); addValidSectionName("REGIONS"); addValidSectionName("SOLUTION"); clearDeckNames(); @@ -2207,7 +2291,7 @@ const std::string CPR::J::itemName = "J"; const std::string CPR::K::itemName = "K"; -CREF::CREF() : ParserKeyword("CREF", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +CREF::CREF() : ParserKeyword("CREF", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("CREF"); @@ -2226,10 +2310,10 @@ const std::string CREF::keywordName = "CREF"; const std::string CREF::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; -CREFS::CREFS() : ParserKeyword("CREFS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +CREFW::CREFW() : ParserKeyword("CREFW", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); - addDeckName("CREFS"); + addDeckName("CREFW"); { ParserRecord record; { @@ -2241,8 +2325,27 @@ CREFS::CREFS() : ParserKeyword("CREFS", KeywordSize("TABDIMS", "NUM_STATE_EQ", f addRecord( record ); } } -const std::string CREFS::keywordName = "CREFS"; -const std::string CREFS::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; +const std::string CREFW::keywordName = "CREFW"; +const std::string CREFW::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; + + +CREFWS::CREFWS() : ParserKeyword("CREFWS", KeywordSize("TABDIMS", "NUM_EOS_SURFACE", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("CREFWS"); + { + ParserRecord record; + { + ParserItem item("COMPRESSIBILITY", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1/Pressure"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string CREFWS::keywordName = "CREFWS"; +const std::string CREFWS::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; CRITPERM::CRITPERM() : ParserKeyword("CRITPERM", KeywordSize(1, false)) { @@ -2305,15 +2408,10 @@ CSKIN::CSKIN() : ParserKeyword("CSKIN", KeywordSize(SLASH_TERMINATED)) { const std::string CSKIN::keywordName = "CSKIN"; const std::string CSKIN::WELL::itemName = "WELL"; const std::string CSKIN::I::itemName = "I"; -const int CSKIN::I::defaultValue = 0; const std::string CSKIN::J::itemName = "J"; -const int CSKIN::J::defaultValue = 0; const std::string CSKIN::K_UPPER::itemName = "K_UPPER"; -const int CSKIN::K_UPPER::defaultValue = 0; const std::string CSKIN::K_LOWER::itemName = "K_LOWER"; -const int CSKIN::K_LOWER::defaultValue = 0; const std::string CSKIN::CONNECTION_SKIN_FACTOR::itemName = "CONNECTION_SKIN_FACTOR"; -const double CSKIN::CONNECTION_SKIN_FACTOR::defaultValue = 0; } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/D.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/D.cpp index 336957ce5c..b0772e5da2 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/D.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/D.cpp @@ -98,10 +98,12 @@ DATUMRX::DATUMRX() : ParserKeyword("DATUMRX", KeywordSize(SLASH_TERMINATED)) { ParserRecord record; { ParserItem item("REGION_FAMILY", ParserItem::itype::STRING); + item.setDefault( std::string("") ); record.addItem(item); } { ParserItem item("DEPTH", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); item.push_backDimension("Length"); record.addItem(item); } @@ -110,6 +112,7 @@ DATUMRX::DATUMRX() : ParserKeyword("DATUMRX", KeywordSize(SLASH_TERMINATED)) { } const std::string DATUMRX::keywordName = "DATUMRX"; const std::string DATUMRX::REGION_FAMILY::itemName = "REGION_FAMILY"; +const std::string DATUMRX::REGION_FAMILY::defaultValue = ""; const std::string DATUMRX::DEPTH::itemName = "DEPTH"; @@ -585,179 +588,92 @@ DEBUG_::DEBUG_() : ParserKeyword("DEBUG_", KeywordSize(1, false)) { } const std::string DEBUG_::keywordName = "DEBUG_"; const std::string DEBUG_::Item1::itemName = "Item1"; -const int DEBUG_::Item1::defaultValue = 0; const std::string DEBUG_::Item2::itemName = "Item2"; -const int DEBUG_::Item2::defaultValue = 0; const std::string DEBUG_::Item3::itemName = "Item3"; -const int DEBUG_::Item3::defaultValue = 0; const std::string DEBUG_::Item4::itemName = "Item4"; -const int DEBUG_::Item4::defaultValue = 0; const std::string DEBUG_::Item5::itemName = "Item5"; -const int DEBUG_::Item5::defaultValue = 0; const std::string DEBUG_::Item6::itemName = "Item6"; -const int DEBUG_::Item6::defaultValue = 0; const std::string DEBUG_::Item7::itemName = "Item7"; -const int DEBUG_::Item7::defaultValue = 0; const std::string DEBUG_::Item8::itemName = "Item8"; -const int DEBUG_::Item8::defaultValue = 0; const std::string DEBUG_::Item9::itemName = "Item9"; -const int DEBUG_::Item9::defaultValue = 0; const std::string DEBUG_::Item10::itemName = "Item10"; -const int DEBUG_::Item10::defaultValue = 0; const std::string DEBUG_::Item11::itemName = "Item11"; -const int DEBUG_::Item11::defaultValue = 0; const std::string DEBUG_::Item12::itemName = "Item12"; -const int DEBUG_::Item12::defaultValue = 0; const std::string DEBUG_::Item13::itemName = "Item13"; -const int DEBUG_::Item13::defaultValue = 0; const std::string DEBUG_::Item14::itemName = "Item14"; -const int DEBUG_::Item14::defaultValue = 0; const std::string DEBUG_::Item15::itemName = "Item15"; -const int DEBUG_::Item15::defaultValue = 0; const std::string DEBUG_::Item16::itemName = "Item16"; -const int DEBUG_::Item16::defaultValue = 0; const std::string DEBUG_::Item17::itemName = "Item17"; -const int DEBUG_::Item17::defaultValue = 0; const std::string DEBUG_::Item18::itemName = "Item18"; -const int DEBUG_::Item18::defaultValue = 0; const std::string DEBUG_::Item19::itemName = "Item19"; -const int DEBUG_::Item19::defaultValue = 0; const std::string DEBUG_::Item20::itemName = "Item20"; -const int DEBUG_::Item20::defaultValue = 0; const std::string DEBUG_::Item21::itemName = "Item21"; -const int DEBUG_::Item21::defaultValue = 0; const std::string DEBUG_::Item22::itemName = "Item22"; -const int DEBUG_::Item22::defaultValue = 0; const std::string DEBUG_::Item23::itemName = "Item23"; -const int DEBUG_::Item23::defaultValue = 0; const std::string DEBUG_::Item24::itemName = "Item24"; -const int DEBUG_::Item24::defaultValue = 0; const std::string DEBUG_::Item25::itemName = "Item25"; -const int DEBUG_::Item25::defaultValue = 0; const std::string DEBUG_::Item26::itemName = "Item26"; -const int DEBUG_::Item26::defaultValue = 0; const std::string DEBUG_::Item27::itemName = "Item27"; -const int DEBUG_::Item27::defaultValue = 0; const std::string DEBUG_::Item28::itemName = "Item28"; -const int DEBUG_::Item28::defaultValue = 0; const std::string DEBUG_::Item29::itemName = "Item29"; -const int DEBUG_::Item29::defaultValue = 0; const std::string DEBUG_::Item30::itemName = "Item30"; -const int DEBUG_::Item30::defaultValue = 0; const std::string DEBUG_::Item31::itemName = "Item31"; -const int DEBUG_::Item31::defaultValue = 0; const std::string DEBUG_::Item32::itemName = "Item32"; -const int DEBUG_::Item32::defaultValue = 0; const std::string DEBUG_::Item33::itemName = "Item33"; -const int DEBUG_::Item33::defaultValue = 0; const std::string DEBUG_::Item34::itemName = "Item34"; -const int DEBUG_::Item34::defaultValue = 0; const std::string DEBUG_::Item35::itemName = "Item35"; -const int DEBUG_::Item35::defaultValue = 0; const std::string DEBUG_::Item36::itemName = "Item36"; -const int DEBUG_::Item36::defaultValue = 0; const std::string DEBUG_::Item37::itemName = "Item37"; -const int DEBUG_::Item37::defaultValue = 0; const std::string DEBUG_::Item38::itemName = "Item38"; -const int DEBUG_::Item38::defaultValue = 0; const std::string DEBUG_::Item39::itemName = "Item39"; -const int DEBUG_::Item39::defaultValue = 0; const std::string DEBUG_::Item40::itemName = "Item40"; -const int DEBUG_::Item40::defaultValue = 0; const std::string DEBUG_::Item41::itemName = "Item41"; -const int DEBUG_::Item41::defaultValue = 0; const std::string DEBUG_::Item42::itemName = "Item42"; -const int DEBUG_::Item42::defaultValue = 0; const std::string DEBUG_::Item43::itemName = "Item43"; -const int DEBUG_::Item43::defaultValue = 0; const std::string DEBUG_::Item44::itemName = "Item44"; -const int DEBUG_::Item44::defaultValue = 0; const std::string DEBUG_::Item45::itemName = "Item45"; -const int DEBUG_::Item45::defaultValue = 0; const std::string DEBUG_::Item46::itemName = "Item46"; -const int DEBUG_::Item46::defaultValue = 0; const std::string DEBUG_::Item47::itemName = "Item47"; -const int DEBUG_::Item47::defaultValue = 0; const std::string DEBUG_::Item48::itemName = "Item48"; -const int DEBUG_::Item48::defaultValue = 0; const std::string DEBUG_::Item49::itemName = "Item49"; -const int DEBUG_::Item49::defaultValue = 0; const std::string DEBUG_::Item50::itemName = "Item50"; -const int DEBUG_::Item50::defaultValue = 0; const std::string DEBUG_::Item51::itemName = "Item51"; -const int DEBUG_::Item51::defaultValue = 0; const std::string DEBUG_::Item52::itemName = "Item52"; -const int DEBUG_::Item52::defaultValue = 0; const std::string DEBUG_::Item53::itemName = "Item53"; -const int DEBUG_::Item53::defaultValue = 0; const std::string DEBUG_::Item54::itemName = "Item54"; -const int DEBUG_::Item54::defaultValue = 0; const std::string DEBUG_::Item55::itemName = "Item55"; -const int DEBUG_::Item55::defaultValue = 0; const std::string DEBUG_::Item56::itemName = "Item56"; -const int DEBUG_::Item56::defaultValue = 0; const std::string DEBUG_::Item57::itemName = "Item57"; -const int DEBUG_::Item57::defaultValue = 0; const std::string DEBUG_::Item58::itemName = "Item58"; -const int DEBUG_::Item58::defaultValue = 0; const std::string DEBUG_::Item59::itemName = "Item59"; -const int DEBUG_::Item59::defaultValue = 0; const std::string DEBUG_::Item60::itemName = "Item60"; -const int DEBUG_::Item60::defaultValue = 0; const std::string DEBUG_::Item61::itemName = "Item61"; -const int DEBUG_::Item61::defaultValue = 0; const std::string DEBUG_::Item62::itemName = "Item62"; -const int DEBUG_::Item62::defaultValue = 0; const std::string DEBUG_::Item63::itemName = "Item63"; -const int DEBUG_::Item63::defaultValue = 0; const std::string DEBUG_::Item64::itemName = "Item64"; -const int DEBUG_::Item64::defaultValue = 0; const std::string DEBUG_::Item65::itemName = "Item65"; -const int DEBUG_::Item65::defaultValue = 0; const std::string DEBUG_::Item66::itemName = "Item66"; -const int DEBUG_::Item66::defaultValue = 0; const std::string DEBUG_::Item67::itemName = "Item67"; -const int DEBUG_::Item67::defaultValue = 0; const std::string DEBUG_::Item68::itemName = "Item68"; -const int DEBUG_::Item68::defaultValue = 0; const std::string DEBUG_::Item69::itemName = "Item69"; -const int DEBUG_::Item69::defaultValue = 0; const std::string DEBUG_::Item70::itemName = "Item70"; -const int DEBUG_::Item70::defaultValue = 0; const std::string DEBUG_::Item71::itemName = "Item71"; -const int DEBUG_::Item71::defaultValue = 0; const std::string DEBUG_::Item72::itemName = "Item72"; -const int DEBUG_::Item72::defaultValue = 0; const std::string DEBUG_::Item73::itemName = "Item73"; -const int DEBUG_::Item73::defaultValue = 0; const std::string DEBUG_::Item74::itemName = "Item74"; -const int DEBUG_::Item74::defaultValue = 0; const std::string DEBUG_::Item75::itemName = "Item75"; -const int DEBUG_::Item75::defaultValue = 0; const std::string DEBUG_::Item76::itemName = "Item76"; -const int DEBUG_::Item76::defaultValue = 0; const std::string DEBUG_::Item77::itemName = "Item77"; -const int DEBUG_::Item77::defaultValue = 0; const std::string DEBUG_::Item78::itemName = "Item78"; -const int DEBUG_::Item78::defaultValue = 0; const std::string DEBUG_::Item79::itemName = "Item79"; -const int DEBUG_::Item79::defaultValue = 0; const std::string DEBUG_::Item80::itemName = "Item80"; -const int DEBUG_::Item80::defaultValue = 0; const std::string DEBUG_::Item81::itemName = "Item81"; -const int DEBUG_::Item81::defaultValue = 0; const std::string DEBUG_::Item82::itemName = "Item82"; -const int DEBUG_::Item82::defaultValue = 0; const std::string DEBUG_::Item83::itemName = "Item83"; -const int DEBUG_::Item83::defaultValue = 0; const std::string DEBUG_::Item84::itemName = "Item84"; -const int DEBUG_::Item84::defaultValue = 0; const std::string DEBUG_::Item85::itemName = "Item85"; -const int DEBUG_::Item85::defaultValue = 0; const std::string DEBUG_::Item86::itemName = "Item86"; -const int DEBUG_::Item86::defaultValue = 0; const std::string DEBUG_::Item87::itemName = "Item87"; -const int DEBUG_::Item87::defaultValue = 0; DELAYACT::DELAYACT() : ParserKeyword("DELAYACT", KeywordSize(1, false)) { @@ -798,9 +714,26 @@ const std::string DELAYACT::ACTION_NAME::itemName = "ACTION_NAME"; const std::string DELAYACT::ACTION_TRIGGER::itemName = "ACTION_TRIGGER"; const std::string DELAYACT::DELAY::itemName = "DELAY"; const std::string DELAYACT::NUM_TIMES::itemName = "NUM_TIMES"; -const int DELAYACT::NUM_TIMES::defaultValue = 1; const std::string DELAYACT::INCREMENT::itemName = "INCREMENT"; -const double DELAYACT::INCREMENT::defaultValue = 0; + + +DENAQA::DENAQA() : ParserKeyword("DENAQA", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("DENAQA"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string DENAQA::keywordName = "DENAQA"; +const std::string DENAQA::DATA::itemName = "DATA"; DENSITY::DENSITY() : ParserKeyword("DENSITY", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -832,11 +765,8 @@ DENSITY::DENSITY() : ParserKeyword("DENSITY", KeywordSize("TABDIMS", "NTPVT", fa } const std::string DENSITY::keywordName = "DENSITY"; const std::string DENSITY::OIL::itemName = "OIL"; -const double DENSITY::OIL::defaultValue = 600.000000; const std::string DENSITY::WATER::itemName = "WATER"; -const double DENSITY::WATER::defaultValue = 999.014000; const std::string DENSITY::GAS::itemName = "GAS"; -const double DENSITY::GAS::defaultValue = 1.000000; DEPTH::DEPTH() : ParserKeyword("DEPTH", KeywordSize(1, false)) { @@ -924,7 +854,70 @@ DIFF::DIFF() : ParserKeyword("DIFF", KeywordSize(1, false)) { } const std::string DIFF::keywordName = "DIFF"; const std::string DIFF::data::itemName = "data"; -const double DIFF::data::defaultValue = 1.000000; + + +DIFFAGAS::DIFFAGAS() : ParserKeyword("DIFFAGAS", KeywordSize("TABDIMS", "NTPVT", false, 0)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "DIFFCWAT", + "DIFFCGAS", + }); + setRequiredKeywords({ + "GAS", + "WATER", + }); + clearDeckNames(); + addDeckName("DIFFAGAS"); + { + ParserRecord record; + { + ParserItem item("CO2_IN_GAS", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + { + ParserItem item("H20_IN_GAS", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string DIFFAGAS::keywordName = "DIFFAGAS"; +const std::string DIFFAGAS::CO2_IN_GAS::itemName = "CO2_IN_GAS"; +const std::string DIFFAGAS::H20_IN_GAS::itemName = "H20_IN_GAS"; + + +DIFFAWAT::DIFFAWAT() : ParserKeyword("DIFFAWAT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "DIFFCWAT", + "DIFFCGAS", + }); + setRequiredKeywords({ + "GAS", + "WATER", + }); + clearDeckNames(); + addDeckName("DIFFAWAT"); + { + ParserRecord record; + { + ParserItem item("CO2_IN_WATER", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + { + ParserItem item("H20_IN_WATER", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string DIFFAWAT::keywordName = "DIFFAWAT"; +const std::string DIFFAWAT::CO2_IN_WATER::itemName = "CO2_IN_WATER"; +const std::string DIFFAWAT::H20_IN_WATER::itemName = "H20_IN_WATER"; DIFFC::DIFFC() : ParserKeyword("DIFFC", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -986,9 +979,39 @@ const std::string DIFFC::OIL_GAS_DIFF_COEFF::itemName = "OIL_GAS_DIFF_COEFF"; const std::string DIFFC::GAS_OIL_DIFF_COEFF::itemName = "GAS_OIL_DIFF_COEFF"; const std::string DIFFC::OIL_OIL_DIFF_COEFF::itemName = "OIL_OIL_DIFF_COEFF"; const std::string DIFFC::GAS_OIL_CROSS_DIFF_COEFF::itemName = "GAS_OIL_CROSS_DIFF_COEFF"; -const double DIFFC::GAS_OIL_CROSS_DIFF_COEFF::defaultValue = 0; const std::string DIFFC::OIL_OIL_CROSS_DIFF_COEFF::itemName = "OIL_OIL_CROSS_DIFF_COEFF"; -const double DIFFC::OIL_OIL_CROSS_DIFF_COEFF::defaultValue = 0; + + +DIFFCGAS::DIFFCGAS() : ParserKeyword("DIFFCGAS", KeywordSize("TABDIMS", "NTPVT", false, 0)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "DIFFAWAT", + "DIFFAGAS", + }); + setRequiredKeywords({ + "GAS", + "WATER", + }); + clearDeckNames(); + addDeckName("DIFFCGAS"); + { + ParserRecord record; + { + ParserItem item("CO2_IN_GAS", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + { + ParserItem item("H20_IN_GAS", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string DIFFCGAS::keywordName = "DIFFCGAS"; +const std::string DIFFCGAS::CO2_IN_GAS::itemName = "CO2_IN_GAS"; +const std::string DIFFCGAS::H20_IN_GAS::itemName = "H20_IN_GAS"; DIFFCOAL::DIFFCOAL() : ParserKeyword("DIFFCOAL", KeywordSize("REGDIMS", "NTCREG", false, 0)) { @@ -1019,10 +1042,41 @@ DIFFCOAL::DIFFCOAL() : ParserKeyword("DIFFCOAL", KeywordSize("REGDIMS", "NTCREG" const std::string DIFFCOAL::keywordName = "DIFFCOAL"; const std::string DIFFCOAL::GAS_DIFF_COEFF::itemName = "GAS_DIFF_COEFF"; const std::string DIFFCOAL::RE_ADSORB_FRACTION::itemName = "RE_ADSORB_FRACTION"; -const double DIFFCOAL::RE_ADSORB_FRACTION::defaultValue = 1.000000; const std::string DIFFCOAL::SOL_DIFF_COEFF::itemName = "SOL_DIFF_COEFF"; +DIFFCWAT::DIFFCWAT() : ParserKeyword("DIFFCWAT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "DIFFAWAT", + "DIFFAGAS", + }); + setRequiredKeywords({ + "GAS", + "WATER", + }); + clearDeckNames(); + addDeckName("DIFFCWAT"); + { + ParserRecord record; + { + ParserItem item("CO2_IN_WATER", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + { + ParserItem item("H20_IN_WATER", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length/Time"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string DIFFCWAT::keywordName = "DIFFCWAT"; +const std::string DIFFCWAT::CO2_IN_WATER::itemName = "CO2_IN_WATER"; +const std::string DIFFCWAT::H20_IN_WATER::itemName = "H20_IN_WATER"; + + DIFFDP::DIFFDP() : ParserKeyword("DIFFDP", KeywordSize(0, false)) { addValidSectionName("PROPS"); clearDeckNames(); @@ -1050,7 +1104,6 @@ DIFFMMF::DIFFMMF() : ParserKeyword("DIFFMMF", KeywordSize(1, false)) { } const std::string DIFFMMF::keywordName = "DIFFMMF"; const std::string DIFFMMF::data::itemName = "data"; -const double DIFFMMF::data::defaultValue = 1.000000; DIFFMR::DIFFMR() : ParserKeyword("DIFFMR", KeywordSize(1, false)) { @@ -1071,7 +1124,6 @@ DIFFMR::DIFFMR() : ParserKeyword("DIFFMR", KeywordSize(1, false)) { } const std::string DIFFMR::keywordName = "DIFFMR"; const std::string DIFFMR::data::itemName = "data"; -const double DIFFMR::data::defaultValue = 1.000000; DIFFMTHT::DIFFMTHT() : ParserKeyword("DIFFMTHT", KeywordSize(1, false)) { @@ -1092,7 +1144,6 @@ DIFFMTHT::DIFFMTHT() : ParserKeyword("DIFFMTHT", KeywordSize(1, false)) { } const std::string DIFFMTHT::keywordName = "DIFFMTHT"; const std::string DIFFMTHT::data::itemName = "data"; -const double DIFFMTHT::data::defaultValue = 1.000000; DIFFMX::DIFFMX() : ParserKeyword("DIFFMX", KeywordSize(1, false)) { @@ -1113,7 +1164,6 @@ DIFFMX::DIFFMX() : ParserKeyword("DIFFMX", KeywordSize(1, false)) { } const std::string DIFFMX::keywordName = "DIFFMX"; const std::string DIFFMX::data::itemName = "data"; -const double DIFFMX::data::defaultValue = 1.000000; DIFFMY::DIFFMY() : ParserKeyword("DIFFMY", KeywordSize(1, false)) { @@ -1134,7 +1184,6 @@ DIFFMY::DIFFMY() : ParserKeyword("DIFFMY", KeywordSize(1, false)) { } const std::string DIFFMY::keywordName = "DIFFMY"; const std::string DIFFMY::data::itemName = "data"; -const double DIFFMY::data::defaultValue = 1.000000; DIFFMZ::DIFFMZ() : ParserKeyword("DIFFMZ", KeywordSize(1, false)) { @@ -1155,7 +1204,6 @@ DIFFMZ::DIFFMZ() : ParserKeyword("DIFFMZ", KeywordSize(1, false)) { } const std::string DIFFMZ::keywordName = "DIFFMZ"; const std::string DIFFMZ::data::itemName = "data"; -const double DIFFMZ::data::defaultValue = 1.000000; DIFFR::DIFFR() : ParserKeyword("DIFFR", KeywordSize(1, false)) { @@ -1317,11 +1365,8 @@ DIMPES::DIMPES() : ParserKeyword("DIMPES", KeywordSize(1, false)) { } const std::string DIMPES::keywordName = "DIMPES"; const std::string DIMPES::DSTARG::itemName = "DSTARG"; -const double DIMPES::DSTARG::defaultValue = 0.050000; const std::string DIMPES::DSMAX::itemName = "DSMAX"; -const double DIMPES::DSMAX::defaultValue = 0.100000; const std::string DIMPES::DPMAX::itemName = "DPMAX"; -const double DIMPES::DPMAX::defaultValue = 13.790000; DIMPLICT::DIMPLICT() : ParserKeyword("DIMPLICT", KeywordSize(0, false)) { @@ -1340,6 +1385,14 @@ DISGAS::DISGAS() : ParserKeyword("DISGAS", KeywordSize(0, false)) { const std::string DISGAS::keywordName = "DISGAS"; +DISGASW::DISGASW() : ParserKeyword("DISGASW", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("DISGASW"); +} +const std::string DISGASW::keywordName = "DISGASW"; + + DISPDIMS::DISPDIMS() : ParserKeyword("DISPDIMS", KeywordSize(1, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -1366,11 +1419,27 @@ DISPDIMS::DISPDIMS() : ParserKeyword("DISPDIMS", KeywordSize(1, false)) { } const std::string DISPDIMS::keywordName = "DISPDIMS"; const std::string DISPDIMS::NUM_DISP_TABLES::itemName = "NUM_DISP_TABLES"; -const int DISPDIMS::NUM_DISP_TABLES::defaultValue = 1; const std::string DISPDIMS::MAX_VELOCITY_NODES::itemName = "MAX_VELOCITY_NODES"; -const int DISPDIMS::MAX_VELOCITY_NODES::defaultValue = 2; const std::string DISPDIMS::MAX_CONCENTRATION_NODES::itemName = "MAX_CONCENTRATION_NODES"; -const int DISPDIMS::MAX_CONCENTRATION_NODES::defaultValue = 1; + + +DISPERC::DISPERC() : ParserKeyword("DISPERC", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("DISPERC"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Length"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string DISPERC::keywordName = "DISPERC"; +const std::string DISPERC::data::itemName = "data"; DISPERSE::DISPERSE() : ParserKeyword("DISPERSE", KeywordSize("DISPDIMS", "MXDIST", true, 0)) { @@ -1454,9 +1523,7 @@ DPKRMOD::DPKRMOD() : ParserKeyword("DPKRMOD", KeywordSize("TABDIMS", "NTSFUN", f } const std::string DPKRMOD::keywordName = "DPKRMOD"; const std::string DPKRMOD::MOD_OIL_WAT_PERM::itemName = "MOD_OIL_WAT_PERM"; -const double DPKRMOD::MOD_OIL_WAT_PERM::defaultValue = 0; const std::string DPKRMOD::MOD_OIL_GAS_PERM::itemName = "MOD_OIL_GAS_PERM"; -const double DPKRMOD::MOD_OIL_GAS_PERM::defaultValue = 0; const std::string DPKRMOD::SCALE_PERM_FRACTURE::itemName = "SCALE_PERM_FRACTURE"; const std::string DPKRMOD::SCALE_PERM_FRACTURE::defaultValue = "YES"; @@ -1498,7 +1565,7 @@ const std::string DR::keywordName = "DR"; const std::string DR::data::itemName = "data"; -DREF::DREF() : ParserKeyword("DREF", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +DREF::DREF() : ParserKeyword("DREF", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("DREF"); @@ -1517,7 +1584,7 @@ const std::string DREF::keywordName = "DREF"; const std::string DREF::DENSITY::itemName = "DENSITY"; -DREFS::DREFS() : ParserKeyword("DREFS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +DREFS::DREFS() : ParserKeyword("DREFS", KeywordSize("TABDIMS", "NUM_EOS_SURFACE", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("DREFS"); @@ -1604,25 +1671,15 @@ DRILPRI::DRILPRI() : ParserKeyword("DRILPRI", KeywordSize(1, false)) { } const std::string DRILPRI::keywordName = "DRILPRI"; const std::string DRILPRI::INTERVAL::itemName = "INTERVAL"; -const double DRILPRI::INTERVAL::defaultValue = 0; const std::string DRILPRI::A::itemName = "A"; -const double DRILPRI::A::defaultValue = 0; const std::string DRILPRI::B::itemName = "B"; -const double DRILPRI::B::defaultValue = 0; const std::string DRILPRI::C::itemName = "C"; -const double DRILPRI::C::defaultValue = 0; const std::string DRILPRI::D::itemName = "D"; -const double DRILPRI::D::defaultValue = 0; const std::string DRILPRI::E::itemName = "E"; -const double DRILPRI::E::defaultValue = 0; const std::string DRILPRI::F::itemName = "F"; -const double DRILPRI::F::defaultValue = 0; const std::string DRILPRI::G::itemName = "G"; -const double DRILPRI::G::defaultValue = 0; const std::string DRILPRI::H::itemName = "H"; -const double DRILPRI::H::defaultValue = 0; const std::string DRILPRI::LOOK_AHEAD::itemName = "LOOK_AHEAD"; -const double DRILPRI::LOOK_AHEAD::defaultValue = 0; const std::string DRILPRI::CALCULATION::itemName = "CALCULATION"; const std::string DRILPRI::CALCULATION::defaultValue = "SINGLE"; @@ -1652,7 +1709,7 @@ const std::string DRSDT::OPTION::itemName = "OPTION"; const std::string DRSDT::OPTION::defaultValue = "ALL"; -DRSDTCON::DRSDTCON() : ParserKeyword("DRSDTCON", KeywordSize(1, false)) { +DRSDTCON::DRSDTCON() : ParserKeyword("DRSDTCON", KeywordSize("TABDIMS", "NTPVT", false, 0)) { addValidSectionName("SCHEDULE"); clearDeckNames(); addDeckName("DRSDTCON"); @@ -1660,6 +1717,19 @@ DRSDTCON::DRSDTCON() : ParserKeyword("DRSDTCON", KeywordSize(1, false)) { ParserRecord record; { ParserItem item("DRSDT_MAX", ParserItem::itype::DOUBLE); + item.setDefault( double(0.040000) ); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("PSI", ParserItem::itype::DOUBLE); + item.setDefault( double(0.340000) ); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("OMEGA", ParserItem::itype::DOUBLE); + item.setDefault( double(3e-09) ); item.push_backDimension("1"); record.addItem(item); } @@ -1673,6 +1743,8 @@ DRSDTCON::DRSDTCON() : ParserKeyword("DRSDTCON", KeywordSize(1, false)) { } const std::string DRSDTCON::keywordName = "DRSDTCON"; const std::string DRSDTCON::DRSDT_MAX::itemName = "DRSDT_MAX"; +const std::string DRSDTCON::PSI::itemName = "PSI"; +const std::string DRSDTCON::OMEGA::itemName = "OMEGA"; const std::string DRSDTCON::OPTION::itemName = "OPTION"; const std::string DRSDTCON::OPTION::defaultValue = "ALL"; @@ -1956,11 +2028,8 @@ DYNRDIMS::DYNRDIMS() : ParserKeyword("DYNRDIMS", KeywordSize(1, false)) { } const std::string DYNRDIMS::keywordName = "DYNRDIMS"; const std::string DYNRDIMS::MNUMDR::itemName = "MNUMDR"; -const int DYNRDIMS::MNUMDR::defaultValue = 0; const std::string DYNRDIMS::MXDYNF::itemName = "MXDYNF"; -const int DYNRDIMS::MXDYNF::defaultValue = 0; const std::string DYNRDIMS::MXDYNR::itemName = "MXDYNR"; -const int DYNRDIMS::MXDYNR::defaultValue = 0; DYV::DYV() : ParserKeyword("DYV", KeywordSize(1, false)) { @@ -2022,7 +2091,6 @@ DZMATRIX::DZMATRIX() : ParserKeyword("DZMATRIX", KeywordSize(1, false)) { } const std::string DZMATRIX::keywordName = "DZMATRIX"; const std::string DZMATRIX::data::itemName = "data"; -const double DZMATRIX::data::defaultValue = 0; DZMTRX::DZMTRX() : ParserKeyword("DZMTRX", KeywordSize(1, false)) { @@ -2043,7 +2111,6 @@ DZMTRX::DZMTRX() : ParserKeyword("DZMTRX", KeywordSize(1, false)) { } const std::string DZMTRX::keywordName = "DZMTRX"; const std::string DZMTRX::data::itemName = "data"; -const double DZMTRX::data::defaultValue = 0; DZMTRXV::DZMTRXV() : ParserKeyword("DZMTRXV", KeywordSize(1, false)) { @@ -2064,7 +2131,6 @@ DZMTRXV::DZMTRXV() : ParserKeyword("DZMTRXV", KeywordSize(1, false)) { } const std::string DZMTRXV::keywordName = "DZMTRXV"; const std::string DZMTRXV::data::itemName = "data"; -const double DZMTRXV::data::defaultValue = 0; DZNET::DZNET() : ParserKeyword("DZNET", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/E.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/E.cpp index d087fcb9e4..23dd423cce 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/E.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/E.cpp @@ -155,6 +155,7 @@ EDITNNCR::EDITNNCR() : ParserKeyword("EDITNNCR", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("TRANS", ParserItem::itype::DOUBLE); + item.push_backDimension("Transmissibility"); record.addItem(item); } { @@ -213,7 +214,7 @@ EHYSTR::EHYSTR() : ParserKeyword("EHYSTR", KeywordSize(1, false)) { { ParserRecord record; { - ParserItem item("curvature_caplillary_pressure_hyst", ParserItem::itype::DOUBLE); + ParserItem item("curvature_capillary_pressure_hyst", ParserItem::itype::DOUBLE); item.setDefault( double(0.100000) ); record.addItem(item); } @@ -281,14 +282,10 @@ EHYSTR::EHYSTR() : ParserKeyword("EHYSTR", KeywordSize(1, false)) { } } const std::string EHYSTR::keywordName = "EHYSTR"; -const std::string EHYSTR::curvature_caplillary_pressure_hyst::itemName = "curvature_caplillary_pressure_hyst"; -const double EHYSTR::curvature_caplillary_pressure_hyst::defaultValue = 0.100000; +const std::string EHYSTR::curvature_capillary_pressure_hyst::itemName = "curvature_capillary_pressure_hyst"; const std::string EHYSTR::relative_perm_hyst::itemName = "relative_perm_hyst"; -const int EHYSTR::relative_perm_hyst::defaultValue = 0; const std::string EHYSTR::curvature_param_killough_wetting::itemName = "curvature_param_killough_wetting"; -const double EHYSTR::curvature_param_killough_wetting::defaultValue = 1.000000; const std::string EHYSTR::mod_param_trapped::itemName = "mod_param_trapped"; -const double EHYSTR::mod_param_trapped::defaultValue = 0.100000; const std::string EHYSTR::limiting_hyst_flag::itemName = "limiting_hyst_flag"; const std::string EHYSTR::limiting_hyst_flag::defaultValue = "BOTH"; const std::string EHYSTR::shape_cap_press_flag::itemName = "shape_cap_press_flag"; @@ -304,9 +301,7 @@ const std::string EHYSTR::baker_flag_gas::defaultValue = "NO"; const std::string EHYSTR::baker_flag_water::itemName = "baker_flag_water"; const std::string EHYSTR::baker_flag_water::defaultValue = "NO"; const std::string EHYSTR::threshold_saturation::itemName = "threshold_saturation"; -const double EHYSTR::threshold_saturation::defaultValue = 0; const std::string EHYSTR::FLAG_SOMETHING::itemName = "FLAG_SOMETHING"; -const int EHYSTR::FLAG_SOMETHING::defaultValue = 0; EHYSTRR::EHYSTRR() : ParserKeyword("EHYSTRR", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { @@ -335,11 +330,8 @@ EHYSTRR::EHYSTRR() : ParserKeyword("EHYSTRR", KeywordSize("TABDIMS", "NTSFUN", f } const std::string EHYSTRR::keywordName = "EHYSTRR"; const std::string EHYSTRR::curvature_caplillary_pressure_hyst::itemName = "curvature_caplillary_pressure_hyst"; -const double EHYSTRR::curvature_caplillary_pressure_hyst::defaultValue = 0.100000; const std::string EHYSTRR::curvature_parameter_wetting_phase_hyst::itemName = "curvature_parameter_wetting_phase_hyst"; -const double EHYSTRR::curvature_parameter_wetting_phase_hyst::defaultValue = 1.000000; const std::string EHYSTRR::mod_param_non_wet_phase_sat::itemName = "mod_param_non_wet_phase_sat"; -const double EHYSTRR::mod_param_non_wet_phase_sat::defaultValue = 0.100000; END::END() : ParserKeyword("END", KeywordSize(0, false)) { @@ -682,11 +674,8 @@ const std::string ENDSCALE::DIRECT::defaultValue = "NODIR"; const std::string ENDSCALE::IRREVERS::itemName = "IRREVERS"; const std::string ENDSCALE::IRREVERS::defaultValue = "REVERS"; const std::string ENDSCALE::NTENDP::itemName = "NTENDP"; -const int ENDSCALE::NTENDP::defaultValue = 1; const std::string ENDSCALE::NSENDP::itemName = "NSENDP"; -const int ENDSCALE::NSENDP::defaultValue = 20; const std::string ENDSCALE::COMB_MODE::itemName = "COMB_MODE"; -const int ENDSCALE::COMB_MODE::defaultValue = 0; ENDSKIP::ENDSKIP() : ParserKeyword("ENDSKIP", KeywordSize(0, false)) { @@ -729,7 +718,6 @@ ENKRVD::ENKRVD() : ParserKeyword("ENKRVD", KeywordSize("ENDSCALE", "NTENDP", fal } const std::string ENKRVD::keywordName = "ENKRVD"; const std::string ENKRVD::DATA::itemName = "DATA"; -const double ENKRVD::DATA::defaultValue = -1.000000; ENPCVD::ENPCVD() : ParserKeyword("ENPCVD", KeywordSize("ENDSCALE", "NTENDP", false, 0)) { @@ -752,7 +740,6 @@ ENPCVD::ENPCVD() : ParserKeyword("ENPCVD", KeywordSize("ENDSCALE", "NTENDP", fal } const std::string ENPCVD::keywordName = "ENPCVD"; const std::string ENPCVD::DATA::itemName = "DATA"; -const double ENPCVD::DATA::defaultValue = -1.000000; ENPTVD::ENPTVD() : ParserKeyword("ENPTVD", KeywordSize("ENDSCALE", "NTENDP", false, 0)) { @@ -781,7 +768,6 @@ ENPTVD::ENPTVD() : ParserKeyword("ENPTVD", KeywordSize("ENDSCALE", "NTENDP", fal } const std::string ENPTVD::keywordName = "ENPTVD"; const std::string ENPTVD::DATA::itemName = "DATA"; -const double ENPTVD::DATA::defaultValue = -1.000000; ENSPCVD::ENSPCVD() : ParserKeyword("ENSPCVD", KeywordSize("ENDSCALE", "NTENDP", false, 0)) { @@ -804,7 +790,44 @@ ENSPCVD::ENSPCVD() : ParserKeyword("ENSPCVD", KeywordSize("ENDSCALE", "NTENDP", } const std::string ENSPCVD::keywordName = "ENSPCVD"; const std::string ENSPCVD::DATA::itemName = "DATA"; -const double ENSPCVD::DATA::defaultValue = -1.000000; + + +EOS::EOS() : ParserKeyword("EOS", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("RUNSPEC"); + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("EOS"); + { + ParserRecord record; + { + ParserItem item("EQUATION", ParserItem::itype::STRING); + item.setDefault( std::string("PR") ); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string EOS::keywordName = "EOS"; +const std::string EOS::EQUATION::itemName = "EQUATION"; +const std::string EOS::EQUATION::defaultValue = "PR"; + + +EOSNUM::EOSNUM() : ParserKeyword("EOSNUM", KeywordSize(1, false)) { + addValidSectionName("REGIONS"); + clearDeckNames(); + addDeckName("EOSNUM"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::INT); + item.setSizeType(ParserItem::item_size::ALL); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string EOSNUM::keywordName = "EOSNUM"; +const std::string EOSNUM::data::itemName = "data"; EPSDBGS::EPSDBGS() : ParserKeyword("EPSDBGS", KeywordSize(SLASH_TERMINATED)) { @@ -862,9 +885,7 @@ EPSDBGS::EPSDBGS() : ParserKeyword("EPSDBGS", KeywordSize(SLASH_TERMINATED)) { } const std::string EPSDBGS::keywordName = "EPSDBGS"; const std::string EPSDBGS::TABLE_OUTPUT::itemName = "TABLE_OUTPUT"; -const int EPSDBGS::TABLE_OUTPUT::defaultValue = 0; const std::string EPSDBGS::CHECK_DRAIN_HYST::itemName = "CHECK_DRAIN_HYST"; -const int EPSDBGS::CHECK_DRAIN_HYST::defaultValue = 0; const std::string EPSDBGS::IX1::itemName = "IX1"; const std::string EPSDBGS::IX2::itemName = "IX2"; const std::string EPSDBGS::JY1::itemName = "JY1"; @@ -932,11 +953,9 @@ const std::string EPSDEBUG::JY2::itemName = "JY2"; const std::string EPSDEBUG::KZ1::itemName = "KZ1"; const std::string EPSDEBUG::KZ2::itemName = "KZ2"; const std::string EPSDEBUG::TABLE_OUTPUT::itemName = "TABLE_OUTPUT"; -const int EPSDEBUG::TABLE_OUTPUT::defaultValue = 0; const std::string EPSDEBUG::GRID_NAME::itemName = "GRID_NAME"; const std::string EPSDEBUG::GRID_NAME::defaultValue = ""; const std::string EPSDEBUG::CHECK_DRAIN_HYST::itemName = "CHECK_DRAIN_HYST"; -const int EPSDEBUG::CHECK_DRAIN_HYST::defaultValue = 0; EQLDIMS::EQLDIMS() : ParserKeyword("EQLDIMS", KeywordSize(1, false)) { @@ -952,7 +971,7 @@ EQLDIMS::EQLDIMS() : ParserKeyword("EQLDIMS", KeywordSize(1, false)) { } { ParserItem item("DEPTH_NODES_P", ParserItem::itype::INT); - item.setDefault( 100 ); + item.setDefault( 2000 ); record.addItem(item); } { @@ -975,15 +994,10 @@ EQLDIMS::EQLDIMS() : ParserKeyword("EQLDIMS", KeywordSize(1, false)) { } const std::string EQLDIMS::keywordName = "EQLDIMS"; const std::string EQLDIMS::NTEQUL::itemName = "NTEQUL"; -const int EQLDIMS::NTEQUL::defaultValue = 1; const std::string EQLDIMS::DEPTH_NODES_P::itemName = "DEPTH_NODES_P"; -const int EQLDIMS::DEPTH_NODES_P::defaultValue = 100; const std::string EQLDIMS::DEPTH_NODES_TAB::itemName = "DEPTH_NODES_TAB"; -const int EQLDIMS::DEPTH_NODES_TAB::defaultValue = 20; const std::string EQLDIMS::NTTRVD::itemName = "NTTRVD"; -const int EQLDIMS::NTTRVD::defaultValue = 1; const std::string EQLDIMS::NSTRVD::itemName = "NSTRVD"; -const int EQLDIMS::NSTRVD::defaultValue = 20; EQLNUM::EQLNUM() : ParserKeyword("EQLNUM", KeywordSize(1, false)) { @@ -1112,9 +1126,9 @@ const std::string EQLZCORN::ACTION_REQ::defaultValue = "TOP"; EQUALREG::EQUALREG() : ParserKeyword("EQUALREG", KeywordSize(SLASH_TERMINATED)) { - addValidSectionName("PROPS"); - addValidSectionName("EDIT"); addValidSectionName("GRID"); + addValidSectionName("EDIT"); + addValidSectionName("PROPS"); addValidSectionName("REGIONS"); addValidSectionName("SOLUTION"); clearDeckNames(); @@ -1149,7 +1163,6 @@ EQUALREG::EQUALREG() : ParserKeyword("EQUALREG", KeywordSize(SLASH_TERMINATED)) const std::string EQUALREG::keywordName = "EQUALREG"; const std::string EQUALREG::ARRAY::itemName = "ARRAY"; const std::string EQUALREG::VALUE::itemName = "VALUE"; -const double EQUALREG::VALUE::defaultValue = 0; const std::string EQUALREG::REGION_NUMBER::itemName = "REGION_NUMBER"; const std::string EQUALREG::REGION_NAME::itemName = "REGION_NAME"; const std::string EQUALREG::REGION_NAME::defaultValue = "M"; @@ -1276,29 +1289,27 @@ EQUIL::EQUIL() : ParserKeyword("EQUIL", KeywordSize("EQLDIMS", "NTEQUL", false, ParserItem item("EQLOPT5", ParserItem::itype::INT); record.addItem(item); } + { + ParserItem item("BLACK_OIL_INIT_HG", ParserItem::itype::INT); + item.setDefault( 0 ); + record.addItem(item); + } addRecord( record ); } } const std::string EQUIL::keywordName = "EQUIL"; const std::string EQUIL::DATUM_DEPTH::itemName = "DATUM_DEPTH"; -const double EQUIL::DATUM_DEPTH::defaultValue = 0; const std::string EQUIL::DATUM_PRESSURE::itemName = "DATUM_PRESSURE"; const std::string EQUIL::OWC::itemName = "OWC"; -const double EQUIL::OWC::defaultValue = 0; const std::string EQUIL::PC_OWC::itemName = "PC_OWC"; -const double EQUIL::PC_OWC::defaultValue = 0; const std::string EQUIL::GOC::itemName = "GOC"; -const double EQUIL::GOC::defaultValue = 0; const std::string EQUIL::PC_GOC::itemName = "PC_GOC"; -const double EQUIL::PC_GOC::defaultValue = 0; const std::string EQUIL::BLACK_OIL_INIT::itemName = "BLACK_OIL_INIT"; -const int EQUIL::BLACK_OIL_INIT::defaultValue = 0; const std::string EQUIL::BLACK_OIL_INIT_WG::itemName = "BLACK_OIL_INIT_WG"; -const int EQUIL::BLACK_OIL_INIT_WG::defaultValue = 0; const std::string EQUIL::OIP_INIT::itemName = "OIP_INIT"; -const int EQUIL::OIP_INIT::defaultValue = -5; const std::string EQUIL::EQLOPT04::itemName = "EQLOPT04"; const std::string EQUIL::EQLOPT5::itemName = "EQLOPT5"; +const std::string EQUIL::BLACK_OIL_INIT_HG::itemName = "BLACK_OIL_INIT_HG"; ESSNODE::ESSNODE() : ParserKeyword("ESSNODE", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -1362,7 +1373,6 @@ EXIT::EXIT() : ParserKeyword("EXIT", KeywordSize(1, false)) { } const std::string EXIT::keywordName = "EXIT"; const std::string EXIT::STATUS_CODE::itemName = "STATUS_CODE"; -const int EXIT::STATUS_CODE::defaultValue = 0; EXTFIN::EXTFIN() : ParserKeyword("EXTFIN", KeywordSize(1, false)) { @@ -1468,7 +1478,6 @@ EXTRAPMS::EXTRAPMS() : ParserKeyword("EXTRAPMS", KeywordSize(1, false)) { } const std::string EXTRAPMS::keywordName = "EXTRAPMS"; const std::string EXTRAPMS::LEVEL::itemName = "LEVEL"; -const int EXTRAPMS::LEVEL::defaultValue = 0; EXTREPGL::EXTREPGL() : ParserKeyword("EXTREPGL", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/F.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/F.cpp index eab4042c71..49472987de 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/F.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/F.cpp @@ -27,7 +27,6 @@ FAULTDIM::FAULTDIM() : ParserKeyword("FAULTDIM", KeywordSize(1, false)) { } const std::string FAULTDIM::keywordName = "FAULTDIM"; const std::string FAULTDIM::MFSEGS::itemName = "MFSEGS"; -const int FAULTDIM::MFSEGS::defaultValue = 0; FAULTS::FAULTS() : ParserKeyword("FAULTS", KeywordSize(SLASH_TERMINATED)) { @@ -90,11 +89,13 @@ FBHPDEF::FBHPDEF() : ParserKeyword("FBHPDEF", KeywordSize(1, false)) { ParserRecord record; { ParserItem item("TARGET_BHP", ParserItem::itype::DOUBLE); - item.push_backDimension("Length"); + item.setDefault( double(1.013250) ); + item.push_backDimension("Pressure"); record.addItem(item); } { ParserItem item("LIMIT_BHP", ParserItem::itype::DOUBLE); + item.setDefault( double(6895.000000) ); item.push_backDimension("Pressure"); record.addItem(item); } @@ -136,38 +137,110 @@ FIELD::FIELD() : ParserKeyword("FIELD", KeywordSize(0, false)) { const std::string FIELD::keywordName = "FIELD"; +FIELDSEP::FIELDSEP() : ParserKeyword("FIELDSEP", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SOLUTION"); + clearDeckNames(); + addDeckName("FIELDSEP"); + { + ParserRecord record; + { + ParserItem item("STAGE", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("TEMPERATURE", ParserItem::itype::DOUBLE); + item.setDefault( double(15.560000) ); + item.push_backDimension("Temperature"); + record.addItem(item); + } + { + ParserItem item("PRESSURE", ParserItem::itype::DOUBLE); + item.setDefault( double(1.013250) ); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("LIQ_DESTINATION", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("VAP_DESTINATION", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("KVALUE", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("TABLE_NUM", ParserItem::itype::INT); + item.setDefault( 0 ); + record.addItem(item); + } + { + ParserItem item("EOS_NUM", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("REF_TEMP", ParserItem::itype::DOUBLE); + item.push_backDimension("Temperature"); + record.addItem(item); + } + { + ParserItem item("REF_PRESS", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string FIELDSEP::keywordName = "FIELDSEP"; +const std::string FIELDSEP::STAGE::itemName = "STAGE"; +const std::string FIELDSEP::TEMPERATURE::itemName = "TEMPERATURE"; +const std::string FIELDSEP::PRESSURE::itemName = "PRESSURE"; +const std::string FIELDSEP::LIQ_DESTINATION::itemName = "LIQ_DESTINATION"; +const std::string FIELDSEP::VAP_DESTINATION::itemName = "VAP_DESTINATION"; +const std::string FIELDSEP::KVALUE::itemName = "KVALUE"; +const std::string FIELDSEP::TABLE_NUM::itemName = "TABLE_NUM"; +const std::string FIELDSEP::EOS_NUM::itemName = "EOS_NUM"; +const std::string FIELDSEP::REF_TEMP::itemName = "REF_TEMP"; +const std::string FIELDSEP::REF_PRESS::itemName = "REF_PRESS"; + + FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) { addValidSectionName("SUMMARY"); clearDeckNames(); - addDeckName("FORFF"); addDeckName("FOPR"); - addDeckName("FCSC"); + addDeckName("FGCDI"); + addDeckName("FORFF"); addDeckName("FOPRH"); + addDeckName("FCSC"); addDeckName("FOPTF"); - addDeckName("FSPR"); - addDeckName("FGPTF"); addDeckName("FGIMT"); + addDeckName("FGPTF"); + addDeckName("FSPR"); addDeckName("FGPP2"); - addDeckName("FGLRH"); addDeckName("FOPRT"); + addDeckName("FGLRH"); addDeckName("FGPRF"); addDeckName("FOPT"); addDeckName("FOPRF"); - addDeckName("FMWPL"); addDeckName("FGST"); - addDeckName("FOPRS"); + addDeckName("FMWPL"); addDeckName("FOPI2"); + addDeckName("FOPRS"); addDeckName("FOPI"); addDeckName("FGPP"); addDeckName("FOPTH"); addDeckName("FGIRT"); - addDeckName("FCIP"); addDeckName("FOPTS"); + addDeckName("FCIP"); addDeckName("FOIR"); - addDeckName("FCIT"); addDeckName("FOIRH"); - addDeckName("FOIRT"); + addDeckName("FCIT"); addDeckName("FWIT"); + addDeckName("FOIRT"); addDeckName("FOIT"); addDeckName("FGPRS"); addDeckName("FWPI2"); @@ -176,88 +249,89 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FWPRT"); addDeckName("FOPP2"); addDeckName("FWPRH"); - addDeckName("FMWPO"); addDeckName("FWPR"); + addDeckName("FMWPO"); addDeckName("FWPT"); - addDeckName("FCIC"); addDeckName("FWPTH"); + addDeckName("FCIC"); addDeckName("FWIR"); addDeckName("FGSR"); addDeckName("FWIRH"); addDeckName("FWIRT"); addDeckName("FWITH"); - addDeckName("FSPT"); addDeckName("FGIMR"); + addDeckName("FSPT"); addDeckName("FWPP"); addDeckName("FWPP2"); - addDeckName("FORFE"); addDeckName("FGPI2"); - addDeckName("FMWPT"); + addDeckName("FORFE"); addDeckName("FWPI"); + addDeckName("FMWPT"); addDeckName("FGPI"); addDeckName("FWPIR"); addDeckName("FGPPF"); addDeckName("FGPR"); addDeckName("FGPRH"); addDeckName("FGPRT"); - addDeckName("FGSAT"); addDeckName("FGPT"); + addDeckName("FGSAT"); addDeckName("FGPTH"); addDeckName("FGPTS"); addDeckName("FGIR"); - addDeckName("FMWIA"); - addDeckName("FSGR"); addDeckName("FGCR"); - addDeckName("FGIRH"); + addDeckName("FSGR"); + addDeckName("FMWIA"); addDeckName("FGPPS2"); + addDeckName("FGIRH"); addDeckName("FGIT"); - addDeckName("FOSRL"); addDeckName("FGITH"); + addDeckName("FOSRL"); addDeckName("FGPPS"); addDeckName("FGPPF2"); - addDeckName("FMWIG"); - addDeckName("FSGT"); addDeckName("FGCT"); - addDeckName("FJPRH"); + addDeckName("FSGT"); + addDeckName("FMWIG"); + addDeckName("FWCD"); addDeckName("FGLIR"); + addDeckName("FJPRH"); addDeckName("FGQ"); addDeckName("FLPR"); - addDeckName("FTICHEA"); - addDeckName("FSIP"); addDeckName("FLPRH"); + addDeckName("FSIP"); + addDeckName("FTICHEA"); addDeckName("FLPRT"); addDeckName("FLPT"); - addDeckName("FOEIW"); addDeckName("FLPTH"); + addDeckName("FOEIW"); addDeckName("FJPR"); addDeckName("FJPRT"); addDeckName("FJPT"); - addDeckName("FEIR"); addDeckName("FJPTH"); + addDeckName("FEIR"); addDeckName("FVPR"); addDeckName("FVPRT"); - addDeckName("FGDEN"); addDeckName("FVPT"); + addDeckName("FGDEN"); addDeckName("FVIR"); addDeckName("FVIRT"); addDeckName("FVIT"); addDeckName("FWCT"); - addDeckName("FORFG"); addDeckName("FWCTH"); + addDeckName("FORFG"); addDeckName("FGOR"); addDeckName("FGORH"); addDeckName("FOGR"); - addDeckName("FORMX"); addDeckName("FOGRH"); + addDeckName("FORMX"); addDeckName("FWGR"); addDeckName("FWGRH"); - addDeckName("FMPT"); addDeckName("FGLR"); - addDeckName("FPRP"); + addDeckName("FMPT"); addDeckName("FMCTP"); + addDeckName("FPRP"); addDeckName("FMCTW"); - addDeckName("FOVIS"); addDeckName("FMCTG"); + addDeckName("FOVIS"); addDeckName("FMWPR"); addDeckName("FMWPA"); addDeckName("FMWPU"); @@ -276,21 +350,25 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FMWWO"); addDeckName("FMWWT"); addDeckName("FEPR"); - addDeckName("FTITSUR"); addDeckName("FEPT"); + addDeckName("FTITSUR"); + addDeckName("FGCDM"); + addDeckName("FOPV"); addDeckName("FGSPR"); addDeckName("FGSRL"); addDeckName("FGSRU"); addDeckName("FGSSP"); - addDeckName("FMIR"); addDeckName("FGSTP"); + addDeckName("FMIR"); addDeckName("FOSPR"); addDeckName("FOSRU"); addDeckName("FOSSP"); addDeckName("FOSTP"); + addDeckName("FWIPG"); + addDeckName("FWIPL"); addDeckName("FWSPR"); - addDeckName("FTPTCAT"); addDeckName("FWSRL"); + addDeckName("FTPTCAT"); addDeckName("FWSRU"); addDeckName("FWSSP"); addDeckName("FWSTP"); @@ -300,14 +378,14 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FOIPL"); addDeckName("FOIPG"); addDeckName("FPPO"); - addDeckName("FMIT"); addDeckName("FODEN"); + addDeckName("FMIT"); addDeckName("FWSAT"); addDeckName("FWIP"); addDeckName("FWIPR"); addDeckName("FPPW"); - addDeckName("FORMS"); addDeckName("FWVIS"); + addDeckName("FORMS"); addDeckName("FWDEN"); addDeckName("FGIP"); addDeckName("FGIPR"); @@ -315,31 +393,30 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FGIPG"); addDeckName("FPPG"); addDeckName("FGVIS"); - addDeckName("FCAD"); addDeckName("FPR"); + addDeckName("FCAD"); addDeckName("FPRH"); addDeckName("FPRGZ"); addDeckName("FRS"); - addDeckName("FSIR"); addDeckName("FRV"); + addDeckName("FSIR"); addDeckName("FPPC"); addDeckName("FRPV"); - addDeckName("FOPV"); addDeckName("FWPV"); addDeckName("FGPV"); addDeckName("FHPV"); addDeckName("FRTM"); addDeckName("FOE"); addDeckName("FOEW"); - addDeckName("FAPI"); addDeckName("FOEWW"); + addDeckName("FAPI"); addDeckName("FOEIG"); addDeckName("FOEWG"); - addDeckName("FTPTALK"); addDeckName("FORMR"); + addDeckName("FTPTALK"); addDeckName("FORMW"); - addDeckName("FNIT"); addDeckName("FORMG"); + addDeckName("FNIT"); addDeckName("FORME"); addDeckName("FORMF"); addDeckName("FORMY"); @@ -361,8 +438,8 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FTPTANI"); addDeckName("FTIRANI"); addDeckName("FTITANI"); - addDeckName("FTPTSUR"); addDeckName("FTPRCAT"); + addDeckName("FTPTSUR"); addDeckName("FTIRCAT"); addDeckName("FTITCAT"); addDeckName("FTPCHEA"); @@ -377,8 +454,8 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FTPTFOA"); addDeckName("FTIRFOA"); addDeckName("FTITFOA"); - addDeckName("FNIP"); addDeckName("FTIPTFOA"); + addDeckName("FNIP"); addDeckName("FTADSFOA"); addDeckName("FTDCYFOA"); addDeckName("FTMOBFOA"); @@ -398,8 +475,8 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) addDeckName("FNPT"); addDeckName("FNIR"); addDeckName("FTPRSUR"); - addDeckName("FTIRALK"); addDeckName("FTIRSUR"); + addDeckName("FTIRALK"); addDeckName("FTIPTSUR"); addDeckName("FTADSUR"); addDeckName("FTPRALK"); @@ -409,6 +486,26 @@ FIELD_PROBE::FIELD_PROBE() : ParserKeyword("FIELD_PROBE", KeywordSize(0, false)) const std::string FIELD_PROBE::keywordName = "FIELD_PROBE"; +FIELD_PROBE_OPM::FIELD_PROBE_OPM() : ParserKeyword("FIELD_PROBE_OPM", KeywordSize(0, false)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("FGMIP"); + addDeckName("FGKDI"); + addDeckName("FGMDS"); + addDeckName("FGKDM"); + addDeckName("FGKMO"); + addDeckName("FGKTR"); + addDeckName("FGMIR"); + addDeckName("FGMGP"); + addDeckName("FGMIT"); + addDeckName("FGMMO"); + addDeckName("FGMST"); + addDeckName("FGMTR"); + addDeckName("FGMUS"); +} +const std::string FIELD_PROBE_OPM::keywordName = "FIELD_PROBE_OPM"; + + FILEUNIT::FILEUNIT() : ParserKeyword("FILEUNIT", KeywordSize(1, false)) { addValidSectionName("GRID"); addValidSectionName("EDIT"); @@ -532,17 +629,11 @@ const std::string FIPSEP::keywordName = "FIPSEP"; const std::string FIPSEP::FLUID_IN_PLACE_REGION::itemName = "FLUID_IN_PLACE_REGION"; const std::string FIPSEP::STAGE_INDEX::itemName = "STAGE_INDEX"; const std::string FIPSEP::STAGE_TEMPERATURE::itemName = "STAGE_TEMPERATURE"; -const double FIPSEP::STAGE_TEMPERATURE::defaultValue = 15.560000; const std::string FIPSEP::STAGE_PRESSURE::itemName = "STAGE_PRESSURE"; -const double FIPSEP::STAGE_PRESSURE::defaultValue = 1.013250; const std::string FIPSEP::DESTINATION_OUPUT::itemName = "DESTINATION_OUPUT"; -const int FIPSEP::DESTINATION_OUPUT::defaultValue = 0; const std::string FIPSEP::DESTINATION_STAGE::itemName = "DESTINATION_STAGE"; -const int FIPSEP::DESTINATION_STAGE::defaultValue = 0; const std::string FIPSEP::K_VAL_TABLE_NUM::itemName = "K_VAL_TABLE_NUM"; -const int FIPSEP::K_VAL_TABLE_NUM::defaultValue = 0; const std::string FIPSEP::GAS_PLANT_TABLE_NUM::itemName = "GAS_PLANT_TABLE_NUM"; -const int FIPSEP::GAS_PLANT_TABLE_NUM::defaultValue = 0; const std::string FIPSEP::SURF_EQ_STATE_NUM::itemName = "SURF_EQ_STATE_NUM"; const std::string FIPSEP::DENSITY_EVAL_GAS_TEMP::itemName = "DENSITY_EVAL_GAS_TEMP"; const std::string FIPSEP::DENSITY_EVAL_PRESSURE_TEMP::itemName = "DENSITY_EVAL_PRESSURE_TEMP"; @@ -741,7 +832,6 @@ FOAMFCN::FOAMFCN() : ParserKeyword("FOAMFCN", KeywordSize("TABDIMS", "NTSFUN", f const std::string FOAMFCN::keywordName = "FOAMFCN"; const std::string FOAMFCN::CAPILLARY_NUMBER::itemName = "CAPILLARY_NUMBER"; const std::string FOAMFCN::EXP::itemName = "EXP"; -const double FOAMFCN::EXP::defaultValue = 1.000000; FOAMFRM::FOAMFRM() : ParserKeyword("FOAMFRM", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { @@ -801,11 +891,8 @@ FOAMFSC::FOAMFSC() : ParserKeyword("FOAMFSC", KeywordSize("TABDIMS", "NTSFUN", f const std::string FOAMFSC::keywordName = "FOAMFSC"; const std::string FOAMFSC::REF_SURF_CONC::itemName = "REF_SURF_CONC"; const std::string FOAMFSC::EXPONENT::itemName = "EXPONENT"; -const double FOAMFSC::EXPONENT::defaultValue = 1.000000; const std::string FOAMFSC::MIN_SURF_CONC::itemName = "MIN_SURF_CONC"; -const double FOAMFSC::MIN_SURF_CONC::defaultValue = 1e-20; const std::string FOAMFSC::MIN_WAT_SAT::itemName = "MIN_WAT_SAT"; -const double FOAMFSC::MIN_WAT_SAT::defaultValue = 1e-06; FOAMFSO::FOAMFSO() : ParserKeyword("FOAMFSO", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { @@ -975,7 +1062,6 @@ FOAMROCK::FOAMROCK() : ParserKeyword("FOAMROCK", KeywordSize("TABDIMS", "NTSFUN" } const std::string FOAMROCK::keywordName = "FOAMROCK"; const std::string FOAMROCK::ADSORPTION_INDEX::itemName = "ADSORPTION_INDEX"; -const int FOAMROCK::ADSORPTION_INDEX::defaultValue = 1; const std::string FOAMROCK::ROCK_DENSITY::itemName = "ROCK_DENSITY"; @@ -1002,7 +1088,6 @@ FORMFEED::FORMFEED() : ParserKeyword("FORMFEED", KeywordSize(1, false)) { } const std::string FORMFEED::keywordName = "FORMFEED"; const std::string FORMFEED::VALUE::itemName = "VALUE"; -const int FORMFEED::VALUE::defaultValue = 1; FRICTION::FRICTION() : ParserKeyword("FRICTION", KeywordSize(1, false)) { @@ -1026,9 +1111,7 @@ FRICTION::FRICTION() : ParserKeyword("FRICTION", KeywordSize(1, false)) { } const std::string FRICTION::keywordName = "FRICTION"; const std::string FRICTION::NWFRIC::itemName = "NWFRIC"; -const int FRICTION::NWFRIC::defaultValue = 0; const std::string FRICTION::NWFRIB::itemName = "NWFRIB"; -const int FRICTION::NWFRIB::defaultValue = 1; FULLIMP::FULLIMP() : ParserKeyword("FULLIMP", KeywordSize(0, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/G.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/G.cpp index f946f9d7e0..bf295743ab 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/G.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/G.cpp @@ -75,11 +75,8 @@ GASDENT::GASDENT() : ParserKeyword("GASDENT", KeywordSize("TABDIMS", "NTPVT", fa } const std::string GASDENT::keywordName = "GASDENT"; const std::string GASDENT::REFERENCE_TEMPERATURE::itemName = "REFERENCE_TEMPERATURE"; -const double GASDENT::REFERENCE_TEMPERATURE::defaultValue = 293.150000; const std::string GASDENT::EXPANSION_COEFF_LINEAR::itemName = "EXPANSION_COEFF_LINEAR"; -const double GASDENT::EXPANSION_COEFF_LINEAR::defaultValue = 0; const std::string GASDENT::EXPANSION_COEFF_QUADRATIC::itemName = "EXPANSION_COEFF_QUADRATIC"; -const double GASDENT::EXPANSION_COEFF_QUADRATIC::defaultValue = 0; GASEND::GASEND() : ParserKeyword("GASEND", KeywordSize(0, false)) { @@ -132,15 +129,10 @@ GASFCOMP::GASFCOMP() : ParserKeyword("GASFCOMP", KeywordSize(SLASH_TERMINATED)) const std::string GASFCOMP::keywordName = "GASFCOMP"; const std::string GASFCOMP::GROUP::itemName = "GROUP"; const std::string GASFCOMP::VFP_TABLE_NUM::itemName = "VFP_TABLE_NUM"; -const int GASFCOMP::VFP_TABLE_NUM::defaultValue = 0; const std::string GASFCOMP::ARTFICIAL_LIFT_QNTY::itemName = "ARTFICIAL_LIFT_QNTY"; -const double GASFCOMP::ARTFICIAL_LIFT_QNTY::defaultValue = 0; const std::string GASFCOMP::GAS_CONSUMPTION_RATE::itemName = "GAS_CONSUMPTION_RATE"; -const double GASFCOMP::GAS_CONSUMPTION_RATE::defaultValue = 0; const std::string GASFCOMP::COMPRESSION_LVL::itemName = "COMPRESSION_LVL"; -const int GASFCOMP::COMPRESSION_LVL::defaultValue = 1; const std::string GASFCOMP::ACTION_SEQ_NUM::itemName = "ACTION_SEQ_NUM"; -const int GASFCOMP::ACTION_SEQ_NUM::defaultValue = 1; GASFDECR::GASFDECR() : ParserKeyword("GASFDECR", KeywordSize(1, false)) { @@ -214,29 +206,17 @@ GASFDECR::GASFDECR() : ParserKeyword("GASFDECR", KeywordSize(1, false)) { } const std::string GASFDECR::keywordName = "GASFDECR"; const std::string GASFDECR::JAN::itemName = "JAN"; -const double GASFDECR::JAN::defaultValue = 0; const std::string GASFDECR::FEB::itemName = "FEB"; -const double GASFDECR::FEB::defaultValue = 0; const std::string GASFDECR::MAR::itemName = "MAR"; -const double GASFDECR::MAR::defaultValue = 0; const std::string GASFDECR::APR::itemName = "APR"; -const double GASFDECR::APR::defaultValue = 0; const std::string GASFDECR::MAY::itemName = "MAY"; -const double GASFDECR::MAY::defaultValue = 0; const std::string GASFDECR::JUN::itemName = "JUN"; -const double GASFDECR::JUN::defaultValue = 0; const std::string GASFDECR::JUL::itemName = "JUL"; -const double GASFDECR::JUL::defaultValue = 0; const std::string GASFDECR::AUG::itemName = "AUG"; -const double GASFDECR::AUG::defaultValue = 0; const std::string GASFDECR::SEP::itemName = "SEP"; -const double GASFDECR::SEP::defaultValue = 0; const std::string GASFDECR::OCT::itemName = "OCT"; -const double GASFDECR::OCT::defaultValue = 0; const std::string GASFDECR::NOV::itemName = "NOV"; -const double GASFDECR::NOV::defaultValue = 0; const std::string GASFDECR::DEC::itemName = "DEC"; -const double GASFDECR::DEC::defaultValue = 0; GASFDELC::GASFDELC() : ParserKeyword("GASFDELC", KeywordSize(1, false)) { @@ -381,7 +361,7 @@ GASJT::GASJT() : ParserKeyword("GASJT", KeywordSize("TABDIMS", "NTPVT", false, 0 { ParserItem item("JOULE_THOMSON_COEFFICIENT", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); - item.push_backDimension("Temperature/Pressure"); + item.push_backDimension("AbsoluteTemperature/Pressure"); record.addItem(item); } addRecord( record ); @@ -389,9 +369,7 @@ GASJT::GASJT() : ParserKeyword("GASJT", KeywordSize("TABDIMS", "NTPVT", false, 0 } const std::string GASJT::keywordName = "GASJT"; const std::string GASJT::PREF::itemName = "PREF"; -const double GASJT::PREF::defaultValue = 1.013200; const std::string GASJT::JOULE_THOMSON_COEFFICIENT::itemName = "JOULE_THOMSON_COEFFICIENT"; -const double GASJT::JOULE_THOMSON_COEFFICIENT::defaultValue = 0; GASMONTH::GASMONTH() : ParserKeyword("GASMONTH", KeywordSize(1, false)) { @@ -476,20 +454,15 @@ GASPERIO::GASPERIO() : ParserKeyword("GASPERIO", KeywordSize(1, false)) { const std::string GASPERIO::keywordName = "GASPERIO"; const std::string GASPERIO::NUM_PERIODS::itemName = "NUM_PERIODS"; const std::string GASPERIO::NUM_MONTHS::itemName = "NUM_MONTHS"; -const int GASPERIO::NUM_MONTHS::defaultValue = 12; const std::string GASPERIO::INITIAL_DCQ::itemName = "INITIAL_DCQ"; const std::string GASPERIO::SWING_REQ::itemName = "SWING_REQ"; const std::string GASPERIO::SWING_REQ::defaultValue = "PER"; const std::string GASPERIO::LIMIT_TIMESTEPS::itemName = "LIMIT_TIMESTEPS"; const std::string GASPERIO::LIMIT_TIMESTEPS::defaultValue = "YES"; const std::string GASPERIO::LIMIT_DCQ_RED_FACTOR::itemName = "LIMIT_DCQ_RED_FACTOR"; -const double GASPERIO::LIMIT_DCQ_RED_FACTOR::defaultValue = 0; const std::string GASPERIO::ANTICIPATED_DCQ_RED_FACTOR::itemName = "ANTICIPATED_DCQ_RED_FACTOR"; -const double GASPERIO::ANTICIPATED_DCQ_RED_FACTOR::defaultValue = 1.000000; const std::string GASPERIO::MAX_ITERATIONS::itemName = "MAX_ITERATIONS"; -const int GASPERIO::MAX_ITERATIONS::defaultValue = 3; const std::string GASPERIO::DCQ_CONV_TOLERANCE::itemName = "DCQ_CONV_TOLERANCE"; -const double GASPERIO::DCQ_CONV_TOLERANCE::defaultValue = 0.100000; GASSATC::GASSATC() : ParserKeyword("GASSATC", KeywordSize(1, false)) { @@ -520,7 +493,8 @@ GASVISCT::GASVISCT() : ParserKeyword("GASVISCT", KeywordSize("TABDIMS", "NTPVT", { ParserItem item("DATA", ParserItem::itype::DOUBLE); item.setSizeType(ParserItem::item_size::ALL); - item.push_backDimension("ContextDependent"); + item.push_backDimension("Temperature"); + item.push_backDimension("Viscosity"); record.addItem(item); } addRecord( record ); @@ -530,6 +504,14 @@ const std::string GASVISCT::keywordName = "GASVISCT"; const std::string GASVISCT::DATA::itemName = "DATA"; +GASWAT::GASWAT() : ParserKeyword("GASWAT", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("GASWAT"); +} +const std::string GASWAT::keywordName = "GASWAT"; + + GASYEAR::GASYEAR() : ParserKeyword("GASYEAR", KeywordSize(1, false)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -588,13 +570,9 @@ const std::string GASYEAR::SWING_REQ::defaultValue = "YEAR"; const std::string GASYEAR::LIMIT_TIMESTEPS::itemName = "LIMIT_TIMESTEPS"; const std::string GASYEAR::LIMIT_TIMESTEPS::defaultValue = "YES"; const std::string GASYEAR::LIMIT_DCQ_RED_FACTOR::itemName = "LIMIT_DCQ_RED_FACTOR"; -const double GASYEAR::LIMIT_DCQ_RED_FACTOR::defaultValue = 0; const std::string GASYEAR::ANTICIPATED_DCQ_RED_FACTOR::itemName = "ANTICIPATED_DCQ_RED_FACTOR"; -const double GASYEAR::ANTICIPATED_DCQ_RED_FACTOR::defaultValue = 1.000000; const std::string GASYEAR::MAX_ITERATIONS::itemName = "MAX_ITERATIONS"; -const int GASYEAR::MAX_ITERATIONS::defaultValue = 3; const std::string GASYEAR::DCQ_CONV_TOLERANCE::itemName = "DCQ_CONV_TOLERANCE"; -const double GASYEAR::DCQ_CONV_TOLERANCE::defaultValue = 0.100000; GCALECON::GCALECON() : ParserKeyword("GCALECON", KeywordSize(SLASH_TERMINATED)) { @@ -630,9 +608,7 @@ GCALECON::GCALECON() : ParserKeyword("GCALECON", KeywordSize(SLASH_TERMINATED)) const std::string GCALECON::keywordName = "GCALECON"; const std::string GCALECON::GROUP::itemName = "GROUP"; const std::string GCALECON::MIN_ENERGY_PROD_RATE::itemName = "MIN_ENERGY_PROD_RATE"; -const double GCALECON::MIN_ENERGY_PROD_RATE::defaultValue = 0; const std::string GCALECON::MIN_CALORIFIC_VAL::itemName = "MIN_CALORIFIC_VAL"; -const double GCALECON::MIN_CALORIFIC_VAL::defaultValue = 0; const std::string GCALECON::FLAG_END_RUN::itemName = "FLAG_END_RUN"; const std::string GCALECON::FLAG_END_RUN::defaultValue = "NO"; @@ -689,7 +665,6 @@ const std::string GCONCAL::MEAN_CALORIFIC_VAL::itemName = "MEAN_CALORIFIC_VAL"; const std::string GCONCAL::ACTION::itemName = "ACTION"; const std::string GCONCAL::ACTION::defaultValue = "NONE"; const std::string GCONCAL::RATE_RED_FACTOR::itemName = "RATE_RED_FACTOR"; -const double GCONCAL::RATE_RED_FACTOR::defaultValue = 0.900000; GCONENG::GCONENG() : ParserKeyword("GCONENG", KeywordSize(SLASH_TERMINATED)) { @@ -714,7 +689,6 @@ GCONENG::GCONENG() : ParserKeyword("GCONENG", KeywordSize(SLASH_TERMINATED)) { const std::string GCONENG::keywordName = "GCONENG"; const std::string GCONENG::GROUP::itemName = "GROUP"; const std::string GCONENG::ENERGY_PROD_RATE::itemName = "ENERGY_PROD_RATE"; -const double GCONENG::ENERGY_PROD_RATE::defaultValue = 100000000000000000000.000000; GCONINJE::GCONINJE() : ParserKeyword("GCONINJE", KeywordSize(SLASH_TERMINATED)) { @@ -738,24 +712,20 @@ GCONINJE::GCONINJE() : ParserKeyword("GCONINJE", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("SURFACE_TARGET", ParserItem::itype::UDA); - item.setDefault( UDAValue(0) ); record.addItem(item); } { ParserItem item("RESV_TARGET", ParserItem::itype::UDA); - item.setDefault( UDAValue(0) ); item.push_backDimension("ReservoirVolume/Time"); record.addItem(item); } { ParserItem item("REINJ_TARGET", ParserItem::itype::UDA); - item.setDefault( UDAValue(0) ); item.push_backDimension("1"); record.addItem(item); } { ParserItem item("VOIDAGE_TARGET", ParserItem::itype::UDA); - item.setDefault( UDAValue(0) ); item.push_backDimension("1"); record.addItem(item); } @@ -796,17 +766,12 @@ const std::string GCONINJE::PHASE::itemName = "PHASE"; const std::string GCONINJE::CONTROL_MODE::itemName = "CONTROL_MODE"; const std::string GCONINJE::CONTROL_MODE::defaultValue = "NONE"; const std::string GCONINJE::SURFACE_TARGET::itemName = "SURFACE_TARGET"; -const UDAValue GCONINJE::SURFACE_TARGET::defaultValue = UDAValue(0); const std::string GCONINJE::RESV_TARGET::itemName = "RESV_TARGET"; -const UDAValue GCONINJE::RESV_TARGET::defaultValue = UDAValue(0); const std::string GCONINJE::REINJ_TARGET::itemName = "REINJ_TARGET"; -const UDAValue GCONINJE::REINJ_TARGET::defaultValue = UDAValue(0); const std::string GCONINJE::VOIDAGE_TARGET::itemName = "VOIDAGE_TARGET"; -const UDAValue GCONINJE::VOIDAGE_TARGET::defaultValue = UDAValue(0); const std::string GCONINJE::RESPOND_TO_PARENT::itemName = "RESPOND_TO_PARENT"; const std::string GCONINJE::RESPOND_TO_PARENT::defaultValue = "YES"; const std::string GCONINJE::GUIDE_RATE::itemName = "GUIDE_RATE"; -const double GCONINJE::GUIDE_RATE::defaultValue = 0; const std::string GCONINJE::GUIDE_RATE_DEF::itemName = "GUIDE_RATE_DEF"; const std::string GCONINJE::REINJECT_GROUP::itemName = "REINJECT_GROUP"; const std::string GCONINJE::VOIDAGE_GROUP::itemName = "VOIDAGE_GROUP"; @@ -1006,14 +971,17 @@ GCONPROD::GCONPROD() : ParserKeyword("GCONPROD", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("WATER_EXCEED_PROCEDURE", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); record.addItem(item); } { ParserItem item("GAS_EXCEED_PROCEDURE", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); record.addItem(item); } { ParserItem item("LIQUID_EXCEED_PROCEDURE", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); record.addItem(item); } { @@ -1033,22 +1001,18 @@ GCONPROD::GCONPROD() : ParserKeyword("GCONPROD", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("CALORIFIC_TARGET", ParserItem::itype::DOUBLE); - item.push_backDimension("1"); record.addItem(item); } { - ParserItem item("SURFACE_GAS_BALANCE", ParserItem::itype::DOUBLE); - item.push_backDimension("1"); + ParserItem item("SURFACE_GAS_FRACTION", ParserItem::itype::DOUBLE); record.addItem(item); } { - ParserItem item("SURFACE_WATER_BALANCE", ParserItem::itype::DOUBLE); - item.push_backDimension("1"); + ParserItem item("SURFACE_WAT_FRACTION", ParserItem::itype::DOUBLE); record.addItem(item); } { ParserItem item("LINEAR_COMBINED_TARGET", ParserItem::itype::DOUBLE); - item.push_backDimension("1"); record.addItem(item); } { @@ -1073,14 +1037,17 @@ const std::string GCONPROD::RESPOND_TO_PARENT::defaultValue = "YES"; const std::string GCONPROD::GUIDE_RATE::itemName = "GUIDE_RATE"; const std::string GCONPROD::GUIDE_RATE_DEF::itemName = "GUIDE_RATE_DEF"; const std::string GCONPROD::WATER_EXCEED_PROCEDURE::itemName = "WATER_EXCEED_PROCEDURE"; +const std::string GCONPROD::WATER_EXCEED_PROCEDURE::defaultValue = "NONE"; const std::string GCONPROD::GAS_EXCEED_PROCEDURE::itemName = "GAS_EXCEED_PROCEDURE"; +const std::string GCONPROD::GAS_EXCEED_PROCEDURE::defaultValue = "NONE"; const std::string GCONPROD::LIQUID_EXCEED_PROCEDURE::itemName = "LIQUID_EXCEED_PROCEDURE"; +const std::string GCONPROD::LIQUID_EXCEED_PROCEDURE::defaultValue = "NONE"; const std::string GCONPROD::RESERVOIR_FLUID_TARGET::itemName = "RESERVOIR_FLUID_TARGET"; const std::string GCONPROD::RESERVOIR_VOLUME_BALANCE::itemName = "RESERVOIR_VOLUME_BALANCE"; const std::string GCONPROD::WET_GAS_TARGET::itemName = "WET_GAS_TARGET"; const std::string GCONPROD::CALORIFIC_TARGET::itemName = "CALORIFIC_TARGET"; -const std::string GCONPROD::SURFACE_GAS_BALANCE::itemName = "SURFACE_GAS_BALANCE"; -const std::string GCONPROD::SURFACE_WATER_BALANCE::itemName = "SURFACE_WATER_BALANCE"; +const std::string GCONPROD::SURFACE_GAS_FRACTION::itemName = "SURFACE_GAS_FRACTION"; +const std::string GCONPROD::SURFACE_WAT_FRACTION::itemName = "SURFACE_WAT_FRACTION"; const std::string GCONPROD::LINEAR_COMBINED_TARGET::itemName = "LINEAR_COMBINED_TARGET"; const std::string GCONPROD::LIN_TARGET_EXCEED_PROCEDURE::itemName = "LIN_TARGET_EXCEED_PROCEDURE"; @@ -1200,9 +1167,7 @@ const std::string GCONTOL::keywordName = "GCONTOL"; const std::string GCONTOL::TOLERANCE_FRACTION::itemName = "TOLERANCE_FRACTION"; const std::string GCONTOL::NUPCOL_VALUE::itemName = "NUPCOL_VALUE"; const std::string GCONTOL::TOLERANCE_FRACTION_INJ::itemName = "TOLERANCE_FRACTION_INJ"; -const double GCONTOL::TOLERANCE_FRACTION_INJ::defaultValue = 0.001000; const std::string GCONTOL::MAX_IT_INJ::itemName = "MAX_IT_INJ"; -const int GCONTOL::MAX_IT_INJ::defaultValue = 5; GCUTBACK::GCUTBACK() : ParserKeyword("GCUTBACK", KeywordSize(SLASH_TERMINATED)) { @@ -1318,13 +1283,9 @@ const std::string GCUTBACT::RATE_CUTBACK::itemName = "RATE_CUTBACK"; const std::string GCUTBACT::CONTROL_PHASE::itemName = "CONTROL_PHASE"; const std::string GCUTBACT::TRACER::itemName = "TRACER"; const std::string GCUTBACT::UPPER_RATE_LIM::itemName = "UPPER_RATE_LIM"; -const double GCUTBACT::UPPER_RATE_LIM::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GCUTBACT::LOWER_RATE_LIM::itemName = "LOWER_RATE_LIM"; -const double GCUTBACT::LOWER_RATE_LIM::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GCUTBACT::UPPER_CONC_LIM::itemName = "UPPER_CONC_LIM"; -const double GCUTBACT::UPPER_CONC_LIM::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GCUTBACT::LOWER_CONC_LIM::itemName = "LOWER_CONC_LIM"; -const double GCUTBACT::LOWER_CONC_LIM::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; GCVD::GCVD() : ParserKeyword("GCVD", KeywordSize("EQLDIMS", "NTEQUL", false, 0)) { @@ -1442,7 +1403,6 @@ GDIMS::GDIMS() : ParserKeyword("GDIMS", KeywordSize(1, false)) { } const std::string GDIMS::keywordName = "GDIMS"; const std::string GDIMS::MAX_NUM_GRAD_PARAMS::itemName = "MAX_NUM_GRAD_PARAMS"; -const int GDIMS::MAX_NUM_GRAD_PARAMS::defaultValue = 0; GDORIENT::GDORIENT() : ParserKeyword("GDORIENT", KeywordSize(1, false)) { @@ -1518,7 +1478,6 @@ const std::string GDRILPOT::keywordName = "GDRILPOT"; const std::string GDRILPOT::GROUP_NAME::itemName = "GROUP_NAME"; const std::string GDRILPOT::QNTY_TYPE::itemName = "QNTY_TYPE"; const std::string GDRILPOT::MIN_POTENTIAL_RATE::itemName = "MIN_POTENTIAL_RATE"; -const double GDRILPOT::MIN_POTENTIAL_RATE::defaultValue = 0; GECON::GECON() : ParserKeyword("GECON", KeywordSize(SLASH_TERMINATED)) { @@ -1534,11 +1493,13 @@ GECON::GECON() : ParserKeyword("GECON", KeywordSize(SLASH_TERMINATED)) { { ParserItem item("MIN_OIL_RATE", ParserItem::itype::UDA); item.setDefault( UDAValue(0) ); + item.push_backDimension("LiquidSurfaceVolume/Time"); record.addItem(item); } { ParserItem item("MIN_GAS_RATE", ParserItem::itype::UDA); item.setDefault( UDAValue(0) ); + item.push_backDimension("GasSurfaceVolume/Time"); record.addItem(item); } { @@ -1591,7 +1552,6 @@ const std::string GECON::WORKOVER::defaultValue = "NONE"; const std::string GECON::END_RUN::itemName = "END_RUN"; const std::string GECON::END_RUN::defaultValue = "NO"; const std::string GECON::MAX_OPEN_WELLS::itemName = "MAX_OPEN_WELLS"; -const int GECON::MAX_OPEN_WELLS::defaultValue = 0; GECONT::GECONT() : ParserKeyword("GECONT", KeywordSize(DOUBLE_SLASH_TERMINATED)) { @@ -1674,20 +1634,13 @@ const std::string GECONT::PROCEDURE::defaultValue = "NONE"; const std::string GECONT::END_RUN::itemName = "END_RUN"; const std::string GECONT::END_RUN::defaultValue = "NO"; const std::string GECONT::MAX_OPEN_WELLS::itemName = "MAX_OPEN_WELLS"; -const int GECONT::MAX_OPEN_WELLS::defaultValue = 0; const std::string GECONT::TRACER::itemName = "TRACER"; const std::string GECONT::MAX_TOTAL_TRACER_RATE::itemName = "MAX_TOTAL_TRACER_RATE"; -const double GECONT::MAX_TOTAL_TRACER_RATE::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GECONT::MAX_TOTAL_TRACER_CONC::itemName = "MAX_TOTAL_TRACER_CONC"; -const double GECONT::MAX_TOTAL_TRACER_CONC::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GECONT::MAX_FREE_TRACER_RATE::itemName = "MAX_FREE_TRACER_RATE"; -const double GECONT::MAX_FREE_TRACER_RATE::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GECONT::MAX_FREE_TRACER_CONC::itemName = "MAX_FREE_TRACER_CONC"; -const double GECONT::MAX_FREE_TRACER_CONC::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GECONT::MAX_SOL_TRACER_RATE::itemName = "MAX_SOL_TRACER_RATE"; -const double GECONT::MAX_SOL_TRACER_RATE::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; const std::string GECONT::MAX_SOL_TRACER_CONC::itemName = "MAX_SOL_TRACER_CONC"; -const double GECONT::MAX_SOL_TRACER_CONC::defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; GEFAC::GEFAC() : ParserKeyword("GEFAC", KeywordSize(SLASH_TERMINATED)) { @@ -1716,7 +1669,6 @@ GEFAC::GEFAC() : ParserKeyword("GEFAC", KeywordSize(SLASH_TERMINATED)) { const std::string GEFAC::keywordName = "GEFAC"; const std::string GEFAC::GROUP::itemName = "GROUP"; const std::string GEFAC::EFFICIENCY_FACTOR::itemName = "EFFICIENCY_FACTOR"; -const double GEFAC::EFFICIENCY_FACTOR::defaultValue = 1.000000; const std::string GEFAC::TRANSFER_EXT_NET::itemName = "TRANSFER_EXT_NET"; const std::string GEFAC::TRANSFER_EXT_NET::defaultValue = "YES"; @@ -1866,9 +1818,7 @@ GLIFTLIM::GLIFTLIM() : ParserKeyword("GLIFTLIM", KeywordSize(SLASH_TERMINATED)) const std::string GLIFTLIM::keywordName = "GLIFTLIM"; const std::string GLIFTLIM::GROUP_NAME::itemName = "GROUP_NAME"; const std::string GLIFTLIM::MAX_LIFT_CAPACITY::itemName = "MAX_LIFT_CAPACITY"; -const double GLIFTLIM::MAX_LIFT_CAPACITY::defaultValue = 0; const std::string GLIFTLIM::MAX_NUM_WELL::itemName = "MAX_NUM_WELL"; -const int GLIFTLIM::MAX_NUM_WELL::defaultValue = 0; GLIFTOPT::GLIFTOPT() : ParserKeyword("GLIFTOPT", KeywordSize(SLASH_TERMINATED)) { @@ -1902,9 +1852,7 @@ GLIFTOPT::GLIFTOPT() : ParserKeyword("GLIFTOPT", KeywordSize(SLASH_TERMINATED)) const std::string GLIFTOPT::keywordName = "GLIFTOPT"; const std::string GLIFTOPT::GROUP_NAME::itemName = "GROUP_NAME"; const std::string GLIFTOPT::MAX_LIFT_GAS_SUPPLY::itemName = "MAX_LIFT_GAS_SUPPLY"; -const double GLIFTOPT::MAX_LIFT_GAS_SUPPLY::defaultValue = -100000000000000000000.000000; const std::string GLIFTOPT::MAX_TOTAL_GAS_RATE::itemName = "MAX_TOTAL_GAS_RATE"; -const double GLIFTOPT::MAX_TOTAL_GAS_RATE::defaultValue = -100000000000000000000.000000; GMWSET::GMWSET() : ParserKeyword("GMWSET", KeywordSize(0, false)) { @@ -1972,17 +1920,11 @@ const std::string GNETDP::FIXED_PRESSURE_GROUP::itemName = "FIXED_PRESSURE_GROUP const std::string GNETDP::PHASE_TYPE::itemName = "PHASE_TYPE"; const std::string GNETDP::PHASE_TYPE::defaultValue = "GA"; const std::string GNETDP::MIN_RATE_TRIGGER::itemName = "MIN_RATE_TRIGGER"; -const double GNETDP::MIN_RATE_TRIGGER::defaultValue = 0; const std::string GNETDP::MAX_RATE_TRIGGER::itemName = "MAX_RATE_TRIGGER"; -const double GNETDP::MAX_RATE_TRIGGER::defaultValue = 100000000000000000000.000000; const std::string GNETDP::PRESSURE_INCR_SUBTRACT::itemName = "PRESSURE_INCR_SUBTRACT"; -const double GNETDP::PRESSURE_INCR_SUBTRACT::defaultValue = 0; const std::string GNETDP::PRESSURE_INCR_ADD::itemName = "PRESSURE_INCR_ADD"; -const double GNETDP::PRESSURE_INCR_ADD::defaultValue = 0; const std::string GNETDP::MIN_ALLOW_PRESSURE::itemName = "MIN_ALLOW_PRESSURE"; -const double GNETDP::MIN_ALLOW_PRESSURE::defaultValue = 0; const std::string GNETDP::MAX_ALLOW_PRESSURE::itemName = "MAX_ALLOW_PRESSURE"; -const double GNETDP::MAX_ALLOW_PRESSURE::defaultValue = 100000000000000000000.000000; GNETINJE::GNETINJE() : ParserKeyword("GNETINJE", KeywordSize(SLASH_TERMINATED)) { @@ -2017,7 +1959,6 @@ const std::string GNETINJE::GROUP::itemName = "GROUP"; const std::string GNETINJE::PHASE::itemName = "PHASE"; const std::string GNETINJE::PRESSURE::itemName = "PRESSURE"; const std::string GNETINJE::VFP_TABLE::itemName = "VFP_TABLE"; -const int GNETINJE::VFP_TABLE::defaultValue = 0; GNETPUMP::GNETPUMP() : ParserKeyword("GNETPUMP", KeywordSize(SLASH_TERMINATED)) { @@ -2062,15 +2003,11 @@ GNETPUMP::GNETPUMP() : ParserKeyword("GNETPUMP", KeywordSize(SLASH_TERMINATED)) const std::string GNETPUMP::keywordName = "GNETPUMP"; const std::string GNETPUMP::GROUP::itemName = "GROUP"; const std::string GNETPUMP::PROD_RATE_SWITCH::itemName = "PROD_RATE_SWITCH"; -const double GNETPUMP::PROD_RATE_SWITCH::defaultValue = 0; const std::string GNETPUMP::PHASE_TYPE::itemName = "PHASE_TYPE"; const std::string GNETPUMP::PHASE_TYPE::defaultValue = "OIL"; const std::string GNETPUMP::NEW_VFT_TABLE_NUM::itemName = "NEW_VFT_TABLE_NUM"; -const int GNETPUMP::NEW_VFT_TABLE_NUM::defaultValue = 4; const std::string GNETPUMP::NEW_ARTIFICIAL_LIFT_QNTY::itemName = "NEW_ARTIFICIAL_LIFT_QNTY"; -const double GNETPUMP::NEW_ARTIFICIAL_LIFT_QNTY::defaultValue = 0; const std::string GNETPUMP::NEW_GAS_CONUMPTION_RATE::itemName = "NEW_GAS_CONUMPTION_RATE"; -const double GNETPUMP::NEW_GAS_CONUMPTION_RATE::defaultValue = 0; GPMAINT::GPMAINT() : ParserKeyword("GPMAINT", KeywordSize(SLASH_TERMINATED)) { @@ -2275,9 +2212,7 @@ GRAVITY::GRAVITY() : ParserKeyword("GRAVITY", KeywordSize("TABDIMS", "NTPVT", fa const std::string GRAVITY::keywordName = "GRAVITY"; const std::string GRAVITY::API_GRAVITY::itemName = "API_GRAVITY"; const std::string GRAVITY::WATER_SP_GRAVITY::itemName = "WATER_SP_GRAVITY"; -const double GRAVITY::WATER_SP_GRAVITY::defaultValue = 1.000000; const std::string GRAVITY::GAS_SP_GRAVITY::itemName = "GAS_SP_GRAVITY"; -const double GRAVITY::GAS_SP_GRAVITY::defaultValue = 0.777300; GRDREACH::GRDREACH() : ParserKeyword("GRDREACH", KeywordSize(SLASH_TERMINATED)) { @@ -2401,20 +2336,14 @@ const std::string GRDREACH::GRID_BLOCK_COORD::itemName = "GRID_BLOCK_COORD"; const std::string GRDREACH::CONTACT_AREA::itemName = "CONTACT_AREA"; const std::string GRDREACH::TABLE_NUM::itemName = "TABLE_NUM"; const std::string GRDREACH::PRODUCTIVITY_INDEX::itemName = "PRODUCTIVITY_INDEX"; -const double GRDREACH::PRODUCTIVITY_INDEX::defaultValue = 0; const std::string GRDREACH::LENGTH_DEAD_GRID_BLOCK::itemName = "LENGTH_DEAD_GRID_BLOCK"; const std::string GRDREACH::OPTION_CONNECT_REACH::itemName = "OPTION_CONNECT_REACH"; -const int GRDREACH::OPTION_CONNECT_REACH::defaultValue = 0; const std::string GRDREACH::ADJUSTMENT_REACH::itemName = "ADJUSTMENT_REACH"; -const int GRDREACH::ADJUSTMENT_REACH::defaultValue = 0; const std::string GRDREACH::REMOVE_CAP_PRESSURE::itemName = "REMOVE_CAP_PRESSURE"; const std::string GRDREACH::REMOVE_CAP_PRESSURE::defaultValue = "NO"; const std::string GRDREACH::INFILTR_EQ::itemName = "INFILTR_EQ"; -const int GRDREACH::INFILTR_EQ::defaultValue = 0; const std::string GRDREACH::HYDRAULIC_CONDUCTIVITY::itemName = "HYDRAULIC_CONDUCTIVITY"; -const double GRDREACH::HYDRAULIC_CONDUCTIVITY::defaultValue = 0; const std::string GRDREACH::RIVER_BED_THICKNESS::itemName = "RIVER_BED_THICKNESS"; -const double GRDREACH::RIVER_BED_THICKNESS::defaultValue = 0; GRID::GRID() : ParserKeyword("GRID", KeywordSize(0, false)) { @@ -2445,9 +2374,7 @@ GRIDFILE::GRIDFILE() : ParserKeyword("GRIDFILE", KeywordSize(1, false)) { } const std::string GRIDFILE::keywordName = "GRIDFILE"; const std::string GRIDFILE::GRID::itemName = "GRID"; -const int GRIDFILE::GRID::defaultValue = 0; const std::string GRIDFILE::EGRID::itemName = "EGRID"; -const int GRIDFILE::EGRID::defaultValue = 1; GRIDOPTS::GRIDOPTS() : ParserKeyword("GRIDOPTS", KeywordSize(1, false)) { @@ -2478,9 +2405,7 @@ const std::string GRIDOPTS::keywordName = "GRIDOPTS"; const std::string GRIDOPTS::TRANMULT::itemName = "TRANMULT"; const std::string GRIDOPTS::TRANMULT::defaultValue = "NO"; const std::string GRIDOPTS::NRMULT::itemName = "NRMULT"; -const int GRIDOPTS::NRMULT::defaultValue = 0; const std::string GRIDOPTS::NRPINC::itemName = "NRPINC"; -const int GRIDOPTS::NRPINC::defaultValue = 0; GRIDUNIT::GRIDUNIT() : ParserKeyword("GRIDUNIT", KeywordSize(1, false)) { @@ -2753,6 +2678,25 @@ const std::string GROUP_PROBE::keywordName = "GROUP_PROBE"; const std::string GROUP_PROBE::GROUPS::itemName = "GROUPS"; +GROUP_PROBE_OPM::GROUP_PROBE_OPM() : ParserKeyword("GROUP_PROBE_OPM", KeywordSize(1, false)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("GGMIR"); + addDeckName("GGMIT"); + { + ParserRecord record; + { + ParserItem item("GROUPS", ParserItem::itype::STRING); + item.setSizeType(ParserItem::item_size::ALL); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string GROUP_PROBE_OPM::keywordName = "GROUP_PROBE_OPM"; +const std::string GROUP_PROBE_OPM::GROUPS::itemName = "GROUPS"; + + GRUPMAST::GRUPMAST() : ParserKeyword("GRUPMAST", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -2773,6 +2717,7 @@ GRUPMAST::GRUPMAST() : ParserKeyword("GRUPMAST", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("LIMITING_FRACTION", ParserItem::itype::DOUBLE); + item.setDefault( double(100000000000000000000.000000) ); item.push_backDimension("1"); record.addItem(item); } @@ -2789,6 +2734,11 @@ const std::string GRUPMAST::LIMITING_FRACTION::itemName = "LIMITING_FRACTION"; GRUPNET::GRUPNET() : ParserKeyword("GRUPNET", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SPECIAL"); addValidSectionName("SCHEDULE"); + setProhibitedKeywords({ + "NETWORK", + "BRANPROP", + "NODEPROP", + }); clearDeckNames(); addDeckName("GRUPNET"); { @@ -2799,6 +2749,7 @@ GRUPNET::GRUPNET() : ParserKeyword("GRUPNET", KeywordSize(SLASH_TERMINATED)) { } { ParserItem item("TERMINAL_PRESSURE", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); record.addItem(item); } { @@ -2817,12 +2768,12 @@ GRUPNET::GRUPNET() : ParserKeyword("GRUPNET", KeywordSize(SLASH_TERMINATED)) { record.addItem(item); } { - ParserItem item("LIFT_GAS_FLOW_THROUGH", ParserItem::itype::STRING); + ParserItem item("ADD_GAS_LIFT_GAS", ParserItem::itype::STRING); item.setDefault( std::string("NO") ); record.addItem(item); } { - ParserItem item("ALQ_SURFACE_EQV", ParserItem::itype::STRING); + ParserItem item("ALQ_SURFACE_DENSITY", ParserItem::itype::STRING); item.setDefault( std::string("NONE") ); record.addItem(item); } @@ -2833,15 +2784,13 @@ const std::string GRUPNET::keywordName = "GRUPNET"; const std::string GRUPNET::NAME::itemName = "NAME"; const std::string GRUPNET::TERMINAL_PRESSURE::itemName = "TERMINAL_PRESSURE"; const std::string GRUPNET::VFP_TABLE::itemName = "VFP_TABLE"; -const int GRUPNET::VFP_TABLE::defaultValue = 0; const std::string GRUPNET::ALQ::itemName = "ALQ"; -const double GRUPNET::ALQ::defaultValue = 0; const std::string GRUPNET::SUB_SEA_MANIFOLD::itemName = "SUB_SEA_MANIFOLD"; const std::string GRUPNET::SUB_SEA_MANIFOLD::defaultValue = "NO"; -const std::string GRUPNET::LIFT_GAS_FLOW_THROUGH::itemName = "LIFT_GAS_FLOW_THROUGH"; -const std::string GRUPNET::LIFT_GAS_FLOW_THROUGH::defaultValue = "NO"; -const std::string GRUPNET::ALQ_SURFACE_EQV::itemName = "ALQ_SURFACE_EQV"; -const std::string GRUPNET::ALQ_SURFACE_EQV::defaultValue = "NONE"; +const std::string GRUPNET::ADD_GAS_LIFT_GAS::itemName = "ADD_GAS_LIFT_GAS"; +const std::string GRUPNET::ADD_GAS_LIFT_GAS::defaultValue = "NO"; +const std::string GRUPNET::ALQ_SURFACE_DENSITY::itemName = "ALQ_SURFACE_DENSITY"; +const std::string GRUPNET::ALQ_SURFACE_DENSITY::defaultValue = "NONE"; GRUPRIG::GRUPRIG() : ParserKeyword("GRUPRIG", KeywordSize(SLASH_TERMINATED)) { @@ -2875,9 +2824,7 @@ GRUPRIG::GRUPRIG() : ParserKeyword("GRUPRIG", KeywordSize(SLASH_TERMINATED)) { const std::string GRUPRIG::keywordName = "GRUPRIG"; const std::string GRUPRIG::GROUP::itemName = "GROUP"; const std::string GRUPRIG::WORKOVER_RIG_NUM::itemName = "WORKOVER_RIG_NUM"; -const int GRUPRIG::WORKOVER_RIG_NUM::defaultValue = 0; const std::string GRUPRIG::DRILLING_RIG_NUM::itemName = "DRILLING_RIG_NUM"; -const int GRUPRIG::DRILLING_RIG_NUM::defaultValue = 0; const std::string GRUPRIG::ADD_OR_REMOVE::itemName = "ADD_OR_REMOVE"; const std::string GRUPRIG::ADD_OR_REMOVE::defaultValue = "ADD"; @@ -2917,17 +2864,17 @@ GRUPSLAV::GRUPSLAV() : ParserKeyword("GRUPSLAV", KeywordSize(SLASH_TERMINATED)) record.addItem(item); } { - ParserItem item("OIL_INJ_PROD_CONSTRAINTS", ParserItem::itype::STRING); + ParserItem item("OIL_INJ_CONSTRAINTS", ParserItem::itype::STRING); item.setDefault( std::string("MAST") ); record.addItem(item); } { - ParserItem item("WAT_INJ_PROD_CONSTRAINTS", ParserItem::itype::STRING); + ParserItem item("WAT_INJ_CONSTRAINTS", ParserItem::itype::STRING); item.setDefault( std::string("MAST") ); record.addItem(item); } { - ParserItem item("GAS_INJ_PROD_CONSTRAINTS", ParserItem::itype::STRING); + ParserItem item("GAS_INJ_CONSTRAINTS", ParserItem::itype::STRING); item.setDefault( std::string("MAST") ); record.addItem(item); } @@ -2945,12 +2892,12 @@ const std::string GRUPSLAV::GAS_PROD_CONSTRAINTS::itemName = "GAS_PROD_CONSTRAIN const std::string GRUPSLAV::GAS_PROD_CONSTRAINTS::defaultValue = "MAST"; const std::string GRUPSLAV::FLUID_VOL_PROD_CONSTRAINTS::itemName = "FLUID_VOL_PROD_CONSTRAINTS"; const std::string GRUPSLAV::FLUID_VOL_PROD_CONSTRAINTS::defaultValue = "MAST"; -const std::string GRUPSLAV::OIL_INJ_PROD_CONSTRAINTS::itemName = "OIL_INJ_PROD_CONSTRAINTS"; -const std::string GRUPSLAV::OIL_INJ_PROD_CONSTRAINTS::defaultValue = "MAST"; -const std::string GRUPSLAV::WAT_INJ_PROD_CONSTRAINTS::itemName = "WAT_INJ_PROD_CONSTRAINTS"; -const std::string GRUPSLAV::WAT_INJ_PROD_CONSTRAINTS::defaultValue = "MAST"; -const std::string GRUPSLAV::GAS_INJ_PROD_CONSTRAINTS::itemName = "GAS_INJ_PROD_CONSTRAINTS"; -const std::string GRUPSLAV::GAS_INJ_PROD_CONSTRAINTS::defaultValue = "MAST"; +const std::string GRUPSLAV::OIL_INJ_CONSTRAINTS::itemName = "OIL_INJ_CONSTRAINTS"; +const std::string GRUPSLAV::OIL_INJ_CONSTRAINTS::defaultValue = "MAST"; +const std::string GRUPSLAV::WAT_INJ_CONSTRAINTS::itemName = "WAT_INJ_CONSTRAINTS"; +const std::string GRUPSLAV::WAT_INJ_CONSTRAINTS::defaultValue = "MAST"; +const std::string GRUPSLAV::GAS_INJ_CONSTRAINTS::itemName = "GAS_INJ_CONSTRAINTS"; +const std::string GRUPSLAV::GAS_INJ_CONSTRAINTS::defaultValue = "MAST"; GRUPTARG::GRUPTARG() : ParserKeyword("GRUPTARG", KeywordSize(SLASH_TERMINATED)) { @@ -2979,7 +2926,6 @@ const std::string GRUPTARG::keywordName = "GRUPTARG"; const std::string GRUPTARG::GROUP::itemName = "GROUP"; const std::string GRUPTARG::TARGET::itemName = "TARGET"; const std::string GRUPTARG::NEW_VALUE::itemName = "NEW_VALUE"; -const double GRUPTARG::NEW_VALUE::defaultValue = 999999999999999949387135297074018866963645011013410073083904.000000; GRUPTREE::GRUPTREE() : ParserKeyword("GRUPTREE", KeywordSize(SLASH_TERMINATED)) { @@ -3043,11 +2989,8 @@ const std::string GSATINJE::keywordName = "GSATINJE"; const std::string GSATINJE::GROUP::itemName = "GROUP"; const std::string GSATINJE::PHASE::itemName = "PHASE"; const std::string GSATINJE::SURF_INJ_RATE::itemName = "SURF_INJ_RATE"; -const double GSATINJE::SURF_INJ_RATE::defaultValue = 0; const std::string GSATINJE::RES_INJ_RATE::itemName = "RES_INJ_RATE"; -const double GSATINJE::RES_INJ_RATE::defaultValue = 0; const std::string GSATINJE::MEAN_CALORIFIC::itemName = "MEAN_CALORIFIC"; -const double GSATINJE::MEAN_CALORIFIC::defaultValue = 0; GSATPROD::GSATPROD() : ParserKeyword("GSATPROD", KeywordSize(SLASH_TERMINATED)) { @@ -3096,17 +3039,11 @@ GSATPROD::GSATPROD() : ParserKeyword("GSATPROD", KeywordSize(SLASH_TERMINATED)) const std::string GSATPROD::keywordName = "GSATPROD"; const std::string GSATPROD::SATELLITE_GROUP_NAME_OR_GROUP_NAME_ROOT::itemName = "SATELLITE_GROUP_NAME_OR_GROUP_NAME_ROOT"; const std::string GSATPROD::OIL_PRODUCTION_RATE::itemName = "OIL_PRODUCTION_RATE"; -const double GSATPROD::OIL_PRODUCTION_RATE::defaultValue = 0; const std::string GSATPROD::WATER_PRODUCTION_RATE::itemName = "WATER_PRODUCTION_RATE"; -const double GSATPROD::WATER_PRODUCTION_RATE::defaultValue = 0; const std::string GSATPROD::GAS_PRODUCTION_RATE::itemName = "GAS_PRODUCTION_RATE"; -const double GSATPROD::GAS_PRODUCTION_RATE::defaultValue = 0; const std::string GSATPROD::RES_FLUID_VOL_PRODUCTION_RATE::itemName = "RES_FLUID_VOL_PRODUCTION_RATE"; -const double GSATPROD::RES_FLUID_VOL_PRODUCTION_RATE::defaultValue = 0; const std::string GSATPROD::LIFT_GAS_SUPPLY_RATE::itemName = "LIFT_GAS_SUPPLY_RATE"; -const double GSATPROD::LIFT_GAS_SUPPLY_RATE::defaultValue = 0; const std::string GSATPROD::MEAN_CALORIFIC_VALUE::itemName = "MEAN_CALORIFIC_VALUE"; -const double GSATPROD::MEAN_CALORIFIC_VALUE::defaultValue = 0; GSEPCOND::GSEPCOND() : ParserKeyword("GSEPCOND", KeywordSize(SLASH_TERMINATED)) { @@ -3131,6 +3068,32 @@ const std::string GSEPCOND::GROUP::itemName = "GROUP"; const std::string GSEPCOND::SEPARATOR::itemName = "SEPARATOR"; +GSF::GSF() : ParserKeyword("GSF", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "SGOF", + "SLGOF", + "SGFN", + }); + clearDeckNames(); + addDeckName("GSF"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + item.push_backDimension("1"); + item.push_backDimension("Pressure"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string GSF::keywordName = "GSF"; +const std::string GSF::DATA::itemName = "DATA"; + + GSSCPTST::GSSCPTST() : ParserKeyword("GSSCPTST", KeywordSize(1, false)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -3185,17 +3148,11 @@ const std::string GSSCPTST::GROUP::itemName = "GROUP"; const std::string GSSCPTST::CONTROL_MODE::itemName = "CONTROL_MODE"; const std::string GSSCPTST::CONTROL_MODE::defaultValue = "GRAT"; const std::string GSSCPTST::TARGET_PROD_RATE::itemName = "TARGET_PROD_RATE"; -const double GSSCPTST::TARGET_PROD_RATE::defaultValue = 0; const std::string GSSCPTST::TARGET_PROD_PERIOD::itemName = "TARGET_PROD_PERIOD"; -const double GSSCPTST::TARGET_PROD_PERIOD::defaultValue = 0; const std::string GSSCPTST::MAX_PROD_RATE_FLAG::itemName = "MAX_PROD_RATE_FLAG"; -const int GSSCPTST::MAX_PROD_RATE_FLAG::defaultValue = 1; const std::string GSSCPTST::CONV_TOLERANCE::itemName = "CONV_TOLERANCE"; -const double GSSCPTST::CONV_TOLERANCE::defaultValue = 0; const std::string GSSCPTST::MAT_IT::itemName = "MAT_IT"; -const int GSSCPTST::MAT_IT::defaultValue = 6; const std::string GSSCPTST::SUB_GRP_CONTROL_FLAG::itemName = "SUB_GRP_CONTROL_FLAG"; -const int GSSCPTST::SUB_GRP_CONTROL_FLAG::defaultValue = 1; GSWINGF::GSWINGF() : ParserKeyword("GSWINGF", KeywordSize(SLASH_TERMINATED)) { @@ -3390,7 +3347,6 @@ const std::string GTADD::GROUP::itemName = "GROUP"; const std::string GTADD::TARGET::itemName = "TARGET"; const std::string GTADD::QUANTITY::itemName = "QUANTITY"; const std::string GTADD::NUM_ADDITIONS::itemName = "NUM_ADDITIONS"; -const int GTADD::NUM_ADDITIONS::defaultValue = 1; GTMULT::GTMULT() : ParserKeyword("GTMULT", KeywordSize(SLASH_TERMINATED)) { @@ -3424,7 +3380,6 @@ const std::string GTMULT::GROUP::itemName = "GROUP"; const std::string GTMULT::TARGET::itemName = "TARGET"; const std::string GTMULT::QUANTITY::itemName = "QUANTITY"; const std::string GTMULT::NUM_MULT::itemName = "NUM_MULT"; -const int GTMULT::NUM_MULT::defaultValue = 1; GUIDECAL::GUIDECAL() : ParserKeyword("GUIDECAL", KeywordSize(1, false)) { @@ -3521,29 +3476,20 @@ GUIDERAT::GUIDERAT() : ParserKeyword("GUIDERAT", KeywordSize(1, false)) { } const std::string GUIDERAT::keywordName = "GUIDERAT"; const std::string GUIDERAT::MIN_CALC_TIME::itemName = "MIN_CALC_TIME"; -const double GUIDERAT::MIN_CALC_TIME::defaultValue = 0; const std::string GUIDERAT::NOMINATED_PHASE::itemName = "NOMINATED_PHASE"; const std::string GUIDERAT::NOMINATED_PHASE::defaultValue = "NONE"; const std::string GUIDERAT::A::itemName = "A"; -const double GUIDERAT::A::defaultValue = 0; const std::string GUIDERAT::B::itemName = "B"; -const double GUIDERAT::B::defaultValue = 0; const std::string GUIDERAT::C::itemName = "C"; -const double GUIDERAT::C::defaultValue = 0; const std::string GUIDERAT::D::itemName = "D"; -const double GUIDERAT::D::defaultValue = 0; const std::string GUIDERAT::E::itemName = "E"; -const double GUIDERAT::E::defaultValue = 0; const std::string GUIDERAT::F::itemName = "F"; -const double GUIDERAT::F::defaultValue = 0; const std::string GUIDERAT::ALLOW_INCREASE::itemName = "ALLOW_INCREASE"; const std::string GUIDERAT::ALLOW_INCREASE::defaultValue = "YES"; const std::string GUIDERAT::DAMPING_FACTOR::itemName = "DAMPING_FACTOR"; -const double GUIDERAT::DAMPING_FACTOR::defaultValue = 1.000000; const std::string GUIDERAT::USE_FREE_GAS::itemName = "USE_FREE_GAS"; const std::string GUIDERAT::USE_FREE_GAS::defaultValue = "NO"; const std::string GUIDERAT::MIN_GUIDE_RATE::itemName = "MIN_GUIDE_RATE"; -const double GUIDERAT::MIN_GUIDE_RATE::defaultValue = 1e-06; GUPFREQ::GUPFREQ() : ParserKeyword("GUPFREQ", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/H.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/H.cpp index 14765cd9d0..1ff77818ed 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/H.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/H.cpp @@ -11,6 +11,22 @@ #include namespace Opm { namespace ParserKeywords { +H2SOL::H2SOL() : ParserKeyword("H2SOL", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("H2SOL"); +} +const std::string H2SOL::keywordName = "H2SOL"; + + +H2STORE::H2STORE() : ParserKeyword("H2STORE", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("H2STORE"); +} +const std::string H2STORE::keywordName = "H2STORE"; + + HALFTRAN::HALFTRAN() : ParserKeyword("HALFTRAN", KeywordSize(0, false)) { addValidSectionName("GRID"); clearDeckNames(); @@ -287,23 +303,14 @@ HMDIMS::HMDIMS() : ParserKeyword("HMDIMS", KeywordSize(1, false)) { } const std::string HMDIMS::keywordName = "HMDIMS"; const std::string HMDIMS::MAX_GRAD_REGIONS::itemName = "MAX_GRAD_REGIONS"; -const int HMDIMS::MAX_GRAD_REGIONS::defaultValue = 0; const std::string HMDIMS::MAX_SUB_REGIONS::itemName = "MAX_SUB_REGIONS"; -const int HMDIMS::MAX_SUB_REGIONS::defaultValue = 0; const std::string HMDIMS::MAX_GRADS::itemName = "MAX_GRADS"; -const int HMDIMS::MAX_GRADS::defaultValue = 0; const std::string HMDIMS::MAX_FAULTS::itemName = "MAX_FAULTS"; -const int HMDIMS::MAX_FAULTS::defaultValue = 0; const std::string HMDIMS::MAX_AQUIFER_PARAMS::itemName = "MAX_AQUIFER_PARAMS"; -const int HMDIMS::MAX_AQUIFER_PARAMS::defaultValue = 0; const std::string HMDIMS::MAX_WELL_PARAMS::itemName = "MAX_WELL_PARAMS"; -const int HMDIMS::MAX_WELL_PARAMS::defaultValue = 0; const std::string HMDIMS::UNUSED::itemName = "UNUSED"; -const int HMDIMS::UNUSED::defaultValue = 0; const std::string HMDIMS::MAX_ROCK_GRAD_PARAMS::itemName = "MAX_ROCK_GRAD_PARAMS"; -const int HMDIMS::MAX_ROCK_GRAD_PARAMS::defaultValue = 0; const std::string HMDIMS::MAX_WELL_CONN_PARAMS::itemName = "MAX_WELL_CONN_PARAMS"; -const int HMDIMS::MAX_WELL_CONN_PARAMS::defaultValue = 0; HMFAULTS::HMFAULTS() : ParserKeyword("HMFAULTS", KeywordSize(SLASH_TERMINATED)) { @@ -357,11 +364,8 @@ HMMLAQUN::HMMLAQUN() : ParserKeyword("HMMLAQUN", KeywordSize(SLASH_TERMINATED)) const std::string HMMLAQUN::keywordName = "HMMLAQUN"; const std::string HMMLAQUN::AQUIFER_ID::itemName = "AQUIFER_ID"; const std::string HMMLAQUN::AQUIFER_PORE_VOL_MULT::itemName = "AQUIFER_PORE_VOL_MULT"; -const double HMMLAQUN::AQUIFER_PORE_VOL_MULT::defaultValue = 1.000000; const std::string HMMLAQUN::AQUIFER_PORE_PERM_MULT::itemName = "AQUIFER_PORE_PERM_MULT"; -const double HMMLAQUN::AQUIFER_PORE_PERM_MULT::defaultValue = 1.000000; const std::string HMMLAQUN::AQUIFER_GRID_CONN_MULT::itemName = "AQUIFER_GRID_CONN_MULT"; -const double HMMLAQUN::AQUIFER_GRID_CONN_MULT::defaultValue = 1.000000; HMMLCTAQ::HMMLCTAQ() : ParserKeyword("HMMLCTAQ", KeywordSize(SLASH_TERMINATED)) { @@ -398,11 +402,8 @@ HMMLCTAQ::HMMLCTAQ() : ParserKeyword("HMMLCTAQ", KeywordSize(SLASH_TERMINATED)) const std::string HMMLCTAQ::keywordName = "HMMLCTAQ"; const std::string HMMLCTAQ::AQUIFER_ID::itemName = "AQUIFER_ID"; const std::string HMMLCTAQ::AQUIFER_PERM_MULT::itemName = "AQUIFER_PERM_MULT"; -const double HMMLCTAQ::AQUIFER_PERM_MULT::defaultValue = 1.000000; const std::string HMMLCTAQ::AQUIFER_ANGLE_MULT::itemName = "AQUIFER_ANGLE_MULT"; -const double HMMLCTAQ::AQUIFER_ANGLE_MULT::defaultValue = 1.000000; const std::string HMMLCTAQ::AQUIFER_DEPTH_MULT::itemName = "AQUIFER_DEPTH_MULT"; -const double HMMLCTAQ::AQUIFER_DEPTH_MULT::defaultValue = 1.000000; HMMLFTAQ::HMMLFTAQ() : ParserKeyword("HMMLFTAQ", KeywordSize(SLASH_TERMINATED)) { @@ -439,11 +440,8 @@ HMMLFTAQ::HMMLFTAQ() : ParserKeyword("HMMLFTAQ", KeywordSize(SLASH_TERMINATED)) const std::string HMMLFTAQ::keywordName = "HMMLFTAQ"; const std::string HMMLFTAQ::AQUIFER_ID::itemName = "AQUIFER_ID"; const std::string HMMLFTAQ::AQUIFER_WAT_VOL_MULT::itemName = "AQUIFER_WAT_VOL_MULT"; -const double HMMLFTAQ::AQUIFER_WAT_VOL_MULT::defaultValue = 1.000000; const std::string HMMLFTAQ::AQUIFER_PROD_INDEX_MULT::itemName = "AQUIFER_PROD_INDEX_MULT"; -const double HMMLFTAQ::AQUIFER_PROD_INDEX_MULT::defaultValue = 1.000000; const std::string HMMLFTAQ::AQUIFER_DEPTH_MULT::itemName = "AQUIFER_DEPTH_MULT"; -const double HMMLFTAQ::AQUIFER_DEPTH_MULT::defaultValue = 1.000000; HMMLTWCN::HMMLTWCN() : ParserKeyword("HMMLTWCN", KeywordSize(SLASH_TERMINATED)) { @@ -496,9 +494,7 @@ const std::string HMMLTWCN::I::itemName = "I"; const std::string HMMLTWCN::J::itemName = "J"; const std::string HMMLTWCN::K::itemName = "K"; const std::string HMMLTWCN::CTF::itemName = "CTF"; -const double HMMLTWCN::CTF::defaultValue = 1.000000; const std::string HMMLTWCN::SKIN::itemName = "SKIN"; -const double HMMLTWCN::SKIN::defaultValue = 1.000000; HMMULTFT::HMMULTFT() : ParserKeyword("HMMULTFT", KeywordSize(SLASH_TERMINATED)) { @@ -529,9 +525,7 @@ HMMULTFT::HMMULTFT() : ParserKeyword("HMMULTFT", KeywordSize(SLASH_TERMINATED)) const std::string HMMULTFT::keywordName = "HMMULTFT"; const std::string HMMULTFT::FAULT::itemName = "FAULT"; const std::string HMMULTFT::TRANS_MULT::itemName = "TRANS_MULT"; -const double HMMULTFT::TRANS_MULT::defaultValue = 1.000000; const std::string HMMULTFT::DIFF_MULT::itemName = "DIFF_MULT"; -const double HMMULTFT::DIFF_MULT::defaultValue = 1.000000; HMMULTSG::HMMULTSG() : ParserKeyword("HMMULTSG", KeywordSize(1, false)) { @@ -554,13 +548,13 @@ const std::string HMMULTSG::data::itemName = "data"; HMMULTxx::HMMULTxx() : ParserKeyword("HMMULTxx", KeywordSize(1, false)) { - addValidSectionName("EDIT"); addValidSectionName("GRID"); + addValidSectionName("EDIT"); clearDeckNames(); addDeckName("HMMULTX"); addDeckName("HMMULTY"); - addDeckName("HMMULTR"); addDeckName("HMMULTZ"); + addDeckName("HMMULTR"); addDeckName("HMMULTPV"); addDeckName("HMMULTTH"); { @@ -608,7 +602,6 @@ HMROCK::HMROCK() : ParserKeyword("HMROCK", KeywordSize(SLASH_TERMINATED)) { const std::string HMROCK::keywordName = "HMROCK"; const std::string HMROCK::TABLE_NUMBER::itemName = "TABLE_NUMBER"; const std::string HMROCK::CALCULATE_GRADIENTS::itemName = "CALCULATE_GRADIENTS"; -const int HMROCK::CALCULATE_GRADIENTS::defaultValue = 0; HMROCKT::HMROCKT() : ParserKeyword("HMROCKT", KeywordSize(SLASH_TERMINATED)) { @@ -792,6 +785,14 @@ const std::string HRFIN::keywordName = "HRFIN"; const std::string HRFIN::data::itemName = "data"; +HWELLS::HWELLS() : ParserKeyword("HWELLS", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("HWELLS"); +} +const std::string HWELLS::keywordName = "HWELLS"; + + HWKRO::HWKRO() : ParserKeyword("HWKRO", KeywordSize(1, false)) { addValidSectionName("PROPS"); clearDeckNames(); diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/I.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/I.cpp index 1e1e9003c4..03ffe25044 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/I.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/I.cpp @@ -32,13 +32,15 @@ IHOST::IHOST() : ParserKeyword("IHOST", KeywordSize(SLASH_TERMINATED)) { const std::string IHOST::keywordName = "IHOST"; const std::string IHOST::LGR::itemName = "LGR"; const std::string IHOST::PROCESS::itemName = "PROCESS"; -const int IHOST::PROCESS::defaultValue = 0; IMBNUM::IMBNUM() : ParserKeyword("IMBNUM", KeywordSize(1, false)) { addValidSectionName("REGIONS"); clearDeckNames(); addDeckName("IMBNUM"); + addDeckName("IMBNUMZ"); + addDeckName("IMBNUMX"); + addDeckName("IMBNUMY"); { ParserRecord record; { @@ -321,7 +323,6 @@ IONXROCK::IONXROCK() : ParserKeyword("IONXROCK", KeywordSize("TABDIMS", "NTSFUN" } const std::string IONXROCK::keywordName = "IONXROCK"; const std::string IONXROCK::VALUE::itemName = "VALUE"; -const double IONXROCK::VALUE::defaultValue = 0; IONXSURF::IONXSURF() : ParserKeyword("IONXSURF", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { @@ -345,7 +346,6 @@ IONXSURF::IONXSURF() : ParserKeyword("IONXSURF", KeywordSize("TABDIMS", "NTSFUN" const std::string IONXSURF::keywordName = "IONXSURF"; const std::string IONXSURF::MOLECULAR_WEIGHT::itemName = "MOLECULAR_WEIGHT"; const std::string IONXSURF::ION_EXCH_CONST::itemName = "ION_EXCH_CONST"; -const double IONXSURF::ION_EXCH_CONST::defaultValue = 0; IPCG::IPCG() : ParserKeyword("IPCG", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/J.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/J.cpp index 58f2d2afaf..4462d6ee52 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/J.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/J.cpp @@ -59,13 +59,9 @@ const std::string JFUNC::keywordName = "JFUNC"; const std::string JFUNC::FLAG::itemName = "FLAG"; const std::string JFUNC::FLAG::defaultValue = "BOTH"; const std::string JFUNC::OW_SURFACE_TENSION::itemName = "OW_SURFACE_TENSION"; -const double JFUNC::OW_SURFACE_TENSION::defaultValue = -1.000000; const std::string JFUNC::GO_SURFACE_TENSION::itemName = "GO_SURFACE_TENSION"; -const double JFUNC::GO_SURFACE_TENSION::defaultValue = -1.000000; const std::string JFUNC::ALPHA_FACTOR::itemName = "ALPHA_FACTOR"; -const double JFUNC::ALPHA_FACTOR::defaultValue = 0.500000; const std::string JFUNC::BETA_FACTOR::itemName = "BETA_FACTOR"; -const double JFUNC::BETA_FACTOR::defaultValue = 0.500000; const std::string JFUNC::DIRECTION::itemName = "DIRECTION"; const std::string JFUNC::DIRECTION::defaultValue = "XY"; @@ -118,9 +114,7 @@ const std::string JFUNCR::J_FUNCTION::defaultValue = "BOTH"; const std::string JFUNCR::OIL_WAT_SURF_TENSTION::itemName = "OIL_WAT_SURF_TENSTION"; const std::string JFUNCR::OIL_GAS_SURF_TENSTION::itemName = "OIL_GAS_SURF_TENSTION"; const std::string JFUNCR::POROSITY_POWER::itemName = "POROSITY_POWER"; -const double JFUNCR::POROSITY_POWER::defaultValue = 0.500000; const std::string JFUNCR::PERMEABILITY_POWER::itemName = "PERMEABILITY_POWER"; -const double JFUNCR::PERMEABILITY_POWER::defaultValue = 0.500000; const std::string JFUNCR::PERM_DIRECTION::itemName = "PERM_DIRECTION"; const std::string JFUNCR::PERM_DIRECTION::defaultValue = "XY"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/L.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/L.cpp index 649f364148..81eeb491af 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/L.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/L.cpp @@ -149,21 +149,14 @@ LGR::LGR() : ParserKeyword("LGR", KeywordSize(1, false)) { } const std::string LGR::keywordName = "LGR"; const std::string LGR::MAXLGR::itemName = "MAXLGR"; -const int LGR::MAXLGR::defaultValue = 0; const std::string LGR::MAXCLS::itemName = "MAXCLS"; -const int LGR::MAXCLS::defaultValue = 0; const std::string LGR::MCOARS::itemName = "MCOARS"; -const int LGR::MCOARS::defaultValue = 0; const std::string LGR::MAMALG::itemName = "MAMALG"; -const int LGR::MAMALG::defaultValue = 0; const std::string LGR::MXLALG::itemName = "MXLALG"; -const int LGR::MXLALG::defaultValue = 0; const std::string LGR::LSTACK::itemName = "LSTACK"; -const int LGR::LSTACK::defaultValue = 0; const std::string LGR::INTERP::itemName = "INTERP"; const std::string LGR::INTERP::defaultValue = "INTERP"; const std::string LGR::NCHCOR::itemName = "NCHCOR"; -const int LGR::NCHCOR::defaultValue = 0; LGRCOPY::LGRCOPY() : ParserKeyword("LGRCOPY", KeywordSize(0, false)) { @@ -231,7 +224,6 @@ LGROFF::LGROFF() : ParserKeyword("LGROFF", KeywordSize(1, false)) { const std::string LGROFF::keywordName = "LGROFF"; const std::string LGROFF::LOCAL_GRID_REFINMENT::itemName = "LOCAL_GRID_REFINMENT"; const std::string LGROFF::ACTIVE_WELLS::itemName = "ACTIVE_WELLS"; -const int LGROFF::ACTIVE_WELLS::defaultValue = 0; LGRON::LGRON() : ParserKeyword("LGRON", KeywordSize(1, false)) { @@ -255,7 +247,6 @@ LGRON::LGRON() : ParserKeyword("LGRON", KeywordSize(1, false)) { const std::string LGRON::keywordName = "LGRON"; const std::string LGRON::LOCAL_GRID_REFINMENT::itemName = "LOCAL_GRID_REFINMENT"; const std::string LGRON::ACTIVE_WELLS::itemName = "ACTIVE_WELLS"; -const int LGRON::ACTIVE_WELLS::defaultValue = 0; LICENSES::LICENSES() : ParserKeyword("LICENSES", KeywordSize(SLASH_TERMINATED)) { @@ -309,7 +300,6 @@ const std::string LIFTOPT::keywordName = "LIFTOPT"; const std::string LIFTOPT::INCREMENT_SIZE::itemName = "INCREMENT_SIZE"; const std::string LIFTOPT::MIN_ECONOMIC_GRADIENT::itemName = "MIN_ECONOMIC_GRADIENT"; const std::string LIFTOPT::MIN_INTERVAL_BETWEEN_GAS_LIFT_OPTIMIZATIONS::itemName = "MIN_INTERVAL_BETWEEN_GAS_LIFT_OPTIMIZATIONS"; -const double LIFTOPT::MIN_INTERVAL_BETWEEN_GAS_LIFT_OPTIMIZATIONS::defaultValue = 0; const std::string LIFTOPT::OPTIMISE_ALL_ITERATIONS::itemName = "OPTIMISE_ALL_ITERATIONS"; const std::string LIFTOPT::OPTIMISE_ALL_ITERATIONS::defaultValue = "YES"; @@ -749,13 +739,9 @@ LTOSIGMA::LTOSIGMA() : ParserKeyword("LTOSIGMA", KeywordSize(1, false)) { } const std::string LTOSIGMA::keywordName = "LTOSIGMA"; const std::string LTOSIGMA::FX::itemName = "FX"; -const double LTOSIGMA::FX::defaultValue = 4.000000; const std::string LTOSIGMA::FY::itemName = "FY"; -const double LTOSIGMA::FY::defaultValue = 4.000000; const std::string LTOSIGMA::FZ::itemName = "FZ"; -const double LTOSIGMA::FZ::defaultValue = 4.000000; const std::string LTOSIGMA::FGD::itemName = "FGD"; -const double LTOSIGMA::FGD::defaultValue = 0; const std::string LTOSIGMA::OPTION::itemName = "OPTION"; const std::string LTOSIGMA::OPTION::defaultValue = "XONLY"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/M.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/M.cpp index 9ee6ef106d..21a2771523 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/M.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/M.cpp @@ -95,11 +95,8 @@ MATCORR::MATCORR() : ParserKeyword("MATCORR", KeywordSize(1, false)) { } const std::string MATCORR::keywordName = "MATCORR"; const std::string MATCORR::NEWTON_IT_NUM::itemName = "NEWTON_IT_NUM"; -const int MATCORR::NEWTON_IT_NUM::defaultValue = 12; const std::string MATCORR::NON_LIN_CONV_ERR::itemName = "NON_LIN_CONV_ERR"; -const double MATCORR::NON_LIN_CONV_ERR::defaultValue = 0.010000; const std::string MATCORR::MATERIAL_BALANCE_ERR::itemName = "MATERIAL_BALANCE_ERR"; -const double MATCORR::MATERIAL_BALANCE_ERR::defaultValue = 1e-06; MAXVALUE::MAXVALUE() : ParserKeyword("MAXVALUE", KeywordSize(SLASH_TERMINATED)) { @@ -156,6 +153,14 @@ const std::string MAXVALUE::K1::itemName = "K1"; const std::string MAXVALUE::K2::itemName = "K2"; +MECH::MECH() : ParserKeyword("MECH", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("MECH"); +} +const std::string MECH::keywordName = "MECH"; + + MEMORY::MEMORY() : ParserKeyword("MEMORY", KeywordSize(1, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -286,31 +291,18 @@ MESSAGES::MESSAGES() : ParserKeyword("MESSAGES", KeywordSize(1, false)) { } const std::string MESSAGES::keywordName = "MESSAGES"; const std::string MESSAGES::MESSAGE_PRINT_LIMIT::itemName = "MESSAGE_PRINT_LIMIT"; -const int MESSAGES::MESSAGE_PRINT_LIMIT::defaultValue = 1000000; const std::string MESSAGES::COMMENT_PRINT_LIMIT::itemName = "COMMENT_PRINT_LIMIT"; -const int MESSAGES::COMMENT_PRINT_LIMIT::defaultValue = 1000000; const std::string MESSAGES::WARNING_PRINT_LIMIT::itemName = "WARNING_PRINT_LIMIT"; -const int MESSAGES::WARNING_PRINT_LIMIT::defaultValue = 10000; const std::string MESSAGES::PROBLEM_PRINT_LIMIT::itemName = "PROBLEM_PRINT_LIMIT"; -const int MESSAGES::PROBLEM_PRINT_LIMIT::defaultValue = 100; const std::string MESSAGES::ERROR_PRINT_LIMIT::itemName = "ERROR_PRINT_LIMIT"; -const int MESSAGES::ERROR_PRINT_LIMIT::defaultValue = 100; const std::string MESSAGES::BUG_PRINT_LIMIT::itemName = "BUG_PRINT_LIMIT"; -const int MESSAGES::BUG_PRINT_LIMIT::defaultValue = 100; const std::string MESSAGES::MESSAGE_STOP_LIMIT::itemName = "MESSAGE_STOP_LIMIT"; -const int MESSAGES::MESSAGE_STOP_LIMIT::defaultValue = 1000000; const std::string MESSAGES::COMMENT_STOP_LIMIT::itemName = "COMMENT_STOP_LIMIT"; -const int MESSAGES::COMMENT_STOP_LIMIT::defaultValue = 1000000; const std::string MESSAGES::WARNING_STOP_LIMIT::itemName = "WARNING_STOP_LIMIT"; -const int MESSAGES::WARNING_STOP_LIMIT::defaultValue = 10000; const std::string MESSAGES::PROBLEM_STOP_LIMIT::itemName = "PROBLEM_STOP_LIMIT"; -const int MESSAGES::PROBLEM_STOP_LIMIT::defaultValue = 100; const std::string MESSAGES::ERROR_STOP_LIMIT::itemName = "ERROR_STOP_LIMIT"; -const int MESSAGES::ERROR_STOP_LIMIT::defaultValue = 10; const std::string MESSAGES::BUG_STOP_LIMIT::itemName = "BUG_STOP_LIMIT"; -const int MESSAGES::BUG_STOP_LIMIT::defaultValue = 1; const std::string MESSAGES::GROUP_PRINT_LIMIT::itemName = "GROUP_PRINT_LIMIT"; -const int MESSAGES::GROUP_PRINT_LIMIT::defaultValue = 10; MESSOPTS::MESSOPTS() : ParserKeyword("MESSOPTS", KeywordSize(1, false)) { @@ -478,39 +470,22 @@ MICPPARA::MICPPARA() : ParserKeyword("MICPPARA", KeywordSize(1, false)) { } const std::string MICPPARA::keywordName = "MICPPARA"; const std::string MICPPARA::DENSITY_BIOFILM::itemName = "DENSITY_BIOFILM"; -const double MICPPARA::DENSITY_BIOFILM::defaultValue = 35.000000; const std::string MICPPARA::DENSITY_CALCITE::itemName = "DENSITY_CALCITE"; -const double MICPPARA::DENSITY_CALCITE::defaultValue = 2710.000000; const std::string MICPPARA::DETACHMENT_RATE::itemName = "DETACHMENT_RATE"; -const double MICPPARA::DETACHMENT_RATE::defaultValue = 2.6e-10; const std::string MICPPARA::CRITICAL_POROSITY::itemName = "CRITICAL_POROSITY"; -const double MICPPARA::CRITICAL_POROSITY::defaultValue = 0.100000; const std::string MICPPARA::FITTING_FACTOR::itemName = "FITTING_FACTOR"; -const double MICPPARA::FITTING_FACTOR::defaultValue = 3.000000; const std::string MICPPARA::HALF_VELOCITY_OXYGEN::itemName = "HALF_VELOCITY_OXYGEN"; -const double MICPPARA::HALF_VELOCITY_OXYGEN::defaultValue = 2e-05; const std::string MICPPARA::HALF_VELOCITY_UREA::itemName = "HALF_VELOCITY_UREA"; -const double MICPPARA::HALF_VELOCITY_UREA::defaultValue = 21.300000; const std::string MICPPARA::MAXIMUM_GROWTH_RATE::itemName = "MAXIMUM_GROWTH_RATE"; -const double MICPPARA::MAXIMUM_GROWTH_RATE::defaultValue = 4.17e-05; const std::string MICPPARA::MAXIMUM_OXYGEN_CONCENTRATION::itemName = "MAXIMUM_OXYGEN_CONCENTRATION"; -const double MICPPARA::MAXIMUM_OXYGEN_CONCENTRATION::defaultValue = 0.040000; const std::string MICPPARA::MAXIMUM_UREA_CONCENTRATION::itemName = "MAXIMUM_UREA_CONCENTRATION"; -const double MICPPARA::MAXIMUM_UREA_CONCENTRATION::defaultValue = 60.000000; const std::string MICPPARA::MAXIMUM_UREA_UTILIZATION::itemName = "MAXIMUM_UREA_UTILIZATION"; -const double MICPPARA::MAXIMUM_UREA_UTILIZATION::defaultValue = 0.016100; const std::string MICPPARA::MICROBIAL_ATTACHMENT_RATE::itemName = "MICROBIAL_ATTACHMENT_RATE"; -const double MICPPARA::MICROBIAL_ATTACHMENT_RATE::defaultValue = 8.51e-07; const std::string MICPPARA::MICROBIAL_DEATH_RATE::itemName = "MICROBIAL_DEATH_RATE"; -const double MICPPARA::MICROBIAL_DEATH_RATE::defaultValue = 3.18e-07; const std::string MICPPARA::MINIMUM_PERMEABILITY::itemName = "MINIMUM_PERMEABILITY"; -const double MICPPARA::MINIMUM_PERMEABILITY::defaultValue = 1e-20; const std::string MICPPARA::OXYGEN_CONSUMPTION_FACTOR::itemName = "OXYGEN_CONSUMPTION_FACTOR"; -const double MICPPARA::OXYGEN_CONSUMPTION_FACTOR::defaultValue = 0.500000; const std::string MICPPARA::TOLERANCE_BEFORE_CLOGGING::itemName = "TOLERANCE_BEFORE_CLOGGING"; -const double MICPPARA::TOLERANCE_BEFORE_CLOGGING::defaultValue = 0.000100; const std::string MICPPARA::YIELD_GROWTH_COEFFICIENT::itemName = "YIELD_GROWTH_COEFFICIENT"; -const double MICPPARA::YIELD_GROWTH_COEFFICIENT::defaultValue = 0.500000; MINNNCT::MINNNCT() : ParserKeyword("MINNNCT", KeywordSize(1, false)) { @@ -542,11 +517,8 @@ MINNNCT::MINNNCT() : ParserKeyword("MINNNCT", KeywordSize(1, false)) { } const std::string MINNNCT::keywordName = "MINNNCT"; const std::string MINNNCT::CUTOFF_TRANSMISSIBILITY::itemName = "CUTOFF_TRANSMISSIBILITY"; -const double MINNNCT::CUTOFF_TRANSMISSIBILITY::defaultValue = 0; const std::string MINNNCT::DIFFUSIVITY::itemName = "DIFFUSIVITY"; -const double MINNNCT::DIFFUSIVITY::defaultValue = 0; const std::string MINNNCT::CUTOFF_THERMAL_TRANSMISSIBILITY::itemName = "CUTOFF_THERMAL_TRANSMISSIBILITY"; -const double MINNNCT::CUTOFF_THERMAL_TRANSMISSIBILITY::defaultValue = 0; MINNPCOL::MINNPCOL() : ParserKeyword("MINNPCOL", KeywordSize(1, false)) { @@ -565,17 +537,19 @@ MINNPCOL::MINNPCOL() : ParserKeyword("MINNPCOL", KeywordSize(1, false)) { } const std::string MINNPCOL::keywordName = "MINNPCOL"; const std::string MINNPCOL::VALUE::itemName = "VALUE"; -const int MINNPCOL::VALUE::defaultValue = 6; MINPORV::MINPORV() : ParserKeyword("MINPORV", KeywordSize(1, false)) { addValidSectionName("GRID"); + setProhibitedKeywords({ + "MINPV", + }); clearDeckNames(); addDeckName("MINPORV"); { ParserRecord record; { - ParserItem item("MIN_PORE_VOL", ParserItem::itype::DOUBLE); + ParserItem item("VALUE", ParserItem::itype::DOUBLE); item.setDefault( double(1e-06) ); item.push_backDimension("ReservoirVolume"); record.addItem(item); @@ -584,12 +558,14 @@ MINPORV::MINPORV() : ParserKeyword("MINPORV", KeywordSize(1, false)) { } } const std::string MINPORV::keywordName = "MINPORV"; -const std::string MINPORV::MIN_PORE_VOL::itemName = "MIN_PORE_VOL"; -const double MINPORV::MIN_PORE_VOL::defaultValue = 1e-06; +const std::string MINPORV::VALUE::itemName = "VALUE"; MINPV::MINPV() : ParserKeyword("MINPV", KeywordSize(1, false)) { addValidSectionName("GRID"); + setProhibitedKeywords({ + "MINPORV", + }); clearDeckNames(); addDeckName("MINPV"); { @@ -605,27 +581,6 @@ MINPV::MINPV() : ParserKeyword("MINPV", KeywordSize(1, false)) { } const std::string MINPV::keywordName = "MINPV"; const std::string MINPV::VALUE::itemName = "VALUE"; -const double MINPV::VALUE::defaultValue = 1e-06; - - -MINPVFIL::MINPVFIL() : ParserKeyword("MINPVFIL", KeywordSize(1, false)) { - addValidSectionName("GRID"); - clearDeckNames(); - addDeckName("MINPVFIL"); - { - ParserRecord record; - { - ParserItem item("VALUE", ParserItem::itype::DOUBLE); - item.setDefault( double(1e-06) ); - item.push_backDimension("ReservoirVolume"); - record.addItem(item); - } - addRecord( record ); - } -} -const std::string MINPVFIL::keywordName = "MINPVFIL"; -const std::string MINPVFIL::VALUE::itemName = "VALUE"; -const double MINPVFIL::VALUE::defaultValue = 1e-06; MINPVV::MINPVV() : ParserKeyword("MINPVV", KeywordSize(1, false)) { @@ -646,7 +601,6 @@ MINPVV::MINPVV() : ParserKeyword("MINPVV", KeywordSize(1, false)) { } const std::string MINPVV::keywordName = "MINPVV"; const std::string MINPVV::data::itemName = "data"; -const double MINPVV::data::defaultValue = 1e-06; MINVALUE::MINVALUE() : ParserKeyword("MINVALUE", KeywordSize(SLASH_TERMINATED)) { @@ -749,9 +703,7 @@ MISCIBLE::MISCIBLE() : ParserKeyword("MISCIBLE", KeywordSize(1, false)) { } const std::string MISCIBLE::keywordName = "MISCIBLE"; const std::string MISCIBLE::NTMISC::itemName = "NTMISC"; -const int MISCIBLE::NTMISC::defaultValue = 1; const std::string MISCIBLE::NSMISC::itemName = "NSMISC"; -const int MISCIBLE::NSMISC::defaultValue = 20; const std::string MISCIBLE::TWOPOINT::itemName = "TWOPOINT"; const std::string MISCIBLE::TWOPOINT::defaultValue = "NONE"; @@ -1132,7 +1084,6 @@ MULTIREG::MULTIREG() : ParserKeyword("MULTIREG", KeywordSize(SLASH_TERMINATED)) const std::string MULTIREG::keywordName = "MULTIREG"; const std::string MULTIREG::ARRAY::itemName = "ARRAY"; const std::string MULTIREG::FACTOR::itemName = "FACTOR"; -const double MULTIREG::FACTOR::defaultValue = 0; const std::string MULTIREG::REGION_NUMBER::itemName = "REGION_NUMBER"; const std::string MULTIREG::REGION_NAME::itemName = "REGION_NAME"; const std::string MULTIREG::REGION_NAME::defaultValue = "M"; @@ -1453,6 +1404,7 @@ MULT_XYZ::MULT_XYZ() : ParserKeyword("MULT_XYZ", KeywordSize(1, false)) { { ParserItem item("data", ParserItem::itype::DOUBLE); item.setSizeType(ParserItem::item_size::ALL); + item.setDefault( double(1.000000) ); item.push_backDimension("1"); record.addDataItem(item); } @@ -1463,25 +1415,26 @@ const std::string MULT_XYZ::keywordName = "MULT_XYZ"; const std::string MULT_XYZ::data::itemName = "data"; -MW::MW() : ParserKeyword("MW", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +MW::MW() : ParserKeyword("MW", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("MW"); { ParserRecord record; { - ParserItem item("MOLAR_WEIGHT", ParserItem::itype::DOUBLE); + ParserItem item("DATA", ParserItem::itype::DOUBLE); item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Mass/Moles"); record.addItem(item); } addRecord( record ); } } const std::string MW::keywordName = "MW"; -const std::string MW::MOLAR_WEIGHT::itemName = "MOLAR_WEIGHT"; +const std::string MW::DATA::itemName = "DATA"; -MWS::MWS() : ParserKeyword("MWS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +MWS::MWS() : ParserKeyword("MWS", KeywordSize("TABDIMS", "NUM_EOS_SURFACE", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("MWS"); @@ -1490,6 +1443,7 @@ MWS::MWS() : ParserKeyword("MWS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, { ParserItem item("MOLAR_WEIGHT", ParserItem::itype::DOUBLE); item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Mass/Moles"); record.addItem(item); } addRecord( record ); diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/N.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/N.cpp index d579a009a0..27e8fc3483 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/N.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/N.cpp @@ -19,6 +19,23 @@ NARROW::NARROW() : ParserKeyword("NARROW", KeywordSize(0, false)) { const std::string NARROW::keywordName = "NARROW"; +NCOMPS::NCOMPS() : ParserKeyword("NCOMPS", KeywordSize(1, false)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("NCOMPS"); + { + ParserRecord record; + { + ParserItem item("NUM_COMPS", ParserItem::itype::INT); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string NCOMPS::keywordName = "NCOMPS"; +const std::string NCOMPS::NUM_COMPS::itemName = "NUM_COMPS"; + + NCONSUMP::NCONSUMP() : ParserKeyword("NCONSUMP", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -45,7 +62,6 @@ NCONSUMP::NCONSUMP() : ParserKeyword("NCONSUMP", KeywordSize(SLASH_TERMINATED)) const std::string NCONSUMP::keywordName = "NCONSUMP"; const std::string NCONSUMP::NODE::itemName = "NODE"; const std::string NCONSUMP::GAS_CONSUMPTION_RATE::itemName = "GAS_CONSUMPTION_RATE"; -const double NCONSUMP::GAS_CONSUMPTION_RATE::defaultValue = 0; const std::string NCONSUMP::REMOVAL_GROUP::itemName = "REMOVAL_GROUP"; @@ -71,7 +87,6 @@ NEFAC::NEFAC() : ParserKeyword("NEFAC", KeywordSize(SLASH_TERMINATED)) { const std::string NEFAC::keywordName = "NEFAC"; const std::string NEFAC::NODE::itemName = "NODE"; const std::string NEFAC::EFF_FACTOR::itemName = "EFF_FACTOR"; -const double NEFAC::EFF_FACTOR::defaultValue = 1.000000; NETBALAN::NETBALAN() : ParserKeyword("NETBALAN", KeywordSize(1, false)) { @@ -130,19 +145,12 @@ NETBALAN::NETBALAN() : ParserKeyword("NETBALAN", KeywordSize(1, false)) { } const std::string NETBALAN::keywordName = "NETBALAN"; const std::string NETBALAN::TIME_INTERVAL::itemName = "TIME_INTERVAL"; -const double NETBALAN::TIME_INTERVAL::defaultValue = 0; const std::string NETBALAN::PRESSURE_CONVERGENCE_LIMIT::itemName = "PRESSURE_CONVERGENCE_LIMIT"; -const double NETBALAN::PRESSURE_CONVERGENCE_LIMIT::defaultValue = 0.100000; const std::string NETBALAN::MAX_ITER::itemName = "MAX_ITER"; -const int NETBALAN::MAX_ITER::defaultValue = 10; const std::string NETBALAN::THP_CONVERGENCE_LIMIT::itemName = "THP_CONVERGENCE_LIMIT"; -const double NETBALAN::THP_CONVERGENCE_LIMIT::defaultValue = 0.010000; const std::string NETBALAN::MAX_ITER_THP::itemName = "MAX_ITER_THP"; -const int NETBALAN::MAX_ITER_THP::defaultValue = 10; const std::string NETBALAN::TARGET_BALANCE_ERROR::itemName = "TARGET_BALANCE_ERROR"; -const double NETBALAN::TARGET_BALANCE_ERROR::defaultValue = 100000000000000000000.000000; const std::string NETBALAN::MAX_BALANCE_ERROR::itemName = "MAX_BALANCE_ERROR"; -const double NETBALAN::MAX_BALANCE_ERROR::defaultValue = 100000000000000000000.000000; const std::string NETBALAN::MIN_TIME_STEP::itemName = "MIN_TIME_STEP"; @@ -218,11 +226,8 @@ const std::string NETCOMPA::GROUP::defaultValue = ""; const std::string NETCOMPA::PHASE::itemName = "PHASE"; const std::string NETCOMPA::PHASE::defaultValue = "GAS"; const std::string NETCOMPA::VFT_TABLE_NUM::itemName = "VFT_TABLE_NUM"; -const int NETCOMPA::VFT_TABLE_NUM::defaultValue = 0; const std::string NETCOMPA::ALQ::itemName = "ALQ"; -const double NETCOMPA::ALQ::defaultValue = 0; const std::string NETCOMPA::GAS_CONSUMPTION_RATE::itemName = "GAS_CONSUMPTION_RATE"; -const double NETCOMPA::GAS_CONSUMPTION_RATE::defaultValue = 0; const std::string NETCOMPA::EXTRACTION_GROUP::itemName = "EXTRACTION_GROUP"; const std::string NETCOMPA::EXTRACTION_GROUP::defaultValue = ""; const std::string NETCOMPA::COMPRESSOR_TYPE::itemName = "COMPRESSOR_TYPE"; @@ -233,6 +238,9 @@ const std::string NETCOMPA::COMP_SWITCH_SEQ_NUM::itemName = "COMP_SWITCH_SEQ_NUM NETWORK::NETWORK() : ParserKeyword("NETWORK", KeywordSize(1, false)) { addValidSectionName("RUNSPEC"); + setProhibitedKeywords({ + "GRUPNET", + }); clearDeckNames(); addDeckName("NETWORK"); { @@ -257,7 +265,26 @@ const std::string NETWORK::keywordName = "NETWORK"; const std::string NETWORK::NODMAX::itemName = "NODMAX"; const std::string NETWORK::NBRMAX::itemName = "NBRMAX"; const std::string NETWORK::NBCMAX::itemName = "NBCMAX"; -const int NETWORK::NBCMAX::defaultValue = 20; + + +NETWORK_PROBE::NETWORK_PROBE() : ParserKeyword("NETWORK_PROBE", KeywordSize(1, false)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("GNETPR"); + addDeckName("NPR"); + setMatchRegex("NU.+"); + { + ParserRecord record; + { + ParserItem item("NETWORK_NODES", ParserItem::itype::STRING); + item.setSizeType(ParserItem::item_size::ALL); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string NETWORK_PROBE::keywordName = "NETWORK_PROBE"; +const std::string NETWORK_PROBE::NETWORK_NODES::itemName = "NETWORK_NODES"; NEWTRAN::NEWTRAN() : ParserKeyword("NEWTRAN", KeywordSize(0, false)) { @@ -374,7 +401,6 @@ const std::string NMATOPTS::keywordName = "NMATOPTS"; const std::string NMATOPTS::GEOMETRY::itemName = "GEOMETRY"; const std::string NMATOPTS::GEOMETRY::defaultValue = "LINEAR"; const std::string NMATOPTS::FRACTION_PORE_VOL::itemName = "FRACTION_PORE_VOL"; -const double NMATOPTS::FRACTION_PORE_VOL::defaultValue = 0.100000; const std::string NMATOPTS::METHOD::itemName = "METHOD"; const std::string NMATOPTS::METHOD::defaultValue = "FPORV"; @@ -462,12 +488,10 @@ NNC::NNC() : ParserKeyword("NNC", KeywordSize(SLASH_TERMINATED)) { } { ParserItem item("VE_FACE1", ParserItem::itype::STRING); - item.setDefault( std::string("") ); record.addItem(item); } { ParserItem item("VE_FACE2", ParserItem::itype::STRING); - item.setDefault( std::string("") ); record.addItem(item); } { @@ -504,27 +528,16 @@ const std::string NNC::I2::itemName = "I2"; const std::string NNC::J2::itemName = "J2"; const std::string NNC::K2::itemName = "K2"; const std::string NNC::TRAN::itemName = "TRAN"; -const double NNC::TRAN::defaultValue = 0; const std::string NNC::IST1::itemName = "IST1"; -const int NNC::IST1::defaultValue = 0; const std::string NNC::IST2::itemName = "IST2"; -const int NNC::IST2::defaultValue = 0; const std::string NNC::PRESSURE_TABLE1::itemName = "PRESSURE_TABLE1"; -const int NNC::PRESSURE_TABLE1::defaultValue = 0; const std::string NNC::PRESSURE_TABLE2::itemName = "PRESSURE_TABLE2"; -const int NNC::PRESSURE_TABLE2::defaultValue = 0; const std::string NNC::VE_FACE1::itemName = "VE_FACE1"; -const std::string NNC::VE_FACE1::defaultValue = ""; const std::string NNC::VE_FACE2::itemName = "VE_FACE2"; -const std::string NNC::VE_FACE2::defaultValue = ""; const std::string NNC::DIFFUSIVITY::itemName = "DIFFUSIVITY"; -const double NNC::DIFFUSIVITY::defaultValue = 0; const std::string NNC::SIM_DEPENDENT3::itemName = "SIM_DEPENDENT3"; -const double NNC::SIM_DEPENDENT3::defaultValue = 0; const std::string NNC::VDFLOW_AREA::itemName = "VDFLOW_AREA"; -const double NNC::VDFLOW_AREA::defaultValue = 0; const std::string NNC::VDFLOW_PERM::itemName = "VDFLOW_PERM"; -const double NNC::VDFLOW_PERM::defaultValue = 0; NNEWTF::NNEWTF() : ParserKeyword("NNEWTF", KeywordSize(1, false)) { @@ -559,6 +572,13 @@ const std::string NOCASC::keywordName = "NOCASC"; NODEPROP::NODEPROP() : ParserKeyword("NODEPROP", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); + setProhibitedKeywords({ + "GRUPNET", + }); + setRequiredKeywords({ + "NETWORK", + "BRANPROP", + }); clearDeckNames(); addDeckName("NODEPROP"); { @@ -620,9 +640,9 @@ const std::string NODPPM::keywordName = "NODPPM"; NOECHO::NOECHO() : ParserKeyword("NOECHO", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); - addValidSectionName("PROPS"); - addValidSectionName("EDIT"); addValidSectionName("GRID"); + addValidSectionName("EDIT"); + addValidSectionName("PROPS"); addValidSectionName("REGIONS"); addValidSectionName("SOLUTION"); addValidSectionName("SUMMARY"); @@ -739,9 +759,9 @@ const std::string NOSIM::keywordName = "NOSIM"; NOWARN::NOWARN() : ParserKeyword("NOWARN", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); - addValidSectionName("GRID"); - addValidSectionName("EDIT"); addValidSectionName("PROPS"); + addValidSectionName("EDIT"); + addValidSectionName("GRID"); addValidSectionName("REGIONS"); addValidSectionName("SOLUTION"); addValidSectionName("SUMMARY"); @@ -776,7 +796,6 @@ NRSOUT::NRSOUT() : ParserKeyword("NRSOUT", KeywordSize(1, false)) { } const std::string NRSOUT::keywordName = "NRSOUT"; const std::string NRSOUT::MAX_NUM::itemName = "MAX_NUM"; -const int NRSOUT::MAX_NUM::defaultValue = 3600; NSTACK::NSTACK() : ParserKeyword("NSTACK", KeywordSize(1, false)) { @@ -796,7 +815,6 @@ NSTACK::NSTACK() : ParserKeyword("NSTACK", KeywordSize(1, false)) { } const std::string NSTACK::keywordName = "NSTACK"; const std::string NSTACK::LINEAR_SOLVER_SIZE::itemName = "LINEAR_SOLVER_SIZE"; -const int NSTACK::LINEAR_SOLVER_SIZE::defaultValue = 10; NTG::NTG() : ParserKeyword("NTG", KeywordSize(1, false)) { @@ -834,7 +852,6 @@ NUMRES::NUMRES() : ParserKeyword("NUMRES", KeywordSize(1, false)) { } const std::string NUMRES::keywordName = "NUMRES"; const std::string NUMRES::num::itemName = "num"; -const int NUMRES::num::defaultValue = 1; NUPCOL::NUPCOL() : ParserKeyword("NUPCOL", KeywordSize(1, false)) { @@ -854,7 +871,6 @@ NUPCOL::NUPCOL() : ParserKeyword("NUPCOL", KeywordSize(1, false)) { } const std::string NUPCOL::keywordName = "NUPCOL"; const std::string NUPCOL::NUM_ITER::itemName = "NUM_ITER"; -const int NUPCOL::NUM_ITER::defaultValue = 12; NWATREM::NWATREM() : ParserKeyword("NWATREM", KeywordSize(SLASH_TERMINATED)) { @@ -885,9 +901,7 @@ NWATREM::NWATREM() : ParserKeyword("NWATREM", KeywordSize(SLASH_TERMINATED)) { const std::string NWATREM::keywordName = "NWATREM"; const std::string NWATREM::NODE::itemName = "NODE"; const std::string NWATREM::WAX_RATE::itemName = "WAX_RATE"; -const double NWATREM::WAX_RATE::defaultValue = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000; const std::string NWATREM::MAX_FRAC_REMOVAL::itemName = "MAX_FRAC_REMOVAL"; -const double NWATREM::MAX_FRAC_REMOVAL::defaultValue = 1.000000; NXFIN::NXFIN() : ParserKeyword("NXFIN", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/O.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/O.cpp index 6d7b856efe..9fbf3a522c 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/O.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/O.cpp @@ -90,11 +90,8 @@ OILCOMPR::OILCOMPR() : ParserKeyword("OILCOMPR", KeywordSize("TABDIMS", "NTPVT", } const std::string OILCOMPR::keywordName = "OILCOMPR"; const std::string OILCOMPR::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; -const double OILCOMPR::COMPRESSIBILITY::defaultValue = 0; const std::string OILCOMPR::EXPANSION_COEFF_LINEAR::itemName = "EXPANSION_COEFF_LINEAR"; -const double OILCOMPR::EXPANSION_COEFF_LINEAR::defaultValue = 0; const std::string OILCOMPR::EXPANSION_COEFF_QUADRATIC::itemName = "EXPANSION_COEFF_QUADRATIC"; -const double OILCOMPR::EXPANSION_COEFF_QUADRATIC::defaultValue = 0; OILDENT::OILDENT() : ParserKeyword("OILDENT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -126,11 +123,8 @@ OILDENT::OILDENT() : ParserKeyword("OILDENT", KeywordSize("TABDIMS", "NTPVT", fa } const std::string OILDENT::keywordName = "OILDENT"; const std::string OILDENT::REFERENCE_TEMPERATURE::itemName = "REFERENCE_TEMPERATURE"; -const double OILDENT::REFERENCE_TEMPERATURE::defaultValue = 293.150000; const std::string OILDENT::EXPANSION_COEFF_LINEAR::itemName = "EXPANSION_COEFF_LINEAR"; -const double OILDENT::EXPANSION_COEFF_LINEAR::defaultValue = 0; const std::string OILDENT::EXPANSION_COEFF_QUADRATIC::itemName = "EXPANSION_COEFF_QUADRATIC"; -const double OILDENT::EXPANSION_COEFF_QUADRATIC::defaultValue = 0; OILJT::OILJT() : ParserKeyword("OILJT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -148,7 +142,7 @@ OILJT::OILJT() : ParserKeyword("OILJT", KeywordSize("TABDIMS", "NTPVT", false, 0 { ParserItem item("JOULE_THOMSON_COEFFICIENT", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); - item.push_backDimension("Temperature/Pressure"); + item.push_backDimension("AbsoluteTemperature/Pressure"); record.addItem(item); } addRecord( record ); @@ -156,9 +150,7 @@ OILJT::OILJT() : ParserKeyword("OILJT", KeywordSize("TABDIMS", "NTPVT", false, 0 } const std::string OILJT::keywordName = "OILJT"; const std::string OILJT::PREF::itemName = "PREF"; -const double OILJT::PREF::defaultValue = 1.013200; const std::string OILJT::JOULE_THOMSON_COEFFICIENT::itemName = "JOULE_THOMSON_COEFFICIENT"; -const double OILJT::JOULE_THOMSON_COEFFICIENT::defaultValue = 0; OILMW::OILMW() : ParserKeyword("OILMW", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -301,9 +293,7 @@ const std::string OPERATE::K2::itemName = "K2"; const std::string OPERATE::OPERATION::itemName = "OPERATION"; const std::string OPERATE::ARRAY::itemName = "ARRAY"; const std::string OPERATE::PARAM1::itemName = "PARAM1"; -const double OPERATE::PARAM1::defaultValue = 0; const std::string OPERATE::PARAM2::itemName = "PARAM2"; -const double OPERATE::PARAM2::defaultValue = 0; OPERATER::OPERATER() : ParserKeyword("OPERATER", KeywordSize(SLASH_TERMINATED)) { @@ -356,9 +346,7 @@ const std::string OPERATER::REGION_NUMBER::itemName = "REGION_NUMBER"; const std::string OPERATER::OPERATION::itemName = "OPERATION"; const std::string OPERATER::ARRAY_PARAMETER::itemName = "ARRAY_PARAMETER"; const std::string OPERATER::PARAM1::itemName = "PARAM1"; -const double OPERATER::PARAM1::defaultValue = 0; const std::string OPERATER::PARAM2::itemName = "PARAM2"; -const double OPERATER::PARAM2::defaultValue = 0; const std::string OPERATER::REGION_NAME::itemName = "REGION_NAME"; const std::string OPERATER::REGION_NAME::defaultValue = "OPERNUM"; @@ -1989,643 +1977,324 @@ OPTIONS::OPTIONS() : ParserKeyword("OPTIONS", KeywordSize(1, false)) { } const std::string OPTIONS::keywordName = "OPTIONS"; const std::string OPTIONS::ITEM1::itemName = "ITEM1"; -const int OPTIONS::ITEM1::defaultValue = 0; const std::string OPTIONS::ITEM2::itemName = "ITEM2"; -const int OPTIONS::ITEM2::defaultValue = 0; const std::string OPTIONS::ITEM3::itemName = "ITEM3"; -const int OPTIONS::ITEM3::defaultValue = 0; const std::string OPTIONS::ITEM4::itemName = "ITEM4"; -const int OPTIONS::ITEM4::defaultValue = 0; const std::string OPTIONS::ITEM5::itemName = "ITEM5"; -const int OPTIONS::ITEM5::defaultValue = 0; const std::string OPTIONS::ITEM6::itemName = "ITEM6"; -const int OPTIONS::ITEM6::defaultValue = 0; const std::string OPTIONS::ITEM7::itemName = "ITEM7"; -const int OPTIONS::ITEM7::defaultValue = 0; const std::string OPTIONS::ITEM8::itemName = "ITEM8"; -const int OPTIONS::ITEM8::defaultValue = 0; const std::string OPTIONS::ITEM9::itemName = "ITEM9"; -const int OPTIONS::ITEM9::defaultValue = 0; const std::string OPTIONS::ITEM10::itemName = "ITEM10"; -const int OPTIONS::ITEM10::defaultValue = 0; const std::string OPTIONS::ITEM11::itemName = "ITEM11"; -const int OPTIONS::ITEM11::defaultValue = 0; const std::string OPTIONS::ITEM12::itemName = "ITEM12"; -const int OPTIONS::ITEM12::defaultValue = 0; const std::string OPTIONS::ITEM13::itemName = "ITEM13"; -const int OPTIONS::ITEM13::defaultValue = 0; const std::string OPTIONS::ITEM14::itemName = "ITEM14"; -const int OPTIONS::ITEM14::defaultValue = 0; const std::string OPTIONS::ITEM15::itemName = "ITEM15"; -const int OPTIONS::ITEM15::defaultValue = 0; const std::string OPTIONS::ITEM16::itemName = "ITEM16"; -const int OPTIONS::ITEM16::defaultValue = 0; const std::string OPTIONS::ITEM17::itemName = "ITEM17"; -const int OPTIONS::ITEM17::defaultValue = 0; const std::string OPTIONS::ITEM18::itemName = "ITEM18"; -const int OPTIONS::ITEM18::defaultValue = 0; const std::string OPTIONS::ITEM19::itemName = "ITEM19"; -const int OPTIONS::ITEM19::defaultValue = 0; const std::string OPTIONS::ITEM20::itemName = "ITEM20"; -const int OPTIONS::ITEM20::defaultValue = 0; const std::string OPTIONS::ITEM21::itemName = "ITEM21"; -const int OPTIONS::ITEM21::defaultValue = 0; const std::string OPTIONS::ITEM22::itemName = "ITEM22"; -const int OPTIONS::ITEM22::defaultValue = 0; const std::string OPTIONS::ITEM23::itemName = "ITEM23"; -const int OPTIONS::ITEM23::defaultValue = 0; const std::string OPTIONS::ITEM24::itemName = "ITEM24"; -const int OPTIONS::ITEM24::defaultValue = 0; const std::string OPTIONS::ITEM25::itemName = "ITEM25"; -const int OPTIONS::ITEM25::defaultValue = 0; const std::string OPTIONS::ITEM26::itemName = "ITEM26"; -const int OPTIONS::ITEM26::defaultValue = 0; const std::string OPTIONS::ITEM27::itemName = "ITEM27"; -const int OPTIONS::ITEM27::defaultValue = 0; const std::string OPTIONS::ITEM28::itemName = "ITEM28"; -const int OPTIONS::ITEM28::defaultValue = 0; const std::string OPTIONS::ITEM29::itemName = "ITEM29"; -const int OPTIONS::ITEM29::defaultValue = 0; const std::string OPTIONS::ITEM30::itemName = "ITEM30"; -const int OPTIONS::ITEM30::defaultValue = 0; const std::string OPTIONS::ITEM31::itemName = "ITEM31"; -const int OPTIONS::ITEM31::defaultValue = 0; const std::string OPTIONS::ITEM32::itemName = "ITEM32"; -const int OPTIONS::ITEM32::defaultValue = 0; const std::string OPTIONS::ITEM33::itemName = "ITEM33"; -const int OPTIONS::ITEM33::defaultValue = 0; const std::string OPTIONS::ITEM34::itemName = "ITEM34"; -const int OPTIONS::ITEM34::defaultValue = 0; const std::string OPTIONS::ITEM35::itemName = "ITEM35"; -const int OPTIONS::ITEM35::defaultValue = 0; const std::string OPTIONS::ITEM36::itemName = "ITEM36"; -const int OPTIONS::ITEM36::defaultValue = 0; const std::string OPTIONS::ITEM37::itemName = "ITEM37"; -const int OPTIONS::ITEM37::defaultValue = 0; const std::string OPTIONS::ITEM38::itemName = "ITEM38"; -const int OPTIONS::ITEM38::defaultValue = 0; const std::string OPTIONS::ITEM39::itemName = "ITEM39"; -const int OPTIONS::ITEM39::defaultValue = 0; const std::string OPTIONS::ITEM40::itemName = "ITEM40"; -const int OPTIONS::ITEM40::defaultValue = 0; const std::string OPTIONS::ITEM41::itemName = "ITEM41"; -const int OPTIONS::ITEM41::defaultValue = 0; const std::string OPTIONS::ITEM42::itemName = "ITEM42"; -const int OPTIONS::ITEM42::defaultValue = 0; const std::string OPTIONS::ITEM43::itemName = "ITEM43"; -const int OPTIONS::ITEM43::defaultValue = 0; const std::string OPTIONS::ITEM44::itemName = "ITEM44"; -const int OPTIONS::ITEM44::defaultValue = 0; const std::string OPTIONS::ITEM45::itemName = "ITEM45"; -const int OPTIONS::ITEM45::defaultValue = 0; const std::string OPTIONS::ITEM46::itemName = "ITEM46"; -const int OPTIONS::ITEM46::defaultValue = 0; const std::string OPTIONS::ITEM47::itemName = "ITEM47"; -const int OPTIONS::ITEM47::defaultValue = 0; const std::string OPTIONS::ITEM48::itemName = "ITEM48"; -const int OPTIONS::ITEM48::defaultValue = 0; const std::string OPTIONS::ITEM49::itemName = "ITEM49"; -const int OPTIONS::ITEM49::defaultValue = 0; const std::string OPTIONS::ITEM50::itemName = "ITEM50"; -const int OPTIONS::ITEM50::defaultValue = 0; const std::string OPTIONS::ITEM51::itemName = "ITEM51"; -const int OPTIONS::ITEM51::defaultValue = 0; const std::string OPTIONS::ITEM52::itemName = "ITEM52"; -const int OPTIONS::ITEM52::defaultValue = 0; const std::string OPTIONS::ITEM53::itemName = "ITEM53"; -const int OPTIONS::ITEM53::defaultValue = 0; const std::string OPTIONS::ITEM54::itemName = "ITEM54"; -const int OPTIONS::ITEM54::defaultValue = 0; const std::string OPTIONS::ITEM55::itemName = "ITEM55"; -const int OPTIONS::ITEM55::defaultValue = 0; const std::string OPTIONS::ITEM56::itemName = "ITEM56"; -const int OPTIONS::ITEM56::defaultValue = 0; const std::string OPTIONS::ITEM57::itemName = "ITEM57"; -const int OPTIONS::ITEM57::defaultValue = 0; const std::string OPTIONS::ITEM58::itemName = "ITEM58"; -const int OPTIONS::ITEM58::defaultValue = 0; const std::string OPTIONS::ITEM59::itemName = "ITEM59"; -const int OPTIONS::ITEM59::defaultValue = 0; const std::string OPTIONS::ITEM60::itemName = "ITEM60"; -const int OPTIONS::ITEM60::defaultValue = 0; const std::string OPTIONS::ITEM61::itemName = "ITEM61"; -const int OPTIONS::ITEM61::defaultValue = 0; const std::string OPTIONS::ITEM62::itemName = "ITEM62"; -const int OPTIONS::ITEM62::defaultValue = 0; const std::string OPTIONS::ITEM63::itemName = "ITEM63"; -const int OPTIONS::ITEM63::defaultValue = 0; const std::string OPTIONS::ITEM64::itemName = "ITEM64"; -const int OPTIONS::ITEM64::defaultValue = 0; const std::string OPTIONS::ITEM65::itemName = "ITEM65"; -const int OPTIONS::ITEM65::defaultValue = 0; const std::string OPTIONS::ITEM66::itemName = "ITEM66"; -const int OPTIONS::ITEM66::defaultValue = 0; const std::string OPTIONS::ITEM67::itemName = "ITEM67"; -const int OPTIONS::ITEM67::defaultValue = 0; const std::string OPTIONS::ITEM68::itemName = "ITEM68"; -const int OPTIONS::ITEM68::defaultValue = 0; const std::string OPTIONS::ITEM69::itemName = "ITEM69"; -const int OPTIONS::ITEM69::defaultValue = 0; const std::string OPTIONS::ITEM70::itemName = "ITEM70"; -const int OPTIONS::ITEM70::defaultValue = 0; const std::string OPTIONS::ITEM71::itemName = "ITEM71"; -const int OPTIONS::ITEM71::defaultValue = 0; const std::string OPTIONS::ITEM72::itemName = "ITEM72"; -const int OPTIONS::ITEM72::defaultValue = 0; const std::string OPTIONS::ITEM73::itemName = "ITEM73"; -const int OPTIONS::ITEM73::defaultValue = 0; const std::string OPTIONS::ITEM74::itemName = "ITEM74"; -const int OPTIONS::ITEM74::defaultValue = 0; const std::string OPTIONS::ITEM75::itemName = "ITEM75"; -const int OPTIONS::ITEM75::defaultValue = 0; const std::string OPTIONS::ITEM76::itemName = "ITEM76"; -const int OPTIONS::ITEM76::defaultValue = 0; const std::string OPTIONS::ITEM77::itemName = "ITEM77"; -const int OPTIONS::ITEM77::defaultValue = 0; const std::string OPTIONS::ITEM78::itemName = "ITEM78"; -const int OPTIONS::ITEM78::defaultValue = 0; const std::string OPTIONS::ITEM79::itemName = "ITEM79"; -const int OPTIONS::ITEM79::defaultValue = 0; const std::string OPTIONS::ITEM80::itemName = "ITEM80"; -const int OPTIONS::ITEM80::defaultValue = 0; const std::string OPTIONS::ITEM81::itemName = "ITEM81"; -const int OPTIONS::ITEM81::defaultValue = 0; const std::string OPTIONS::ITEM82::itemName = "ITEM82"; -const int OPTIONS::ITEM82::defaultValue = 0; const std::string OPTIONS::ITEM83::itemName = "ITEM83"; -const int OPTIONS::ITEM83::defaultValue = 0; const std::string OPTIONS::ITEM84::itemName = "ITEM84"; -const int OPTIONS::ITEM84::defaultValue = 0; const std::string OPTIONS::ITEM85::itemName = "ITEM85"; -const int OPTIONS::ITEM85::defaultValue = 0; const std::string OPTIONS::ITEM86::itemName = "ITEM86"; -const int OPTIONS::ITEM86::defaultValue = 0; const std::string OPTIONS::ITEM87::itemName = "ITEM87"; -const int OPTIONS::ITEM87::defaultValue = 0; const std::string OPTIONS::ITEM88::itemName = "ITEM88"; -const int OPTIONS::ITEM88::defaultValue = 0; const std::string OPTIONS::ITEM89::itemName = "ITEM89"; -const int OPTIONS::ITEM89::defaultValue = 0; const std::string OPTIONS::ITEM90::itemName = "ITEM90"; -const int OPTIONS::ITEM90::defaultValue = 0; const std::string OPTIONS::ITEM91::itemName = "ITEM91"; -const int OPTIONS::ITEM91::defaultValue = 0; const std::string OPTIONS::ITEM92::itemName = "ITEM92"; -const int OPTIONS::ITEM92::defaultValue = 0; const std::string OPTIONS::ITEM93::itemName = "ITEM93"; -const int OPTIONS::ITEM93::defaultValue = 0; const std::string OPTIONS::ITEM94::itemName = "ITEM94"; -const int OPTIONS::ITEM94::defaultValue = 0; const std::string OPTIONS::ITEM95::itemName = "ITEM95"; -const int OPTIONS::ITEM95::defaultValue = 0; const std::string OPTIONS::ITEM96::itemName = "ITEM96"; -const int OPTIONS::ITEM96::defaultValue = 0; const std::string OPTIONS::ITEM97::itemName = "ITEM97"; -const int OPTIONS::ITEM97::defaultValue = 0; const std::string OPTIONS::ITEM98::itemName = "ITEM98"; -const int OPTIONS::ITEM98::defaultValue = 0; const std::string OPTIONS::ITEM99::itemName = "ITEM99"; -const int OPTIONS::ITEM99::defaultValue = 0; const std::string OPTIONS::ITEM100::itemName = "ITEM100"; -const int OPTIONS::ITEM100::defaultValue = 0; const std::string OPTIONS::ITEM101::itemName = "ITEM101"; -const int OPTIONS::ITEM101::defaultValue = 0; const std::string OPTIONS::ITEM102::itemName = "ITEM102"; -const int OPTIONS::ITEM102::defaultValue = 0; const std::string OPTIONS::ITEM103::itemName = "ITEM103"; -const int OPTIONS::ITEM103::defaultValue = 0; const std::string OPTIONS::ITEM104::itemName = "ITEM104"; -const int OPTIONS::ITEM104::defaultValue = 0; const std::string OPTIONS::ITEM105::itemName = "ITEM105"; -const int OPTIONS::ITEM105::defaultValue = 0; const std::string OPTIONS::ITEM106::itemName = "ITEM106"; -const int OPTIONS::ITEM106::defaultValue = 0; const std::string OPTIONS::ITEM107::itemName = "ITEM107"; -const int OPTIONS::ITEM107::defaultValue = 0; const std::string OPTIONS::ITEM108::itemName = "ITEM108"; -const int OPTIONS::ITEM108::defaultValue = 0; const std::string OPTIONS::ITEM109::itemName = "ITEM109"; -const int OPTIONS::ITEM109::defaultValue = 0; const std::string OPTIONS::ITEM110::itemName = "ITEM110"; -const int OPTIONS::ITEM110::defaultValue = 0; const std::string OPTIONS::ITEM111::itemName = "ITEM111"; -const int OPTIONS::ITEM111::defaultValue = 0; const std::string OPTIONS::ITEM112::itemName = "ITEM112"; -const int OPTIONS::ITEM112::defaultValue = 0; const std::string OPTIONS::ITEM113::itemName = "ITEM113"; -const int OPTIONS::ITEM113::defaultValue = 0; const std::string OPTIONS::ITEM114::itemName = "ITEM114"; -const int OPTIONS::ITEM114::defaultValue = 0; const std::string OPTIONS::ITEM115::itemName = "ITEM115"; -const int OPTIONS::ITEM115::defaultValue = 0; const std::string OPTIONS::ITEM116::itemName = "ITEM116"; -const int OPTIONS::ITEM116::defaultValue = 0; const std::string OPTIONS::ITEM117::itemName = "ITEM117"; -const int OPTIONS::ITEM117::defaultValue = 0; const std::string OPTIONS::ITEM118::itemName = "ITEM118"; -const int OPTIONS::ITEM118::defaultValue = 0; const std::string OPTIONS::ITEM119::itemName = "ITEM119"; -const int OPTIONS::ITEM119::defaultValue = 0; const std::string OPTIONS::ITEM120::itemName = "ITEM120"; -const int OPTIONS::ITEM120::defaultValue = 0; const std::string OPTIONS::ITEM121::itemName = "ITEM121"; -const int OPTIONS::ITEM121::defaultValue = 0; const std::string OPTIONS::ITEM122::itemName = "ITEM122"; -const int OPTIONS::ITEM122::defaultValue = 0; const std::string OPTIONS::ITEM123::itemName = "ITEM123"; -const int OPTIONS::ITEM123::defaultValue = 0; const std::string OPTIONS::ITEM124::itemName = "ITEM124"; -const int OPTIONS::ITEM124::defaultValue = 0; const std::string OPTIONS::ITEM125::itemName = "ITEM125"; -const int OPTIONS::ITEM125::defaultValue = 0; const std::string OPTIONS::ITEM126::itemName = "ITEM126"; -const int OPTIONS::ITEM126::defaultValue = 0; const std::string OPTIONS::ITEM127::itemName = "ITEM127"; -const int OPTIONS::ITEM127::defaultValue = 0; const std::string OPTIONS::ITEM128::itemName = "ITEM128"; -const int OPTIONS::ITEM128::defaultValue = 0; const std::string OPTIONS::ITEM129::itemName = "ITEM129"; -const int OPTIONS::ITEM129::defaultValue = 0; const std::string OPTIONS::ITEM130::itemName = "ITEM130"; -const int OPTIONS::ITEM130::defaultValue = 0; const std::string OPTIONS::ITEM131::itemName = "ITEM131"; -const int OPTIONS::ITEM131::defaultValue = 0; const std::string OPTIONS::ITEM132::itemName = "ITEM132"; -const int OPTIONS::ITEM132::defaultValue = 0; const std::string OPTIONS::ITEM133::itemName = "ITEM133"; -const int OPTIONS::ITEM133::defaultValue = 0; const std::string OPTIONS::ITEM134::itemName = "ITEM134"; -const int OPTIONS::ITEM134::defaultValue = 0; const std::string OPTIONS::ITEM135::itemName = "ITEM135"; -const int OPTIONS::ITEM135::defaultValue = 0; const std::string OPTIONS::ITEM136::itemName = "ITEM136"; -const int OPTIONS::ITEM136::defaultValue = 0; const std::string OPTIONS::ITEM137::itemName = "ITEM137"; -const int OPTIONS::ITEM137::defaultValue = 0; const std::string OPTIONS::ITEM138::itemName = "ITEM138"; -const int OPTIONS::ITEM138::defaultValue = 0; const std::string OPTIONS::ITEM139::itemName = "ITEM139"; -const int OPTIONS::ITEM139::defaultValue = 0; const std::string OPTIONS::ITEM140::itemName = "ITEM140"; -const int OPTIONS::ITEM140::defaultValue = 0; const std::string OPTIONS::ITEM141::itemName = "ITEM141"; -const int OPTIONS::ITEM141::defaultValue = 0; const std::string OPTIONS::ITEM142::itemName = "ITEM142"; -const int OPTIONS::ITEM142::defaultValue = 0; const std::string OPTIONS::ITEM143::itemName = "ITEM143"; -const int OPTIONS::ITEM143::defaultValue = 0; const std::string OPTIONS::ITEM144::itemName = "ITEM144"; -const int OPTIONS::ITEM144::defaultValue = 0; const std::string OPTIONS::ITEM145::itemName = "ITEM145"; -const int OPTIONS::ITEM145::defaultValue = 0; const std::string OPTIONS::ITEM146::itemName = "ITEM146"; -const int OPTIONS::ITEM146::defaultValue = 0; const std::string OPTIONS::ITEM147::itemName = "ITEM147"; -const int OPTIONS::ITEM147::defaultValue = 0; const std::string OPTIONS::ITEM148::itemName = "ITEM148"; -const int OPTIONS::ITEM148::defaultValue = 0; const std::string OPTIONS::ITEM149::itemName = "ITEM149"; -const int OPTIONS::ITEM149::defaultValue = 0; const std::string OPTIONS::ITEM150::itemName = "ITEM150"; -const int OPTIONS::ITEM150::defaultValue = 0; const std::string OPTIONS::ITEM151::itemName = "ITEM151"; -const int OPTIONS::ITEM151::defaultValue = 0; const std::string OPTIONS::ITEM152::itemName = "ITEM152"; -const int OPTIONS::ITEM152::defaultValue = 0; const std::string OPTIONS::ITEM153::itemName = "ITEM153"; -const int OPTIONS::ITEM153::defaultValue = 0; const std::string OPTIONS::ITEM154::itemName = "ITEM154"; -const int OPTIONS::ITEM154::defaultValue = 0; const std::string OPTIONS::ITEM155::itemName = "ITEM155"; -const int OPTIONS::ITEM155::defaultValue = 0; const std::string OPTIONS::ITEM156::itemName = "ITEM156"; -const int OPTIONS::ITEM156::defaultValue = 0; const std::string OPTIONS::ITEM157::itemName = "ITEM157"; -const int OPTIONS::ITEM157::defaultValue = 0; const std::string OPTIONS::ITEM158::itemName = "ITEM158"; -const int OPTIONS::ITEM158::defaultValue = 0; const std::string OPTIONS::ITEM159::itemName = "ITEM159"; -const int OPTIONS::ITEM159::defaultValue = 0; const std::string OPTIONS::ITEM160::itemName = "ITEM160"; -const int OPTIONS::ITEM160::defaultValue = 0; const std::string OPTIONS::ITEM161::itemName = "ITEM161"; -const int OPTIONS::ITEM161::defaultValue = 0; const std::string OPTIONS::ITEM162::itemName = "ITEM162"; -const int OPTIONS::ITEM162::defaultValue = 0; const std::string OPTIONS::ITEM163::itemName = "ITEM163"; -const int OPTIONS::ITEM163::defaultValue = 0; const std::string OPTIONS::ITEM164::itemName = "ITEM164"; -const int OPTIONS::ITEM164::defaultValue = 0; const std::string OPTIONS::ITEM165::itemName = "ITEM165"; -const int OPTIONS::ITEM165::defaultValue = 0; const std::string OPTIONS::ITEM166::itemName = "ITEM166"; -const int OPTIONS::ITEM166::defaultValue = 0; const std::string OPTIONS::ITEM167::itemName = "ITEM167"; -const int OPTIONS::ITEM167::defaultValue = 0; const std::string OPTIONS::ITEM168::itemName = "ITEM168"; -const int OPTIONS::ITEM168::defaultValue = 0; const std::string OPTIONS::ITEM169::itemName = "ITEM169"; -const int OPTIONS::ITEM169::defaultValue = 0; const std::string OPTIONS::ITEM170::itemName = "ITEM170"; -const int OPTIONS::ITEM170::defaultValue = 0; const std::string OPTIONS::ITEM171::itemName = "ITEM171"; -const int OPTIONS::ITEM171::defaultValue = 0; const std::string OPTIONS::ITEM172::itemName = "ITEM172"; -const int OPTIONS::ITEM172::defaultValue = 0; const std::string OPTIONS::ITEM173::itemName = "ITEM173"; -const int OPTIONS::ITEM173::defaultValue = 0; const std::string OPTIONS::ITEM174::itemName = "ITEM174"; -const int OPTIONS::ITEM174::defaultValue = 0; const std::string OPTIONS::ITEM175::itemName = "ITEM175"; -const int OPTIONS::ITEM175::defaultValue = 0; const std::string OPTIONS::ITEM176::itemName = "ITEM176"; -const int OPTIONS::ITEM176::defaultValue = 0; const std::string OPTIONS::ITEM177::itemName = "ITEM177"; -const int OPTIONS::ITEM177::defaultValue = 0; const std::string OPTIONS::ITEM178::itemName = "ITEM178"; -const int OPTIONS::ITEM178::defaultValue = 0; const std::string OPTIONS::ITEM179::itemName = "ITEM179"; -const int OPTIONS::ITEM179::defaultValue = 0; const std::string OPTIONS::ITEM180::itemName = "ITEM180"; -const int OPTIONS::ITEM180::defaultValue = 0; const std::string OPTIONS::ITEM181::itemName = "ITEM181"; -const int OPTIONS::ITEM181::defaultValue = 0; const std::string OPTIONS::ITEM182::itemName = "ITEM182"; -const int OPTIONS::ITEM182::defaultValue = 0; const std::string OPTIONS::ITEM183::itemName = "ITEM183"; -const int OPTIONS::ITEM183::defaultValue = 0; const std::string OPTIONS::ITEM184::itemName = "ITEM184"; -const int OPTIONS::ITEM184::defaultValue = 0; const std::string OPTIONS::ITEM185::itemName = "ITEM185"; -const int OPTIONS::ITEM185::defaultValue = 0; const std::string OPTIONS::ITEM186::itemName = "ITEM186"; -const int OPTIONS::ITEM186::defaultValue = 0; const std::string OPTIONS::ITEM187::itemName = "ITEM187"; -const int OPTIONS::ITEM187::defaultValue = 0; const std::string OPTIONS::ITEM188::itemName = "ITEM188"; -const int OPTIONS::ITEM188::defaultValue = 0; const std::string OPTIONS::ITEM189::itemName = "ITEM189"; -const int OPTIONS::ITEM189::defaultValue = 0; const std::string OPTIONS::ITEM190::itemName = "ITEM190"; -const int OPTIONS::ITEM190::defaultValue = 0; const std::string OPTIONS::ITEM191::itemName = "ITEM191"; -const int OPTIONS::ITEM191::defaultValue = 0; const std::string OPTIONS::ITEM192::itemName = "ITEM192"; -const int OPTIONS::ITEM192::defaultValue = 0; const std::string OPTIONS::ITEM193::itemName = "ITEM193"; -const int OPTIONS::ITEM193::defaultValue = 0; const std::string OPTIONS::ITEM194::itemName = "ITEM194"; -const int OPTIONS::ITEM194::defaultValue = 0; const std::string OPTIONS::ITEM195::itemName = "ITEM195"; -const int OPTIONS::ITEM195::defaultValue = 0; const std::string OPTIONS::ITEM196::itemName = "ITEM196"; -const int OPTIONS::ITEM196::defaultValue = 0; const std::string OPTIONS::ITEM197::itemName = "ITEM197"; -const int OPTIONS::ITEM197::defaultValue = 0; const std::string OPTIONS::ITEM198::itemName = "ITEM198"; -const int OPTIONS::ITEM198::defaultValue = 0; const std::string OPTIONS::ITEM199::itemName = "ITEM199"; -const int OPTIONS::ITEM199::defaultValue = 0; const std::string OPTIONS::ITEM200::itemName = "ITEM200"; -const int OPTIONS::ITEM200::defaultValue = 0; const std::string OPTIONS::ITEM201::itemName = "ITEM201"; -const int OPTIONS::ITEM201::defaultValue = 0; const std::string OPTIONS::ITEM202::itemName = "ITEM202"; -const int OPTIONS::ITEM202::defaultValue = 0; const std::string OPTIONS::ITEM203::itemName = "ITEM203"; -const int OPTIONS::ITEM203::defaultValue = 0; const std::string OPTIONS::ITEM204::itemName = "ITEM204"; -const int OPTIONS::ITEM204::defaultValue = 0; const std::string OPTIONS::ITEM205::itemName = "ITEM205"; -const int OPTIONS::ITEM205::defaultValue = 0; const std::string OPTIONS::ITEM206::itemName = "ITEM206"; -const int OPTIONS::ITEM206::defaultValue = 0; const std::string OPTIONS::ITEM207::itemName = "ITEM207"; -const int OPTIONS::ITEM207::defaultValue = 0; const std::string OPTIONS::ITEM208::itemName = "ITEM208"; -const int OPTIONS::ITEM208::defaultValue = 0; const std::string OPTIONS::ITEM209::itemName = "ITEM209"; -const int OPTIONS::ITEM209::defaultValue = 0; const std::string OPTIONS::ITEM210::itemName = "ITEM210"; -const int OPTIONS::ITEM210::defaultValue = 0; const std::string OPTIONS::ITEM211::itemName = "ITEM211"; -const int OPTIONS::ITEM211::defaultValue = 0; const std::string OPTIONS::ITEM212::itemName = "ITEM212"; -const int OPTIONS::ITEM212::defaultValue = 0; const std::string OPTIONS::ITEM213::itemName = "ITEM213"; -const int OPTIONS::ITEM213::defaultValue = 0; const std::string OPTIONS::ITEM214::itemName = "ITEM214"; -const int OPTIONS::ITEM214::defaultValue = 0; const std::string OPTIONS::ITEM215::itemName = "ITEM215"; -const int OPTIONS::ITEM215::defaultValue = 0; const std::string OPTIONS::ITEM216::itemName = "ITEM216"; -const int OPTIONS::ITEM216::defaultValue = 0; const std::string OPTIONS::ITEM217::itemName = "ITEM217"; -const int OPTIONS::ITEM217::defaultValue = 0; const std::string OPTIONS::ITEM218::itemName = "ITEM218"; -const int OPTIONS::ITEM218::defaultValue = 0; const std::string OPTIONS::ITEM219::itemName = "ITEM219"; -const int OPTIONS::ITEM219::defaultValue = 0; const std::string OPTIONS::ITEM220::itemName = "ITEM220"; -const int OPTIONS::ITEM220::defaultValue = 0; const std::string OPTIONS::ITEM221::itemName = "ITEM221"; -const int OPTIONS::ITEM221::defaultValue = 0; const std::string OPTIONS::ITEM222::itemName = "ITEM222"; -const int OPTIONS::ITEM222::defaultValue = 0; const std::string OPTIONS::ITEM223::itemName = "ITEM223"; -const int OPTIONS::ITEM223::defaultValue = 0; const std::string OPTIONS::ITEM224::itemName = "ITEM224"; -const int OPTIONS::ITEM224::defaultValue = 0; const std::string OPTIONS::ITEM225::itemName = "ITEM225"; -const int OPTIONS::ITEM225::defaultValue = 0; const std::string OPTIONS::ITEM226::itemName = "ITEM226"; -const int OPTIONS::ITEM226::defaultValue = 0; const std::string OPTIONS::ITEM227::itemName = "ITEM227"; -const int OPTIONS::ITEM227::defaultValue = 0; const std::string OPTIONS::ITEM228::itemName = "ITEM228"; -const int OPTIONS::ITEM228::defaultValue = 0; const std::string OPTIONS::ITEM229::itemName = "ITEM229"; -const int OPTIONS::ITEM229::defaultValue = 0; const std::string OPTIONS::ITEM230::itemName = "ITEM230"; -const int OPTIONS::ITEM230::defaultValue = 0; const std::string OPTIONS::ITEM231::itemName = "ITEM231"; -const int OPTIONS::ITEM231::defaultValue = 0; const std::string OPTIONS::ITEM232::itemName = "ITEM232"; -const int OPTIONS::ITEM232::defaultValue = 0; const std::string OPTIONS::ITEM233::itemName = "ITEM233"; -const int OPTIONS::ITEM233::defaultValue = 0; const std::string OPTIONS::ITEM234::itemName = "ITEM234"; -const int OPTIONS::ITEM234::defaultValue = 0; const std::string OPTIONS::ITEM235::itemName = "ITEM235"; -const int OPTIONS::ITEM235::defaultValue = 0; const std::string OPTIONS::ITEM236::itemName = "ITEM236"; -const int OPTIONS::ITEM236::defaultValue = 0; const std::string OPTIONS::ITEM237::itemName = "ITEM237"; -const int OPTIONS::ITEM237::defaultValue = 0; const std::string OPTIONS::ITEM238::itemName = "ITEM238"; -const int OPTIONS::ITEM238::defaultValue = 0; const std::string OPTIONS::ITEM239::itemName = "ITEM239"; -const int OPTIONS::ITEM239::defaultValue = 0; const std::string OPTIONS::ITEM240::itemName = "ITEM240"; -const int OPTIONS::ITEM240::defaultValue = 0; const std::string OPTIONS::ITEM241::itemName = "ITEM241"; -const int OPTIONS::ITEM241::defaultValue = 0; const std::string OPTIONS::ITEM242::itemName = "ITEM242"; -const int OPTIONS::ITEM242::defaultValue = 0; const std::string OPTIONS::ITEM243::itemName = "ITEM243"; -const int OPTIONS::ITEM243::defaultValue = 0; const std::string OPTIONS::ITEM244::itemName = "ITEM244"; -const int OPTIONS::ITEM244::defaultValue = 0; const std::string OPTIONS::ITEM245::itemName = "ITEM245"; -const int OPTIONS::ITEM245::defaultValue = 0; const std::string OPTIONS::ITEM246::itemName = "ITEM246"; -const int OPTIONS::ITEM246::defaultValue = 0; const std::string OPTIONS::ITEM247::itemName = "ITEM247"; -const int OPTIONS::ITEM247::defaultValue = 0; const std::string OPTIONS::ITEM248::itemName = "ITEM248"; -const int OPTIONS::ITEM248::defaultValue = 0; const std::string OPTIONS::ITEM249::itemName = "ITEM249"; -const int OPTIONS::ITEM249::defaultValue = 0; const std::string OPTIONS::ITEM250::itemName = "ITEM250"; -const int OPTIONS::ITEM250::defaultValue = 0; const std::string OPTIONS::ITEM251::itemName = "ITEM251"; -const int OPTIONS::ITEM251::defaultValue = 0; const std::string OPTIONS::ITEM252::itemName = "ITEM252"; -const int OPTIONS::ITEM252::defaultValue = 0; const std::string OPTIONS::ITEM253::itemName = "ITEM253"; -const int OPTIONS::ITEM253::defaultValue = 0; const std::string OPTIONS::ITEM254::itemName = "ITEM254"; -const int OPTIONS::ITEM254::defaultValue = 0; const std::string OPTIONS::ITEM255::itemName = "ITEM255"; -const int OPTIONS::ITEM255::defaultValue = 0; const std::string OPTIONS::ITEM256::itemName = "ITEM256"; -const int OPTIONS::ITEM256::defaultValue = 0; const std::string OPTIONS::ITEM257::itemName = "ITEM257"; -const int OPTIONS::ITEM257::defaultValue = 0; const std::string OPTIONS::ITEM258::itemName = "ITEM258"; -const int OPTIONS::ITEM258::defaultValue = 0; const std::string OPTIONS::ITEM259::itemName = "ITEM259"; -const int OPTIONS::ITEM259::defaultValue = 0; const std::string OPTIONS::ITEM260::itemName = "ITEM260"; -const int OPTIONS::ITEM260::defaultValue = 0; const std::string OPTIONS::ITEM261::itemName = "ITEM261"; -const int OPTIONS::ITEM261::defaultValue = 0; const std::string OPTIONS::ITEM262::itemName = "ITEM262"; -const int OPTIONS::ITEM262::defaultValue = 0; const std::string OPTIONS::ITEM263::itemName = "ITEM263"; -const int OPTIONS::ITEM263::defaultValue = 0; const std::string OPTIONS::ITEM264::itemName = "ITEM264"; -const int OPTIONS::ITEM264::defaultValue = 0; const std::string OPTIONS::ITEM265::itemName = "ITEM265"; -const int OPTIONS::ITEM265::defaultValue = 0; const std::string OPTIONS::ITEM266::itemName = "ITEM266"; -const int OPTIONS::ITEM266::defaultValue = 0; const std::string OPTIONS::ITEM267::itemName = "ITEM267"; -const int OPTIONS::ITEM267::defaultValue = 0; const std::string OPTIONS::ITEM268::itemName = "ITEM268"; -const int OPTIONS::ITEM268::defaultValue = 0; const std::string OPTIONS::ITEM269::itemName = "ITEM269"; -const int OPTIONS::ITEM269::defaultValue = 0; const std::string OPTIONS::ITEM270::itemName = "ITEM270"; -const int OPTIONS::ITEM270::defaultValue = 0; const std::string OPTIONS::ITEM271::itemName = "ITEM271"; -const int OPTIONS::ITEM271::defaultValue = 0; const std::string OPTIONS::ITEM272::itemName = "ITEM272"; -const int OPTIONS::ITEM272::defaultValue = 0; const std::string OPTIONS::ITEM273::itemName = "ITEM273"; -const int OPTIONS::ITEM273::defaultValue = 0; const std::string OPTIONS::ITEM274::itemName = "ITEM274"; -const int OPTIONS::ITEM274::defaultValue = 0; const std::string OPTIONS::ITEM275::itemName = "ITEM275"; -const int OPTIONS::ITEM275::defaultValue = 0; const std::string OPTIONS::ITEM276::itemName = "ITEM276"; -const int OPTIONS::ITEM276::defaultValue = 0; const std::string OPTIONS::ITEM277::itemName = "ITEM277"; -const int OPTIONS::ITEM277::defaultValue = 0; const std::string OPTIONS::ITEM278::itemName = "ITEM278"; -const int OPTIONS::ITEM278::defaultValue = 0; const std::string OPTIONS::ITEM279::itemName = "ITEM279"; -const int OPTIONS::ITEM279::defaultValue = 0; const std::string OPTIONS::ITEM280::itemName = "ITEM280"; -const int OPTIONS::ITEM280::defaultValue = 0; const std::string OPTIONS::ITEM281::itemName = "ITEM281"; -const int OPTIONS::ITEM281::defaultValue = 0; const std::string OPTIONS::ITEM282::itemName = "ITEM282"; -const int OPTIONS::ITEM282::defaultValue = 0; const std::string OPTIONS::ITEM283::itemName = "ITEM283"; -const int OPTIONS::ITEM283::defaultValue = 0; const std::string OPTIONS::ITEM284::itemName = "ITEM284"; -const int OPTIONS::ITEM284::defaultValue = 0; const std::string OPTIONS::ITEM285::itemName = "ITEM285"; -const int OPTIONS::ITEM285::defaultValue = 0; const std::string OPTIONS::ITEM286::itemName = "ITEM286"; -const int OPTIONS::ITEM286::defaultValue = 0; const std::string OPTIONS::ITEM287::itemName = "ITEM287"; -const int OPTIONS::ITEM287::defaultValue = 0; const std::string OPTIONS::ITEM288::itemName = "ITEM288"; -const int OPTIONS::ITEM288::defaultValue = 0; const std::string OPTIONS::ITEM289::itemName = "ITEM289"; -const int OPTIONS::ITEM289::defaultValue = 0; const std::string OPTIONS::ITEM290::itemName = "ITEM290"; -const int OPTIONS::ITEM290::defaultValue = 0; const std::string OPTIONS::ITEM291::itemName = "ITEM291"; -const int OPTIONS::ITEM291::defaultValue = 0; const std::string OPTIONS::ITEM292::itemName = "ITEM292"; -const int OPTIONS::ITEM292::defaultValue = 0; const std::string OPTIONS::ITEM293::itemName = "ITEM293"; -const int OPTIONS::ITEM293::defaultValue = 0; const std::string OPTIONS::ITEM294::itemName = "ITEM294"; -const int OPTIONS::ITEM294::defaultValue = 0; const std::string OPTIONS::ITEM295::itemName = "ITEM295"; -const int OPTIONS::ITEM295::defaultValue = 0; const std::string OPTIONS::ITEM296::itemName = "ITEM296"; -const int OPTIONS::ITEM296::defaultValue = 0; const std::string OPTIONS::ITEM297::itemName = "ITEM297"; -const int OPTIONS::ITEM297::defaultValue = 0; const std::string OPTIONS::ITEM298::itemName = "ITEM298"; -const int OPTIONS::ITEM298::defaultValue = 0; const std::string OPTIONS::ITEM299::itemName = "ITEM299"; -const int OPTIONS::ITEM299::defaultValue = 0; const std::string OPTIONS::ITEM300::itemName = "ITEM300"; -const int OPTIONS::ITEM300::defaultValue = 0; const std::string OPTIONS::ITEM301::itemName = "ITEM301"; -const int OPTIONS::ITEM301::defaultValue = 0; const std::string OPTIONS::ITEM302::itemName = "ITEM302"; -const int OPTIONS::ITEM302::defaultValue = 0; const std::string OPTIONS::ITEM303::itemName = "ITEM303"; -const int OPTIONS::ITEM303::defaultValue = 0; const std::string OPTIONS::ITEM304::itemName = "ITEM304"; -const int OPTIONS::ITEM304::defaultValue = 0; const std::string OPTIONS::ITEM305::itemName = "ITEM305"; -const int OPTIONS::ITEM305::defaultValue = 0; const std::string OPTIONS::ITEM306::itemName = "ITEM306"; -const int OPTIONS::ITEM306::defaultValue = 0; const std::string OPTIONS::ITEM307::itemName = "ITEM307"; -const int OPTIONS::ITEM307::defaultValue = 0; const std::string OPTIONS::ITEM308::itemName = "ITEM308"; -const int OPTIONS::ITEM308::defaultValue = 0; const std::string OPTIONS::ITEM309::itemName = "ITEM309"; -const int OPTIONS::ITEM309::defaultValue = 0; const std::string OPTIONS::ITEM310::itemName = "ITEM310"; -const int OPTIONS::ITEM310::defaultValue = 0; const std::string OPTIONS::ITEM311::itemName = "ITEM311"; -const int OPTIONS::ITEM311::defaultValue = 0; const std::string OPTIONS::ITEM312::itemName = "ITEM312"; -const int OPTIONS::ITEM312::defaultValue = 0; const std::string OPTIONS::ITEM313::itemName = "ITEM313"; -const int OPTIONS::ITEM313::defaultValue = 0; const std::string OPTIONS::ITEM314::itemName = "ITEM314"; -const int OPTIONS::ITEM314::defaultValue = 0; const std::string OPTIONS::ITEM315::itemName = "ITEM315"; -const int OPTIONS::ITEM315::defaultValue = 0; const std::string OPTIONS::ITEM316::itemName = "ITEM316"; -const int OPTIONS::ITEM316::defaultValue = 0; const std::string OPTIONS::ITEM317::itemName = "ITEM317"; -const int OPTIONS::ITEM317::defaultValue = 0; const std::string OPTIONS::ITEM318::itemName = "ITEM318"; -const int OPTIONS::ITEM318::defaultValue = 0; const std::string OPTIONS::ITEM319::itemName = "ITEM319"; -const int OPTIONS::ITEM319::defaultValue = 0; OPTIONS3::OPTIONS3() : ParserKeyword("OPTIONS3", KeywordSize(1, false)) { @@ -4080,581 +3749,293 @@ OPTIONS3::OPTIONS3() : ParserKeyword("OPTIONS3", KeywordSize(1, false)) { } const std::string OPTIONS3::keywordName = "OPTIONS3"; const std::string OPTIONS3::ITEM1::itemName = "ITEM1"; -const int OPTIONS3::ITEM1::defaultValue = 0; const std::string OPTIONS3::ITEM2::itemName = "ITEM2"; -const int OPTIONS3::ITEM2::defaultValue = 0; const std::string OPTIONS3::ITEM3::itemName = "ITEM3"; -const int OPTIONS3::ITEM3::defaultValue = 0; const std::string OPTIONS3::ITEM4::itemName = "ITEM4"; -const int OPTIONS3::ITEM4::defaultValue = 0; const std::string OPTIONS3::ITEM5::itemName = "ITEM5"; -const int OPTIONS3::ITEM5::defaultValue = 0; const std::string OPTIONS3::ITEM6::itemName = "ITEM6"; -const int OPTIONS3::ITEM6::defaultValue = 0; const std::string OPTIONS3::ITEM7::itemName = "ITEM7"; -const int OPTIONS3::ITEM7::defaultValue = 0; const std::string OPTIONS3::ITEM8::itemName = "ITEM8"; -const int OPTIONS3::ITEM8::defaultValue = 0; const std::string OPTIONS3::ITEM9::itemName = "ITEM9"; -const int OPTIONS3::ITEM9::defaultValue = 0; const std::string OPTIONS3::ITEM10::itemName = "ITEM10"; -const int OPTIONS3::ITEM10::defaultValue = 0; const std::string OPTIONS3::ITEM11::itemName = "ITEM11"; -const int OPTIONS3::ITEM11::defaultValue = 0; const std::string OPTIONS3::ITEM12::itemName = "ITEM12"; -const int OPTIONS3::ITEM12::defaultValue = 0; const std::string OPTIONS3::ITEM13::itemName = "ITEM13"; -const int OPTIONS3::ITEM13::defaultValue = 0; const std::string OPTIONS3::ITEM14::itemName = "ITEM14"; -const int OPTIONS3::ITEM14::defaultValue = 0; const std::string OPTIONS3::ITEM15::itemName = "ITEM15"; -const int OPTIONS3::ITEM15::defaultValue = 0; const std::string OPTIONS3::ITEM16::itemName = "ITEM16"; -const int OPTIONS3::ITEM16::defaultValue = 0; const std::string OPTIONS3::ITEM17::itemName = "ITEM17"; -const int OPTIONS3::ITEM17::defaultValue = 0; const std::string OPTIONS3::ITEM18::itemName = "ITEM18"; -const int OPTIONS3::ITEM18::defaultValue = 0; const std::string OPTIONS3::ITEM19::itemName = "ITEM19"; -const int OPTIONS3::ITEM19::defaultValue = 0; const std::string OPTIONS3::ITEM20::itemName = "ITEM20"; -const int OPTIONS3::ITEM20::defaultValue = 0; const std::string OPTIONS3::ITEM21::itemName = "ITEM21"; -const int OPTIONS3::ITEM21::defaultValue = 0; const std::string OPTIONS3::ITEM22::itemName = "ITEM22"; -const int OPTIONS3::ITEM22::defaultValue = 0; const std::string OPTIONS3::ITEM23::itemName = "ITEM23"; -const int OPTIONS3::ITEM23::defaultValue = 0; const std::string OPTIONS3::ITEM24::itemName = "ITEM24"; -const int OPTIONS3::ITEM24::defaultValue = 0; const std::string OPTIONS3::ITEM25::itemName = "ITEM25"; -const int OPTIONS3::ITEM25::defaultValue = 0; const std::string OPTIONS3::ITEM26::itemName = "ITEM26"; -const int OPTIONS3::ITEM26::defaultValue = 0; const std::string OPTIONS3::ITEM27::itemName = "ITEM27"; -const int OPTIONS3::ITEM27::defaultValue = 0; const std::string OPTIONS3::ITEM28::itemName = "ITEM28"; -const int OPTIONS3::ITEM28::defaultValue = 0; const std::string OPTIONS3::ITEM29::itemName = "ITEM29"; -const int OPTIONS3::ITEM29::defaultValue = 0; const std::string OPTIONS3::ITEM30::itemName = "ITEM30"; -const int OPTIONS3::ITEM30::defaultValue = 0; const std::string OPTIONS3::ITEM31::itemName = "ITEM31"; -const int OPTIONS3::ITEM31::defaultValue = 0; const std::string OPTIONS3::ITEM32::itemName = "ITEM32"; -const int OPTIONS3::ITEM32::defaultValue = 0; const std::string OPTIONS3::ITEM33::itemName = "ITEM33"; -const int OPTIONS3::ITEM33::defaultValue = 0; const std::string OPTIONS3::ITEM34::itemName = "ITEM34"; -const int OPTIONS3::ITEM34::defaultValue = 0; const std::string OPTIONS3::ITEM35::itemName = "ITEM35"; -const int OPTIONS3::ITEM35::defaultValue = 0; const std::string OPTIONS3::ITEM36::itemName = "ITEM36"; -const int OPTIONS3::ITEM36::defaultValue = 0; const std::string OPTIONS3::ITEM37::itemName = "ITEM37"; -const int OPTIONS3::ITEM37::defaultValue = 0; const std::string OPTIONS3::ITEM38::itemName = "ITEM38"; -const int OPTIONS3::ITEM38::defaultValue = 0; const std::string OPTIONS3::ITEM39::itemName = "ITEM39"; -const int OPTIONS3::ITEM39::defaultValue = 0; const std::string OPTIONS3::ITEM40::itemName = "ITEM40"; -const int OPTIONS3::ITEM40::defaultValue = 0; const std::string OPTIONS3::ITEM41::itemName = "ITEM41"; -const int OPTIONS3::ITEM41::defaultValue = 0; const std::string OPTIONS3::ITEM42::itemName = "ITEM42"; -const int OPTIONS3::ITEM42::defaultValue = 0; const std::string OPTIONS3::ITEM43::itemName = "ITEM43"; -const int OPTIONS3::ITEM43::defaultValue = 0; const std::string OPTIONS3::ITEM44::itemName = "ITEM44"; -const int OPTIONS3::ITEM44::defaultValue = 0; const std::string OPTIONS3::ITEM45::itemName = "ITEM45"; -const int OPTIONS3::ITEM45::defaultValue = 0; const std::string OPTIONS3::ITEM46::itemName = "ITEM46"; -const int OPTIONS3::ITEM46::defaultValue = 0; const std::string OPTIONS3::ITEM47::itemName = "ITEM47"; -const int OPTIONS3::ITEM47::defaultValue = 0; const std::string OPTIONS3::ITEM48::itemName = "ITEM48"; -const int OPTIONS3::ITEM48::defaultValue = 0; const std::string OPTIONS3::ITEM49::itemName = "ITEM49"; -const int OPTIONS3::ITEM49::defaultValue = 0; const std::string OPTIONS3::ITEM50::itemName = "ITEM50"; -const int OPTIONS3::ITEM50::defaultValue = 0; const std::string OPTIONS3::ITEM51::itemName = "ITEM51"; -const int OPTIONS3::ITEM51::defaultValue = 0; const std::string OPTIONS3::ITEM52::itemName = "ITEM52"; -const int OPTIONS3::ITEM52::defaultValue = 0; const std::string OPTIONS3::ITEM53::itemName = "ITEM53"; -const int OPTIONS3::ITEM53::defaultValue = 0; const std::string OPTIONS3::ITEM54::itemName = "ITEM54"; -const int OPTIONS3::ITEM54::defaultValue = 0; const std::string OPTIONS3::ITEM55::itemName = "ITEM55"; -const int OPTIONS3::ITEM55::defaultValue = 0; const std::string OPTIONS3::ITEM56::itemName = "ITEM56"; -const int OPTIONS3::ITEM56::defaultValue = 0; const std::string OPTIONS3::ITEM57::itemName = "ITEM57"; -const int OPTIONS3::ITEM57::defaultValue = 0; const std::string OPTIONS3::ITEM58::itemName = "ITEM58"; -const int OPTIONS3::ITEM58::defaultValue = 0; const std::string OPTIONS3::ITEM59::itemName = "ITEM59"; -const int OPTIONS3::ITEM59::defaultValue = 0; const std::string OPTIONS3::ITEM60::itemName = "ITEM60"; -const int OPTIONS3::ITEM60::defaultValue = 0; const std::string OPTIONS3::ITEM61::itemName = "ITEM61"; -const int OPTIONS3::ITEM61::defaultValue = 0; const std::string OPTIONS3::ITEM62::itemName = "ITEM62"; -const int OPTIONS3::ITEM62::defaultValue = 0; const std::string OPTIONS3::ITEM63::itemName = "ITEM63"; -const int OPTIONS3::ITEM63::defaultValue = 0; const std::string OPTIONS3::ITEM64::itemName = "ITEM64"; -const int OPTIONS3::ITEM64::defaultValue = 0; const std::string OPTIONS3::ITEM65::itemName = "ITEM65"; -const int OPTIONS3::ITEM65::defaultValue = 0; const std::string OPTIONS3::ITEM66::itemName = "ITEM66"; -const int OPTIONS3::ITEM66::defaultValue = 0; const std::string OPTIONS3::ITEM67::itemName = "ITEM67"; -const int OPTIONS3::ITEM67::defaultValue = 0; const std::string OPTIONS3::ITEM68::itemName = "ITEM68"; -const int OPTIONS3::ITEM68::defaultValue = 0; const std::string OPTIONS3::ITEM69::itemName = "ITEM69"; -const int OPTIONS3::ITEM69::defaultValue = 0; const std::string OPTIONS3::ITEM70::itemName = "ITEM70"; -const int OPTIONS3::ITEM70::defaultValue = 0; const std::string OPTIONS3::ITEM71::itemName = "ITEM71"; -const int OPTIONS3::ITEM71::defaultValue = 0; const std::string OPTIONS3::ITEM72::itemName = "ITEM72"; -const int OPTIONS3::ITEM72::defaultValue = 0; const std::string OPTIONS3::ITEM73::itemName = "ITEM73"; -const int OPTIONS3::ITEM73::defaultValue = 0; const std::string OPTIONS3::ITEM74::itemName = "ITEM74"; -const int OPTIONS3::ITEM74::defaultValue = 0; const std::string OPTIONS3::ITEM75::itemName = "ITEM75"; -const int OPTIONS3::ITEM75::defaultValue = 0; const std::string OPTIONS3::ITEM76::itemName = "ITEM76"; -const int OPTIONS3::ITEM76::defaultValue = 0; const std::string OPTIONS3::ITEM77::itemName = "ITEM77"; -const int OPTIONS3::ITEM77::defaultValue = 0; const std::string OPTIONS3::ITEM78::itemName = "ITEM78"; -const int OPTIONS3::ITEM78::defaultValue = 0; const std::string OPTIONS3::ITEM79::itemName = "ITEM79"; -const int OPTIONS3::ITEM79::defaultValue = 0; const std::string OPTIONS3::ITEM80::itemName = "ITEM80"; -const int OPTIONS3::ITEM80::defaultValue = 0; const std::string OPTIONS3::ITEM81::itemName = "ITEM81"; -const int OPTIONS3::ITEM81::defaultValue = 0; const std::string OPTIONS3::ITEM82::itemName = "ITEM82"; -const int OPTIONS3::ITEM82::defaultValue = 0; const std::string OPTIONS3::ITEM83::itemName = "ITEM83"; -const int OPTIONS3::ITEM83::defaultValue = 0; const std::string OPTIONS3::ITEM84::itemName = "ITEM84"; -const int OPTIONS3::ITEM84::defaultValue = 0; const std::string OPTIONS3::ITEM85::itemName = "ITEM85"; -const int OPTIONS3::ITEM85::defaultValue = 0; const std::string OPTIONS3::ITEM86::itemName = "ITEM86"; -const int OPTIONS3::ITEM86::defaultValue = 0; const std::string OPTIONS3::ITEM87::itemName = "ITEM87"; -const int OPTIONS3::ITEM87::defaultValue = 0; const std::string OPTIONS3::ITEM88::itemName = "ITEM88"; -const int OPTIONS3::ITEM88::defaultValue = 0; const std::string OPTIONS3::ITEM89::itemName = "ITEM89"; -const int OPTIONS3::ITEM89::defaultValue = 0; const std::string OPTIONS3::ITEM90::itemName = "ITEM90"; -const int OPTIONS3::ITEM90::defaultValue = 0; const std::string OPTIONS3::ITEM91::itemName = "ITEM91"; -const int OPTIONS3::ITEM91::defaultValue = 0; const std::string OPTIONS3::ITEM92::itemName = "ITEM92"; -const int OPTIONS3::ITEM92::defaultValue = 0; const std::string OPTIONS3::ITEM93::itemName = "ITEM93"; -const int OPTIONS3::ITEM93::defaultValue = 0; const std::string OPTIONS3::ITEM94::itemName = "ITEM94"; -const int OPTIONS3::ITEM94::defaultValue = 0; const std::string OPTIONS3::ITEM95::itemName = "ITEM95"; -const int OPTIONS3::ITEM95::defaultValue = 0; const std::string OPTIONS3::ITEM96::itemName = "ITEM96"; -const int OPTIONS3::ITEM96::defaultValue = 0; const std::string OPTIONS3::ITEM97::itemName = "ITEM97"; -const int OPTIONS3::ITEM97::defaultValue = 0; const std::string OPTIONS3::ITEM98::itemName = "ITEM98"; -const int OPTIONS3::ITEM98::defaultValue = 0; const std::string OPTIONS3::ITEM99::itemName = "ITEM99"; -const int OPTIONS3::ITEM99::defaultValue = 0; const std::string OPTIONS3::ITEM100::itemName = "ITEM100"; -const int OPTIONS3::ITEM100::defaultValue = 0; const std::string OPTIONS3::ITEM101::itemName = "ITEM101"; -const int OPTIONS3::ITEM101::defaultValue = 0; const std::string OPTIONS3::ITEM102::itemName = "ITEM102"; -const int OPTIONS3::ITEM102::defaultValue = 0; const std::string OPTIONS3::ITEM103::itemName = "ITEM103"; -const int OPTIONS3::ITEM103::defaultValue = 0; const std::string OPTIONS3::ITEM104::itemName = "ITEM104"; -const int OPTIONS3::ITEM104::defaultValue = 0; const std::string OPTIONS3::ITEM105::itemName = "ITEM105"; -const int OPTIONS3::ITEM105::defaultValue = 0; const std::string OPTIONS3::ITEM106::itemName = "ITEM106"; -const int OPTIONS3::ITEM106::defaultValue = 0; const std::string OPTIONS3::ITEM107::itemName = "ITEM107"; -const int OPTIONS3::ITEM107::defaultValue = 0; const std::string OPTIONS3::ITEM108::itemName = "ITEM108"; -const int OPTIONS3::ITEM108::defaultValue = 0; const std::string OPTIONS3::ITEM109::itemName = "ITEM109"; -const int OPTIONS3::ITEM109::defaultValue = 0; const std::string OPTIONS3::ITEM110::itemName = "ITEM110"; -const int OPTIONS3::ITEM110::defaultValue = 0; const std::string OPTIONS3::ITEM111::itemName = "ITEM111"; -const int OPTIONS3::ITEM111::defaultValue = 0; const std::string OPTIONS3::ITEM112::itemName = "ITEM112"; -const int OPTIONS3::ITEM112::defaultValue = 0; const std::string OPTIONS3::ITEM113::itemName = "ITEM113"; -const int OPTIONS3::ITEM113::defaultValue = 0; const std::string OPTIONS3::ITEM114::itemName = "ITEM114"; -const int OPTIONS3::ITEM114::defaultValue = 0; const std::string OPTIONS3::ITEM115::itemName = "ITEM115"; -const int OPTIONS3::ITEM115::defaultValue = 0; const std::string OPTIONS3::ITEM116::itemName = "ITEM116"; -const int OPTIONS3::ITEM116::defaultValue = 0; const std::string OPTIONS3::ITEM117::itemName = "ITEM117"; -const int OPTIONS3::ITEM117::defaultValue = 0; const std::string OPTIONS3::ITEM118::itemName = "ITEM118"; -const int OPTIONS3::ITEM118::defaultValue = 0; const std::string OPTIONS3::ITEM119::itemName = "ITEM119"; -const int OPTIONS3::ITEM119::defaultValue = 0; const std::string OPTIONS3::ITEM120::itemName = "ITEM120"; -const int OPTIONS3::ITEM120::defaultValue = 0; const std::string OPTIONS3::ITEM121::itemName = "ITEM121"; -const int OPTIONS3::ITEM121::defaultValue = 0; const std::string OPTIONS3::ITEM122::itemName = "ITEM122"; -const int OPTIONS3::ITEM122::defaultValue = 0; const std::string OPTIONS3::ITEM123::itemName = "ITEM123"; -const int OPTIONS3::ITEM123::defaultValue = 0; const std::string OPTIONS3::ITEM124::itemName = "ITEM124"; -const int OPTIONS3::ITEM124::defaultValue = 0; const std::string OPTIONS3::ITEM125::itemName = "ITEM125"; -const int OPTIONS3::ITEM125::defaultValue = 0; const std::string OPTIONS3::ITEM126::itemName = "ITEM126"; -const int OPTIONS3::ITEM126::defaultValue = 0; const std::string OPTIONS3::ITEM127::itemName = "ITEM127"; -const int OPTIONS3::ITEM127::defaultValue = 0; const std::string OPTIONS3::ITEM128::itemName = "ITEM128"; -const int OPTIONS3::ITEM128::defaultValue = 0; const std::string OPTIONS3::ITEM129::itemName = "ITEM129"; -const int OPTIONS3::ITEM129::defaultValue = 0; const std::string OPTIONS3::ITEM130::itemName = "ITEM130"; -const int OPTIONS3::ITEM130::defaultValue = 0; const std::string OPTIONS3::ITEM131::itemName = "ITEM131"; -const int OPTIONS3::ITEM131::defaultValue = 0; const std::string OPTIONS3::ITEM132::itemName = "ITEM132"; -const int OPTIONS3::ITEM132::defaultValue = 0; const std::string OPTIONS3::ITEM133::itemName = "ITEM133"; -const int OPTIONS3::ITEM133::defaultValue = 0; const std::string OPTIONS3::ITEM134::itemName = "ITEM134"; -const int OPTIONS3::ITEM134::defaultValue = 0; const std::string OPTIONS3::ITEM135::itemName = "ITEM135"; -const int OPTIONS3::ITEM135::defaultValue = 0; const std::string OPTIONS3::ITEM136::itemName = "ITEM136"; -const int OPTIONS3::ITEM136::defaultValue = 0; const std::string OPTIONS3::ITEM137::itemName = "ITEM137"; -const int OPTIONS3::ITEM137::defaultValue = 0; const std::string OPTIONS3::ITEM138::itemName = "ITEM138"; -const int OPTIONS3::ITEM138::defaultValue = 0; const std::string OPTIONS3::ITEM139::itemName = "ITEM139"; -const int OPTIONS3::ITEM139::defaultValue = 0; const std::string OPTIONS3::ITEM140::itemName = "ITEM140"; -const int OPTIONS3::ITEM140::defaultValue = 0; const std::string OPTIONS3::ITEM141::itemName = "ITEM141"; -const int OPTIONS3::ITEM141::defaultValue = 0; const std::string OPTIONS3::ITEM142::itemName = "ITEM142"; -const int OPTIONS3::ITEM142::defaultValue = 0; const std::string OPTIONS3::ITEM143::itemName = "ITEM143"; -const int OPTIONS3::ITEM143::defaultValue = 0; const std::string OPTIONS3::ITEM144::itemName = "ITEM144"; -const int OPTIONS3::ITEM144::defaultValue = 0; const std::string OPTIONS3::ITEM145::itemName = "ITEM145"; -const int OPTIONS3::ITEM145::defaultValue = 0; const std::string OPTIONS3::ITEM146::itemName = "ITEM146"; -const int OPTIONS3::ITEM146::defaultValue = 0; const std::string OPTIONS3::ITEM147::itemName = "ITEM147"; -const int OPTIONS3::ITEM147::defaultValue = 0; const std::string OPTIONS3::ITEM148::itemName = "ITEM148"; -const int OPTIONS3::ITEM148::defaultValue = 0; const std::string OPTIONS3::ITEM149::itemName = "ITEM149"; -const int OPTIONS3::ITEM149::defaultValue = 0; const std::string OPTIONS3::ITEM150::itemName = "ITEM150"; -const int OPTIONS3::ITEM150::defaultValue = 0; const std::string OPTIONS3::ITEM151::itemName = "ITEM151"; -const int OPTIONS3::ITEM151::defaultValue = 0; const std::string OPTIONS3::ITEM152::itemName = "ITEM152"; -const int OPTIONS3::ITEM152::defaultValue = 0; const std::string OPTIONS3::ITEM153::itemName = "ITEM153"; -const int OPTIONS3::ITEM153::defaultValue = 0; const std::string OPTIONS3::ITEM154::itemName = "ITEM154"; -const int OPTIONS3::ITEM154::defaultValue = 0; const std::string OPTIONS3::ITEM155::itemName = "ITEM155"; -const int OPTIONS3::ITEM155::defaultValue = 0; const std::string OPTIONS3::ITEM156::itemName = "ITEM156"; -const int OPTIONS3::ITEM156::defaultValue = 0; const std::string OPTIONS3::ITEM157::itemName = "ITEM157"; -const int OPTIONS3::ITEM157::defaultValue = 0; const std::string OPTIONS3::ITEM158::itemName = "ITEM158"; -const int OPTIONS3::ITEM158::defaultValue = 0; const std::string OPTIONS3::ITEM159::itemName = "ITEM159"; -const int OPTIONS3::ITEM159::defaultValue = 0; const std::string OPTIONS3::ITEM160::itemName = "ITEM160"; -const int OPTIONS3::ITEM160::defaultValue = 0; const std::string OPTIONS3::ITEM161::itemName = "ITEM161"; -const int OPTIONS3::ITEM161::defaultValue = 0; const std::string OPTIONS3::ITEM162::itemName = "ITEM162"; -const int OPTIONS3::ITEM162::defaultValue = 0; const std::string OPTIONS3::ITEM163::itemName = "ITEM163"; -const int OPTIONS3::ITEM163::defaultValue = 0; const std::string OPTIONS3::ITEM164::itemName = "ITEM164"; -const int OPTIONS3::ITEM164::defaultValue = 0; const std::string OPTIONS3::ITEM165::itemName = "ITEM165"; -const int OPTIONS3::ITEM165::defaultValue = 0; const std::string OPTIONS3::ITEM166::itemName = "ITEM166"; -const int OPTIONS3::ITEM166::defaultValue = 0; const std::string OPTIONS3::ITEM167::itemName = "ITEM167"; -const int OPTIONS3::ITEM167::defaultValue = 0; const std::string OPTIONS3::ITEM168::itemName = "ITEM168"; -const int OPTIONS3::ITEM168::defaultValue = 0; const std::string OPTIONS3::ITEM169::itemName = "ITEM169"; -const int OPTIONS3::ITEM169::defaultValue = 0; const std::string OPTIONS3::ITEM170::itemName = "ITEM170"; -const int OPTIONS3::ITEM170::defaultValue = 0; const std::string OPTIONS3::ITEM171::itemName = "ITEM171"; -const int OPTIONS3::ITEM171::defaultValue = 0; const std::string OPTIONS3::ITEM172::itemName = "ITEM172"; -const int OPTIONS3::ITEM172::defaultValue = 0; const std::string OPTIONS3::ITEM173::itemName = "ITEM173"; -const int OPTIONS3::ITEM173::defaultValue = 0; const std::string OPTIONS3::ITEM174::itemName = "ITEM174"; -const int OPTIONS3::ITEM174::defaultValue = 0; const std::string OPTIONS3::ITEM175::itemName = "ITEM175"; -const int OPTIONS3::ITEM175::defaultValue = 0; const std::string OPTIONS3::ITEM176::itemName = "ITEM176"; -const int OPTIONS3::ITEM176::defaultValue = 0; const std::string OPTIONS3::ITEM177::itemName = "ITEM177"; -const int OPTIONS3::ITEM177::defaultValue = 0; const std::string OPTIONS3::ITEM178::itemName = "ITEM178"; -const int OPTIONS3::ITEM178::defaultValue = 0; const std::string OPTIONS3::ITEM179::itemName = "ITEM179"; -const int OPTIONS3::ITEM179::defaultValue = 0; const std::string OPTIONS3::ITEM180::itemName = "ITEM180"; -const int OPTIONS3::ITEM180::defaultValue = 0; const std::string OPTIONS3::ITEM181::itemName = "ITEM181"; -const int OPTIONS3::ITEM181::defaultValue = 0; const std::string OPTIONS3::ITEM182::itemName = "ITEM182"; -const int OPTIONS3::ITEM182::defaultValue = 0; const std::string OPTIONS3::ITEM183::itemName = "ITEM183"; -const int OPTIONS3::ITEM183::defaultValue = 0; const std::string OPTIONS3::ITEM184::itemName = "ITEM184"; -const int OPTIONS3::ITEM184::defaultValue = 0; const std::string OPTIONS3::ITEM185::itemName = "ITEM185"; -const int OPTIONS3::ITEM185::defaultValue = 0; const std::string OPTIONS3::ITEM186::itemName = "ITEM186"; -const int OPTIONS3::ITEM186::defaultValue = 0; const std::string OPTIONS3::ITEM187::itemName = "ITEM187"; -const int OPTIONS3::ITEM187::defaultValue = 0; const std::string OPTIONS3::ITEM188::itemName = "ITEM188"; -const int OPTIONS3::ITEM188::defaultValue = 0; const std::string OPTIONS3::ITEM189::itemName = "ITEM189"; -const int OPTIONS3::ITEM189::defaultValue = 0; const std::string OPTIONS3::ITEM190::itemName = "ITEM190"; -const int OPTIONS3::ITEM190::defaultValue = 0; const std::string OPTIONS3::ITEM191::itemName = "ITEM191"; -const int OPTIONS3::ITEM191::defaultValue = 0; const std::string OPTIONS3::ITEM192::itemName = "ITEM192"; -const int OPTIONS3::ITEM192::defaultValue = 0; const std::string OPTIONS3::ITEM193::itemName = "ITEM193"; -const int OPTIONS3::ITEM193::defaultValue = 0; const std::string OPTIONS3::ITEM194::itemName = "ITEM194"; -const int OPTIONS3::ITEM194::defaultValue = 0; const std::string OPTIONS3::ITEM195::itemName = "ITEM195"; -const int OPTIONS3::ITEM195::defaultValue = 0; const std::string OPTIONS3::ITEM196::itemName = "ITEM196"; -const int OPTIONS3::ITEM196::defaultValue = 0; const std::string OPTIONS3::ITEM197::itemName = "ITEM197"; -const int OPTIONS3::ITEM197::defaultValue = 0; const std::string OPTIONS3::ITEM198::itemName = "ITEM198"; -const int OPTIONS3::ITEM198::defaultValue = 0; const std::string OPTIONS3::ITEM199::itemName = "ITEM199"; -const int OPTIONS3::ITEM199::defaultValue = 0; const std::string OPTIONS3::ITEM200::itemName = "ITEM200"; -const int OPTIONS3::ITEM200::defaultValue = 0; const std::string OPTIONS3::ITEM201::itemName = "ITEM201"; -const int OPTIONS3::ITEM201::defaultValue = 0; const std::string OPTIONS3::ITEM202::itemName = "ITEM202"; -const int OPTIONS3::ITEM202::defaultValue = 0; const std::string OPTIONS3::ITEM203::itemName = "ITEM203"; -const int OPTIONS3::ITEM203::defaultValue = 0; const std::string OPTIONS3::ITEM204::itemName = "ITEM204"; -const int OPTIONS3::ITEM204::defaultValue = 0; const std::string OPTIONS3::ITEM205::itemName = "ITEM205"; -const int OPTIONS3::ITEM205::defaultValue = 0; const std::string OPTIONS3::ITEM206::itemName = "ITEM206"; -const int OPTIONS3::ITEM206::defaultValue = 0; const std::string OPTIONS3::ITEM207::itemName = "ITEM207"; -const int OPTIONS3::ITEM207::defaultValue = 0; const std::string OPTIONS3::ITEM208::itemName = "ITEM208"; -const int OPTIONS3::ITEM208::defaultValue = 0; const std::string OPTIONS3::ITEM209::itemName = "ITEM209"; -const int OPTIONS3::ITEM209::defaultValue = 0; const std::string OPTIONS3::ITEM210::itemName = "ITEM210"; -const int OPTIONS3::ITEM210::defaultValue = 0; const std::string OPTIONS3::ITEM211::itemName = "ITEM211"; -const int OPTIONS3::ITEM211::defaultValue = 0; const std::string OPTIONS3::ITEM212::itemName = "ITEM212"; -const int OPTIONS3::ITEM212::defaultValue = 0; const std::string OPTIONS3::ITEM213::itemName = "ITEM213"; -const int OPTIONS3::ITEM213::defaultValue = 0; const std::string OPTIONS3::ITEM214::itemName = "ITEM214"; -const int OPTIONS3::ITEM214::defaultValue = 0; const std::string OPTIONS3::ITEM215::itemName = "ITEM215"; -const int OPTIONS3::ITEM215::defaultValue = 0; const std::string OPTIONS3::ITEM216::itemName = "ITEM216"; -const int OPTIONS3::ITEM216::defaultValue = 0; const std::string OPTIONS3::ITEM217::itemName = "ITEM217"; -const int OPTIONS3::ITEM217::defaultValue = 0; const std::string OPTIONS3::ITEM218::itemName = "ITEM218"; -const int OPTIONS3::ITEM218::defaultValue = 0; const std::string OPTIONS3::ITEM219::itemName = "ITEM219"; -const int OPTIONS3::ITEM219::defaultValue = 0; const std::string OPTIONS3::ITEM220::itemName = "ITEM220"; -const int OPTIONS3::ITEM220::defaultValue = 0; const std::string OPTIONS3::ITEM221::itemName = "ITEM221"; -const int OPTIONS3::ITEM221::defaultValue = 0; const std::string OPTIONS3::ITEM222::itemName = "ITEM222"; -const int OPTIONS3::ITEM222::defaultValue = 0; const std::string OPTIONS3::ITEM223::itemName = "ITEM223"; -const int OPTIONS3::ITEM223::defaultValue = 0; const std::string OPTIONS3::ITEM224::itemName = "ITEM224"; -const int OPTIONS3::ITEM224::defaultValue = 0; const std::string OPTIONS3::ITEM225::itemName = "ITEM225"; -const int OPTIONS3::ITEM225::defaultValue = 0; const std::string OPTIONS3::ITEM226::itemName = "ITEM226"; -const int OPTIONS3::ITEM226::defaultValue = 0; const std::string OPTIONS3::ITEM227::itemName = "ITEM227"; -const int OPTIONS3::ITEM227::defaultValue = 0; const std::string OPTIONS3::ITEM228::itemName = "ITEM228"; -const int OPTIONS3::ITEM228::defaultValue = 0; const std::string OPTIONS3::ITEM229::itemName = "ITEM229"; -const int OPTIONS3::ITEM229::defaultValue = 0; const std::string OPTIONS3::ITEM230::itemName = "ITEM230"; -const int OPTIONS3::ITEM230::defaultValue = 0; const std::string OPTIONS3::ITEM231::itemName = "ITEM231"; -const int OPTIONS3::ITEM231::defaultValue = 0; const std::string OPTIONS3::ITEM232::itemName = "ITEM232"; -const int OPTIONS3::ITEM232::defaultValue = 0; const std::string OPTIONS3::ITEM233::itemName = "ITEM233"; -const int OPTIONS3::ITEM233::defaultValue = 0; const std::string OPTIONS3::ITEM234::itemName = "ITEM234"; -const int OPTIONS3::ITEM234::defaultValue = 0; const std::string OPTIONS3::ITEM235::itemName = "ITEM235"; -const int OPTIONS3::ITEM235::defaultValue = 0; const std::string OPTIONS3::ITEM236::itemName = "ITEM236"; -const int OPTIONS3::ITEM236::defaultValue = 0; const std::string OPTIONS3::ITEM237::itemName = "ITEM237"; -const int OPTIONS3::ITEM237::defaultValue = 0; const std::string OPTIONS3::ITEM238::itemName = "ITEM238"; -const int OPTIONS3::ITEM238::defaultValue = 0; const std::string OPTIONS3::ITEM239::itemName = "ITEM239"; -const int OPTIONS3::ITEM239::defaultValue = 0; const std::string OPTIONS3::ITEM240::itemName = "ITEM240"; -const int OPTIONS3::ITEM240::defaultValue = 0; const std::string OPTIONS3::ITEM241::itemName = "ITEM241"; -const int OPTIONS3::ITEM241::defaultValue = 0; const std::string OPTIONS3::ITEM242::itemName = "ITEM242"; -const int OPTIONS3::ITEM242::defaultValue = 0; const std::string OPTIONS3::ITEM243::itemName = "ITEM243"; -const int OPTIONS3::ITEM243::defaultValue = 0; const std::string OPTIONS3::ITEM244::itemName = "ITEM244"; -const int OPTIONS3::ITEM244::defaultValue = 0; const std::string OPTIONS3::ITEM245::itemName = "ITEM245"; -const int OPTIONS3::ITEM245::defaultValue = 0; const std::string OPTIONS3::ITEM246::itemName = "ITEM246"; -const int OPTIONS3::ITEM246::defaultValue = 0; const std::string OPTIONS3::ITEM247::itemName = "ITEM247"; -const int OPTIONS3::ITEM247::defaultValue = 0; const std::string OPTIONS3::ITEM248::itemName = "ITEM248"; -const int OPTIONS3::ITEM248::defaultValue = 0; const std::string OPTIONS3::ITEM249::itemName = "ITEM249"; -const int OPTIONS3::ITEM249::defaultValue = 0; const std::string OPTIONS3::ITEM250::itemName = "ITEM250"; -const int OPTIONS3::ITEM250::defaultValue = 0; const std::string OPTIONS3::ITEM251::itemName = "ITEM251"; -const int OPTIONS3::ITEM251::defaultValue = 0; const std::string OPTIONS3::ITEM252::itemName = "ITEM252"; -const int OPTIONS3::ITEM252::defaultValue = 0; const std::string OPTIONS3::ITEM253::itemName = "ITEM253"; -const int OPTIONS3::ITEM253::defaultValue = 0; const std::string OPTIONS3::ITEM254::itemName = "ITEM254"; -const int OPTIONS3::ITEM254::defaultValue = 0; const std::string OPTIONS3::ITEM255::itemName = "ITEM255"; -const int OPTIONS3::ITEM255::defaultValue = 0; const std::string OPTIONS3::ITEM256::itemName = "ITEM256"; -const int OPTIONS3::ITEM256::defaultValue = 0; const std::string OPTIONS3::ITEM257::itemName = "ITEM257"; -const int OPTIONS3::ITEM257::defaultValue = 0; const std::string OPTIONS3::ITEM258::itemName = "ITEM258"; -const int OPTIONS3::ITEM258::defaultValue = 0; const std::string OPTIONS3::ITEM259::itemName = "ITEM259"; -const int OPTIONS3::ITEM259::defaultValue = 0; const std::string OPTIONS3::ITEM260::itemName = "ITEM260"; -const int OPTIONS3::ITEM260::defaultValue = 0; const std::string OPTIONS3::ITEM261::itemName = "ITEM261"; -const int OPTIONS3::ITEM261::defaultValue = 0; const std::string OPTIONS3::ITEM262::itemName = "ITEM262"; -const int OPTIONS3::ITEM262::defaultValue = 0; const std::string OPTIONS3::ITEM263::itemName = "ITEM263"; -const int OPTIONS3::ITEM263::defaultValue = 0; const std::string OPTIONS3::ITEM264::itemName = "ITEM264"; -const int OPTIONS3::ITEM264::defaultValue = 0; const std::string OPTIONS3::ITEM265::itemName = "ITEM265"; -const int OPTIONS3::ITEM265::defaultValue = 0; const std::string OPTIONS3::ITEM266::itemName = "ITEM266"; -const int OPTIONS3::ITEM266::defaultValue = 0; const std::string OPTIONS3::ITEM267::itemName = "ITEM267"; -const int OPTIONS3::ITEM267::defaultValue = 0; const std::string OPTIONS3::ITEM268::itemName = "ITEM268"; -const int OPTIONS3::ITEM268::defaultValue = 0; const std::string OPTIONS3::ITEM269::itemName = "ITEM269"; -const int OPTIONS3::ITEM269::defaultValue = 0; const std::string OPTIONS3::ITEM270::itemName = "ITEM270"; -const int OPTIONS3::ITEM270::defaultValue = 0; const std::string OPTIONS3::ITEM271::itemName = "ITEM271"; -const int OPTIONS3::ITEM271::defaultValue = 0; const std::string OPTIONS3::ITEM272::itemName = "ITEM272"; -const int OPTIONS3::ITEM272::defaultValue = 0; const std::string OPTIONS3::ITEM273::itemName = "ITEM273"; -const int OPTIONS3::ITEM273::defaultValue = 0; const std::string OPTIONS3::ITEM274::itemName = "ITEM274"; -const int OPTIONS3::ITEM274::defaultValue = 0; const std::string OPTIONS3::ITEM275::itemName = "ITEM275"; -const int OPTIONS3::ITEM275::defaultValue = 0; const std::string OPTIONS3::ITEM276::itemName = "ITEM276"; -const int OPTIONS3::ITEM276::defaultValue = 0; const std::string OPTIONS3::ITEM277::itemName = "ITEM277"; -const int OPTIONS3::ITEM277::defaultValue = 0; const std::string OPTIONS3::ITEM278::itemName = "ITEM278"; -const int OPTIONS3::ITEM278::defaultValue = 0; const std::string OPTIONS3::ITEM279::itemName = "ITEM279"; -const int OPTIONS3::ITEM279::defaultValue = 0; const std::string OPTIONS3::ITEM280::itemName = "ITEM280"; -const int OPTIONS3::ITEM280::defaultValue = 0; const std::string OPTIONS3::ITEM281::itemName = "ITEM281"; -const int OPTIONS3::ITEM281::defaultValue = 0; const std::string OPTIONS3::ITEM282::itemName = "ITEM282"; -const int OPTIONS3::ITEM282::defaultValue = 0; const std::string OPTIONS3::ITEM283::itemName = "ITEM283"; -const int OPTIONS3::ITEM283::defaultValue = 0; const std::string OPTIONS3::ITEM284::itemName = "ITEM284"; -const int OPTIONS3::ITEM284::defaultValue = 0; const std::string OPTIONS3::ITEM285::itemName = "ITEM285"; -const int OPTIONS3::ITEM285::defaultValue = 0; const std::string OPTIONS3::ITEM286::itemName = "ITEM286"; -const int OPTIONS3::ITEM286::defaultValue = 0; const std::string OPTIONS3::ITEM287::itemName = "ITEM287"; -const int OPTIONS3::ITEM287::defaultValue = 0; const std::string OPTIONS3::ITEM288::itemName = "ITEM288"; -const int OPTIONS3::ITEM288::defaultValue = 0; OUTRAD::OUTRAD() : ParserKeyword("OUTRAD", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/P.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/P.cpp index a7f5522ac3..810c289146 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/P.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/P.cpp @@ -32,7 +32,6 @@ PARALLEL::PARALLEL() : ParserKeyword("PARALLEL", KeywordSize(1, false)) { } const std::string PARALLEL::keywordName = "PARALLEL"; const std::string PARALLEL::NDMAIN::itemName = "NDMAIN"; -const int PARALLEL::NDMAIN::defaultValue = 1; const std::string PARALLEL::MACHINE_TYPE::itemName = "MACHINE_TYPE"; const std::string PARALLEL::MACHINE_TYPE::defaultValue = "DISTRIBUTED"; @@ -94,19 +93,12 @@ const std::string PARAOPTS::keywordName = "PARAOPTS"; const std::string PARAOPTS::METHOD::itemName = "METHOD"; const std::string PARAOPTS::METHOD::defaultValue = "TREE"; const std::string PARAOPTS::SET_PRINT::itemName = "SET_PRINT"; -const int PARAOPTS::SET_PRINT::defaultValue = 0; const std::string PARAOPTS::SIZE::itemName = "SIZE"; -const int PARAOPTS::SIZE::defaultValue = 0; const std::string PARAOPTS::NUM_BUFFERS::itemName = "NUM_BUFFERS"; -const int PARAOPTS::NUM_BUFFERS::defaultValue = 2; const std::string PARAOPTS::VALUE_MEM::itemName = "VALUE_MEM"; -const int PARAOPTS::VALUE_MEM::defaultValue = 0; const std::string PARAOPTS::VALUE_COARSE::itemName = "VALUE_COARSE"; -const int PARAOPTS::VALUE_COARSE::defaultValue = 0; const std::string PARAOPTS::VALUE_NNC::itemName = "VALUE_NNC"; -const int PARAOPTS::VALUE_NNC::defaultValue = 0; const std::string PARAOPTS::VALUE_PRT_FILE::itemName = "VALUE_PRT_FILE"; -const int PARAOPTS::VALUE_PRT_FILE::defaultValue = 1; const std::string PARAOPTS::RESERVED::itemName = "RESERVED"; @@ -136,11 +128,8 @@ PARTTRAC::PARTTRAC() : ParserKeyword("PARTTRAC", KeywordSize(1, false)) { } const std::string PARTTRAC::keywordName = "PARTTRAC"; const std::string PARTTRAC::NPARTT::itemName = "NPARTT"; -const int PARTTRAC::NPARTT::defaultValue = 0; const std::string PARTTRAC::NKPTMX::itemName = "NKPTMX"; -const int PARTTRAC::NKPTMX::defaultValue = 0; const std::string PARTTRAC::NPKPMX::itemName = "NPKPMX"; -const int PARTTRAC::NPKPMX::defaultValue = 0; PATHS::PATHS() : ParserKeyword("PATHS", KeywordSize(SLASH_TERMINATED)) { @@ -204,6 +193,29 @@ const std::string PBVD::keywordName = "PBVD"; const std::string PBVD::DATA::itemName = "DATA"; +PCFACT::PCFACT() : ParserKeyword("PCFACT", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { + addValidSectionName("PROPS"); + setRequiredKeywords({ + "PRECSALT", + }); + clearDeckNames(); + addDeckName("PCFACT"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string PCFACT::keywordName = "PCFACT"; +const std::string PCFACT::DATA::itemName = "DATA"; + + PCG::PCG() : ParserKeyword("PCG", KeywordSize(1, false)) { addValidSectionName("PROPS"); setRequiredKeywords({ @@ -244,6 +256,25 @@ const std::string PCG32D::keywordName = "PCG32D"; const std::string PCG32D::SOME_DATA::itemName = "SOME_DATA"; +PCRIT::PCRIT() : ParserKeyword("PCRIT", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("PCRIT"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Pressure"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string PCRIT::keywordName = "PCRIT"; +const std::string PCRIT::DATA::itemName = "DATA"; + + PCW::PCW() : ParserKeyword("PCW", KeywordSize(1, false)) { addValidSectionName("PROPS"); setRequiredKeywords({ @@ -425,11 +456,8 @@ const std::string PECOEFS::C_0::itemName = "C_0"; const std::string PECOEFS::C_K::itemName = "C_K"; const std::string PECOEFS::SHEAR_MOD::itemName = "SHEAR_MOD"; const std::string PECOEFS::ALPHA::itemName = "ALPHA"; -const double PECOEFS::ALPHA::defaultValue = 1.000000; const std::string PECOEFS::E::itemName = "E"; -const double PECOEFS::E::defaultValue = 1.000000; const std::string PECOEFS::METHOD::itemName = "METHOD"; -const int PECOEFS::METHOD::defaultValue = 0; PEDIMS::PEDIMS() : ParserKeyword("PEDIMS", KeywordSize(1, false)) { @@ -453,9 +481,7 @@ PEDIMS::PEDIMS() : ParserKeyword("PEDIMS", KeywordSize(1, false)) { } const std::string PEDIMS::keywordName = "PEDIMS"; const std::string PEDIMS::NUM_REGIONS::itemName = "NUM_REGIONS"; -const int PEDIMS::NUM_REGIONS::defaultValue = 0; const std::string PEDIMS::MAX_PRESSURE_POINTS::itemName = "MAX_PRESSURE_POINTS"; -const int PEDIMS::MAX_PRESSURE_POINTS::defaultValue = 0; PEGTABX::PEGTABX() : ParserKeyword("PEGTABX", KeywordSize("PEDIMS", "NUM_REGIONS", false, 0)) { @@ -534,35 +560,35 @@ PERFORMANCE_PROBE::PERFORMANCE_PROBE() : ParserKeyword("PERFORMANCE_PROBE", Keyw addValidSectionName("SUMMARY"); clearDeckNames(); addDeckName("HLINEARS"); - addDeckName("TCPUDAY"); addDeckName("ELAPSED"); + addDeckName("TCPUDAY"); addDeckName("HSUMLINS"); - addDeckName("WNEWTON"); addDeckName("MAXDPR"); + addDeckName("WNEWTON"); addDeckName("MAXDSW"); addDeckName("MAXDSO"); addDeckName("MAXDSG"); addDeckName("MEMORYTS"); addDeckName("MLINEARS"); - addDeckName("TELAPDAY"); addDeckName("MSUMLINS"); + addDeckName("TELAPDAY"); addDeckName("MSUMNEWT"); addDeckName("NBYTOT"); - addDeckName("TCPUTSHT"); addDeckName("NEWTON"); - addDeckName("TCPUH"); + addDeckName("TCPUTSHT"); addDeckName("NLINEARS"); - addDeckName("TCPU"); + addDeckName("TCPUH"); addDeckName("NLINSMIN"); + addDeckName("TCPU"); addDeckName("NLINSMAX"); addDeckName("PERFORMA"); - addDeckName("TCPUSCH"); addDeckName("STEPTYPE"); + addDeckName("TCPUSCH"); addDeckName("TCPUHT"); addDeckName("TCPUTS"); addDeckName("TCPUTSH"); - addDeckName("TIMESTEP"); addDeckName("TELAPLIN"); + addDeckName("TIMESTEP"); addDeckName("TELAPTS"); addDeckName("ZIPEFF"); addDeckName("ZIPEFFC"); @@ -596,14 +622,11 @@ PERMAVE::PERMAVE() : ParserKeyword("PERMAVE", KeywordSize(1, false)) { } const std::string PERMAVE::keywordName = "PERMAVE"; const std::string PERMAVE::EXPO_0::itemName = "EXPO_0"; -const int PERMAVE::EXPO_0::defaultValue = -1; const std::string PERMAVE::EXPO_1::itemName = "EXPO_1"; -const int PERMAVE::EXPO_1::defaultValue = -1; const std::string PERMAVE::EXPO_2::itemName = "EXPO_2"; -const int PERMAVE::EXPO_2::defaultValue = -1; -PERMFACT::PERMFACT() : ParserKeyword("PERMFACT", KeywordSize("EQLDIMS", "NTEQUL", false, 0)) { +PERMFACT::PERMFACT() : ParserKeyword("PERMFACT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("PERMFACT"); @@ -736,7 +759,6 @@ PERMY::PERMY() : ParserKeyword("PERMY", KeywordSize(1, false)) { } const std::string PERMY::keywordName = "PERMY"; const std::string PERMY::data::itemName = "data"; -const double PERMY::data::defaultValue = 0; PERMYZ::PERMYZ() : ParserKeyword("PERMYZ", KeywordSize(1, false)) { @@ -776,7 +798,6 @@ PERMZ::PERMZ() : ParserKeyword("PERMZ", KeywordSize(1, false)) { } const std::string PERMZ::keywordName = "PERMZ"; const std::string PERMZ::data::itemName = "data"; -const double PERMZ::data::defaultValue = 0; PERMZX::PERMZX() : ParserKeyword("PERMZX", KeywordSize(1, false)) { @@ -910,21 +931,15 @@ const std::string PICOND::keywordName = "PICOND"; const std::string PICOND::MAX_INTERVAL_BELOW_DEWPOINT::itemName = "MAX_INTERVAL_BELOW_DEWPOINT"; const std::string PICOND::MAX_INTERVAL_ABOVE_DEWPOINT::itemName = "MAX_INTERVAL_ABOVE_DEWPOINT"; const std::string PICOND::D_F::itemName = "D_F"; -const double PICOND::D_F::defaultValue = 1.000000; const std::string PICOND::INCLUDE::itemName = "INCLUDE"; const std::string PICOND::INCLUDE::defaultValue = "NO"; const std::string PICOND::F_L::itemName = "F_L"; -const double PICOND::F_L::defaultValue = 0; const std::string PICOND::F_U::itemName = "F_U"; -const double PICOND::F_U::defaultValue = 1.100000; const std::string PICOND::DELTA_WAT_SAT::itemName = "DELTA_WAT_SAT"; const std::string PICOND::DELTA_PRESSURE::itemName = "DELTA_PRESSURE"; const std::string PICOND::DELTA_FRAC_COMP::itemName = "DELTA_FRAC_COMP"; -const double PICOND::DELTA_FRAC_COMP::defaultValue = 0.010000; const std::string PICOND::MAX_DELTA_TIME::itemName = "MAX_DELTA_TIME"; -const double PICOND::MAX_DELTA_TIME::defaultValue = -1.000000; const std::string PICOND::ADAPTIVE_ORD_CONTROL::itemName = "ADAPTIVE_ORD_CONTROL"; -const double PICOND::ADAPTIVE_ORD_CONTROL::defaultValue = -1.000000; const std::string PICOND::ADAPTIVE_ORD_MIN_SPACING::itemName = "ADAPTIVE_ORD_MIN_SPACING"; @@ -949,9 +964,7 @@ PIMTDIMS::PIMTDIMS() : ParserKeyword("PIMTDIMS", KeywordSize(1, false)) { } const std::string PIMTDIMS::keywordName = "PIMTDIMS"; const std::string PIMTDIMS::NTPIMT::itemName = "NTPIMT"; -const int PIMTDIMS::NTPIMT::defaultValue = 0; const std::string PIMTDIMS::NPPIMT::itemName = "NPPIMT"; -const int PIMTDIMS::NPPIMT::defaultValue = 0; PIMULTAB::PIMULTAB() : ParserKeyword("PIMULTAB", KeywordSize("PIMTDIMS", "NTPIMT", false, 0)) { @@ -1010,11 +1023,9 @@ PINCH::PINCH() : ParserKeyword("PINCH", KeywordSize(1, false)) { } const std::string PINCH::keywordName = "PINCH"; const std::string PINCH::THRESHOLD_THICKNESS::itemName = "THRESHOLD_THICKNESS"; -const double PINCH::THRESHOLD_THICKNESS::defaultValue = 0.001000; const std::string PINCH::CONTROL_OPTION::itemName = "CONTROL_OPTION"; const std::string PINCH::CONTROL_OPTION::defaultValue = "GAP"; const std::string PINCH::MAX_EMPTY_GAP::itemName = "MAX_EMPTY_GAP"; -const double PINCH::MAX_EMPTY_GAP::defaultValue = 100000000000000000000.000000; const std::string PINCH::PINCHOUT_OPTION::itemName = "PINCHOUT_OPTION"; const std::string PINCH::PINCHOUT_OPTION::defaultValue = "TOPBOT"; const std::string PINCH::MULTZ_OPTION::itemName = "MULTZ_OPTION"; @@ -1085,11 +1096,9 @@ PINCHREG::PINCHREG() : ParserKeyword("PINCHREG", KeywordSize(SLASH_TERMINATED)) } const std::string PINCHREG::keywordName = "PINCHREG"; const std::string PINCHREG::THRESHOLD_THICKNESS::itemName = "THRESHOLD_THICKNESS"; -const double PINCHREG::THRESHOLD_THICKNESS::defaultValue = 0.001000; const std::string PINCHREG::OPTION1::itemName = "OPTION1"; const std::string PINCHREG::OPTION1::defaultValue = "GAP"; const std::string PINCHREG::MAX_GAP::itemName = "MAX_GAP"; -const double PINCHREG::MAX_GAP::defaultValue = 100000000000000000000.000000; const std::string PINCHREG::OPTION2::itemName = "OPTION2"; const std::string PINCHREG::OPTION2::defaultValue = "TOPBOT"; const std::string PINCHREG::OPTION3::itemName = "OPTION3"; @@ -1119,9 +1128,7 @@ PINCHXY::PINCHXY() : ParserKeyword("PINCHXY", KeywordSize(1, false)) { } const std::string PINCHXY::keywordName = "PINCHXY"; const std::string PINCHXY::THRESHOLD_XR::itemName = "THRESHOLD_XR"; -const double PINCHXY::THRESHOLD_XR::defaultValue = 0.001000; const std::string PINCHXY::THRESHOLD_YTHETA::itemName = "THRESHOLD_YTHETA"; -const double PINCHXY::THRESHOLD_YTHETA::defaultValue = 0.001000; PINTDIMS::PINTDIMS() : ParserKeyword("PINTDIMS", KeywordSize(1, false)) { @@ -1150,11 +1157,8 @@ PINTDIMS::PINTDIMS() : ParserKeyword("PINTDIMS", KeywordSize(1, false)) { } const std::string PINTDIMS::keywordName = "PINTDIMS"; const std::string PINTDIMS::NTSKWAT::itemName = "NTSKWAT"; -const int PINTDIMS::NTSKWAT::defaultValue = 1; const std::string PINTDIMS::NTSKPOLY::itemName = "NTSKPOLY"; -const int PINTDIMS::NTSKPOLY::defaultValue = 1; const std::string PINTDIMS::NTPMWINJ::itemName = "NTPMWINJ"; -const int PINTDIMS::NTPMWINJ::defaultValue = 1; PLMIXNUM::PLMIXNUM() : ParserKeyword("PLMIXNUM", KeywordSize(1, false)) { @@ -1432,7 +1436,6 @@ PLYOPTS::PLYOPTS() : ParserKeyword("PLYOPTS", KeywordSize(1, false)) { } const std::string PLYOPTS::keywordName = "PLYOPTS"; const std::string PLYOPTS::MIN_SWAT::itemName = "MIN_SWAT"; -const double PLYOPTS::MIN_SWAT::defaultValue = 1e-06; PLYRMDEN::PLYRMDEN() : ParserKeyword("PLYRMDEN", KeywordSize(1, false)) { @@ -1494,7 +1497,6 @@ const std::string PLYROCK::IPV::itemName = "IPV"; const std::string PLYROCK::RRF::itemName = "RRF"; const std::string PLYROCK::ROCK_DENSITY::itemName = "ROCK_DENSITY"; const std::string PLYROCK::AI::itemName = "AI"; -const double PLYROCK::AI::defaultValue = 1.000000; const std::string PLYROCK::MAX_ADSORPTION::itemName = "MAX_ADSORPTION"; @@ -1538,7 +1540,6 @@ const std::string PLYROCKM::IPV::itemName = "IPV"; const std::string PLYROCKM::RRF::itemName = "RRF"; const std::string PLYROCKM::ROCK_DENSITY::itemName = "ROCK_DENSITY"; const std::string PLYROCKM::AI::itemName = "AI"; -const double PLYROCKM::AI::defaultValue = 1.000000; const std::string PLYROCKM::MAX_ADSORPTION::itemName = "MAX_ADSORPTION"; @@ -1811,11 +1812,8 @@ PMAX::PMAX() : ParserKeyword("PMAX", KeywordSize(1, false)) { const std::string PMAX::keywordName = "PMAX"; const std::string PMAX::MAX_PRESSURE::itemName = "MAX_PRESSURE"; const std::string PMAX::MAX_PRESSURE_CHECK::itemName = "MAX_PRESSURE_CHECK"; -const double PMAX::MAX_PRESSURE_CHECK::defaultValue = 0; const std::string PMAX::MIN_PRESSURE_CHECK::itemName = "MIN_PRESSURE_CHECK"; -const double PMAX::MIN_PRESSURE_CHECK::defaultValue = 100000000000000000000.000000; const std::string PMAX::NUM_NODES::itemName = "NUM_NODES"; -const int PMAX::NUM_NODES::defaultValue = 30; PMISC::PMISC() : ParserKeyword("PMISC", KeywordSize("MISCIBLE", "NTMISC", false, 0)) { @@ -1838,6 +1836,25 @@ const std::string PMISC::keywordName = "PMISC"; const std::string PMISC::DATA::itemName = "DATA"; +POELCOEF::POELCOEF() : ParserKeyword("POELCOEF", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("POELCOEF"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string POELCOEF::keywordName = "POELCOEF"; +const std::string POELCOEF::data::itemName = "data"; + + POLYMER::POLYMER() : ParserKeyword("POLYMER", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -1872,7 +1889,6 @@ PORO::PORO() : ParserKeyword("PORO", KeywordSize(1, false)) { } const std::string PORO::keywordName = "PORO"; const std::string PORO::data::itemName = "data"; -const double PORO::data::defaultValue = 0; PORV::PORV() : ParserKeyword("PORV", KeywordSize(1, false)) { @@ -1903,6 +1919,7 @@ PPCWMAX::PPCWMAX() : ParserKeyword("PPCWMAX", KeywordSize("TABDIMS", "NTSFUN", f { ParserItem item("MAXIMUM_CAPILLARY_PRESSURE", ParserItem::itype::DOUBLE); item.setDefault( double(100000000000000000000.000000) ); + item.push_backDimension("Pressure"); record.addItem(item); } { @@ -1915,11 +1932,29 @@ PPCWMAX::PPCWMAX() : ParserKeyword("PPCWMAX", KeywordSize("TABDIMS", "NTSFUN", f } const std::string PPCWMAX::keywordName = "PPCWMAX"; const std::string PPCWMAX::MAXIMUM_CAPILLARY_PRESSURE::itemName = "MAXIMUM_CAPILLARY_PRESSURE"; -const double PPCWMAX::MAXIMUM_CAPILLARY_PRESSURE::defaultValue = 100000000000000000000.000000; const std::string PPCWMAX::MODIFY_CONNATE_SATURATION::itemName = "MODIFY_CONNATE_SATURATION"; const std::string PPCWMAX::MODIFY_CONNATE_SATURATION::defaultValue = "NO"; +PRATIO::PRATIO() : ParserKeyword("PRATIO", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("PRATIO"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string PRATIO::keywordName = "PRATIO"; +const std::string PRATIO::data::itemName = "data"; + + PRECSALT::PRECSALT() : ParserKeyword("PRECSALT", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -1928,7 +1963,7 @@ PRECSALT::PRECSALT() : ParserKeyword("PRECSALT", KeywordSize(0, false)) { const std::string PRECSALT::keywordName = "PRECSALT"; -PREF::PREF() : ParserKeyword("PREF", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +PREF::PREF() : ParserKeyword("PREF", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("PREF"); @@ -1947,7 +1982,7 @@ const std::string PREF::keywordName = "PREF"; const std::string PREF::PRESSURE::itemName = "PRESSURE"; -PREFS::PREFS() : ParserKeyword("PREFS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +PREFS::PREFS() : ParserKeyword("PREFS", KeywordSize("TABDIMS", "NUM_EOS_SURFACE", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("PREFS"); @@ -2082,37 +2117,21 @@ PRIORITY::PRIORITY() : ParserKeyword("PRIORITY", KeywordSize(1, false)) { const std::string PRIORITY::keywordName = "PRIORITY"; const std::string PRIORITY::MIN_CALC_TIME::itemName = "MIN_CALC_TIME"; const std::string PRIORITY::A1::itemName = "A1"; -const double PRIORITY::A1::defaultValue = 0; const std::string PRIORITY::B1::itemName = "B1"; -const double PRIORITY::B1::defaultValue = 0; const std::string PRIORITY::C1::itemName = "C1"; -const double PRIORITY::C1::defaultValue = 0; const std::string PRIORITY::D1::itemName = "D1"; -const double PRIORITY::D1::defaultValue = 0; const std::string PRIORITY::E1::itemName = "E1"; -const double PRIORITY::E1::defaultValue = 0; const std::string PRIORITY::F1::itemName = "F1"; -const double PRIORITY::F1::defaultValue = 0; const std::string PRIORITY::G1::itemName = "G1"; -const double PRIORITY::G1::defaultValue = 0; const std::string PRIORITY::H1::itemName = "H1"; -const double PRIORITY::H1::defaultValue = 0; const std::string PRIORITY::A2::itemName = "A2"; -const double PRIORITY::A2::defaultValue = 0; const std::string PRIORITY::B2::itemName = "B2"; -const double PRIORITY::B2::defaultValue = 0; const std::string PRIORITY::C2::itemName = "C2"; -const double PRIORITY::C2::defaultValue = 0; const std::string PRIORITY::D2::itemName = "D2"; -const double PRIORITY::D2::defaultValue = 0; const std::string PRIORITY::E2::itemName = "E2"; -const double PRIORITY::E2::defaultValue = 0; const std::string PRIORITY::F2::itemName = "F2"; -const double PRIORITY::F2::defaultValue = 0; const std::string PRIORITY::G2::itemName = "G2"; -const double PRIORITY::G2::defaultValue = 0; const std::string PRIORITY::H2::itemName = "H2"; -const double PRIORITY::H2::defaultValue = 0; PROPS::PROPS() : ParserKeyword("PROPS", KeywordSize(0, false)) { @@ -2660,13 +2679,9 @@ PVTW::PVTW() : ParserKeyword("PVTW", KeywordSize("TABDIMS", "NTPVT", false, 0)) const std::string PVTW::keywordName = "PVTW"; const std::string PVTW::P_REF::itemName = "P_REF"; const std::string PVTW::WATER_VOL_FACTOR::itemName = "WATER_VOL_FACTOR"; -const double PVTW::WATER_VOL_FACTOR::defaultValue = 1.000000; const std::string PVTW::WATER_COMPRESSIBILITY::itemName = "WATER_COMPRESSIBILITY"; -const double PVTW::WATER_COMPRESSIBILITY::defaultValue = 4e-05; const std::string PVTW::WATER_VISCOSITY::itemName = "WATER_VISCOSITY"; -const double PVTW::WATER_VISCOSITY::defaultValue = 0.500000; const std::string PVTW::WATER_VISCOSIBILITY::itemName = "WATER_VISCOSIBILITY"; -const double PVTW::WATER_VISCOSIBILITY::defaultValue = 0; PVTWSALT::PVTWSALT() : ParserKeyword("PVTWSALT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -2707,7 +2722,6 @@ PVTWSALT::PVTWSALT() : ParserKeyword("PVTWSALT", KeywordSize("TABDIMS", "NTPVT", const std::string PVTWSALT::keywordName = "PVTWSALT"; const std::string PVTWSALT::P_REF::itemName = "P_REF"; const std::string PVTWSALT::SALT_CONCENTRATION_REF::itemName = "SALT_CONCENTRATION_REF"; -const double PVTWSALT::SALT_CONCENTRATION_REF::defaultValue = 0; const std::string PVTWSALT::DATA::itemName = "DATA"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitA.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitA.cpp new file mode 100644 index 0000000000..e75ed38f1e --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitA.cpp @@ -0,0 +1,66 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsA([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( ACF() ); + p.addParserKeyword( ACTCO2S() ); + p.addParserKeyword( ACTDIMS() ); + p.addParserKeyword( ACTION() ); + p.addParserKeyword( ACTIONG() ); + p.addParserKeyword( ACTIONR() ); + p.addParserKeyword( ACTIONS() ); + p.addParserKeyword( ACTIONW() ); + p.addParserKeyword( ACTIONX() ); + p.addParserKeyword( ACTNUM() ); + p.addParserKeyword( ACTPARAM() ); + p.addParserKeyword( ADD() ); + p.addParserKeyword( ADDREG() ); + p.addParserKeyword( ADDZCORN() ); + p.addParserKeyword( ADSALNOD() ); + p.addParserKeyword( ADSORP() ); + p.addParserKeyword( AITS() ); + p.addParserKeyword( AITSOFF() ); + p.addParserKeyword( ALKADS() ); + p.addParserKeyword( ALKALINE() ); + p.addParserKeyword( ALKROCK() ); + p.addParserKeyword( ALL() ); + p.addParserKeyword( ALPOLADS() ); + p.addParserKeyword( ALSURFAD() ); + p.addParserKeyword( ALSURFST() ); + p.addParserKeyword( AMALGAM() ); + p.addParserKeyword( API() ); + p.addParserKeyword( APIGROUP() ); + p.addParserKeyword( APILIM() ); + p.addParserKeyword( APIVD() ); + p.addParserKeyword( AQANCONL() ); + p.addParserKeyword( AQANNC() ); + p.addParserKeyword( AQANTRC() ); + p.addParserKeyword( AQUALIST() ); + p.addParserKeyword( AQUANCON() ); + p.addParserKeyword( AQUCHGAS() ); + p.addParserKeyword( AQUCHWAT() ); + p.addParserKeyword( AQUCON() ); + p.addParserKeyword( AQUCT() ); + p.addParserKeyword( AQUCWFAC() ); + p.addParserKeyword( AQUDIMS() ); + p.addParserKeyword( AQUFET() ); + p.addParserKeyword( AQUFETP() ); + p.addParserKeyword( AQUFLUX() ); + p.addParserKeyword( AQUIFER_PROBE_ANALYTIC() ); + p.addParserKeyword( AQUIFER_PROBE_ANALYTIC_NAMED() ); + p.addParserKeyword( AQUIFER_PROBE_NUMERIC() ); + p.addParserKeyword( AQUNNC() ); + p.addParserKeyword( AQUNUM() ); + p.addParserKeyword( AQUTAB() ); + p.addParserKeyword( AUTOCOAR() ); + p.addParserKeyword( AUTOREF() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitB.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitB.cpp new file mode 100644 index 0000000000..09ec643b70 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitB.cpp @@ -0,0 +1,34 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsB([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( BC() ); + p.addParserKeyword( BCCON() ); + p.addParserKeyword( BCPROP() ); + p.addParserKeyword( BDENSITY() ); + p.addParserKeyword( BGGI() ); + p.addParserKeyword( BIC() ); + p.addParserKeyword( BIGMODEL() ); + p.addParserKeyword( BIOTCOEF() ); + p.addParserKeyword( BLACKOIL() ); + p.addParserKeyword( BLOCK_PROBE() ); + p.addParserKeyword( BLOCK_PROBE300() ); + p.addParserKeyword( BOGI() ); + p.addParserKeyword( BOUNDARY() ); + p.addParserKeyword( BOX() ); + p.addParserKeyword( BPARA() ); + p.addParserKeyword( BPIDIMS() ); + p.addParserKeyword( BRANPROP() ); + p.addParserKeyword( BRINE() ); + p.addParserKeyword( BTOBALFA() ); + p.addParserKeyword( BTOBALFV() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitC.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitC.cpp new file mode 100644 index 0000000000..7aafe1c0e1 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitC.cpp @@ -0,0 +1,65 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsC([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( CALTRAC() ); + p.addParserKeyword( CARFIN() ); + p.addParserKeyword( CART() ); + p.addParserKeyword( CBMOPTS() ); + p.addParserKeyword( CECON() ); + p.addParserKeyword( CECONT() ); + p.addParserKeyword( CIRCLE() ); + p.addParserKeyword( CNAMES() ); + p.addParserKeyword( CO2SOL() ); + p.addParserKeyword( CO2STOR() ); + p.addParserKeyword( CO2STORE() ); + p.addParserKeyword( COAL() ); + p.addParserKeyword( COALADS() ); + p.addParserKeyword( COALNUM() ); + p.addParserKeyword( COALPP() ); + p.addParserKeyword( COARSEN() ); + p.addParserKeyword( COLLAPSE() ); + p.addParserKeyword( COLUMNS() ); + p.addParserKeyword( COMPDAT() ); + p.addParserKeyword( COMPDATX() ); + p.addParserKeyword( COMPFLSH() ); + p.addParserKeyword( COMPIMB() ); + p.addParserKeyword( COMPINJK() ); + p.addParserKeyword( COMPLMPL() ); + p.addParserKeyword( COMPLUMP() ); + p.addParserKeyword( COMPOFF() ); + p.addParserKeyword( COMPORD() ); + p.addParserKeyword( COMPRIV() ); + p.addParserKeyword( COMPRP() ); + p.addParserKeyword( COMPRPL() ); + p.addParserKeyword( COMPS() ); + p.addParserKeyword( COMPSEGL() ); + p.addParserKeyword( COMPSEGS() ); + p.addParserKeyword( COMPTRAJ() ); + p.addParserKeyword( COMPVE() ); + p.addParserKeyword( COMPVEL() ); + p.addParserKeyword( CONNECTION_PROBE() ); + p.addParserKeyword( CONNECTION_PROBE_OPM() ); + p.addParserKeyword( COORD() ); + p.addParserKeyword( COORDSYS() ); + p.addParserKeyword( COPY() ); + p.addParserKeyword( COPYBOX() ); + p.addParserKeyword( COPYREG() ); + p.addParserKeyword( CPIFACT() ); + p.addParserKeyword( CPIFACTL() ); + p.addParserKeyword( CPR() ); + p.addParserKeyword( CREF() ); + p.addParserKeyword( CREFW() ); + p.addParserKeyword( CREFWS() ); + p.addParserKeyword( CRITPERM() ); + p.addParserKeyword( CSKIN() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitD.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitD.cpp new file mode 100644 index 0000000000..93dd88e2f9 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitD.cpp @@ -0,0 +1,89 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsD([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( DATE() ); + p.addParserKeyword( DATES() ); + p.addParserKeyword( DATUM() ); + p.addParserKeyword( DATUMR() ); + p.addParserKeyword( DATUMRX() ); + p.addParserKeyword( DCQDEFN() ); + p.addParserKeyword( DEBUG_() ); + p.addParserKeyword( DELAYACT() ); + p.addParserKeyword( DENAQA() ); + p.addParserKeyword( DENSITY() ); + p.addParserKeyword( DEPTH() ); + p.addParserKeyword( DEPTHTAB() ); + p.addParserKeyword( DEPTHZ() ); + p.addParserKeyword( DIAGDISP() ); + p.addParserKeyword( DIFF() ); + p.addParserKeyword( DIFFAGAS() ); + p.addParserKeyword( DIFFAWAT() ); + p.addParserKeyword( DIFFC() ); + p.addParserKeyword( DIFFCGAS() ); + p.addParserKeyword( DIFFCOAL() ); + p.addParserKeyword( DIFFCWAT() ); + p.addParserKeyword( DIFFDP() ); + p.addParserKeyword( DIFFMMF() ); + p.addParserKeyword( DIFFMR() ); + p.addParserKeyword( DIFFMTHT() ); + p.addParserKeyword( DIFFMX() ); + p.addParserKeyword( DIFFMY() ); + p.addParserKeyword( DIFFMZ() ); + p.addParserKeyword( DIFFR() ); + p.addParserKeyword( DIFFTHT() ); + p.addParserKeyword( DIFFUSE() ); + p.addParserKeyword( DIFFX() ); + p.addParserKeyword( DIFFY() ); + p.addParserKeyword( DIFFZ() ); + p.addParserKeyword( DIMENS() ); + p.addParserKeyword( DIMPES() ); + p.addParserKeyword( DIMPLICT() ); + p.addParserKeyword( DISGAS() ); + p.addParserKeyword( DISGASW() ); + p.addParserKeyword( DISPDIMS() ); + p.addParserKeyword( DISPERC() ); + p.addParserKeyword( DISPERSE() ); + p.addParserKeyword( DOMAINS() ); + p.addParserKeyword( DPGRID() ); + p.addParserKeyword( DPKRMOD() ); + p.addParserKeyword( DPNUM() ); + p.addParserKeyword( DR() ); + p.addParserKeyword( DREF() ); + p.addParserKeyword( DREFS() ); + p.addParserKeyword( DRILPRI() ); + p.addParserKeyword( DRSDT() ); + p.addParserKeyword( DRSDTCON() ); + p.addParserKeyword( DRSDTR() ); + p.addParserKeyword( DRV() ); + p.addParserKeyword( DRVDT() ); + p.addParserKeyword( DRVDTR() ); + p.addParserKeyword( DSPDEINT() ); + p.addParserKeyword( DTHETA() ); + p.addParserKeyword( DTHETAV() ); + p.addParserKeyword( DUALPERM() ); + p.addParserKeyword( DUALPORO() ); + p.addParserKeyword( DUMPCUPL() ); + p.addParserKeyword( DUMPFLUX() ); + p.addParserKeyword( DX() ); + p.addParserKeyword( DXV() ); + p.addParserKeyword( DY() ); + p.addParserKeyword( DYNAMICR() ); + p.addParserKeyword( DYNRDIMS() ); + p.addParserKeyword( DYV() ); + p.addParserKeyword( DZ() ); + p.addParserKeyword( DZMATRIX() ); + p.addParserKeyword( DZMTRX() ); + p.addParserKeyword( DZMTRXV() ); + p.addParserKeyword( DZNET() ); + p.addParserKeyword( DZV() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitE.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitE.cpp new file mode 100644 index 0000000000..1cfbf7823f --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitE.cpp @@ -0,0 +1,54 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsE([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( ECHO() ); + p.addParserKeyword( ECLMC() ); + p.addParserKeyword( EDIT() ); + p.addParserKeyword( EDITNNC() ); + p.addParserKeyword( EDITNNCR() ); + p.addParserKeyword( EHYSTR() ); + p.addParserKeyword( EHYSTRR() ); + p.addParserKeyword( END() ); + p.addParserKeyword( ENDACTIO() ); + p.addParserKeyword( ENDBOX() ); + p.addParserKeyword( ENDDYN() ); + p.addParserKeyword( ENDFIN() ); + p.addParserKeyword( ENDINC() ); + p.addParserKeyword( ENDNUM() ); + p.addParserKeyword( ENDPOINT_SPECIFIERS() ); + p.addParserKeyword( ENDSCALE() ); + p.addParserKeyword( ENDSKIP() ); + p.addParserKeyword( ENKRVD() ); + p.addParserKeyword( ENPCVD() ); + p.addParserKeyword( ENPTVD() ); + p.addParserKeyword( ENSPCVD() ); + p.addParserKeyword( EOS() ); + p.addParserKeyword( EOSNUM() ); + p.addParserKeyword( EPSDBGS() ); + p.addParserKeyword( EPSDEBUG() ); + p.addParserKeyword( EQLDIMS() ); + p.addParserKeyword( EQLNUM() ); + p.addParserKeyword( EQLOPTS() ); + p.addParserKeyword( EQLZCORN() ); + p.addParserKeyword( EQUALREG() ); + p.addParserKeyword( EQUALS() ); + p.addParserKeyword( EQUIL() ); + p.addParserKeyword( ESSNODE() ); + p.addParserKeyword( EXCAVATE() ); + p.addParserKeyword( EXCEL() ); + p.addParserKeyword( EXIT() ); + p.addParserKeyword( EXTFIN() ); + p.addParserKeyword( EXTHOST() ); + p.addParserKeyword( EXTRAPMS() ); + p.addParserKeyword( EXTREPGL() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitF.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitF.cpp new file mode 100644 index 0000000000..2a3af87863 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitF.cpp @@ -0,0 +1,53 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsF([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( FAULTDIM() ); + p.addParserKeyword( FAULTS() ); + p.addParserKeyword( FBHPDEF() ); + p.addParserKeyword( FHERCHBL() ); + p.addParserKeyword( FIELD() ); + p.addParserKeyword( FIELDSEP() ); + p.addParserKeyword( FIELD_PROBE() ); + p.addParserKeyword( FIELD_PROBE_OPM() ); + p.addParserKeyword( FILEUNIT() ); + p.addParserKeyword( FILLEPS() ); + p.addParserKeyword( FIPNUM() ); + p.addParserKeyword( FIPOWG() ); + p.addParserKeyword( FIPSEP() ); + p.addParserKeyword( FIP_PROBE() ); + p.addParserKeyword( FLUXNUM() ); + p.addParserKeyword( FLUXREG() ); + p.addParserKeyword( FLUXTYPE() ); + p.addParserKeyword( FMTHMD() ); + p.addParserKeyword( FMTIN() ); + p.addParserKeyword( FMTOUT() ); + p.addParserKeyword( FMWSET() ); + p.addParserKeyword( FOAM() ); + p.addParserKeyword( FOAMADS() ); + p.addParserKeyword( FOAMDCYO() ); + p.addParserKeyword( FOAMDCYW() ); + p.addParserKeyword( FOAMFCN() ); + p.addParserKeyword( FOAMFRM() ); + p.addParserKeyword( FOAMFSC() ); + p.addParserKeyword( FOAMFSO() ); + p.addParserKeyword( FOAMFST() ); + p.addParserKeyword( FOAMFSW() ); + p.addParserKeyword( FOAMMOB() ); + p.addParserKeyword( FOAMMOBP() ); + p.addParserKeyword( FOAMMOBS() ); + p.addParserKeyword( FOAMOPTS() ); + p.addParserKeyword( FOAMROCK() ); + p.addParserKeyword( FORMFEED() ); + p.addParserKeyword( FRICTION() ); + p.addParserKeyword( FULLIMP() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitG.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitG.cpp new file mode 100644 index 0000000000..3ebf5094f6 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitG.cpp @@ -0,0 +1,100 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsG([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( GAS() ); + p.addParserKeyword( GASBEGIN() ); + p.addParserKeyword( GASCONC() ); + p.addParserKeyword( GASDENT() ); + p.addParserKeyword( GASEND() ); + p.addParserKeyword( GASFCOMP() ); + p.addParserKeyword( GASFDECR() ); + p.addParserKeyword( GASFDELC() ); + p.addParserKeyword( GASFIELD() ); + p.addParserKeyword( GASFTARG() ); + p.addParserKeyword( GASJT() ); + p.addParserKeyword( GASMONTH() ); + p.addParserKeyword( GASPERIO() ); + p.addParserKeyword( GASSATC() ); + p.addParserKeyword( GASVISCT() ); + p.addParserKeyword( GASWAT() ); + p.addParserKeyword( GASYEAR() ); + p.addParserKeyword( GCALECON() ); + p.addParserKeyword( GCOMPIDX() ); + p.addParserKeyword( GCONCAL() ); + p.addParserKeyword( GCONENG() ); + p.addParserKeyword( GCONINJE() ); + p.addParserKeyword( GCONPRI() ); + p.addParserKeyword( GCONPROD() ); + p.addParserKeyword( GCONSALE() ); + p.addParserKeyword( GCONSUMP() ); + p.addParserKeyword( GCONTOL() ); + p.addParserKeyword( GCUTBACK() ); + p.addParserKeyword( GCUTBACT() ); + p.addParserKeyword( GCVD() ); + p.addParserKeyword( GDCQ() ); + p.addParserKeyword( GDCQECON() ); + p.addParserKeyword( GDFILE() ); + p.addParserKeyword( GDIMS() ); + p.addParserKeyword( GDORIENT() ); + p.addParserKeyword( GDRILPOT() ); + p.addParserKeyword( GECON() ); + p.addParserKeyword( GECONT() ); + p.addParserKeyword( GEFAC() ); + p.addParserKeyword( GETDATA() ); + p.addParserKeyword( GETGLOB() ); + p.addParserKeyword( GI() ); + p.addParserKeyword( GIALL() ); + p.addParserKeyword( GIMODEL() ); + p.addParserKeyword( GINODE() ); + p.addParserKeyword( GLIFTLIM() ); + p.addParserKeyword( GLIFTOPT() ); + p.addParserKeyword( GMWSET() ); + p.addParserKeyword( GNETDP() ); + p.addParserKeyword( GNETINJE() ); + p.addParserKeyword( GNETPUMP() ); + p.addParserKeyword( GPMAINT() ); + p.addParserKeyword( GRADGRUP() ); + p.addParserKeyword( GRADRESV() ); + p.addParserKeyword( GRADRFT() ); + p.addParserKeyword( GRADWELL() ); + p.addParserKeyword( GRAVCONS() ); + p.addParserKeyword( GRAVDR() ); + p.addParserKeyword( GRAVDRB() ); + p.addParserKeyword( GRAVDRM() ); + p.addParserKeyword( GRAVITY() ); + p.addParserKeyword( GRDREACH() ); + p.addParserKeyword( GRID() ); + p.addParserKeyword( GRIDFILE() ); + p.addParserKeyword( GRIDOPTS() ); + p.addParserKeyword( GRIDUNIT() ); + p.addParserKeyword( GROUP_PROBE() ); + p.addParserKeyword( GROUP_PROBE_OPM() ); + p.addParserKeyword( GRUPMAST() ); + p.addParserKeyword( GRUPNET() ); + p.addParserKeyword( GRUPRIG() ); + p.addParserKeyword( GRUPSLAV() ); + p.addParserKeyword( GRUPTARG() ); + p.addParserKeyword( GRUPTREE() ); + p.addParserKeyword( GSATINJE() ); + p.addParserKeyword( GSATPROD() ); + p.addParserKeyword( GSEPCOND() ); + p.addParserKeyword( GSF() ); + p.addParserKeyword( GSSCPTST() ); + p.addParserKeyword( GSWINGF() ); + p.addParserKeyword( GTADD() ); + p.addParserKeyword( GTMULT() ); + p.addParserKeyword( GUIDECAL() ); + p.addParserKeyword( GUIDERAT() ); + p.addParserKeyword( GUPFREQ() ); + p.addParserKeyword( GWRTWCV() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitH.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitH.cpp new file mode 100644 index 0000000000..3bd3d2d15a --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitH.cpp @@ -0,0 +1,63 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsH([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( H2SOL() ); + p.addParserKeyword( H2STORE() ); + p.addParserKeyword( HALFTRAN() ); + p.addParserKeyword( HAxxxxxx() ); + p.addParserKeyword( HBNUM() ); + p.addParserKeyword( HDISP() ); + p.addParserKeyword( HEATCR() ); + p.addParserKeyword( HEATCRT() ); + p.addParserKeyword( HMAQUCT() ); + p.addParserKeyword( HMAQUFET() ); + p.addParserKeyword( HMAQUNUM() ); + p.addParserKeyword( HMDIMS() ); + p.addParserKeyword( HMFAULTS() ); + p.addParserKeyword( HMMLAQUN() ); + p.addParserKeyword( HMMLCTAQ() ); + p.addParserKeyword( HMMLFTAQ() ); + p.addParserKeyword( HMMLTWCN() ); + p.addParserKeyword( HMMULTFT() ); + p.addParserKeyword( HMMULTSG() ); + p.addParserKeyword( HMMULTxx() ); + p.addParserKeyword( HMPROPS() ); + p.addParserKeyword( HMROCK() ); + p.addParserKeyword( HMROCKT() ); + p.addParserKeyword( HMRREF() ); + p.addParserKeyword( HMWELCON() ); + p.addParserKeyword( HMWPIMLT() ); + p.addParserKeyword( HMxxxxxx() ); + p.addParserKeyword( HRFIN() ); + p.addParserKeyword( HWELLS() ); + p.addParserKeyword( HWKRO() ); + p.addParserKeyword( HWKRORG() ); + p.addParserKeyword( HWKRORW() ); + p.addParserKeyword( HWKRW() ); + p.addParserKeyword( HWKRWR() ); + p.addParserKeyword( HWPCW() ); + p.addParserKeyword( HWSNUM() ); + p.addParserKeyword( HWSOGCR() ); + p.addParserKeyword( HWSOWCR() ); + p.addParserKeyword( HWSWCR() ); + p.addParserKeyword( HWSWL() ); + p.addParserKeyword( HWSWLPC() ); + p.addParserKeyword( HWSWU() ); + p.addParserKeyword( HXFIN() ); + p.addParserKeyword( HYDRHEAD() ); + p.addParserKeyword( HYFIN() ); + p.addParserKeyword( HYMOBGDR() ); + p.addParserKeyword( HYST() ); + p.addParserKeyword( HYSTCHCK() ); + p.addParserKeyword( HZFIN() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitI.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitI.cpp new file mode 100644 index 0000000000..0a8e8fecef --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitI.cpp @@ -0,0 +1,45 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsI([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( IHOST() ); + p.addParserKeyword( IMBNUM() ); + p.addParserKeyword( IMBNUMMF() ); + p.addParserKeyword( IMKRVD() ); + p.addParserKeyword( IMPCVD() ); + p.addParserKeyword( IMPES() ); + p.addParserKeyword( IMPLICIT() ); + p.addParserKeyword( IMPORT() ); + p.addParserKeyword( IMPTVD() ); + p.addParserKeyword( IMSPCVD() ); + p.addParserKeyword( INCLUDE() ); + p.addParserKeyword( INIT() ); + p.addParserKeyword( INRAD() ); + p.addParserKeyword( INSPEC() ); + p.addParserKeyword( INTPC() ); + p.addParserKeyword( IONROCK() ); + p.addParserKeyword( IONXROCK() ); + p.addParserKeyword( IONXSURF() ); + p.addParserKeyword( IPCG() ); + p.addParserKeyword( IPCW() ); + p.addParserKeyword( ISGCR() ); + p.addParserKeyword( ISGL() ); + p.addParserKeyword( ISGLPC() ); + p.addParserKeyword( ISGU() ); + p.addParserKeyword( ISOGCR() ); + p.addParserKeyword( ISOLNUM() ); + p.addParserKeyword( ISOWCR() ); + p.addParserKeyword( ISWCR() ); + p.addParserKeyword( ISWL() ); + p.addParserKeyword( ISWLPC() ); + p.addParserKeyword( ISWU() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitJ.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitJ.cpp new file mode 100644 index 0000000000..f8e7d90627 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitJ.cpp @@ -0,0 +1,16 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsJ([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( JFUNC() ); + p.addParserKeyword( JFUNCR() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitK.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitK.cpp new file mode 100644 index 0000000000..8a479901d4 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitK.cpp @@ -0,0 +1,16 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsK([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( KRNUM() ); + p.addParserKeyword( KRNUMMF() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitL.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitL.cpp new file mode 100644 index 0000000000..bd7cbd6278 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitL.cpp @@ -0,0 +1,68 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsL([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( LAB() ); + p.addParserKeyword( LANGMPL() ); + p.addParserKeyword( LANGMUIR() ); + p.addParserKeyword( LANGSOLV() ); + p.addParserKeyword( LCUNIT() ); + p.addParserKeyword( LGR() ); + p.addParserKeyword( LGRCOPY() ); + p.addParserKeyword( LGRFREE() ); + p.addParserKeyword( LGRLOCK() ); + p.addParserKeyword( LGROFF() ); + p.addParserKeyword( LGRON() ); + p.addParserKeyword( LICENSES() ); + p.addParserKeyword( LIFTOPT() ); + p.addParserKeyword( LINCOM() ); + p.addParserKeyword( LINKPERM() ); + p.addParserKeyword( LIVEOIL() ); + p.addParserKeyword( LKRO() ); + p.addParserKeyword( LKRORG() ); + p.addParserKeyword( LKRORW() ); + p.addParserKeyword( LKRW() ); + p.addParserKeyword( LKRWR() ); + p.addParserKeyword( LOAD() ); + p.addParserKeyword( LOWSALT() ); + p.addParserKeyword( LPCW() ); + p.addParserKeyword( LSALTFNC() ); + p.addParserKeyword( LSLTWNUM() ); + p.addParserKeyword( LSNUM() ); + p.addParserKeyword( LSOGCR() ); + p.addParserKeyword( LSOWCR() ); + p.addParserKeyword( LSWCR() ); + p.addParserKeyword( LSWL() ); + p.addParserKeyword( LSWLPC() ); + p.addParserKeyword( LSWU() ); + p.addParserKeyword( LTOSIGMA() ); + p.addParserKeyword( LWKRO() ); + p.addParserKeyword( LWKRORG() ); + p.addParserKeyword( LWKRORW() ); + p.addParserKeyword( LWKRW() ); + p.addParserKeyword( LWKRWR() ); + p.addParserKeyword( LWPCW() ); + p.addParserKeyword( LWSLTNUM() ); + p.addParserKeyword( LWSNUM() ); + p.addParserKeyword( LWSOGCR() ); + p.addParserKeyword( LWSOWCR() ); + p.addParserKeyword( LWSWCR() ); + p.addParserKeyword( LWSWL() ); + p.addParserKeyword( LWSWLPC() ); + p.addParserKeyword( LWSWU() ); + p.addParserKeyword( LX() ); + p.addParserKeyword( LXFIN() ); + p.addParserKeyword( LY() ); + p.addParserKeyword( LYFIN() ); + p.addParserKeyword( LZ() ); + p.addParserKeyword( LZFIN() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitM.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitM.cpp new file mode 100644 index 0000000000..90e0f62786 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitM.cpp @@ -0,0 +1,65 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsM([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( MAPAXES() ); + p.addParserKeyword( MAPUNITS() ); + p.addParserKeyword( MASSFLOW() ); + p.addParserKeyword( MATCORR() ); + p.addParserKeyword( MAXVALUE() ); + p.addParserKeyword( MECH() ); + p.addParserKeyword( MEMORY() ); + p.addParserKeyword( MESSAGE() ); + p.addParserKeyword( MESSAGES() ); + p.addParserKeyword( MESSOPTS() ); + p.addParserKeyword( MESSSRVC() ); + p.addParserKeyword( METRIC() ); + p.addParserKeyword( MICP() ); + p.addParserKeyword( MICPPARA() ); + p.addParserKeyword( MINNNCT() ); + p.addParserKeyword( MINNPCOL() ); + p.addParserKeyword( MINPORV() ); + p.addParserKeyword( MINPV() ); + p.addParserKeyword( MINPVV() ); + p.addParserKeyword( MINVALUE() ); + p.addParserKeyword( MISC() ); + p.addParserKeyword( MISCIBLE() ); + p.addParserKeyword( MISCNUM() ); + p.addParserKeyword( MLANG() ); + p.addParserKeyword( MLANGSLV() ); + p.addParserKeyword( MONITOR() ); + p.addParserKeyword( MPFANUM() ); + p.addParserKeyword( MPFNNC() ); + p.addParserKeyword( MSFN() ); + p.addParserKeyword( MSGFILE() ); + p.addParserKeyword( MSUM_PROBE() ); + p.addParserKeyword( MULSGGD() ); + p.addParserKeyword( MULSGGDV() ); + p.addParserKeyword( MULTFLT() ); + p.addParserKeyword( MULTIN() ); + p.addParserKeyword( MULTIPLY() ); + p.addParserKeyword( MULTIREG() ); + p.addParserKeyword( MULTNUM() ); + p.addParserKeyword( MULTOUT() ); + p.addParserKeyword( MULTOUTS() ); + p.addParserKeyword( MULTPV() ); + p.addParserKeyword( MULTREAL() ); + p.addParserKeyword( MULTREGD() ); + p.addParserKeyword( MULTREGH() ); + p.addParserKeyword( MULTREGP() ); + p.addParserKeyword( MULTREGT() ); + p.addParserKeyword( MULTSIG() ); + p.addParserKeyword( MULTSIGV() ); + p.addParserKeyword( MULT_XYZ() ); + p.addParserKeyword( MW() ); + p.addParserKeyword( MWS() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitN.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitN.cpp new file mode 100644 index 0000000000..cc5955862e --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitN.cpp @@ -0,0 +1,57 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsN([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( NARROW() ); + p.addParserKeyword( NCOMPS() ); + p.addParserKeyword( NCONSUMP() ); + p.addParserKeyword( NEFAC() ); + p.addParserKeyword( NETBALAN() ); + p.addParserKeyword( NETCOMPA() ); + p.addParserKeyword( NETWORK() ); + p.addParserKeyword( NETWORK_PROBE() ); + p.addParserKeyword( NEWTRAN() ); + p.addParserKeyword( NEXTSTEP() ); + p.addParserKeyword( NEXTSTPL() ); + p.addParserKeyword( NINENUM() ); + p.addParserKeyword( NINEPOIN() ); + p.addParserKeyword( NMATOPTS() ); + p.addParserKeyword( NMATRIX() ); + p.addParserKeyword( NMESSAGE() ); + p.addParserKeyword( NNC() ); + p.addParserKeyword( NNEWTF() ); + p.addParserKeyword( NOCASC() ); + p.addParserKeyword( NODEPROP() ); + p.addParserKeyword( NODPPM() ); + p.addParserKeyword( NOECHO() ); + p.addParserKeyword( NOGGF() ); + p.addParserKeyword( NOGRAV() ); + p.addParserKeyword( NOHMD() ); + p.addParserKeyword( NOHMO() ); + p.addParserKeyword( NOHYST() ); + p.addParserKeyword( NOINSPEC() ); + p.addParserKeyword( NOMONITO() ); + p.addParserKeyword( NONNC() ); + p.addParserKeyword( NORSSPEC() ); + p.addParserKeyword( NOSIM() ); + p.addParserKeyword( NOWARN() ); + p.addParserKeyword( NOWARNEP() ); + p.addParserKeyword( NRSOUT() ); + p.addParserKeyword( NSTACK() ); + p.addParserKeyword( NTG() ); + p.addParserKeyword( NUMRES() ); + p.addParserKeyword( NUPCOL() ); + p.addParserKeyword( NWATREM() ); + p.addParserKeyword( NXFIN() ); + p.addParserKeyword( NYFIN() ); + p.addParserKeyword( NZFIN() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitO.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitO.cpp new file mode 100644 index 0000000000..1be158cca9 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitO.cpp @@ -0,0 +1,34 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsO([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( OCOMPIDX() ); + p.addParserKeyword( OFM() ); + p.addParserKeyword( OIL() ); + p.addParserKeyword( OILAPI() ); + p.addParserKeyword( OILCOMPR() ); + p.addParserKeyword( OILDENT() ); + p.addParserKeyword( OILJT() ); + p.addParserKeyword( OILMW() ); + p.addParserKeyword( OILVISCT() ); + p.addParserKeyword( OILVTIM() ); + p.addParserKeyword( OLDTRAN() ); + p.addParserKeyword( OLDTRANR() ); + p.addParserKeyword( OPERATE() ); + p.addParserKeyword( OPERATER() ); + p.addParserKeyword( OPERNUM() ); + p.addParserKeyword( OPTIONS() ); + p.addParserKeyword( OPTIONS3() ); + p.addParserKeyword( OUTRAD() ); + p.addParserKeyword( OUTSOL() ); + p.addParserKeyword( OVERBURD() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitP.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitP.cpp new file mode 100644 index 0000000000..8a69236153 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitP.cpp @@ -0,0 +1,118 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsP([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( PARALLEL() ); + p.addParserKeyword( PARAOPTS() ); + p.addParserKeyword( PARTTRAC() ); + p.addParserKeyword( PATHS() ); + p.addParserKeyword( PBUB() ); + p.addParserKeyword( PBVD() ); + p.addParserKeyword( PCFACT() ); + p.addParserKeyword( PCG() ); + p.addParserKeyword( PCG32D() ); + p.addParserKeyword( PCRIT() ); + p.addParserKeyword( PCW() ); + p.addParserKeyword( PCW32D() ); + p.addParserKeyword( PDEW() ); + p.addParserKeyword( PDVD() ); + p.addParserKeyword( PEBI() ); + p.addParserKeyword( PECOEFS() ); + p.addParserKeyword( PEDIMS() ); + p.addParserKeyword( PEGTABX() ); + p.addParserKeyword( PEKTABX() ); + p.addParserKeyword( PENUM() ); + p.addParserKeyword( PERFORMANCE_PROBE() ); + p.addParserKeyword( PERMAVE() ); + p.addParserKeyword( PERMFACT() ); + p.addParserKeyword( PERMJFUN() ); + p.addParserKeyword( PERMR() ); + p.addParserKeyword( PERMTHT() ); + p.addParserKeyword( PERMX() ); + p.addParserKeyword( PERMXY() ); + p.addParserKeyword( PERMY() ); + p.addParserKeyword( PERMYZ() ); + p.addParserKeyword( PERMZ() ); + p.addParserKeyword( PERMZX() ); + p.addParserKeyword( PETGRID() ); + p.addParserKeyword( PETOPTS() ); + p.addParserKeyword( PICOND() ); + p.addParserKeyword( PIMTDIMS() ); + p.addParserKeyword( PIMULTAB() ); + p.addParserKeyword( PINCH() ); + p.addParserKeyword( PINCHNUM() ); + p.addParserKeyword( PINCHOUT() ); + p.addParserKeyword( PINCHREG() ); + p.addParserKeyword( PINCHXY() ); + p.addParserKeyword( PINTDIMS() ); + p.addParserKeyword( PLMIXNUM() ); + p.addParserKeyword( PLMIXPAR() ); + p.addParserKeyword( PLYADS() ); + p.addParserKeyword( PLYADSS() ); + p.addParserKeyword( PLYATEMP() ); + p.addParserKeyword( PLYCAMAX() ); + p.addParserKeyword( PLYDHFLF() ); + p.addParserKeyword( PLYESAL() ); + p.addParserKeyword( PLYKRRF() ); + p.addParserKeyword( PLYMAX() ); + p.addParserKeyword( PLYMWINJ() ); + p.addParserKeyword( PLYOPTS() ); + p.addParserKeyword( PLYRMDEN() ); + p.addParserKeyword( PLYROCK() ); + p.addParserKeyword( PLYROCKM() ); + p.addParserKeyword( PLYSHEAR() ); + p.addParserKeyword( PLYSHLOG() ); + p.addParserKeyword( PLYTRRF() ); + p.addParserKeyword( PLYTRRFA() ); + p.addParserKeyword( PLYVISC() ); + p.addParserKeyword( PLYVISCS() ); + p.addParserKeyword( PLYVISCT() ); + p.addParserKeyword( PLYVMH() ); + p.addParserKeyword( PLYVSCST() ); + p.addParserKeyword( PMAX() ); + p.addParserKeyword( PMISC() ); + p.addParserKeyword( POELCOEF() ); + p.addParserKeyword( POLYMER() ); + p.addParserKeyword( POLYMW() ); + p.addParserKeyword( PORO() ); + p.addParserKeyword( PORV() ); + p.addParserKeyword( PPCWMAX() ); + p.addParserKeyword( PRATIO() ); + p.addParserKeyword( PRECSALT() ); + p.addParserKeyword( PREF() ); + p.addParserKeyword( PREFS() ); + p.addParserKeyword( PRESSURE() ); + p.addParserKeyword( PRIORITY() ); + p.addParserKeyword( PROPS() ); + p.addParserKeyword( PRORDER() ); + p.addParserKeyword( PRVD() ); + p.addParserKeyword( PSTEADY() ); + p.addParserKeyword( PSWRG() ); + p.addParserKeyword( PSWRO() ); + p.addParserKeyword( PVCDO() ); + p.addParserKeyword( PVCO() ); + p.addParserKeyword( PVDG() ); + p.addParserKeyword( PVDO() ); + p.addParserKeyword( PVDS() ); + p.addParserKeyword( PVTG() ); + p.addParserKeyword( PVTGW() ); + p.addParserKeyword( PVTGWO() ); + p.addParserKeyword( PVTNUM() ); + p.addParserKeyword( PVTO() ); + p.addParserKeyword( PVTSOL() ); + p.addParserKeyword( PVTW() ); + p.addParserKeyword( PVTWSALT() ); + p.addParserKeyword( PVT_M() ); + p.addParserKeyword( PVZG() ); + p.addParserKeyword( PYACTION() ); + p.addParserKeyword( PYINPUT() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitQ.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitQ.cpp new file mode 100644 index 0000000000..35fbb78808 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitQ.cpp @@ -0,0 +1,17 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsQ([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( QDRILL() ); + p.addParserKeyword( QHRATING() ); + p.addParserKeyword( QMOBIL() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitR.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitR.cpp new file mode 100644 index 0000000000..bfe3a56a52 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitR.cpp @@ -0,0 +1,92 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsR([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( RADFIN() ); + p.addParserKeyword( RADFIN4() ); + p.addParserKeyword( RADIAL() ); + p.addParserKeyword( RAINFALL() ); + p.addParserKeyword( RBEDCONT() ); + p.addParserKeyword( RCMASTS() ); + p.addParserKeyword( REACHES() ); + p.addParserKeyword( READDATA() ); + p.addParserKeyword( REFINE() ); + p.addParserKeyword( REGDIMS() ); + p.addParserKeyword( REGION2REGION_PROBE() ); + p.addParserKeyword( REGION2REGION_PROBE_E300() ); + p.addParserKeyword( REGIONS() ); + p.addParserKeyword( REGION_PROBE() ); + p.addParserKeyword( REGION_PROBE_OPM() ); + p.addParserKeyword( RESIDNUM() ); + p.addParserKeyword( RESTART() ); + p.addParserKeyword( RESVNUM() ); + p.addParserKeyword( RHO() ); + p.addParserKeyword( RIVDEBUG() ); + p.addParserKeyword( RIVERSYS() ); + p.addParserKeyword( RIVRDIMS() ); + p.addParserKeyword( RIVRPROP() ); + p.addParserKeyword( RIVRXSEC() ); + p.addParserKeyword( RIVSALT() ); + p.addParserKeyword( RIVTRACE() ); + p.addParserKeyword( RKTRMDIR() ); + p.addParserKeyword( ROCK() ); + p.addParserKeyword( ROCK2D() ); + p.addParserKeyword( ROCK2DTR() ); + p.addParserKeyword( ROCKCOMP() ); + p.addParserKeyword( ROCKFRAC() ); + p.addParserKeyword( ROCKNUM() ); + p.addParserKeyword( ROCKOPTS() ); + p.addParserKeyword( ROCKPAMA() ); + p.addParserKeyword( ROCKTAB() ); + p.addParserKeyword( ROCKTABH() ); + p.addParserKeyword( ROCKTABW() ); + p.addParserKeyword( ROCKTHSG() ); + p.addParserKeyword( ROCKTSIG() ); + p.addParserKeyword( ROCKV() ); + p.addParserKeyword( ROCKWNOD() ); + p.addParserKeyword( RPTCPL() ); + p.addParserKeyword( RPTGRID() ); + p.addParserKeyword( RPTGRIDL() ); + p.addParserKeyword( RPTHMD() ); + p.addParserKeyword( RPTHMG() ); + p.addParserKeyword( RPTHMW() ); + p.addParserKeyword( RPTINIT() ); + p.addParserKeyword( RPTISOL() ); + p.addParserKeyword( RPTONLY() ); + p.addParserKeyword( RPTONLYO() ); + p.addParserKeyword( RPTPROPS() ); + p.addParserKeyword( RPTREGS() ); + p.addParserKeyword( RPTRST() ); + p.addParserKeyword( RPTRUNSP() ); + p.addParserKeyword( RPTSCHED() ); + p.addParserKeyword( RPTSMRY() ); + p.addParserKeyword( RPTSOL() ); + p.addParserKeyword( RS() ); + p.addParserKeyword( RSCONST() ); + p.addParserKeyword( RSCONSTT() ); + p.addParserKeyword( RSGI() ); + p.addParserKeyword( RSSPEC() ); + p.addParserKeyword( RSVD() ); + p.addParserKeyword( RTEMP() ); + p.addParserKeyword( RTEMPA() ); + p.addParserKeyword( RTEMPVD() ); + p.addParserKeyword( RUNSPEC() ); + p.addParserKeyword( RUNSUM() ); + p.addParserKeyword( RV() ); + p.addParserKeyword( RVCONST() ); + p.addParserKeyword( RVCONSTT() ); + p.addParserKeyword( RVGI() ); + p.addParserKeyword( RVVD() ); + p.addParserKeyword( RVW() ); + p.addParserKeyword( RVWVD() ); + p.addParserKeyword( RWGSALT() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitS.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitS.cpp new file mode 100644 index 0000000000..0fb48fbaeb --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitS.cpp @@ -0,0 +1,152 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsS([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( SALINITY() ); + p.addParserKeyword( SALT() ); + p.addParserKeyword( SALTMF() ); + p.addParserKeyword( SALTNODE() ); + p.addParserKeyword( SALTP() ); + p.addParserKeyword( SALTPVD() ); + p.addParserKeyword( SALTREST() ); + p.addParserKeyword( SALTSOL() ); + p.addParserKeyword( SALTVD() ); + p.addParserKeyword( SAMG() ); + p.addParserKeyword( SATNUM() ); + p.addParserKeyword( SATOPTS() ); + p.addParserKeyword( SAVE() ); + p.addParserKeyword( SBIOF() ); + p.addParserKeyword( SCALC() ); + p.addParserKeyword( SCALECRS() ); + p.addParserKeyword( SCALELIM() ); + p.addParserKeyword( SCDATAB() ); + p.addParserKeyword( SCDETAB() ); + p.addParserKeyword( SCDPDIMS() ); + p.addParserKeyword( SCDPTAB() ); + p.addParserKeyword( SCDPTRAC() ); + p.addParserKeyword( SCHEDULE() ); + p.addParserKeyword( SCVD() ); + p.addParserKeyword( SDENSITY() ); + p.addParserKeyword( SEGMENT_PROBE() ); + p.addParserKeyword( SEPARATE() ); + p.addParserKeyword( SEPVALS() ); + p.addParserKeyword( SFOAM() ); + p.addParserKeyword( SGAS() ); + p.addParserKeyword( SGCR() ); + p.addParserKeyword( SGCWMIS() ); + p.addParserKeyword( SGF32D() ); + p.addParserKeyword( SGFN() ); + p.addParserKeyword( SGL() ); + p.addParserKeyword( SGLPC() ); + p.addParserKeyword( SGOF() ); + p.addParserKeyword( SGOFLET() ); + p.addParserKeyword( SGU() ); + p.addParserKeyword( SGWFN() ); + p.addParserKeyword( SHRATE() ); + p.addParserKeyword( SIGMA() ); + p.addParserKeyword( SIGMAGDV() ); + p.addParserKeyword( SIGMATH() ); + p.addParserKeyword( SIGMAV() ); + p.addParserKeyword( SIMULATE() ); + p.addParserKeyword( SKIP() ); + p.addParserKeyword( SKIP100() ); + p.addParserKeyword( SKIP300() ); + p.addParserKeyword( SKIPREST() ); + p.addParserKeyword( SKPRPOLY() ); + p.addParserKeyword( SKPRWAT() ); + p.addParserKeyword( SKRO() ); + p.addParserKeyword( SKRORG() ); + p.addParserKeyword( SKRORW() ); + p.addParserKeyword( SKRW() ); + p.addParserKeyword( SKRWR() ); + p.addParserKeyword( SLAVES() ); + p.addParserKeyword( SLGOF() ); + p.addParserKeyword( SMICR() ); + p.addParserKeyword( SMRYDIMS() ); + p.addParserKeyword( SMULTX() ); + p.addParserKeyword( SMULTY() ); + p.addParserKeyword( SMULTZ() ); + p.addParserKeyword( SOCRS() ); + p.addParserKeyword( SOF2() ); + p.addParserKeyword( SOF3() ); + p.addParserKeyword( SOF32D() ); + p.addParserKeyword( SOGCR() ); + p.addParserKeyword( SOIL() ); + p.addParserKeyword( SOLID() ); + p.addParserKeyword( SOLUTION() ); + p.addParserKeyword( SOLVCONC() ); + p.addParserKeyword( SOLVDIMS() ); + p.addParserKeyword( SOLVDIRS() ); + p.addParserKeyword( SOLVENT() ); + p.addParserKeyword( SOLVFRAC() ); + p.addParserKeyword( SOLVNUM() ); + p.addParserKeyword( SOMGAS() ); + p.addParserKeyword( SOMWAT() ); + p.addParserKeyword( SORWMIS() ); + p.addParserKeyword( SOURCE() ); + p.addParserKeyword( SOWCR() ); + p.addParserKeyword( SOXYG() ); + p.addParserKeyword( SPECGRID() ); + p.addParserKeyword( SPECHEAT() ); + p.addParserKeyword( SPECROCK() ); + p.addParserKeyword( SPIDER() ); + p.addParserKeyword( SPOLY() ); + p.addParserKeyword( SPOLYMW() ); + p.addParserKeyword( SSFN() ); + p.addParserKeyword( SSGCR() ); + p.addParserKeyword( SSGL() ); + p.addParserKeyword( SSOGCR() ); + p.addParserKeyword( SSOL() ); + p.addParserKeyword( SSOWCR() ); + p.addParserKeyword( SSWCR() ); + p.addParserKeyword( SSWL() ); + p.addParserKeyword( SSWU() ); + p.addParserKeyword( START() ); + p.addParserKeyword( STCOND() ); + p.addParserKeyword( STOG() ); + p.addParserKeyword( STONE() ); + p.addParserKeyword( STONE1() ); + p.addParserKeyword( STONE1EX() ); + p.addParserKeyword( STONE2() ); + p.addParserKeyword( STOW() ); + p.addParserKeyword( STREQUIL() ); + p.addParserKeyword( STRESSEQUILNUM() ); + p.addParserKeyword( STWG() ); + p.addParserKeyword( SUMMARY() ); + p.addParserKeyword( SUMTHIN() ); + p.addParserKeyword( SUREA() ); + p.addParserKeyword( SURF() ); + p.addParserKeyword( SURFACT() ); + p.addParserKeyword( SURFACTW() ); + p.addParserKeyword( SURFADDW() ); + p.addParserKeyword( SURFADS() ); + p.addParserKeyword( SURFCAPD() ); + p.addParserKeyword( SURFESAL() ); + p.addParserKeyword( SURFNUM() ); + p.addParserKeyword( SURFOPTS() ); + p.addParserKeyword( SURFROCK() ); + p.addParserKeyword( SURFST() ); + p.addParserKeyword( SURFSTES() ); + p.addParserKeyword( SURFVISC() ); + p.addParserKeyword( SURFWNUM() ); + p.addParserKeyword( SWAT() ); + p.addParserKeyword( SWATINIT() ); + p.addParserKeyword( SWCR() ); + p.addParserKeyword( SWF32D() ); + p.addParserKeyword( SWFN() ); + p.addParserKeyword( SWINGFAC() ); + p.addParserKeyword( SWL() ); + p.addParserKeyword( SWLPC() ); + p.addParserKeyword( SWOF() ); + p.addParserKeyword( SWOFLET() ); + p.addParserKeyword( SWU() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitT.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitT.cpp new file mode 100644 index 0000000000..0ce14c79d2 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitT.cpp @@ -0,0 +1,75 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsT([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( TABDIMS() ); + p.addParserKeyword( TBLK() ); + p.addParserKeyword( TCRIT() ); + p.addParserKeyword( TEMP() ); + p.addParserKeyword( TEMPI() ); + p.addParserKeyword( TEMPNODE() ); + p.addParserKeyword( TEMPTVD() ); + p.addParserKeyword( TEMPVD() ); + p.addParserKeyword( THCGAS() ); + p.addParserKeyword( THCO2MIX() ); + p.addParserKeyword( THCOIL() ); + p.addParserKeyword( THCONR() ); + p.addParserKeyword( THCONSF() ); + p.addParserKeyword( THCROCK() ); + p.addParserKeyword( THCWATER() ); + p.addParserKeyword( THELCOEF() ); + p.addParserKeyword( THERMAL() ); + p.addParserKeyword( THERMEXR() ); + p.addParserKeyword( THPRES() ); + p.addParserKeyword( THPRESFT() ); + p.addParserKeyword( TIGHTEN() ); + p.addParserKeyword( TIGHTENP() ); + p.addParserKeyword( TIME() ); + p.addParserKeyword( TITLE() ); + p.addParserKeyword( TLMIXPAR() ); + p.addParserKeyword( TLPMIXPA() ); + p.addParserKeyword( TNUM() ); + p.addParserKeyword( TOLCRIT() ); + p.addParserKeyword( TOPS() ); + p.addParserKeyword( TPAMEPS() ); + p.addParserKeyword( TPAMEPSS() ); + p.addParserKeyword( TRACER() ); + p.addParserKeyword( TRACERKM() ); + p.addParserKeyword( TRACERKP() ); + p.addParserKeyword( TRACERS() ); + p.addParserKeyword( TRACITVD() ); + p.addParserKeyword( TRACTVD() ); + p.addParserKeyword( TRADS() ); + p.addParserKeyword( TRANGL() ); + p.addParserKeyword( TRANR() ); + p.addParserKeyword( TRANTHT() ); + p.addParserKeyword( TRANX() ); + p.addParserKeyword( TRANY() ); + p.addParserKeyword( TRANZ() ); + p.addParserKeyword( TRDCY() ); + p.addParserKeyword( TRDIF() ); + p.addParserKeyword( TRDIS() ); + p.addParserKeyword( TREF() ); + p.addParserKeyword( TREFS() ); + p.addParserKeyword( TRKPF() ); + p.addParserKeyword( TRNHD() ); + p.addParserKeyword( TRPLPORO() ); + p.addParserKeyword( TRROCK() ); + p.addParserKeyword( TSTEP() ); + p.addParserKeyword( TUNING() ); + p.addParserKeyword( TUNINGDP() ); + p.addParserKeyword( TUNINGH() ); + p.addParserKeyword( TUNINGL() ); + p.addParserKeyword( TUNINGS() ); + p.addParserKeyword( TVDP() ); + p.addParserKeyword( TZONE() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitU.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitU.cpp new file mode 100644 index 0000000000..18b9ec11e3 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitU.cpp @@ -0,0 +1,28 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsU([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( UDADIMS() ); + p.addParserKeyword( UDQ() ); + p.addParserKeyword( UDQDIMS() ); + p.addParserKeyword( UDQPARAM() ); + p.addParserKeyword( UDT() ); + p.addParserKeyword( UDTDIMS() ); + p.addParserKeyword( UNCODHMD() ); + p.addParserKeyword( UNIFIN() ); + p.addParserKeyword( UNIFOUT() ); + p.addParserKeyword( UNIFOUTS() ); + p.addParserKeyword( UNIFSAVE() ); + p.addParserKeyword( USECUPL() ); + p.addParserKeyword( USEFLUX() ); + p.addParserKeyword( USENOFLO() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitV.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitV.cpp new file mode 100644 index 0000000000..a0217d57e8 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitV.cpp @@ -0,0 +1,39 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsV([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( VAPOIL() ); + p.addParserKeyword( VAPPARS() ); + p.addParserKeyword( VAPWAT() ); + p.addParserKeyword( VCRIT() ); + p.addParserKeyword( VDFLOW() ); + p.addParserKeyword( VDFLOWR() ); + p.addParserKeyword( VE() ); + p.addParserKeyword( VEDEBUG() ); + p.addParserKeyword( VEFIN() ); + p.addParserKeyword( VEFRAC() ); + p.addParserKeyword( VEFRACP() ); + p.addParserKeyword( VEFRACPV() ); + p.addParserKeyword( VEFRACV() ); + p.addParserKeyword( VFPCHK() ); + p.addParserKeyword( VFPIDIMS() ); + p.addParserKeyword( VFPINJ() ); + p.addParserKeyword( VFPPDIMS() ); + p.addParserKeyword( VFPPROD() ); + p.addParserKeyword( VFPTABL() ); + p.addParserKeyword( VISAGE() ); + p.addParserKeyword( VISCAQA() ); + p.addParserKeyword( VISCD() ); + p.addParserKeyword( VISCREF() ); + p.addParserKeyword( VISDATES() ); + p.addParserKeyword( VISOPTS() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitW.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitW.cpp new file mode 100644 index 0000000000..86a5562404 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitW.cpp @@ -0,0 +1,146 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsW([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( WAGHYSTR() ); + p.addParserKeyword( WAITBAL() ); + p.addParserKeyword( WALKALIN() ); + p.addParserKeyword( WALQCALC() ); + p.addParserKeyword( WAPI() ); + p.addParserKeyword( WARN() ); + p.addParserKeyword( WATDENT() ); + p.addParserKeyword( WATER() ); + p.addParserKeyword( WATJT() ); + p.addParserKeyword( WATVISCT() ); + p.addParserKeyword( WBHGLR() ); + p.addParserKeyword( WBOREVOL() ); + p.addParserKeyword( WCALCVAL() ); + p.addParserKeyword( WCONHIST() ); + p.addParserKeyword( WCONINJ() ); + p.addParserKeyword( WCONINJE() ); + p.addParserKeyword( WCONINJH() ); + p.addParserKeyword( WCONINJP() ); + p.addParserKeyword( WCONPROD() ); + p.addParserKeyword( WCUTBACK() ); + p.addParserKeyword( WCUTBACT() ); + p.addParserKeyword( WCYCLE() ); + p.addParserKeyword( WDFAC() ); + p.addParserKeyword( WDFACCOR() ); + p.addParserKeyword( WDRILPRI() ); + p.addParserKeyword( WDRILRES() ); + p.addParserKeyword( WDRILTIM() ); + p.addParserKeyword( WECON() ); + p.addParserKeyword( WECONINJ() ); + p.addParserKeyword( WECONT() ); + p.addParserKeyword( WEFAC() ); + p.addParserKeyword( WELCNTL() ); + p.addParserKeyword( WELDEBUG() ); + p.addParserKeyword( WELDRAW() ); + p.addParserKeyword( WELEVNT() ); + p.addParserKeyword( WELLDIMS() ); + p.addParserKeyword( WELLSTRE() ); + p.addParserKeyword( WELL_COMPLETION_PROBE() ); + p.addParserKeyword( WELL_PROBE() ); + p.addParserKeyword( WELL_PROBE_COMP() ); + p.addParserKeyword( WELL_PROBE_OPM() ); + p.addParserKeyword( WELMOVEL() ); + p.addParserKeyword( WELOPEN() ); + p.addParserKeyword( WELOPENL() ); + p.addParserKeyword( WELPI() ); + p.addParserKeyword( WELPRI() ); + p.addParserKeyword( WELSEGS() ); + p.addParserKeyword( WELSOMIN() ); + p.addParserKeyword( WELSPECL() ); + p.addParserKeyword( WELSPECS() ); + p.addParserKeyword( WELTARG() ); + p.addParserKeyword( WELTRAJ() ); + p.addParserKeyword( WFOAM() ); + p.addParserKeyword( WFRICSEG() ); + p.addParserKeyword( WFRICSGL() ); + p.addParserKeyword( WFRICTN() ); + p.addParserKeyword( WFRICTNL() ); + p.addParserKeyword( WGASPROD() ); + p.addParserKeyword( WGORPEN() ); + p.addParserKeyword( WGRUPCON() ); + p.addParserKeyword( WH2NUM() ); + p.addParserKeyword( WH3NUM() ); + p.addParserKeyword( WHEDREFD() ); + p.addParserKeyword( WHISTCTL() ); + p.addParserKeyword( WHTEMP() ); + p.addParserKeyword( WINJCLN() ); + p.addParserKeyword( WINJDAM() ); + p.addParserKeyword( WINJFCNC() ); + p.addParserKeyword( WINJGAS() ); + p.addParserKeyword( WINJMULT() ); + p.addParserKeyword( WINJTEMP() ); + p.addParserKeyword( WLIFT() ); + p.addParserKeyword( WLIFTOPT() ); + p.addParserKeyword( WLIMTOL() ); + p.addParserKeyword( WLIST() ); + p.addParserKeyword( WLISTARG() ); + p.addParserKeyword( WLISTNAM() ); + p.addParserKeyword( WMICP() ); + p.addParserKeyword( WNETCTRL() ); + p.addParserKeyword( WNETDP() ); + p.addParserKeyword( WORKLIM() ); + p.addParserKeyword( WORKTHP() ); + p.addParserKeyword( WPAVE() ); + p.addParserKeyword( WPAVEDEP() ); + p.addParserKeyword( WPIMULT() ); + p.addParserKeyword( WPIMULTL() ); + p.addParserKeyword( WPITAB() ); + p.addParserKeyword( WPLUG() ); + p.addParserKeyword( WPMITAB() ); + p.addParserKeyword( WPOLYMER() ); + p.addParserKeyword( WPOLYRED() ); + p.addParserKeyword( WPOTCALC() ); + p.addParserKeyword( WREGROUP() ); + p.addParserKeyword( WRFT() ); + p.addParserKeyword( WRFTPLT() ); + p.addParserKeyword( WSALT() ); + p.addParserKeyword( WSCCLEAN() ); + p.addParserKeyword( WSCCLENL() ); + p.addParserKeyword( WSCTAB() ); + p.addParserKeyword( WSEGAICD() ); + p.addParserKeyword( WSEGDFIN() ); + p.addParserKeyword( WSEGDFMD() ); + p.addParserKeyword( WSEGDFPA() ); + p.addParserKeyword( WSEGDIMS() ); + p.addParserKeyword( WSEGEXSS() ); + p.addParserKeyword( WSEGFLIM() ); + p.addParserKeyword( WSEGFMOD() ); + p.addParserKeyword( WSEGINIT() ); + p.addParserKeyword( WSEGITER() ); + p.addParserKeyword( WSEGLABY() ); + p.addParserKeyword( WSEGLINK() ); + p.addParserKeyword( WSEGMULT() ); + p.addParserKeyword( WSEGPROP() ); + p.addParserKeyword( WSEGSEP() ); + p.addParserKeyword( WSEGSICD() ); + p.addParserKeyword( WSEGSOLV() ); + p.addParserKeyword( WSEGTABL() ); + p.addParserKeyword( WSEGVALV() ); + p.addParserKeyword( WSF() ); + p.addParserKeyword( WSKPTAB() ); + p.addParserKeyword( WSOLVENT() ); + p.addParserKeyword( WSURFACT() ); + p.addParserKeyword( WTADD() ); + p.addParserKeyword( WTEMP() ); + p.addParserKeyword( WTEMPQ() ); + p.addParserKeyword( WTEST() ); + p.addParserKeyword( WTHPMAX() ); + p.addParserKeyword( WTMULT() ); + p.addParserKeyword( WTRACER() ); + p.addParserKeyword( WVFPDP() ); + p.addParserKeyword( WVFPEXP() ); + p.addParserKeyword( WWPAVE() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitX.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitX.cpp new file mode 100644 index 0000000000..5866554a19 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitX.cpp @@ -0,0 +1,15 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsX([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( XMF() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitY.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitY.cpp new file mode 100644 index 0000000000..564d777e9b --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitY.cpp @@ -0,0 +1,16 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsY([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( YMF() ); + p.addParserKeyword( YMODULE() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitZ.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitZ.cpp new file mode 100644 index 0000000000..48c415279a --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/ParserInitZ.cpp @@ -0,0 +1,23 @@ + +#include +#include +#include + +namespace Opm { +namespace ParserKeywords { +void addDefaultKeywordsZ([[maybe_unused]] Parser& p){ + //Builtin keywords; + p.addParserKeyword( ZCORN() ); + p.addParserKeyword( ZFACT1() ); + p.addParserKeyword( ZFACT1S() ); + p.addParserKeyword( ZFACTOR() ); + p.addParserKeyword( ZFACTORS() ); + p.addParserKeyword( ZIPP2OFF() ); + p.addParserKeyword( ZIPPY2() ); + p.addParserKeyword( ZMF() ); + p.addParserKeyword( ZMFVD() ); + + +} +} +} diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/R.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/R.cpp index 21d26adfe6..04ffc9e49e 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/R.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/R.cpp @@ -89,12 +89,9 @@ const std::string RADFIN::NR::itemName = "NR"; const std::string RADFIN::NTHETA::itemName = "NTHETA"; const std::string RADFIN::NZ::itemName = "NZ"; const std::string RADFIN::NWMAX::itemName = "NWMAX"; -const int RADFIN::NWMAX::defaultValue = 1; const std::string RADFIN::INNER_RADIUS::itemName = "INNER_RADIUS"; -const double RADFIN::INNER_RADIUS::defaultValue = 0.152400; const std::string RADFIN::OUTER_RADIUS::itemName = "OUTER_RADIUS"; const std::string RADFIN::MINIMUM_RADIUS_REFINEMENT::itemName = "MINIMUM_RADIUS_REFINEMENT"; -const double RADFIN::MINIMUM_RADIUS_REFINEMENT::defaultValue = 1.524000; const std::string RADFIN::PARENT_LGR::itemName = "PARENT_LGR"; const std::string RADFIN::PARENT_LGR::defaultValue = "GLOBAL"; @@ -166,7 +163,6 @@ const std::string RADFIN4::NR::itemName = "NR"; const std::string RADFIN4::NTHETA::itemName = "NTHETA"; const std::string RADFIN4::NZ::itemName = "NZ"; const std::string RADFIN4::NWMAX::itemName = "NWMAX"; -const int RADFIN4::NWMAX::defaultValue = 1; RADIAL::RADIAL() : ParserKeyword("RADIAL", KeywordSize(0, false)) { @@ -421,16 +417,12 @@ const std::string REACHES::BRANCH::itemName = "BRANCH"; const std::string REACHES::LENGTH2::itemName = "LENGTH2"; const std::string REACHES::DEPTH::itemName = "DEPTH"; const std::string REACHES::PROFILE::itemName = "PROFILE"; -const int REACHES::PROFILE::defaultValue = 1; const std::string REACHES::ROUGHNESS::itemName = "ROUGHNESS"; const std::string REACHES::XLENGTH::itemName = "XLENGTH"; const std::string REACHES::YLENGTH::itemName = "YLENGTH"; const std::string REACHES::REACH_LENGTH::itemName = "REACH_LENGTH"; -const double REACHES::REACH_LENGTH::defaultValue = 0; const std::string REACHES::NUM_REACHES::itemName = "NUM_REACHES"; -const int REACHES::NUM_REACHES::defaultValue = 1; const std::string REACHES::DEPTH_SOMETHING::itemName = "DEPTH_SOMETHING"; -const int REACHES::DEPTH_SOMETHING::defaultValue = 1; READDATA::READDATA() : ParserKeyword("READDATA", KeywordSize(1, false)) { @@ -535,25 +527,15 @@ REGDIMS::REGDIMS() : ParserKeyword("REGDIMS", KeywordSize(1, false)) { } const std::string REGDIMS::keywordName = "REGDIMS"; const std::string REGDIMS::NTFIP::itemName = "NTFIP"; -const int REGDIMS::NTFIP::defaultValue = 1; const std::string REGDIMS::NMFIPR::itemName = "NMFIPR"; -const int REGDIMS::NMFIPR::defaultValue = 1; const std::string REGDIMS::NRFREG::itemName = "NRFREG"; -const int REGDIMS::NRFREG::defaultValue = 0; const std::string REGDIMS::NTFREG::itemName = "NTFREG"; -const int REGDIMS::NTFREG::defaultValue = 0; const std::string REGDIMS::MAX_ETRACK::itemName = "MAX_ETRACK"; -const int REGDIMS::MAX_ETRACK::defaultValue = 0; const std::string REGDIMS::NTCREG::itemName = "NTCREG"; -const int REGDIMS::NTCREG::defaultValue = 1; const std::string REGDIMS::MAX_OPERNUM::itemName = "MAX_OPERNUM"; -const int REGDIMS::MAX_OPERNUM::defaultValue = 0; const std::string REGDIMS::MAX_OPERATE_DWORK::itemName = "MAX_OPERATE_DWORK"; -const int REGDIMS::MAX_OPERATE_DWORK::defaultValue = 0; const std::string REGDIMS::MAX_OPERATE_IWORK::itemName = "MAX_OPERATE_IWORK"; -const int REGDIMS::MAX_OPERATE_IWORK::defaultValue = 0; const std::string REGDIMS::NPLMIX::itemName = "NPLMIX"; -const int REGDIMS::NPLMIX::defaultValue = 1; REGION2REGION_PROBE::REGION2REGION_PROBE() : ParserKeyword("REGION2REGION_PROBE", KeywordSize(SLASH_TERMINATED)) { @@ -610,19 +592,14 @@ const std::string REGIONS::keywordName = "REGIONS"; REGION_PROBE::REGION_PROBE() : ParserKeyword("REGION_PROBE", KeywordSize(1, false)) { addValidSectionName("SUMMARY"); clearDeckNames(); - addDeckName("RRPV_[0-9A-Z][0-9A-Z][0-9A-Z]"); - addDeckName("ROEIG"); - addDeckName("ROEW_[0-9A-Z][0-9A-Z][0-9A-Z]"); - addDeckName("RWIR"); - addDeckName("RGPV"); - addDeckName("RHPV_[0-9A-Z][0-9A-Z][0-9A-Z]"); - addDeckName("RORFR"); + addDeckName("RRPV"); addDeckName("ROP"); - addDeckName("ROEW"); addDeckName("RGP"); + addDeckName("ROEW"); addDeckName("ROSAT"); - addDeckName("ROIP"); addDeckName("ROIPL"); + addDeckName("RHPV"); + addDeckName("ROIP"); addDeckName("RWVIS"); addDeckName("ROIPG"); addDeckName("RPPO"); @@ -637,16 +614,19 @@ REGION_PROBE::REGION_PROBE() : ParserKeyword("REGION_PROBE", KeywordSize(1, fals addDeckName("ROIR"); addDeckName("ROIT"); addDeckName("RSIP"); - addDeckName("RORME"); addDeckName("RPPC"); addDeckName("RWSAT"); + addDeckName("RORME"); addDeckName("RWIP"); addDeckName("RRS"); addDeckName("RWP"); addDeckName("RPRGZ"); addDeckName("RPPW"); + addDeckName("RWIPG"); addDeckName("RWPR"); addDeckName("RWPT"); + addDeckName("ROEIG"); + addDeckName("RWIR"); addDeckName("RORMR"); addDeckName("RWIT"); addDeckName("RGIP"); @@ -655,7 +635,9 @@ REGION_PROBE::REGION_PROBE() : ParserKeyword("REGION_PROBE", KeywordSize(1, fals addDeckName("RGPR"); addDeckName("RGIPG"); addDeckName("RPPG"); + addDeckName("RGCDI"); addDeckName("RGVIS"); + addDeckName("RGCDM"); addDeckName("RGDEN"); addDeckName("RGPT"); addDeckName("RGPRF"); @@ -669,10 +651,11 @@ REGION_PROBE::REGION_PROBE() : ParserKeyword("REGION_PROBE", KeywordSize(1, fals addDeckName("RGIT"); addDeckName("RPR"); addDeckName("RPRP"); - addDeckName("RRPV"); addDeckName("RORMW"); addDeckName("ROPV"); - addDeckName("RHPV"); + addDeckName("RWIPL"); + addDeckName("RWCD"); + addDeckName("RGPV"); addDeckName("ROEIW"); addDeckName("ROEWW"); addDeckName("ROEWG"); @@ -682,6 +665,7 @@ REGION_PROBE::REGION_PROBE() : ParserKeyword("REGION_PROBE", KeywordSize(1, fals addDeckName("RORMF"); addDeckName("RORMX"); addDeckName("RORMY"); + addDeckName("RORFR"); addDeckName("RORFW"); addDeckName("RORFG"); addDeckName("RORFE"); @@ -706,7 +690,8 @@ REGION_PROBE::REGION_PROBE() : ParserKeyword("REGION_PROBE", KeywordSize(1, fals addDeckName("RTIPTSUR"); addDeckName("RTFTTSUR"); addDeckName("RTADSUR"); - setMatchRegex("R[OGW]?[OIP][EPRT]_.+|RU.+|RTIPF.+|RTIPS.+|RTFTF.+|RTFTS.+|RTFTT.+|RTIPT.+|RTIPF.+|RTIPS.+|RTIP[1-9][0-9]*.+|RTFTT.+|RTFTF.+|RTFTS.+|RTFT[1-9][0-9]*.+|RTADS.+|RTDCY.+"); + setMatchRegex("RU.+|RTIPF.+|RTIPS.+|RTFTF.+|RTFTS.+|RTFTT.+|RTIPT.+|RTIPF.+|RTIPS.+|RTIP[1-9][0-9]*.+|RTFTT.+|RTFTF.+|RTFTS.+|RTFT[1-9][0-9]*.+|RTADS.+|RTDCY.+"); + setMatchRegexSuffix("_{0,2}[A-Z0-9]{3}"); { ParserRecord record; { @@ -721,6 +706,35 @@ const std::string REGION_PROBE::keywordName = "REGION_PROBE"; const std::string REGION_PROBE::data::itemName = "data"; +REGION_PROBE_OPM::REGION_PROBE_OPM() : ParserKeyword("REGION_PROBE_OPM", KeywordSize(1, false)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("RGMIP"); + addDeckName("RGKDI"); + addDeckName("RGMDS"); + addDeckName("RGKDM"); + addDeckName("RGKMO"); + addDeckName("RGMMO"); + addDeckName("RGKTR"); + addDeckName("RGMGP"); + addDeckName("RGMST"); + addDeckName("RGMIM"); + addDeckName("RGMUS"); + setMatchRegexSuffix("_{0,2}[A-Z0-9]{3}"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::INT); + item.setSizeType(ParserItem::item_size::ALL); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string REGION_PROBE_OPM::keywordName = "REGION_PROBE_OPM"; +const std::string REGION_PROBE_OPM::data::itemName = "data"; + + RESIDNUM::RESIDNUM() : ParserKeyword("RESIDNUM", KeywordSize(1, false)) { addValidSectionName("REGIONS"); clearDeckNames(); @@ -810,7 +824,6 @@ RHO::RHO() : ParserKeyword("RHO", KeywordSize(1, false)) { } const std::string RHO::keywordName = "RHO"; const std::string RHO::data::itemName = "data"; -const double RHO::data::defaultValue = 0; RIVDEBUG::RIVDEBUG() : ParserKeyword("RIVDEBUG", KeywordSize(SLASH_TERMINATED)) { @@ -954,31 +967,18 @@ RIVRDIMS::RIVRDIMS() : ParserKeyword("RIVRDIMS", KeywordSize(1, false)) { } const std::string RIVRDIMS::keywordName = "RIVRDIMS"; const std::string RIVRDIMS::MAX_RIVERS::itemName = "MAX_RIVERS"; -const int RIVRDIMS::MAX_RIVERS::defaultValue = 0; const std::string RIVRDIMS::MAX_REACHES::itemName = "MAX_REACHES"; -const int RIVRDIMS::MAX_REACHES::defaultValue = 1; const std::string RIVRDIMS::MAX_BRANCHES::itemName = "MAX_BRANCHES"; -const int RIVRDIMS::MAX_BRANCHES::defaultValue = 1; const std::string RIVRDIMS::MAX_BLOCKS::itemName = "MAX_BLOCKS"; -const int RIVRDIMS::MAX_BLOCKS::defaultValue = 1; const std::string RIVRDIMS::MXTBPR::itemName = "MXTBPR"; -const int RIVRDIMS::MXTBPR::defaultValue = 1; const std::string RIVRDIMS::MXDPTB::itemName = "MXDPTB"; -const int RIVRDIMS::MXDPTB::defaultValue = 2; const std::string RIVRDIMS::MXTBGR::itemName = "MXTBGR"; -const int RIVRDIMS::MXTBGR::defaultValue = 1; const std::string RIVRDIMS::NMDEPT::itemName = "NMDEPT"; -const int RIVRDIMS::NMDEPT::defaultValue = 0; const std::string RIVRDIMS::MXDEPT::itemName = "MXDEPT"; -const int RIVRDIMS::MXDEPT::defaultValue = 2; const std::string RIVRDIMS::NMMAST::itemName = "NMMAST"; -const int RIVRDIMS::NMMAST::defaultValue = 0; const std::string RIVRDIMS::MXMAST::itemName = "MXMAST"; -const int RIVRDIMS::MXMAST::defaultValue = 2; const std::string RIVRDIMS::NRATTA::itemName = "NRATTA"; -const int RIVRDIMS::NRATTA::defaultValue = 0; const std::string RIVRDIMS::MXRATE::itemName = "MXRATE"; -const int RIVRDIMS::MXRATE::defaultValue = 2; RIVRPROP::RIVRPROP() : ParserKeyword("RIVRPROP", KeywordSize(SLASH_TERMINATED)) { @@ -1127,7 +1127,7 @@ RKTRMDIR::RKTRMDIR() : ParserKeyword("RKTRMDIR", KeywordSize(0, false)) { const std::string RKTRMDIR::keywordName = "RKTRMDIR"; -ROCK::ROCK() : ParserKeyword("ROCK", KeywordSize(UNKNOWN)) { +ROCK::ROCK() : ParserKeyword("ROCK", KeywordSize(SPECIAL_CASE_ROCK)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("ROCK"); @@ -1150,9 +1150,7 @@ ROCK::ROCK() : ParserKeyword("ROCK", KeywordSize(UNKNOWN)) { } const std::string ROCK::keywordName = "ROCK"; const std::string ROCK::PREF::itemName = "PREF"; -const double ROCK::PREF::defaultValue = 1.013200; const std::string ROCK::COMPRESSIBILITY::itemName = "COMPRESSIBILITY"; -const double ROCK::COMPRESSIBILITY::defaultValue = 0; ROCK2D::ROCK2D() : ParserKeyword("ROCK2D", KeywordSize("ROCKCOMP", "NTROCC", true, 0)) { @@ -1242,12 +1240,10 @@ const std::string ROCKCOMP::keywordName = "ROCKCOMP"; const std::string ROCKCOMP::HYSTERESIS::itemName = "HYSTERESIS"; const std::string ROCKCOMP::HYSTERESIS::defaultValue = "REVERS"; const std::string ROCKCOMP::NTROCC::itemName = "NTROCC"; -const int ROCKCOMP::NTROCC::defaultValue = 1; const std::string ROCKCOMP::WATER_COMPACTION::itemName = "WATER_COMPACTION"; const std::string ROCKCOMP::WATER_COMPACTION::defaultValue = "NO"; const std::string ROCKCOMP::PORTXROP::itemName = "PORTXROP"; const std::string ROCKCOMP::CARKZEXP::itemName = "CARKZEXP"; -const double ROCKCOMP::CARKZEXP::defaultValue = 0; ROCKFRAC::ROCKFRAC() : ParserKeyword("ROCKFRAC", KeywordSize(1, false)) { @@ -1387,21 +1383,13 @@ const std::string ROCKPAMA::keywordName = "ROCKPAMA"; const std::string ROCKPAMA::K::itemName = "K"; const std::string ROCKPAMA::M::itemName = "M"; const std::string ROCKPAMA::G::itemName = "G"; -const double ROCKPAMA::G::defaultValue = 0; const std::string ROCKPAMA::B::itemName = "B"; -const double ROCKPAMA::B::defaultValue = 0; const std::string ROCKPAMA::E1::itemName = "E1"; -const double ROCKPAMA::E1::defaultValue = 0; const std::string ROCKPAMA::f::itemName = "f"; -const double ROCKPAMA::f::defaultValue = 0.500000; const std::string ROCKPAMA::n::itemName = "n"; -const double ROCKPAMA::n::defaultValue = 3.000000; const std::string ROCKPAMA::g::itemName = "g"; -const double ROCKPAMA::g::defaultValue = 1.000000; const std::string ROCKPAMA::Bs::itemName = "Bs"; -const double ROCKPAMA::Bs::defaultValue = 0; const std::string ROCKPAMA::Es::itemName = "Es"; -const double ROCKPAMA::Es::defaultValue = 0; ROCKTAB::ROCKTAB() : ParserKeyword("ROCKTAB", KeywordSize("ROCKCOMP", "NTROCC", false, 0)) { @@ -1624,17 +1612,11 @@ RPTHMD::RPTHMD() : ParserKeyword("RPTHMD", KeywordSize(1, false)) { } const std::string RPTHMD::keywordName = "RPTHMD"; const std::string RPTHMD::ITEM1::itemName = "ITEM1"; -const int RPTHMD::ITEM1::defaultValue = 0; const std::string RPTHMD::ITEM2::itemName = "ITEM2"; -const int RPTHMD::ITEM2::defaultValue = 0; const std::string RPTHMD::ITEM3::itemName = "ITEM3"; -const int RPTHMD::ITEM3::defaultValue = 0; const std::string RPTHMD::ITEM4::itemName = "ITEM4"; -const int RPTHMD::ITEM4::defaultValue = 0; const std::string RPTHMD::ITEM5::itemName = "ITEM5"; -const int RPTHMD::ITEM5::defaultValue = 0; const std::string RPTHMD::ITEM6::itemName = "ITEM6"; -const int RPTHMD::ITEM6::defaultValue = 0; RPTHMG::RPTHMG() : ParserKeyword("RPTHMG", KeywordSize(SLASH_TERMINATED)) { @@ -1983,7 +1965,6 @@ RTEMP::RTEMP() : ParserKeyword("RTEMP", KeywordSize(1, false)) { } const std::string RTEMP::keywordName = "RTEMP"; const std::string RTEMP::TEMP::itemName = "TEMP"; -const double RTEMP::TEMP::defaultValue = 15.555000; RTEMPA::RTEMPA() : ParserKeyword("RTEMPA", KeywordSize(1, false)) { @@ -2004,7 +1985,6 @@ RTEMPA::RTEMPA() : ParserKeyword("RTEMPA", KeywordSize(1, false)) { } const std::string RTEMPA::keywordName = "RTEMPA"; const std::string RTEMPA::TEMP::itemName = "TEMP"; -const double RTEMPA::TEMP::defaultValue = 15.555000; RTEMPVD::RTEMPVD() : ParserKeyword("RTEMPVD", KeywordSize("EQLDIMS", "NTEQUL", false, 0)) { @@ -2168,16 +2148,40 @@ const std::string RVW::keywordName = "RVW"; const std::string RVW::data::itemName = "data"; -RWGSALT::RWGSALT() : ParserKeyword("RWGSALT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { +RVWVD::RVWVD() : ParserKeyword("RVWVD", KeywordSize("EQLDIMS", "NTEQUL", false, 0)) { + addValidSectionName("SOLUTION"); + clearDeckNames(); + addDeckName("RVWVD"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Length"); + item.push_backDimension("OilDissolutionFactor"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string RVWVD::keywordName = "RVWVD"; +const std::string RVWVD::DATA::itemName = "DATA"; + + +RWGSALT::RWGSALT() : ParserKeyword("RWGSALT", KeywordSize("TABDIMS", "NTPVT", true, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("RWGSALT"); { ParserRecord record; + { + ParserItem item("GAS_PRESSURE", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); + record.addItem(item); + } { ParserItem item("DATA", ParserItem::itype::DOUBLE); item.setSizeType(ParserItem::item_size::ALL); - item.push_backDimension("Pressure"); item.push_backDimension("Mass/Length*Length*Length"); item.push_backDimension("OilDissolutionFactor"); record.addItem(item); @@ -2186,6 +2190,7 @@ RWGSALT::RWGSALT() : ParserKeyword("RWGSALT", KeywordSize("TABDIMS", "NTPVT", fa } } const std::string RWGSALT::keywordName = "RWGSALT"; +const std::string RWGSALT::GAS_PRESSURE::itemName = "GAS_PRESSURE"; const std::string RWGSALT::DATA::itemName = "DATA"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/S.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/S.cpp index e13f0b3804..29b125cb1f 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/S.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/S.cpp @@ -13,6 +13,9 @@ namespace Opm { namespace ParserKeywords { SALINITY::SALINITY() : ParserKeyword("SALINITY", KeywordSize(1, false)) { addValidSectionName("PROPS"); + setProhibitedKeywords({ + "SALTMF", + }); clearDeckNames(); addDeckName("SALINITY"); { @@ -27,7 +30,6 @@ SALINITY::SALINITY() : ParserKeyword("SALINITY", KeywordSize(1, false)) { } const std::string SALINITY::keywordName = "SALINITY"; const std::string SALINITY::MOLALITY::itemName = "MOLALITY"; -const double SALINITY::MOLALITY::defaultValue = 0; SALT::SALT() : ParserKeyword("SALT", KeywordSize(1, false)) { @@ -49,6 +51,27 @@ const std::string SALT::keywordName = "SALT"; const std::string SALT::SALT_CONCENTRATION::itemName = "SALT_CONCENTRATION"; +SALTMF::SALTMF() : ParserKeyword("SALTMF", KeywordSize(1, false)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "SALINITY", + }); + clearDeckNames(); + addDeckName("SALTMF"); + { + ParserRecord record; + { + ParserItem item("MOLE_FRACTION", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string SALTMF::keywordName = "SALTMF"; +const std::string SALTMF::MOLE_FRACTION::itemName = "MOLE_FRACTION"; + + SALTNODE::SALTNODE() : ParserKeyword("SALTNODE", KeywordSize("TABDIMS", "NTPVT", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); @@ -136,6 +159,7 @@ SALTSOL::SALTSOL() : ParserKeyword("SALTSOL", KeywordSize("TABDIMS", "NTPVT", fa ParserItem item("DATA", ParserItem::itype::DOUBLE); item.setSizeType(ParserItem::item_size::ALL); item.push_backDimension("Density"); + item.push_backDimension("Density"); record.addItem(item); } addRecord( record ); @@ -316,7 +340,6 @@ SCALELIM::SCALELIM() : ParserKeyword("SCALELIM", KeywordSize("ENDSCALE", "NTENDP } const std::string SCALELIM::keywordName = "SCALELIM"; const std::string SCALELIM::SAT_LIMIT::itemName = "SAT_LIMIT"; -const double SCALELIM::SAT_LIMIT::defaultValue = 0; SCDATAB::SCDATAB() : ParserKeyword("SCDATAB", KeywordSize("SCDPDIMS", "NTSCDA", false, 0)) { @@ -338,7 +361,6 @@ SCDATAB::SCDATAB() : ParserKeyword("SCDATAB", KeywordSize("SCDPDIMS", "NTSCDA", } const std::string SCDATAB::keywordName = "SCDATAB"; const std::string SCDATAB::SCALE_DATA::itemName = "SCALE_DATA"; -const double SCDATAB::SCALE_DATA::defaultValue = 0; SCDETAB::SCDETAB() : ParserKeyword("SCDETAB", KeywordSize("SCDPDIMS", "NTSCDE", false, 0)) { @@ -360,7 +382,6 @@ SCDETAB::SCDETAB() : ParserKeyword("SCDETAB", KeywordSize("SCDPDIMS", "NTSCDE", } const std::string SCDETAB::keywordName = "SCDETAB"; const std::string SCDETAB::SCALE_DATA::itemName = "SCALE_DATA"; -const double SCDETAB::SCALE_DATA::defaultValue = 0; SCDPDIMS::SCDPDIMS() : ParserKeyword("SCDPDIMS", KeywordSize(1, false)) { @@ -409,19 +430,12 @@ SCDPDIMS::SCDPDIMS() : ParserKeyword("SCDPDIMS", KeywordSize(1, false)) { } const std::string SCDPDIMS::keywordName = "SCDPDIMS"; const std::string SCDPDIMS::NTSCDP::itemName = "NTSCDP"; -const int SCDPDIMS::NTSCDP::defaultValue = 0; const std::string SCDPDIMS::NPSCDP::itemName = "NPSCDP"; -const int SCDPDIMS::NPSCDP::defaultValue = 0; const std::string SCDPDIMS::NTSCDA::itemName = "NTSCDA"; -const int SCDPDIMS::NTSCDA::defaultValue = 0; const std::string SCDPDIMS::PSCDA::itemName = "PSCDA"; -const int SCDPDIMS::PSCDA::defaultValue = 0; const std::string SCDPDIMS::UNUSED1::itemName = "UNUSED1"; -const int SCDPDIMS::UNUSED1::defaultValue = 0; const std::string SCDPDIMS::UNUSED2::itemName = "UNUSED2"; -const int SCDPDIMS::UNUSED2::defaultValue = 0; const std::string SCDPDIMS::NTSCDE::itemName = "NTSCDE"; -const int SCDPDIMS::NTSCDE::defaultValue = 0; SCDPTAB::SCDPTAB() : ParserKeyword("SCDPTAB", KeywordSize("SCDPDIMS", "NTSCDP", false, 0)) { @@ -505,21 +519,47 @@ SDENSITY::SDENSITY() : ParserKeyword("SDENSITY", KeywordSize("TABDIMS", "NTPVT", } const std::string SDENSITY::keywordName = "SDENSITY"; const std::string SDENSITY::SOLVENT_DENSITY::itemName = "SOLVENT_DENSITY"; -const double SDENSITY::SOLVENT_DENSITY::defaultValue = 1.000000; SEGMENT_PROBE::SEGMENT_PROBE() : ParserKeyword("SEGMENT_PROBE", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SUMMARY"); clearDeckNames(); - addDeckName("SWFR"); - addDeckName("SOFR"); + addDeckName("SMDEN"); + addDeckName("SDENM"); + addDeckName("SGDEN"); + addDeckName("SGOR"); addDeckName("SGFR"); - addDeckName("SPR"); + addDeckName("SGFV"); + addDeckName("SGFRF"); + addDeckName("SGFRS"); + addDeckName("SGFT"); + addDeckName("SGHF"); + addDeckName("SGVIS"); + addDeckName("SODEN"); + addDeckName("SWGR"); + addDeckName("SOFR"); + addDeckName("SOFRF"); + addDeckName("SWVIS"); + addDeckName("SOFRS"); addDeckName("SPRDH"); addDeckName("SWCT"); + addDeckName("SOFT"); + addDeckName("SOFV"); + addDeckName("SOGR"); + addDeckName("SOHF"); + addDeckName("SOVIS"); + addDeckName("SPR"); addDeckName("SPRD"); - addDeckName("SPRDF"); addDeckName("SPRDA"); + addDeckName("SPRDF"); + addDeckName("STFC"); + addDeckName("STFR"); + addDeckName("SWDEN"); + addDeckName("SWFR"); + addDeckName("SWFT"); + addDeckName("SWFV"); + addDeckName("SWHF"); + setMatchRegex("SU.+|STFC.+|STFR.+"); { ParserRecord record; { @@ -692,6 +732,9 @@ const std::string SGF32D::KRG::itemName = "KRG"; SGFN::SGFN() : ParserKeyword("SGFN", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { addValidSectionName("PROPS"); + setProhibitedKeywords({ + "GSF", + }); setRequiredKeywords({ "GAS", }); @@ -762,6 +805,7 @@ SGOF::SGOF() : ParserKeyword("SGOF", KeywordSize("TABDIMS", "NTSFUN", false, 0)) addValidSectionName("PROPS"); setProhibitedKeywords({ "SLGOF", + "GSF", }); setRequiredKeywords({ "GAS", @@ -904,39 +948,22 @@ SGOFLET::SGOFLET() : ParserKeyword("SGOFLET", KeywordSize("TABDIMS", "NTSFUN", f } const std::string SGOFLET::keywordName = "SGOFLET"; const std::string SGOFLET::SG_0::itemName = "SG_0"; -const double SGOFLET::SG_0::defaultValue = 0; const std::string SGOFLET::SG_CRITICAL::itemName = "SG_CRITICAL"; -const double SGOFLET::SG_CRITICAL::defaultValue = 0; const std::string SGOFLET::L_GAS::itemName = "L_GAS"; -const double SGOFLET::L_GAS::defaultValue = 1.000000; const std::string SGOFLET::E_GAS::itemName = "E_GAS"; -const double SGOFLET::E_GAS::defaultValue = 1.000000; const std::string SGOFLET::T_GAS::itemName = "T_GAS"; -const double SGOFLET::T_GAS::defaultValue = 1.000000; const std::string SGOFLET::KRT_GAS::itemName = "KRT_GAS"; -const double SGOFLET::KRT_GAS::defaultValue = 1.000000; const std::string SGOFLET::SO_0::itemName = "SO_0"; -const double SGOFLET::SO_0::defaultValue = 0; const std::string SGOFLET::SO_CRITICAL::itemName = "SO_CRITICAL"; -const double SGOFLET::SO_CRITICAL::defaultValue = 0; const std::string SGOFLET::L_OIL::itemName = "L_OIL"; -const double SGOFLET::L_OIL::defaultValue = 1.000000; const std::string SGOFLET::E_OIL::itemName = "E_OIL"; -const double SGOFLET::E_OIL::defaultValue = 1.000000; const std::string SGOFLET::T_OIL::itemName = "T_OIL"; -const double SGOFLET::T_OIL::defaultValue = 1.000000; const std::string SGOFLET::KRT_OIL::itemName = "KRT_OIL"; -const double SGOFLET::KRT_OIL::defaultValue = 1.000000; const std::string SGOFLET::L_PC::itemName = "L_PC"; -const double SGOFLET::L_PC::defaultValue = 1.000000; const std::string SGOFLET::E_PC::itemName = "E_PC"; -const double SGOFLET::E_PC::defaultValue = 1.000000; const std::string SGOFLET::T_PC::itemName = "T_PC"; -const double SGOFLET::T_PC::defaultValue = 1.000000; const std::string SGOFLET::PCIR::itemName = "PCIR"; -const double SGOFLET::PCIR::defaultValue = 0; const std::string SGOFLET::PCT::itemName = "PCT"; -const double SGOFLET::PCT::defaultValue = 0; SGU::SGU() : ParserKeyword("SGU", KeywordSize(1, false)) { @@ -1367,13 +1394,13 @@ const std::string SLAVES::SLAVE_ECLBASE::itemName = "SLAVE_ECLBASE"; const std::string SLAVES::HOST_NAME::itemName = "HOST_NAME"; const std::string SLAVES::DIRECTORY::itemName = "DIRECTORY"; const std::string SLAVES::NUM_PE::itemName = "NUM_PE"; -const int SLAVES::NUM_PE::defaultValue = 1; SLGOF::SLGOF() : ParserKeyword("SLGOF", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { addValidSectionName("PROPS"); setProhibitedKeywords({ "SGOF", + "GSF", }); setRequiredKeywords({ "GAS", @@ -1433,7 +1460,6 @@ SMRYDIMS::SMRYDIMS() : ParserKeyword("SMRYDIMS", KeywordSize(1, false)) { } const std::string SMRYDIMS::keywordName = "SMRYDIMS"; const std::string SMRYDIMS::DIMS::itemName = "DIMS"; -const int SMRYDIMS::DIMS::defaultValue = 10000; SMULTX::SMULTX() : ParserKeyword("SMULTX", KeywordSize(1, false)) { @@ -1635,6 +1661,14 @@ const std::string SOIL::keywordName = "SOIL"; const std::string SOIL::data::itemName = "data"; +SOLID::SOLID() : ParserKeyword("SOLID", KeywordSize(0, false)) { + addValidSectionName("RUNSPEC"); + clearDeckNames(); + addDeckName("SOLID"); +} +const std::string SOLID::keywordName = "SOLID"; + + SOLUTION::SOLUTION() : ParserKeyword("SOLUTION", KeywordSize(0, false)) { clearDeckNames(); addDeckName("SOLUTION"); @@ -1801,6 +1835,59 @@ const std::string SORWMIS::keywordName = "SORWMIS"; const std::string SORWMIS::DATA::itemName = "DATA"; +SOURCE::SOURCE() : ParserKeyword("SOURCE", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("SOURCE"); + { + ParserRecord record; + { + ParserItem item("I", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("J", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("K", ParserItem::itype::INT); + record.addItem(item); + } + { + ParserItem item("COMPONENT", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); + record.addItem(item); + } + { + ParserItem item("RATE", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Mass/Time"); + record.addItem(item); + } + { + ParserItem item("HRATE", ParserItem::itype::DOUBLE); + item.push_backDimension("Energy/Time"); + record.addItem(item); + } + { + ParserItem item("TEMP", ParserItem::itype::DOUBLE); + item.push_backDimension("Temperature"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string SOURCE::keywordName = "SOURCE"; +const std::string SOURCE::I::itemName = "I"; +const std::string SOURCE::J::itemName = "J"; +const std::string SOURCE::K::itemName = "K"; +const std::string SOURCE::COMPONENT::itemName = "COMPONENT"; +const std::string SOURCE::COMPONENT::defaultValue = "NONE"; +const std::string SOURCE::RATE::itemName = "RATE"; +const std::string SOURCE::HRATE::itemName = "HRATE"; +const std::string SOURCE::TEMP::itemName = "TEMP"; + + SOWCR::SOWCR() : ParserKeyword("SOWCR", KeywordSize(1, false)) { addValidSectionName("PROPS"); setRequiredKeywords({ @@ -1880,13 +1967,9 @@ SPECGRID::SPECGRID() : ParserKeyword("SPECGRID", KeywordSize(1, false)) { } const std::string SPECGRID::keywordName = "SPECGRID"; const std::string SPECGRID::NX::itemName = "NX"; -const int SPECGRID::NX::defaultValue = 1; const std::string SPECGRID::NY::itemName = "NY"; -const int SPECGRID::NY::defaultValue = 1; const std::string SPECGRID::NZ::itemName = "NZ"; -const int SPECGRID::NZ::defaultValue = 1; const std::string SPECGRID::NUMRES::itemName = "NUMRES"; -const int SPECGRID::NUMRES::defaultValue = 1; const std::string SPECGRID::COORD_TYPE::itemName = "COORD_TYPE"; const std::string SPECGRID::COORD_TYPE::defaultValue = "F"; @@ -2177,11 +2260,9 @@ START::START() : ParserKeyword("START", KeywordSize(1, false)) { } const std::string START::keywordName = "START"; const std::string START::DAY::itemName = "DAY"; -const int START::DAY::defaultValue = 1; const std::string START::MONTH::itemName = "MONTH"; const std::string START::MONTH::defaultValue = "JAN"; const std::string START::YEAR::itemName = "YEAR"; -const int START::YEAR::defaultValue = 1983; const std::string START::TIME::itemName = "TIME"; const std::string START::TIME::defaultValue = "00:00:00.000"; @@ -2209,9 +2290,7 @@ STCOND::STCOND() : ParserKeyword("STCOND", KeywordSize(1, false)) { } const std::string STCOND::keywordName = "STCOND"; const std::string STCOND::TEMPERATURE::itemName = "TEMPERATURE"; -const double STCOND::TEMPERATURE::defaultValue = 15.560000; const std::string STCOND::PRESSURE::itemName = "PRESSURE"; -const double STCOND::PRESSURE::defaultValue = 1.013250; STOG::STOG() : ParserKeyword("STOG", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -2278,7 +2357,6 @@ STONE1EX::STONE1EX() : ParserKeyword("STONE1EX", KeywordSize("TABDIMS", "NTSFUN" } const std::string STONE1EX::keywordName = "STONE1EX"; const std::string STONE1EX::EXP_VALUE::itemName = "EXP_VALUE"; -const double STONE1EX::EXP_VALUE::defaultValue = 1.000000; STONE2::STONE2() : ParserKeyword("STONE2", KeywordSize(0, false)) { @@ -2320,6 +2398,93 @@ const std::string STOW::REF_OIL_PRESSURE::itemName = "REF_OIL_PRESSURE"; const std::string STOW::table::itemName = "table"; +STREQUIL::STREQUIL() : ParserKeyword("STREQUIL", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SOLUTION"); + clearDeckNames(); + addDeckName("STREQUIL"); + { + ParserRecord record; + { + ParserItem item("DATUM_DEPTH", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("DATUM_POSX", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("DATUM_POSY", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("STRESSXX", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("STRESSXXGRAD", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure/Length"); + record.addItem(item); + } + { + ParserItem item("STRESSYY", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("STRESSYYGRAD", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure/Length"); + record.addItem(item); + } + { + ParserItem item("STRESSZZ", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); + record.addItem(item); + } + { + ParserItem item("STRESSZZGRAD", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure/Length"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string STREQUIL::keywordName = "STREQUIL"; +const std::string STREQUIL::DATUM_DEPTH::itemName = "DATUM_DEPTH"; +const std::string STREQUIL::DATUM_POSX::itemName = "DATUM_POSX"; +const std::string STREQUIL::DATUM_POSY::itemName = "DATUM_POSY"; +const std::string STREQUIL::STRESSXX::itemName = "STRESSXX"; +const std::string STREQUIL::STRESSXXGRAD::itemName = "STRESSXXGRAD"; +const std::string STREQUIL::STRESSYY::itemName = "STRESSYY"; +const std::string STREQUIL::STRESSYYGRAD::itemName = "STRESSYYGRAD"; +const std::string STREQUIL::STRESSZZ::itemName = "STRESSZZ"; +const std::string STREQUIL::STRESSZZGRAD::itemName = "STRESSZZGRAD"; + + +STRESSEQUILNUM::STRESSEQUILNUM() : ParserKeyword("STRESSEQUILNUM", KeywordSize(1, false)) { + addValidSectionName("REGIONS"); + clearDeckNames(); + addDeckName("STRESSEQUILNUM"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::INT); + item.setSizeType(ParserItem::item_size::ALL); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string STRESSEQUILNUM::keywordName = "STRESSEQUILNUM"; +const std::string STRESSEQUILNUM::data::itemName = "data"; + + STWG::STWG() : ParserKeyword("STWG", KeywordSize("TABDIMS", "NTPVT", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); @@ -2548,9 +2713,7 @@ SURFOPTS::SURFOPTS() : ParserKeyword("SURFOPTS", KeywordSize(1, false)) { } const std::string SURFOPTS::keywordName = "SURFOPTS"; const std::string SURFOPTS::MIN_SWAT::itemName = "MIN_SWAT"; -const double SURFOPTS::MIN_SWAT::defaultValue = 1e-06; const std::string SURFOPTS::SMOOTHING::itemName = "SMOOTHING"; -const double SURFOPTS::SMOOTHING::defaultValue = 1e-06; SURFROCK::SURFROCK() : ParserKeyword("SURFROCK", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { @@ -2744,6 +2907,9 @@ const std::string SWF32D::KRW::itemName = "KRW"; SWFN::SWFN() : ParserKeyword("SWFN", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { addValidSectionName("PROPS"); + setProhibitedKeywords({ + "WSF", + }); setRequiredKeywords({ "WATER", }); @@ -2938,6 +3104,9 @@ const std::string SWLPC::data::itemName = "data"; SWOF::SWOF() : ParserKeyword("SWOF", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { addValidSectionName("PROPS"); + setProhibitedKeywords({ + "WSF", + }); setRequiredKeywords({ "OIL", "WATER", @@ -3079,39 +3248,22 @@ SWOFLET::SWOFLET() : ParserKeyword("SWOFLET", KeywordSize("TABDIMS", "NTSFUN", f } const std::string SWOFLET::keywordName = "SWOFLET"; const std::string SWOFLET::SW_RESIDUAL::itemName = "SW_RESIDUAL"; -const double SWOFLET::SW_RESIDUAL::defaultValue = 0; const std::string SWOFLET::SW_CRITICAL::itemName = "SW_CRITICAL"; -const double SWOFLET::SW_CRITICAL::defaultValue = 0; const std::string SWOFLET::L_WATER::itemName = "L_WATER"; -const double SWOFLET::L_WATER::defaultValue = 1.000000; const std::string SWOFLET::E_WATER::itemName = "E_WATER"; -const double SWOFLET::E_WATER::defaultValue = 1.000000; const std::string SWOFLET::T_WATER::itemName = "T_WATER"; -const double SWOFLET::T_WATER::defaultValue = 1.000000; const std::string SWOFLET::KRT_WATER::itemName = "KRT_WATER"; -const double SWOFLET::KRT_WATER::defaultValue = 1.000000; const std::string SWOFLET::SO_RESIDUAL::itemName = "SO_RESIDUAL"; -const double SWOFLET::SO_RESIDUAL::defaultValue = 0; const std::string SWOFLET::SO_CRITICAL::itemName = "SO_CRITICAL"; -const double SWOFLET::SO_CRITICAL::defaultValue = 0; const std::string SWOFLET::L_OIL::itemName = "L_OIL"; -const double SWOFLET::L_OIL::defaultValue = 1.000000; const std::string SWOFLET::E_OIL::itemName = "E_OIL"; -const double SWOFLET::E_OIL::defaultValue = 1.000000; const std::string SWOFLET::T_OIL::itemName = "T_OIL"; -const double SWOFLET::T_OIL::defaultValue = 1.000000; const std::string SWOFLET::KRT_OIL::itemName = "KRT_OIL"; -const double SWOFLET::KRT_OIL::defaultValue = 1.000000; const std::string SWOFLET::L_PC::itemName = "L_PC"; -const double SWOFLET::L_PC::defaultValue = 1.000000; const std::string SWOFLET::E_PC::itemName = "E_PC"; -const double SWOFLET::E_PC::defaultValue = 1.000000; const std::string SWOFLET::T_PC::itemName = "T_PC"; -const double SWOFLET::T_PC::defaultValue = 1.000000; const std::string SWOFLET::PCIR::itemName = "PCIR"; -const double SWOFLET::PCIR::defaultValue = 0; const std::string SWOFLET::PCT::itemName = "PCT"; -const double SWOFLET::PCT::defaultValue = 0; SWU::SWU() : ParserKeyword("SWU", KeywordSize(1, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/T.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/T.cpp index f18fa5370b..bcdcf70d03 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/T.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/T.cpp @@ -143,50 +143,29 @@ TABDIMS::TABDIMS() : ParserKeyword("TABDIMS", KeywordSize(1, false)) { } const std::string TABDIMS::keywordName = "TABDIMS"; const std::string TABDIMS::NTSFUN::itemName = "NTSFUN"; -const int TABDIMS::NTSFUN::defaultValue = 1; const std::string TABDIMS::NTPVT::itemName = "NTPVT"; -const int TABDIMS::NTPVT::defaultValue = 1; const std::string TABDIMS::NSSFUN::itemName = "NSSFUN"; -const int TABDIMS::NSSFUN::defaultValue = 20; const std::string TABDIMS::NPPVT::itemName = "NPPVT"; -const int TABDIMS::NPPVT::defaultValue = 20; const std::string TABDIMS::NTFIP::itemName = "NTFIP"; -const int TABDIMS::NTFIP::defaultValue = 1; const std::string TABDIMS::NRPVT::itemName = "NRPVT"; -const int TABDIMS::NRPVT::defaultValue = 20; const std::string TABDIMS::MAX_RV_NODES::itemName = "MAX_RV_NODES"; -const int TABDIMS::MAX_RV_NODES::defaultValue = 20; const std::string TABDIMS::NTENDP::itemName = "NTENDP"; -const int TABDIMS::NTENDP::defaultValue = 1; const std::string TABDIMS::NUM_EOS_RES::itemName = "NUM_EOS_RES"; -const int TABDIMS::NUM_EOS_RES::defaultValue = 1; const std::string TABDIMS::NUM_EOS_SURFACE::itemName = "NUM_EOS_SURFACE"; -const int TABDIMS::NUM_EOS_SURFACE::defaultValue = 1; const std::string TABDIMS::MAX_FLUX_REGIONS::itemName = "MAX_FLUX_REGIONS"; -const int TABDIMS::MAX_FLUX_REGIONS::defaultValue = 10; const std::string TABDIMS::MAX_THERMAL_REGIONS::itemName = "MAX_THERMAL_REGIONS"; -const int TABDIMS::MAX_THERMAL_REGIONS::defaultValue = 1; const std::string TABDIMS::NTROCC::itemName = "NTROCC"; const std::string TABDIMS::MAX_PRESSURE_MAINTAINANCE_REGIONS::itemName = "MAX_PRESSURE_MAINTAINANCE_REGIONS"; -const int TABDIMS::MAX_PRESSURE_MAINTAINANCE_REGIONS::defaultValue = 0; const std::string TABDIMS::MAX_KVALUE_TABLES::itemName = "MAX_KVALUE_TABLES"; -const int TABDIMS::MAX_KVALUE_TABLES::defaultValue = 0; const std::string TABDIMS::NTALPHA::itemName = "NTALPHA"; const std::string TABDIMS::ASPHALTENE_ASPKDAM_MAX_ROWS::itemName = "ASPHALTENE_ASPKDAM_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPKDAM_MAX_ROWS::defaultValue = 10; const std::string TABDIMS::ASPHALTENE_ASPREWG_MAX_ROWS::itemName = "ASPHALTENE_ASPREWG_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPREWG_MAX_ROWS::defaultValue = 10; const std::string TABDIMS::ASPHALTENE_ASPVISO_MAX_ROWS::itemName = "ASPHALTENE_ASPVISO_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPVISO_MAX_ROWS::defaultValue = 10; const std::string TABDIMS::ITEM20_NOT_USED::itemName = "ITEM20_NOT_USED"; const std::string TABDIMS::ASPHALTENE_ASPPW2D_MAX_COLUMNS::itemName = "ASPHALTENE_ASPPW2D_MAX_COLUMNS"; -const int TABDIMS::ASPHALTENE_ASPPW2D_MAX_COLUMNS::defaultValue = 5; const std::string TABDIMS::ASPHALTENE_ASPPW2D_MAX_ROWS::itemName = "ASPHALTENE_ASPPW2D_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPPW2D_MAX_ROWS::defaultValue = 5; const std::string TABDIMS::ASPHALTENE_ASPWETF_MAX_ROWS::itemName = "ASPHALTENE_ASPWETF_MAX_ROWS"; -const int TABDIMS::ASPHALTENE_ASPWETF_MAX_ROWS::defaultValue = 5; const std::string TABDIMS::NUM_KVALUE_TABLES::itemName = "NUM_KVALUE_TABLES"; -const int TABDIMS::NUM_KVALUE_TABLES::defaultValue = 0; const std::string TABDIMS::RESERVED::itemName = "RESERVED"; @@ -208,6 +187,25 @@ const std::string TBLK::keywordName = "TBLK"; const std::string TBLK::data::itemName = "data"; +TCRIT::TCRIT() : ParserKeyword("TCRIT", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("TCRIT"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("AbsoluteTemperature"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string TCRIT::keywordName = "TCRIT"; +const std::string TCRIT::DATA::itemName = "DATA"; + + TEMP::TEMP() : ParserKeyword("TEMP", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -304,6 +302,39 @@ const std::string THCGAS::keywordName = "THCGAS"; const std::string THCGAS::data::itemName = "data"; +THCO2MIX::THCO2MIX() : ParserKeyword("THCO2MIX", KeywordSize(1, false)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("THCO2MIX"); + { + ParserRecord record; + { + ParserItem item("MIXING_MODEL_SALT", ParserItem::itype::STRING); + item.setDefault( std::string("MICHAELIDES") ); + record.addItem(item); + } + { + ParserItem item("MIXING_MODEL_LIQUID", ParserItem::itype::STRING); + item.setDefault( std::string("DUANSUN") ); + record.addItem(item); + } + { + ParserItem item("MIXING_MODEL_GAS", ParserItem::itype::STRING); + item.setDefault( std::string("NONE") ); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string THCO2MIX::keywordName = "THCO2MIX"; +const std::string THCO2MIX::MIXING_MODEL_SALT::itemName = "MIXING_MODEL_SALT"; +const std::string THCO2MIX::MIXING_MODEL_SALT::defaultValue = "MICHAELIDES"; +const std::string THCO2MIX::MIXING_MODEL_LIQUID::itemName = "MIXING_MODEL_LIQUID"; +const std::string THCO2MIX::MIXING_MODEL_LIQUID::defaultValue = "DUANSUN"; +const std::string THCO2MIX::MIXING_MODEL_GAS::itemName = "MIXING_MODEL_GAS"; +const std::string THCO2MIX::MIXING_MODEL_GAS::defaultValue = "NONE"; + + THCOIL::THCOIL() : ParserKeyword("THCOIL", KeywordSize(1, false)) { addValidSectionName("GRID"); clearDeckNames(); @@ -399,6 +430,25 @@ const std::string THCWATER::keywordName = "THCWATER"; const std::string THCWATER::data::itemName = "data"; +THELCOEF::THELCOEF() : ParserKeyword("THELCOEF", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("THELCOEF"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string THELCOEF::keywordName = "THELCOEF"; +const std::string THELCOEF::data::itemName = "data"; + + THERMAL::THERMAL() : ParserKeyword("THERMAL", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -407,6 +457,25 @@ THERMAL::THERMAL() : ParserKeyword("THERMAL", KeywordSize(0, false)) { const std::string THERMAL::keywordName = "THERMAL"; +THERMEXR::THERMEXR() : ParserKeyword("THERMEXR", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("THERMEXR"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1/AbsoluteTemperature"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string THERMEXR::keywordName = "THERMEXR"; +const std::string THERMEXR::data::itemName = "data"; + + THPRES::THPRES() : ParserKeyword("THPRES", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SOLUTION"); clearDeckNames(); @@ -623,7 +692,6 @@ TOLCRIT::TOLCRIT() : ParserKeyword("TOLCRIT", KeywordSize(1, false)) { } const std::string TOLCRIT::keywordName = "TOLCRIT"; const std::string TOLCRIT::VALUE::itemName = "VALUE"; -const double TOLCRIT::VALUE::defaultValue = 1e-06; TOPS::TOPS() : ParserKeyword("TOPS", KeywordSize(1, false)) { @@ -859,27 +927,19 @@ TRACERS::TRACERS() : ParserKeyword("TRACERS", KeywordSize(1, false)) { } const std::string TRACERS::keywordName = "TRACERS"; const std::string TRACERS::MAX_OIL_TRACERS::itemName = "MAX_OIL_TRACERS"; -const int TRACERS::MAX_OIL_TRACERS::defaultValue = 0; const std::string TRACERS::MAX_WATER_TRACERS::itemName = "MAX_WATER_TRACERS"; -const int TRACERS::MAX_WATER_TRACERS::defaultValue = 0; const std::string TRACERS::MAX_GAS_TRACERS::itemName = "MAX_GAS_TRACERS"; -const int TRACERS::MAX_GAS_TRACERS::defaultValue = 0; const std::string TRACERS::MAX_ENV_TRACERS::itemName = "MAX_ENV_TRACERS"; -const int TRACERS::MAX_ENV_TRACERS::defaultValue = 0; const std::string TRACERS::NUMERIC_DIFF::itemName = "NUMERIC_DIFF"; const std::string TRACERS::NUMERIC_DIFF::defaultValue = "NODIFF"; const std::string TRACERS::MAX_ITER::itemName = "MAX_ITER"; -const int TRACERS::MAX_ITER::defaultValue = 12; const std::string TRACERS::MIN_ITER::itemName = "MIN_ITER"; -const int TRACERS::MIN_ITER::defaultValue = 1; const std::string TRACERS::PASSIVE_NONLINEAR::itemName = "PASSIVE_NONLINEAR"; const std::string TRACERS::PASSIVE_NONLINEAR::defaultValue = "NO"; const std::string TRACERS::ONEOFF_LIN_TIGHT::itemName = "ONEOFF_LIN_TIGHT"; const std::string TRACERS::ONEOFF_NLIN_TIGHT::itemName = "ONEOFF_NLIN_TIGHT"; const std::string TRACERS::TIGHTENING_FACTORS::itemName = "TIGHTENING_FACTORS"; -const double TRACERS::TIGHTENING_FACTORS::defaultValue = 1.000000; const std::string TRACERS::NTIGHTFACTORS::itemName = "NTIGHTFACTORS"; -const int TRACERS::NTIGHTFACTORS::defaultValue = 0; TRACITVD::TRACITVD() : ParserKeyword("TRACITVD", KeywordSize(1, false)) { @@ -903,7 +963,6 @@ TRACITVD::TRACITVD() : ParserKeyword("TRACITVD", KeywordSize(1, false)) { } const std::string TRACITVD::keywordName = "TRACITVD"; const std::string TRACITVD::FLUX_LIMITER::itemName = "FLUX_LIMITER"; -const int TRACITVD::FLUX_LIMITER::defaultValue = 1; const std::string TRACITVD::BOTH_TIMESTEP::itemName = "BOTH_TIMESTEP"; const std::string TRACITVD::BOTH_TIMESTEP::defaultValue = "YES"; @@ -1094,7 +1153,6 @@ TRDCY::TRDCY() : ParserKeyword("TRDCY", KeywordSize("TABDIMS", "NTPVT", false, 0 } const std::string TRDCY::keywordName = "TRDCY"; const std::string TRDCY::HALF_TIME::itemName = "HALF_TIME"; -const double TRDCY::HALF_TIME::defaultValue = 100000000000000000000.000000; TRDIF::TRDIF() : ParserKeyword("TRDIF", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -1114,7 +1172,6 @@ TRDIF::TRDIF() : ParserKeyword("TRDIF", KeywordSize("TABDIMS", "NTPVT", false, 0 } const std::string TRDIF::keywordName = "TRDIF"; const std::string TRDIF::HALF_TIME::itemName = "HALF_TIME"; -const double TRDIF::HALF_TIME::defaultValue = 100000000000000000000.000000; TRDIS::TRDIS() : ParserKeyword("TRDIS", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -1174,7 +1231,7 @@ const std::string TRDIS::D8TABLE::itemName = "D8TABLE"; const std::string TRDIS::D9TABLE::itemName = "D9TABLE"; -TREF::TREF() : ParserKeyword("TREF", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +TREF::TREF() : ParserKeyword("TREF", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("TREF"); @@ -1193,7 +1250,7 @@ const std::string TREF::keywordName = "TREF"; const std::string TREF::TEMPERATURE::itemName = "TEMPERATURE"; -TREFS::TREFS() : ParserKeyword("TREFS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +TREFS::TREFS() : ParserKeyword("TREFS", KeywordSize("TABDIMS", "NUM_EOS_SURFACE", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("TREFS"); @@ -1282,7 +1339,6 @@ const std::string TRROCK::keywordName = "TRROCK"; const std::string TRROCK::ADSORPTION_INDEX::itemName = "ADSORPTION_INDEX"; const std::string TRROCK::MASS_DENSITY::itemName = "MASS_DENSITY"; const std::string TRROCK::INIT_MODEL::itemName = "INIT_MODEL"; -const int TRROCK::INIT_MODEL::defaultValue = 1; TSTEP::TSTEP() : ParserKeyword("TSTEP", KeywordSize(1, false)) { @@ -1493,67 +1549,37 @@ TUNING::TUNING() : ParserKeyword("TUNING", KeywordSize(3, false)) { } const std::string TUNING::keywordName = "TUNING"; const std::string TUNING::TSINIT::itemName = "TSINIT"; -const double TUNING::TSINIT::defaultValue = 1.000000; const std::string TUNING::TSMAXZ::itemName = "TSMAXZ"; -const double TUNING::TSMAXZ::defaultValue = 365.000000; const std::string TUNING::TSMINZ::itemName = "TSMINZ"; -const double TUNING::TSMINZ::defaultValue = 0.100000; const std::string TUNING::TSMCHP::itemName = "TSMCHP"; -const double TUNING::TSMCHP::defaultValue = 0.150000; const std::string TUNING::TSFMAX::itemName = "TSFMAX"; -const double TUNING::TSFMAX::defaultValue = 3.000000; const std::string TUNING::TSFMIN::itemName = "TSFMIN"; -const double TUNING::TSFMIN::defaultValue = 0.300000; const std::string TUNING::TSFCNV::itemName = "TSFCNV"; -const double TUNING::TSFCNV::defaultValue = 0.100000; const std::string TUNING::TFDIFF::itemName = "TFDIFF"; -const double TUNING::TFDIFF::defaultValue = 1.250000; const std::string TUNING::THRUPT::itemName = "THRUPT"; -const double TUNING::THRUPT::defaultValue = 100000000000000000000.000000; const std::string TUNING::TMAXWC::itemName = "TMAXWC"; const std::string TUNING::TRGTTE::itemName = "TRGTTE"; -const double TUNING::TRGTTE::defaultValue = 0.100000; const std::string TUNING::TRGCNV::itemName = "TRGCNV"; -const double TUNING::TRGCNV::defaultValue = 0.001000; const std::string TUNING::TRGMBE::itemName = "TRGMBE"; -const double TUNING::TRGMBE::defaultValue = 1e-07; const std::string TUNING::TRGLCV::itemName = "TRGLCV"; -const double TUNING::TRGLCV::defaultValue = 0.000100; const std::string TUNING::XXXTTE::itemName = "XXXTTE"; -const double TUNING::XXXTTE::defaultValue = 10.000000; const std::string TUNING::XXXCNV::itemName = "XXXCNV"; -const double TUNING::XXXCNV::defaultValue = 0.010000; const std::string TUNING::XXXMBE::itemName = "XXXMBE"; -const double TUNING::XXXMBE::defaultValue = 1e-06; const std::string TUNING::XXXLCV::itemName = "XXXLCV"; -const double TUNING::XXXLCV::defaultValue = 0.001000; const std::string TUNING::XXXWFL::itemName = "XXXWFL"; -const double TUNING::XXXWFL::defaultValue = 0.001000; const std::string TUNING::TRGFIP::itemName = "TRGFIP"; -const double TUNING::TRGFIP::defaultValue = 0.025000; const std::string TUNING::TRGSFT::itemName = "TRGSFT"; const std::string TUNING::THIONX::itemName = "THIONX"; -const double TUNING::THIONX::defaultValue = 0.010000; const std::string TUNING::TRWGHT::itemName = "TRWGHT"; -const int TUNING::TRWGHT::defaultValue = 1; const std::string TUNING::NEWTMX::itemName = "NEWTMX"; -const int TUNING::NEWTMX::defaultValue = 12; const std::string TUNING::NEWTMN::itemName = "NEWTMN"; -const int TUNING::NEWTMN::defaultValue = 1; const std::string TUNING::LITMAX::itemName = "LITMAX"; -const int TUNING::LITMAX::defaultValue = 25; const std::string TUNING::LITMIN::itemName = "LITMIN"; -const int TUNING::LITMIN::defaultValue = 1; const std::string TUNING::MXWSIT::itemName = "MXWSIT"; -const int TUNING::MXWSIT::defaultValue = 8; const std::string TUNING::MXWPIT::itemName = "MXWPIT"; -const int TUNING::MXWPIT::defaultValue = 8; const std::string TUNING::DDPLIM::itemName = "DDPLIM"; -const double TUNING::DDPLIM::defaultValue = 1000000.000000; const std::string TUNING::DDSLIM::itemName = "DDSLIM"; -const double TUNING::DDSLIM::defaultValue = 1000000.000000; const std::string TUNING::TRGDPR::itemName = "TRGDPR"; -const double TUNING::TRGDPR::defaultValue = 1000000.000000; const std::string TUNING::XXXDPR::itemName = "XXXDPR"; @@ -1625,15 +1651,10 @@ TUNINGH::TUNINGH() : ParserKeyword("TUNINGH", KeywordSize(1, false)) { } const std::string TUNINGH::keywordName = "TUNINGH"; const std::string TUNINGH::GRGLCV::itemName = "GRGLCV"; -const double TUNINGH::GRGLCV::defaultValue = 0.000100; const std::string TUNINGH::GXXLCV::itemName = "GXXLCV"; -const double TUNINGH::GXXLCV::defaultValue = 0.001000; const std::string TUNINGH::GMSLCV::itemName = "GMSLCV"; -const double TUNINGH::GMSLCV::defaultValue = 1e-20; const std::string TUNINGH::LGTMIN::itemName = "LGTMIN"; -const int TUNINGH::LGTMIN::defaultValue = 1; const std::string TUNINGH::LGTMAX::itemName = "LGTMAX"; -const int TUNINGH::LGTMAX::defaultValue = 25; TUNINGL::TUNINGL() : ParserKeyword("TUNINGL", KeywordSize(3, false)) { @@ -1825,67 +1846,37 @@ TUNINGL::TUNINGL() : ParserKeyword("TUNINGL", KeywordSize(3, false)) { } const std::string TUNINGL::keywordName = "TUNINGL"; const std::string TUNINGL::TSINIT::itemName = "TSINIT"; -const double TUNINGL::TSINIT::defaultValue = 1.000000; const std::string TUNINGL::TSMAXZ::itemName = "TSMAXZ"; -const double TUNINGL::TSMAXZ::defaultValue = 365.000000; const std::string TUNINGL::TSMINZ::itemName = "TSMINZ"; -const double TUNINGL::TSMINZ::defaultValue = 0.100000; const std::string TUNINGL::TSMCHP::itemName = "TSMCHP"; -const double TUNINGL::TSMCHP::defaultValue = 0.150000; const std::string TUNINGL::TSFMAX::itemName = "TSFMAX"; -const double TUNINGL::TSFMAX::defaultValue = 3.000000; const std::string TUNINGL::TSFMIN::itemName = "TSFMIN"; -const double TUNINGL::TSFMIN::defaultValue = 0.300000; const std::string TUNINGL::TSFCNV::itemName = "TSFCNV"; -const double TUNINGL::TSFCNV::defaultValue = 0.100000; const std::string TUNINGL::TFDIFF::itemName = "TFDIFF"; -const double TUNINGL::TFDIFF::defaultValue = 1.250000; const std::string TUNINGL::THRUPT::itemName = "THRUPT"; -const double TUNINGL::THRUPT::defaultValue = 100000000000000000000.000000; const std::string TUNINGL::TMAXWC::itemName = "TMAXWC"; const std::string TUNINGL::TRGTTE::itemName = "TRGTTE"; -const double TUNINGL::TRGTTE::defaultValue = 0.100000; const std::string TUNINGL::TRGCNV::itemName = "TRGCNV"; -const double TUNINGL::TRGCNV::defaultValue = 0.001000; const std::string TUNINGL::TRGMBE::itemName = "TRGMBE"; -const double TUNINGL::TRGMBE::defaultValue = 1e-07; const std::string TUNINGL::TRGLCV::itemName = "TRGLCV"; -const double TUNINGL::TRGLCV::defaultValue = 0.000100; const std::string TUNINGL::XXXTTE::itemName = "XXXTTE"; -const double TUNINGL::XXXTTE::defaultValue = 10.000000; const std::string TUNINGL::XXXCNV::itemName = "XXXCNV"; -const double TUNINGL::XXXCNV::defaultValue = 0.010000; const std::string TUNINGL::XXXMBE::itemName = "XXXMBE"; -const double TUNINGL::XXXMBE::defaultValue = 1e-06; const std::string TUNINGL::XXXLCV::itemName = "XXXLCV"; -const double TUNINGL::XXXLCV::defaultValue = 0.001000; const std::string TUNINGL::XXXWFL::itemName = "XXXWFL"; -const double TUNINGL::XXXWFL::defaultValue = 0.001000; const std::string TUNINGL::TRGFIP::itemName = "TRGFIP"; -const double TUNINGL::TRGFIP::defaultValue = 0.025000; const std::string TUNINGL::TRGSFT::itemName = "TRGSFT"; const std::string TUNINGL::THIONX::itemName = "THIONX"; -const double TUNINGL::THIONX::defaultValue = 0.010000; const std::string TUNINGL::TRWGHT::itemName = "TRWGHT"; -const int TUNINGL::TRWGHT::defaultValue = 1; const std::string TUNINGL::NEWTMX::itemName = "NEWTMX"; -const int TUNINGL::NEWTMX::defaultValue = 12; const std::string TUNINGL::NEWTMN::itemName = "NEWTMN"; -const int TUNINGL::NEWTMN::defaultValue = 1; const std::string TUNINGL::LITMAX::itemName = "LITMAX"; -const int TUNINGL::LITMAX::defaultValue = 25; const std::string TUNINGL::LITMIN::itemName = "LITMIN"; -const int TUNINGL::LITMIN::defaultValue = 1; const std::string TUNINGL::MXWSIT::itemName = "MXWSIT"; -const int TUNINGL::MXWSIT::defaultValue = 8; const std::string TUNINGL::MXWPIT::itemName = "MXWPIT"; -const int TUNINGL::MXWPIT::defaultValue = 8; const std::string TUNINGL::DDPLIM::itemName = "DDPLIM"; -const double TUNINGL::DDPLIM::defaultValue = 1000000.000000; const std::string TUNINGL::DDSLIM::itemName = "DDSLIM"; -const double TUNINGL::DDSLIM::defaultValue = 1000000.000000; const std::string TUNINGL::TRGDPR::itemName = "TRGDPR"; -const double TUNINGL::TRGDPR::defaultValue = 1000000.000000; const std::string TUNINGL::XXXDPR::itemName = "XXXDPR"; @@ -2087,67 +2078,37 @@ TUNINGS::TUNINGS() : ParserKeyword("TUNINGS", KeywordSize(4, false)) { const std::string TUNINGS::keywordName = "TUNINGS"; const std::string TUNINGS::LGR::itemName = "LGR"; const std::string TUNINGS::TSINIT::itemName = "TSINIT"; -const double TUNINGS::TSINIT::defaultValue = 1.000000; const std::string TUNINGS::TSMAXZ::itemName = "TSMAXZ"; -const double TUNINGS::TSMAXZ::defaultValue = 365.000000; const std::string TUNINGS::TSMINZ::itemName = "TSMINZ"; -const double TUNINGS::TSMINZ::defaultValue = 0.100000; const std::string TUNINGS::TSMCHP::itemName = "TSMCHP"; -const double TUNINGS::TSMCHP::defaultValue = 0.150000; const std::string TUNINGS::TSFMAX::itemName = "TSFMAX"; -const double TUNINGS::TSFMAX::defaultValue = 3.000000; const std::string TUNINGS::TSFMIN::itemName = "TSFMIN"; -const double TUNINGS::TSFMIN::defaultValue = 0.300000; const std::string TUNINGS::TSFCNV::itemName = "TSFCNV"; -const double TUNINGS::TSFCNV::defaultValue = 0.100000; const std::string TUNINGS::TFDIFF::itemName = "TFDIFF"; -const double TUNINGS::TFDIFF::defaultValue = 1.250000; const std::string TUNINGS::THRUPT::itemName = "THRUPT"; -const double TUNINGS::THRUPT::defaultValue = 100000000000000000000.000000; const std::string TUNINGS::TMAXWC::itemName = "TMAXWC"; const std::string TUNINGS::TRGTTE::itemName = "TRGTTE"; -const double TUNINGS::TRGTTE::defaultValue = 0.100000; const std::string TUNINGS::TRGCNV::itemName = "TRGCNV"; -const double TUNINGS::TRGCNV::defaultValue = 0.001000; const std::string TUNINGS::TRGMBE::itemName = "TRGMBE"; -const double TUNINGS::TRGMBE::defaultValue = 1e-07; const std::string TUNINGS::TRGLCV::itemName = "TRGLCV"; -const double TUNINGS::TRGLCV::defaultValue = 0.000100; const std::string TUNINGS::XXXTTE::itemName = "XXXTTE"; -const double TUNINGS::XXXTTE::defaultValue = 10.000000; const std::string TUNINGS::XXXCNV::itemName = "XXXCNV"; -const double TUNINGS::XXXCNV::defaultValue = 0.010000; const std::string TUNINGS::XXXMBE::itemName = "XXXMBE"; -const double TUNINGS::XXXMBE::defaultValue = 1e-06; const std::string TUNINGS::XXXLCV::itemName = "XXXLCV"; -const double TUNINGS::XXXLCV::defaultValue = 0.001000; const std::string TUNINGS::XXXWFL::itemName = "XXXWFL"; -const double TUNINGS::XXXWFL::defaultValue = 0.001000; const std::string TUNINGS::TRGFIP::itemName = "TRGFIP"; -const double TUNINGS::TRGFIP::defaultValue = 0.025000; const std::string TUNINGS::TRGSFT::itemName = "TRGSFT"; const std::string TUNINGS::THIONX::itemName = "THIONX"; -const double TUNINGS::THIONX::defaultValue = 0.010000; const std::string TUNINGS::TRWGHT::itemName = "TRWGHT"; -const int TUNINGS::TRWGHT::defaultValue = 1; const std::string TUNINGS::NEWTMX::itemName = "NEWTMX"; -const int TUNINGS::NEWTMX::defaultValue = 12; const std::string TUNINGS::NEWTMN::itemName = "NEWTMN"; -const int TUNINGS::NEWTMN::defaultValue = 1; const std::string TUNINGS::LITMAX::itemName = "LITMAX"; -const int TUNINGS::LITMAX::defaultValue = 25; const std::string TUNINGS::LITMIN::itemName = "LITMIN"; -const int TUNINGS::LITMIN::defaultValue = 1; const std::string TUNINGS::MXWSIT::itemName = "MXWSIT"; -const int TUNINGS::MXWSIT::defaultValue = 8; const std::string TUNINGS::MXWPIT::itemName = "MXWPIT"; -const int TUNINGS::MXWPIT::defaultValue = 8; const std::string TUNINGS::DDPLIM::itemName = "DDPLIM"; -const double TUNINGS::DDPLIM::defaultValue = 1000000.000000; const std::string TUNINGS::DDSLIM::itemName = "DDSLIM"; -const double TUNINGS::DDSLIM::defaultValue = 1000000.000000; const std::string TUNINGS::TRGDPR::itemName = "TRGDPR"; -const double TUNINGS::TRGDPR::defaultValue = 1000000.000000; const std::string TUNINGS::XXXDPR::itemName = "XXXDPR"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/U.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/U.cpp index 3e08ac6d9a..2958df9749 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/U.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/U.cpp @@ -37,11 +37,8 @@ UDADIMS::UDADIMS() : ParserKeyword("UDADIMS", KeywordSize(1, false)) { } const std::string UDADIMS::keywordName = "UDADIMS"; const std::string UDADIMS::NUM_UDQ_REPLACE::itemName = "NUM_UDQ_REPLACE"; -const int UDADIMS::NUM_UDQ_REPLACE::defaultValue = 0; const std::string UDADIMS::IGNORED::itemName = "IGNORED"; -const int UDADIMS::IGNORED::defaultValue = 0; const std::string UDADIMS::TOTAL_UDQ_UNIQUE::itemName = "TOTAL_UDQ_UNIQUE"; -const int UDADIMS::TOTAL_UDQ_UNIQUE::defaultValue = 100; UDQ::UDQ() : ParserKeyword("UDQ", KeywordSize(SLASH_TERMINATED)) { @@ -138,25 +135,15 @@ UDQDIMS::UDQDIMS() : ParserKeyword("UDQDIMS", KeywordSize(1, false)) { } const std::string UDQDIMS::keywordName = "UDQDIMS"; const std::string UDQDIMS::MAX_FUNCTIONS::itemName = "MAX_FUNCTIONS"; -const int UDQDIMS::MAX_FUNCTIONS::defaultValue = 16; const std::string UDQDIMS::MAX_ITEMS::itemName = "MAX_ITEMS"; -const int UDQDIMS::MAX_ITEMS::defaultValue = 16; const std::string UDQDIMS::MAX_CONNECTIONS::itemName = "MAX_CONNECTIONS"; -const int UDQDIMS::MAX_CONNECTIONS::defaultValue = 0; const std::string UDQDIMS::MAX_FIELDS::itemName = "MAX_FIELDS"; -const int UDQDIMS::MAX_FIELDS::defaultValue = 0; const std::string UDQDIMS::MAX_GROUP::itemName = "MAX_GROUP"; -const int UDQDIMS::MAX_GROUP::defaultValue = 0; const std::string UDQDIMS::MAX_REGION::itemName = "MAX_REGION"; -const int UDQDIMS::MAX_REGION::defaultValue = 0; const std::string UDQDIMS::MAX_SEGMENT::itemName = "MAX_SEGMENT"; -const int UDQDIMS::MAX_SEGMENT::defaultValue = 0; const std::string UDQDIMS::MAX_WELL::itemName = "MAX_WELL"; -const int UDQDIMS::MAX_WELL::defaultValue = 0; const std::string UDQDIMS::MAX_AQUIFER::itemName = "MAX_AQUIFER"; -const int UDQDIMS::MAX_AQUIFER::defaultValue = 0; const std::string UDQDIMS::MAX_BLOCK::itemName = "MAX_BLOCK"; -const int UDQDIMS::MAX_BLOCK::defaultValue = 0; const std::string UDQDIMS::RESTART_NEW_SEED::itemName = "RESTART_NEW_SEED"; const std::string UDQDIMS::RESTART_NEW_SEED::defaultValue = "N"; @@ -192,21 +179,57 @@ UDQPARAM::UDQPARAM() : ParserKeyword("UDQPARAM", KeywordSize(1, false)) { } const std::string UDQPARAM::keywordName = "UDQPARAM"; const std::string UDQPARAM::RANDOM_SEED::itemName = "RANDOM_SEED"; -const int UDQPARAM::RANDOM_SEED::defaultValue = 1; const std::string UDQPARAM::RANGE::itemName = "RANGE"; -const double UDQPARAM::RANGE::defaultValue = 100000000000000000000.000000; const std::string UDQPARAM::UNDEFINED_VALUE::itemName = "UNDEFINED_VALUE"; -const double UDQPARAM::UNDEFINED_VALUE::defaultValue = 0; const std::string UDQPARAM::CMP_EPSILON::itemName = "CMP_EPSILON"; -const double UDQPARAM::CMP_EPSILON::defaultValue = 0.000100; -UDT::UDT() : ParserKeyword("UDT", KeywordSize(0, false)) { +UDT::UDT() : ParserKeyword("UDT", KeywordSize(DOUBLE_SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); addDeckName("UDT"); + setDoubleRecordsKeyword(true); + { + ParserRecord record; + { + ParserItem item("TABLE_NAME", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("DIMENSIONS", ParserItem::itype::INT); + record.addItem(item); + } + addRecord( record ); + } + { + ParserRecord record; + { + ParserItem item("INTERPOLATION_TYPE", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("INTERPOLATION_POINTS", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + record.addItem(item); + } + addRecord( record ); + } + { + ParserRecord record; + { + ParserItem item("TABLE_VALUES", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + record.addItem(item); + } + addRecord( record ); + } } const std::string UDT::keywordName = "UDT"; +const std::string UDT::TABLE_NAME::itemName = "TABLE_NAME"; +const std::string UDT::DIMENSIONS::itemName = "DIMENSIONS"; +const std::string UDT::INTERPOLATION_TYPE::itemName = "INTERPOLATION_TYPE"; +const std::string UDT::INTERPOLATION_POINTS::itemName = "INTERPOLATION_POINTS"; +const std::string UDT::TABLE_VALUES::itemName = "TABLE_VALUES"; UDTDIMS::UDTDIMS() : ParserKeyword("UDTDIMS", KeywordSize(1, false)) { @@ -240,13 +263,9 @@ UDTDIMS::UDTDIMS() : ParserKeyword("UDTDIMS", KeywordSize(1, false)) { } const std::string UDTDIMS::keywordName = "UDTDIMS"; const std::string UDTDIMS::MAX_TABLES::itemName = "MAX_TABLES"; -const int UDTDIMS::MAX_TABLES::defaultValue = 0; const std::string UDTDIMS::MAX_ROWS::itemName = "MAX_ROWS"; -const int UDTDIMS::MAX_ROWS::defaultValue = 0; const std::string UDTDIMS::MAX_INTERPOLATION_POINTS::itemName = "MAX_INTERPOLATION_POINTS"; -const int UDTDIMS::MAX_INTERPOLATION_POINTS::defaultValue = 0; const std::string UDTDIMS::MAX_DIMENSIONS::itemName = "MAX_DIMENSIONS"; -const int UDTDIMS::MAX_DIMENSIONS::defaultValue = 0; UNCODHMD::UNCODHMD() : ParserKeyword("UNCODHMD", KeywordSize(0, false)) { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/V.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/V.cpp index ed89918565..e3e2fb9edd 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/V.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/V.cpp @@ -50,6 +50,25 @@ VAPWAT::VAPWAT() : ParserKeyword("VAPWAT", KeywordSize(0, false)) { const std::string VAPWAT::keywordName = "VAPWAT"; +VCRIT::VCRIT() : ParserKeyword("VCRIT", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("VCRIT"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("GeometricVolume/Moles"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string VCRIT::keywordName = "VCRIT"; +const std::string VCRIT::DATA::itemName = "DATA"; + + VDFLOW::VDFLOW() : ParserKeyword("VDFLOW", KeywordSize(1, false)) { addValidSectionName("PROPS"); clearDeckNames(); @@ -154,7 +173,6 @@ const std::string VEDEBUG::J2::itemName = "J2"; const std::string VEDEBUG::K1::itemName = "K1"; const std::string VEDEBUG::K2::itemName = "K2"; const std::string VEDEBUG::DEBUG_LEVEL::itemName = "DEBUG_LEVEL"; -const int VEDEBUG::DEBUG_LEVEL::defaultValue = 0; const std::string VEDEBUG::LGR::itemName = "LGR"; const std::string VEDEBUG::LGR::defaultValue = " "; @@ -182,7 +200,6 @@ const std::string VEFIN::keywordName = "VEFIN"; const std::string VEFIN::VE::itemName = "VE"; const std::string VEFIN::VE::defaultValue = "NO"; const std::string VEFIN::NVEPT::itemName = "NVEPT"; -const int VEFIN::NVEPT::defaultValue = 0; VEFRAC::VEFRAC() : ParserKeyword("VEFRAC", KeywordSize(1, false)) { @@ -201,7 +218,6 @@ VEFRAC::VEFRAC() : ParserKeyword("VEFRAC", KeywordSize(1, false)) { } const std::string VEFRAC::keywordName = "VEFRAC"; const std::string VEFRAC::FRAC::itemName = "FRAC"; -const double VEFRAC::FRAC::defaultValue = 10.000000; VEFRACP::VEFRACP() : ParserKeyword("VEFRACP", KeywordSize(1, false)) { @@ -220,7 +236,6 @@ VEFRACP::VEFRACP() : ParserKeyword("VEFRACP", KeywordSize(1, false)) { } const std::string VEFRACP::keywordName = "VEFRACP"; const std::string VEFRACP::FRAC::itemName = "FRAC"; -const double VEFRACP::FRAC::defaultValue = 1.000000; VEFRACPV::VEFRACPV() : ParserKeyword("VEFRACPV", KeywordSize(1, false)) { @@ -276,7 +291,6 @@ VFPCHK::VFPCHK() : ParserKeyword("VFPCHK", KeywordSize(1, false)) { } const std::string VFPCHK::keywordName = "VFPCHK"; const std::string VFPCHK::BHP_LIMIT::itemName = "BHP_LIMIT"; -const double VFPCHK::BHP_LIMIT::defaultValue = 10000000000.000000; VFPIDIMS::VFPIDIMS() : ParserKeyword("VFPIDIMS", KeywordSize(1, false)) { @@ -305,11 +319,8 @@ VFPIDIMS::VFPIDIMS() : ParserKeyword("VFPIDIMS", KeywordSize(1, false)) { } const std::string VFPIDIMS::keywordName = "VFPIDIMS"; const std::string VFPIDIMS::MAX_FLOW_TABLE::itemName = "MAX_FLOW_TABLE"; -const int VFPIDIMS::MAX_FLOW_TABLE::defaultValue = 0; const std::string VFPIDIMS::MAX_THP_TABLE::itemName = "MAX_THP_TABLE"; -const int VFPIDIMS::MAX_THP_TABLE::defaultValue = 0; const std::string VFPIDIMS::MAX_INJ_VFP_TABLE::itemName = "MAX_INJ_VFP_TABLE"; -const int VFPIDIMS::MAX_INJ_VFP_TABLE::defaultValue = 0; VFPINJ::VFPINJ() : ParserKeyword("VFPINJ", KeywordSize(UNKNOWN)) { @@ -435,17 +446,11 @@ VFPPDIMS::VFPPDIMS() : ParserKeyword("VFPPDIMS", KeywordSize(1, false)) { } const std::string VFPPDIMS::keywordName = "VFPPDIMS"; const std::string VFPPDIMS::MAX_FLOW_TABLE::itemName = "MAX_FLOW_TABLE"; -const int VFPPDIMS::MAX_FLOW_TABLE::defaultValue = 0; const std::string VFPPDIMS::MAX_THP_TABLE::itemName = "MAX_THP_TABLE"; -const int VFPPDIMS::MAX_THP_TABLE::defaultValue = 0; const std::string VFPPDIMS::MAX_WCT_TABLE::itemName = "MAX_WCT_TABLE"; -const int VFPPDIMS::MAX_WCT_TABLE::defaultValue = 0; const std::string VFPPDIMS::MAX_GCT_TABLE::itemName = "MAX_GCT_TABLE"; -const int VFPPDIMS::MAX_GCT_TABLE::defaultValue = 0; const std::string VFPPDIMS::MAX_ALQ_TABLE::itemName = "MAX_ALQ_TABLE"; -const int VFPPDIMS::MAX_ALQ_TABLE::defaultValue = 0; const std::string VFPPDIMS::MAX_PROD_VFP_TABLE::itemName = "MAX_PROD_VFP_TABLE"; -const int VFPPDIMS::MAX_PROD_VFP_TABLE::defaultValue = 0; VFPPROD::VFPPROD() : ParserKeyword("VFPPROD", KeywordSize(UNKNOWN)) { @@ -615,6 +620,25 @@ VISAGE::VISAGE() : ParserKeyword("VISAGE", KeywordSize(0, false)) { const std::string VISAGE::keywordName = "VISAGE"; +VISCAQA::VISCAQA() : ParserKeyword("VISCAQA", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("VISCAQA"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string VISCAQA::keywordName = "VISCAQA"; +const std::string VISCAQA::DATA::itemName = "DATA"; + + VISCD::VISCD() : ParserKeyword("VISCD", KeywordSize(0, false)) { addValidSectionName("RUNSPEC"); clearDeckNames(); @@ -743,14 +767,13 @@ const std::string VISOPTS::EXIT::defaultValue = "NO"; const std::string VISOPTS::ACTIVE::itemName = "ACTIVE"; const std::string VISOPTS::ACTIVE::defaultValue = "NO"; const std::string VISOPTS::REL_TOL::itemName = "REL_TOL"; -const double VISOPTS::REL_TOL::defaultValue = 0.050000; const std::string VISOPTS::UNUSED::itemName = "UNUSED"; const std::string VISOPTS::RETAIN_RESTART_FREQUENCY::itemName = "RETAIN_RESTART_FREQUENCY"; const std::string VISOPTS::RETAIN_RESTART_FREQUENCY::defaultValue = "NO"; const std::string VISOPTS::RETAIN_RESTART_CONTENT::itemName = "RETAIN_RESTART_CONTENT"; const std::string VISOPTS::RETAIN_RESTART_CONTENT::defaultValue = "NO"; -const std::string VISOPTS::msvc_prefix_ERROR::itemName = "ERROR"; -const std::string VISOPTS::msvc_prefix_ERROR::defaultValue = "ERROR"; +const std::string VISOPTS::ERROR::itemName = "ERROR"; +const std::string VISOPTS::ERROR::defaultValue = "ERROR"; } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/W.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/W.cpp index 551491c194..9cca2ebe55 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/W.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/W.cpp @@ -62,7 +62,6 @@ WAGHYSTR::WAGHYSTR() : ParserKeyword("WAGHYSTR", KeywordSize("TABDIMS", "NTSFUN" const std::string WAGHYSTR::keywordName = "WAGHYSTR"; const std::string WAGHYSTR::LANDS_PARAMETER::itemName = "LANDS_PARAMETER"; const std::string WAGHYSTR::SECONDARY_DRAINAGE_REDUCTION::itemName = "SECONDARY_DRAINAGE_REDUCTION"; -const double WAGHYSTR::SECONDARY_DRAINAGE_REDUCTION::defaultValue = 0; const std::string WAGHYSTR::GAS_MODEL::itemName = "GAS_MODEL"; const std::string WAGHYSTR::GAS_MODEL::defaultValue = "YES"; const std::string WAGHYSTR::RES_OIL::itemName = "RES_OIL"; @@ -70,11 +69,8 @@ const std::string WAGHYSTR::RES_OIL::defaultValue = "YES"; const std::string WAGHYSTR::WATER_MODEL::itemName = "WATER_MODEL"; const std::string WAGHYSTR::WATER_MODEL::defaultValue = "YES"; const std::string WAGHYSTR::IMB_LINEAR_FRACTION::itemName = "IMB_LINEAR_FRACTION"; -const double WAGHYSTR::IMB_LINEAR_FRACTION::defaultValue = 0.100000; const std::string WAGHYSTR::THREEPHASE_SAT_LIMIT::itemName = "THREEPHASE_SAT_LIMIT"; -const double WAGHYSTR::THREEPHASE_SAT_LIMIT::defaultValue = 0.001000; const std::string WAGHYSTR::RES_OIL_MOD_FRACTION::itemName = "RES_OIL_MOD_FRACTION"; -const double WAGHYSTR::RES_OIL_MOD_FRACTION::defaultValue = 1.000000; WAITBAL::WAITBAL() : ParserKeyword("WAITBAL", KeywordSize(1, false)) { @@ -209,11 +205,8 @@ WATDENT::WATDENT() : ParserKeyword("WATDENT", KeywordSize("TABDIMS", "NTPVT", fa } const std::string WATDENT::keywordName = "WATDENT"; const std::string WATDENT::REFERENCE_TEMPERATURE::itemName = "REFERENCE_TEMPERATURE"; -const double WATDENT::REFERENCE_TEMPERATURE::defaultValue = 293.150000; const std::string WATDENT::EXPANSION_COEFF_LINEAR::itemName = "EXPANSION_COEFF_LINEAR"; -const double WATDENT::EXPANSION_COEFF_LINEAR::defaultValue = 0.000300; const std::string WATDENT::EXPANSION_COEFF_QUADRATIC::itemName = "EXPANSION_COEFF_QUADRATIC"; -const double WATDENT::EXPANSION_COEFF_QUADRATIC::defaultValue = 3e-06; WATER::WATER() : ParserKeyword("WATER", KeywordSize(0, false)) { @@ -239,7 +232,7 @@ WATJT::WATJT() : ParserKeyword("WATJT", KeywordSize("TABDIMS", "NTPVT", false, 0 { ParserItem item("JOULE_THOMSON_COEFFICIENT", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); - item.push_backDimension("Temperature/Pressure"); + item.push_backDimension("AbsoluteTemperature/Pressure"); record.addItem(item); } addRecord( record ); @@ -247,9 +240,7 @@ WATJT::WATJT() : ParserKeyword("WATJT", KeywordSize("TABDIMS", "NTPVT", false, 0 } const std::string WATJT::keywordName = "WATJT"; const std::string WATJT::PREF::itemName = "PREF"; -const double WATJT::PREF::defaultValue = 1.013200; const std::string WATJT::JOULE_THOMSON_COEFFICIENT::itemName = "JOULE_THOMSON_COEFFICIENT"; -const double WATJT::JOULE_THOMSON_COEFFICIENT::defaultValue = 0; WATVISCT::WATVISCT() : ParserKeyword("WATVISCT", KeywordSize("TABDIMS", "NTPVT", false, 0)) { @@ -326,15 +317,11 @@ WBHGLR::WBHGLR() : ParserKeyword("WBHGLR", KeywordSize(SLASH_TERMINATED)) { const std::string WBHGLR::keywordName = "WBHGLR"; const std::string WBHGLR::WELL::itemName = "WELL"; const std::string WBHGLR::MAX_GLR_CUTBACK::itemName = "MAX_GLR_CUTBACK"; -const double WBHGLR::MAX_GLR_CUTBACK::defaultValue = 100000000000000000000.000000; const std::string WBHGLR::MIN_GLR_CUTBACK_REVERSE::itemName = "MIN_GLR_CUTBACK_REVERSE"; -const double WBHGLR::MIN_GLR_CUTBACK_REVERSE::defaultValue = 100000000000000000000.000000; const std::string WBHGLR::RATE_CUTBACK_FACTOR::itemName = "RATE_CUTBACK_FACTOR"; -const double WBHGLR::RATE_CUTBACK_FACTOR::defaultValue = 1.000000; const std::string WBHGLR::PHASE::itemName = "PHASE"; const std::string WBHGLR::PHASE::defaultValue = "RESV"; const std::string WBHGLR::MAX_GLR_ELIMIT::itemName = "MAX_GLR_ELIMIT"; -const double WBHGLR::MAX_GLR_ELIMIT::defaultValue = 100000000000000000000.000000; const std::string WBHGLR::WORKOVER_ACTION::itemName = "WORKOVER_ACTION"; const std::string WBHGLR::WORKOVER_ACTION::defaultValue = "NONE"; const std::string WBHGLR::WORKOVER_REMOVE_CUTBACKS::itemName = "WORKOVER_REMOVE_CUTBACKS"; @@ -368,7 +355,6 @@ WBOREVOL::WBOREVOL() : ParserKeyword("WBOREVOL", KeywordSize(SLASH_TERMINATED)) const std::string WBOREVOL::keywordName = "WBOREVOL"; const std::string WBOREVOL::WELL::itemName = "WELL"; const std::string WBOREVOL::WELLBORE_VOL::itemName = "WELLBORE_VOL"; -const double WBOREVOL::WELLBORE_VOL::defaultValue = 1e-05; const std::string WBOREVOL::START_BHP::itemName = "START_BHP"; @@ -481,7 +467,6 @@ const UDAValue WCONHIST::WRAT::defaultValue = UDAValue(0); const std::string WCONHIST::GRAT::itemName = "GRAT"; const UDAValue WCONHIST::GRAT::defaultValue = UDAValue(0); const std::string WCONHIST::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONHIST::VFP_TABLE::defaultValue = 0; const std::string WCONHIST::ALQ::itemName = "ALQ"; const UDAValue WCONHIST::ALQ::defaultValue = UDAValue(0); const std::string WCONHIST::THP::itemName = "THP"; @@ -489,9 +474,7 @@ const UDAValue WCONHIST::THP::defaultValue = UDAValue(0); const std::string WCONHIST::BHP::itemName = "BHP"; const UDAValue WCONHIST::BHP::defaultValue = UDAValue(0); const std::string WCONHIST::WGASRAT_HIS::itemName = "WGASRAT_HIS"; -const double WCONHIST::WGASRAT_HIS::defaultValue = 0; const std::string WCONHIST::NGLRAT_HIS::itemName = "NGLRAT_HIS"; -const double WCONHIST::NGLRAT_HIS::defaultValue = 0; WCONINJ::WCONINJ() : ParserKeyword("WCONINJ", KeywordSize(0, false)) { @@ -596,19 +579,12 @@ const std::string WCONINJE::BHP::itemName = "BHP"; const UDAValue WCONINJE::BHP::defaultValue = UDAValue(6895.000000); const std::string WCONINJE::THP::itemName = "THP"; const std::string WCONINJE::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONINJE::VFP_TABLE::defaultValue = 0; const std::string WCONINJE::VAPOIL_C::itemName = "VAPOIL_C"; -const double WCONINJE::VAPOIL_C::defaultValue = 0; const std::string WCONINJE::GAS_STEAM_RATIO::itemName = "GAS_STEAM_RATIO"; -const double WCONINJE::GAS_STEAM_RATIO::defaultValue = 0; const std::string WCONINJE::SURFACE_OIL_FRACTION::itemName = "SURFACE_OIL_FRACTION"; -const double WCONINJE::SURFACE_OIL_FRACTION::defaultValue = 0; const std::string WCONINJE::SURFACE_WATER_FRACTION::itemName = "SURFACE_WATER_FRACTION"; -const double WCONINJE::SURFACE_WATER_FRACTION::defaultValue = 0; const std::string WCONINJE::SURFACE_GAS_FRACTION::itemName = "SURFACE_GAS_FRACTION"; -const double WCONINJE::SURFACE_GAS_FRACTION::defaultValue = 0; const std::string WCONINJE::OIL_STEAM_RATIO::itemName = "OIL_STEAM_RATIO"; -const double WCONINJE::OIL_STEAM_RATIO::defaultValue = 0; WCONINJH::WCONINJH() : ParserKeyword("WCONINJH", KeywordSize(SLASH_TERMINATED)) { @@ -688,15 +664,10 @@ const std::string WCONINJH::RATE::itemName = "RATE"; const std::string WCONINJH::BHP::itemName = "BHP"; const std::string WCONINJH::THP::itemName = "THP"; const std::string WCONINJH::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONINJH::VFP_TABLE::defaultValue = 0; const std::string WCONINJH::VAPOIL_C::itemName = "VAPOIL_C"; -const double WCONINJH::VAPOIL_C::defaultValue = 0; const std::string WCONINJH::SURFACE_OIL_FRACTION::itemName = "SURFACE_OIL_FRACTION"; -const double WCONINJH::SURFACE_OIL_FRACTION::defaultValue = 0; const std::string WCONINJH::SURFACE_WATER_FRACTION::itemName = "SURFACE_WATER_FRACTION"; -const double WCONINJH::SURFACE_WATER_FRACTION::defaultValue = 0; const std::string WCONINJH::SURFACE_GAS_FRACTION::itemName = "SURFACE_GAS_FRACTION"; -const double WCONINJH::SURFACE_GAS_FRACTION::defaultValue = 0; const std::string WCONINJH::CMODE::itemName = "CMODE"; const std::string WCONINJH::CMODE::defaultValue = "RATE"; @@ -781,22 +752,15 @@ const std::string WCONINJP::INJECTOR_TYPE::itemName = "INJECTOR_TYPE"; const std::string WCONINJP::STATUS::itemName = "STATUS"; const std::string WCONINJP::STATUS::defaultValue = "OPEN"; const std::string WCONINJP::BHP_MAX::itemName = "BHP_MAX"; -const double WCONINJP::BHP_MAX::defaultValue = 6895.000000; const std::string WCONINJP::THP_MAX::itemName = "THP_MAX"; const std::string WCONINJP::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONINJP::VFP_TABLE::defaultValue = 0; const std::string WCONINJP::VOIDAGE_TARGET_MULTIPLIER::itemName = "VOIDAGE_TARGET_MULTIPLIER"; -const double WCONINJP::VOIDAGE_TARGET_MULTIPLIER::defaultValue = 1.000000; const std::string WCONINJP::OIL_FRACTION::itemName = "OIL_FRACTION"; -const double WCONINJP::OIL_FRACTION::defaultValue = 0; const std::string WCONINJP::WATER_FRACTION::itemName = "WATER_FRACTION"; -const double WCONINJP::WATER_FRACTION::defaultValue = 0; const std::string WCONINJP::GAS_FRACTION::itemName = "GAS_FRACTION"; -const double WCONINJP::GAS_FRACTION::defaultValue = 0; const std::string WCONINJP::WELL::itemName = "WELL"; const std::string WCONINJP::PROD_FRACTION::itemName = "PROD_FRACTION"; const std::string WCONINJP::FIPNUM_VALUE::itemName = "FIPNUM_VALUE"; -const int WCONINJP::FIPNUM_VALUE::defaultValue = 0; WCONPROD::WCONPROD() : ParserKeyword("WCONPROD", KeywordSize(SLASH_TERMINATED)) { @@ -925,7 +889,6 @@ const UDAValue WCONPROD::BHP::defaultValue = UDAValue(1.013250); const std::string WCONPROD::THP::itemName = "THP"; const UDAValue WCONPROD::THP::defaultValue = UDAValue(0); const std::string WCONPROD::VFP_TABLE::itemName = "VFP_TABLE"; -const int WCONPROD::VFP_TABLE::defaultValue = 0; const std::string WCONPROD::ALQ::itemName = "ALQ"; const UDAValue WCONPROD::ALQ::defaultValue = UDAValue(0); const std::string WCONPROD::E300_ITEM13::itemName = "E300_ITEM13"; @@ -1028,20 +991,13 @@ const std::string WCUTBACK::GOR_LIMIT::itemName = "GOR_LIMIT"; const std::string WCUTBACK::GLR_LIMIT::itemName = "GLR_LIMIT"; const std::string WCUTBACK::WGR_LIMIT::itemName = "WGR_LIMIT"; const std::string WCUTBACK::RATE_CUTBACK::itemName = "RATE_CUTBACK"; -const double WCUTBACK::RATE_CUTBACK::defaultValue = 1.000000; const std::string WCUTBACK::PHASE::itemName = "PHASE"; const std::string WCUTBACK::PRESSURE_LIMIT::itemName = "PRESSURE_LIMIT"; -const double WCUTBACK::PRESSURE_LIMIT::defaultValue = 0; const std::string WCUTBACK::PRESSURE_LIMIT_REVERSE::itemName = "PRESSURE_LIMIT_REVERSE"; -const double WCUTBACK::PRESSURE_LIMIT_REVERSE::defaultValue = 0; const std::string WCUTBACK::WCT_LIMIT_REVERSE::itemName = "WCT_LIMIT_REVERSE"; -const double WCUTBACK::WCT_LIMIT_REVERSE::defaultValue = 0; const std::string WCUTBACK::GOR_LIMIT_REVERSE::itemName = "GOR_LIMIT_REVERSE"; -const double WCUTBACK::GOR_LIMIT_REVERSE::defaultValue = 0; const std::string WCUTBACK::GLR_LIMIT_REVERSE::itemName = "GLR_LIMIT_REVERSE"; -const double WCUTBACK::GLR_LIMIT_REVERSE::defaultValue = 0; const std::string WCUTBACK::WGR_LIMIT_REVERSE::itemName = "WGR_LIMIT_REVERSE"; -const double WCUTBACK::WGR_LIMIT_REVERSE::defaultValue = 0; const std::string WCUTBACK::WORKOVER_REMOVE::itemName = "WORKOVER_REMOVE"; const std::string WCUTBACK::WORKOVER_REMOVE::defaultValue = "NO"; @@ -1076,7 +1032,6 @@ WCUTBACT::WCUTBACT() : ParserKeyword("WCUTBACT", KeywordSize(SLASH_TERMINATED)) const std::string WCUTBACT::keywordName = "WCUTBACT"; const std::string WCUTBACT::WELL::itemName = "WELL"; const std::string WCUTBACT::RATE_CUTBACK::itemName = "RATE_CUTBACK"; -const double WCUTBACT::RATE_CUTBACK::defaultValue = 1.000000; const std::string WCUTBACT::PHASE::itemName = "PHASE"; const std::string WCUTBACT::WORKOVER_REMOVE::itemName = "WORKOVER_REMOVE"; const std::string WCUTBACT::WORKOVER_REMOVE::defaultValue = "NO"; @@ -1127,13 +1082,9 @@ WCYCLE::WCYCLE() : ParserKeyword("WCYCLE", KeywordSize(SLASH_TERMINATED)) { const std::string WCYCLE::keywordName = "WCYCLE"; const std::string WCYCLE::WELL::itemName = "WELL"; const std::string WCYCLE::ON_TIME::itemName = "ON_TIME"; -const double WCYCLE::ON_TIME::defaultValue = 0; const std::string WCYCLE::OFF_TIME::itemName = "OFF_TIME"; -const double WCYCLE::OFF_TIME::defaultValue = 0; const std::string WCYCLE::START_TIME::itemName = "START_TIME"; -const double WCYCLE::START_TIME::defaultValue = 0; const std::string WCYCLE::MAX_TIMESTEP::itemName = "MAX_TIMESTEP"; -const double WCYCLE::MAX_TIMESTEP::defaultValue = 0; const std::string WCYCLE::CONTROLLED_TIMESTEP::itemName = "CONTROLLED_TIMESTEP"; const std::string WCYCLE::CONTROLLED_TIMESTEP::defaultValue = "NO"; @@ -1160,7 +1111,6 @@ WDFAC::WDFAC() : ParserKeyword("WDFAC", KeywordSize(SLASH_TERMINATED)) { const std::string WDFAC::keywordName = "WDFAC"; const std::string WDFAC::WELL::itemName = "WELL"; const std::string WDFAC::DFACTOR::itemName = "DFACTOR"; -const double WDFAC::DFACTOR::defaultValue = 0; WDFACCOR::WDFACCOR() : ParserKeyword("WDFACCOR", KeywordSize(SLASH_TERMINATED)) { @@ -1176,16 +1126,19 @@ WDFACCOR::WDFACCOR() : ParserKeyword("WDFACCOR", KeywordSize(SLASH_TERMINATED)) { ParserItem item("A", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); + item.push_backDimension("Viscosity*Time*Area/Permeability*GasSurfaceVolume"); record.addItem(item); } { ParserItem item("B", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); + item.push_backDimension("1"); record.addItem(item); } { ParserItem item("C", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); + item.push_backDimension("1"); record.addItem(item); } addRecord( record ); @@ -1194,11 +1147,8 @@ WDFACCOR::WDFACCOR() : ParserKeyword("WDFACCOR", KeywordSize(SLASH_TERMINATED)) const std::string WDFACCOR::keywordName = "WDFACCOR"; const std::string WDFACCOR::WELLNAME::itemName = "WELLNAME"; const std::string WDFACCOR::A::itemName = "A"; -const double WDFACCOR::A::defaultValue = 0; const std::string WDFACCOR::B::itemName = "B"; -const double WDFACCOR::B::defaultValue = 0; const std::string WDFACCOR::C::itemName = "C"; -const double WDFACCOR::C::defaultValue = 0; WDRILPRI::WDRILPRI() : ParserKeyword("WDRILPRI", KeywordSize(SLASH_TERMINATED)) { @@ -1227,9 +1177,7 @@ WDRILPRI::WDRILPRI() : ParserKeyword("WDRILPRI", KeywordSize(SLASH_TERMINATED)) const std::string WDRILPRI::keywordName = "WDRILPRI"; const std::string WDRILPRI::WELL::itemName = "WELL"; const std::string WDRILPRI::PRIORITY::itemName = "PRIORITY"; -const double WDRILPRI::PRIORITY::defaultValue = -1.000000; const std::string WDRILPRI::DRILLING_UNIT::itemName = "DRILLING_UNIT"; -const int WDRILPRI::DRILLING_UNIT::defaultValue = 0; WDRILRES::WDRILRES() : ParserKeyword("WDRILRES", KeywordSize(0, false)) { @@ -1387,15 +1335,11 @@ const std::string WECON::FOLLOW_ON_WELL::defaultValue = "'"; const std::string WECON::LIMITED_QUANTITY::itemName = "LIMITED_QUANTITY"; const std::string WECON::LIMITED_QUANTITY::defaultValue = "RATE"; const std::string WECON::SECOND_MAX_WATER_CUT::itemName = "SECOND_MAX_WATER_CUT"; -const double WECON::SECOND_MAX_WATER_CUT::defaultValue = 0; const std::string WECON::WORKOVER_SECOND_WATER_CUT_LIMIT::itemName = "WORKOVER_SECOND_WATER_CUT_LIMIT"; const std::string WECON::MAX_GAS_LIQUID_RATIO::itemName = "MAX_GAS_LIQUID_RATIO"; -const double WECON::MAX_GAS_LIQUID_RATIO::defaultValue = 0; const std::string WECON::MIN_LIQUID_PRODCUTION_RATE::itemName = "MIN_LIQUID_PRODCUTION_RATE"; -const double WECON::MIN_LIQUID_PRODCUTION_RATE::defaultValue = 0; const std::string WECON::MAX_TEMP::itemName = "MAX_TEMP"; const std::string WECON::MIN_RES_FLUID_RATE::itemName = "MIN_RES_FLUID_RATE"; -const double WECON::MIN_RES_FLUID_RATE::defaultValue = 0; WECONINJ::WECONINJ() : ParserKeyword("WECONINJ", KeywordSize(SLASH_TERMINATED)) { @@ -1424,7 +1368,6 @@ WECONINJ::WECONINJ() : ParserKeyword("WECONINJ", KeywordSize(SLASH_TERMINATED)) const std::string WECONINJ::keywordName = "WECONINJ"; const std::string WECONINJ::WELL::itemName = "WELL"; const std::string WECONINJ::MIN_RATE::itemName = "MIN_RATE"; -const double WECONINJ::MIN_RATE::defaultValue = 0; const std::string WECONINJ::QUANTITY::itemName = "QUANTITY"; const std::string WECONINJ::QUANTITY::defaultValue = "RATE"; @@ -1491,7 +1434,6 @@ WEFAC::WEFAC() : ParserKeyword("WEFAC", KeywordSize(SLASH_TERMINATED)) { const std::string WEFAC::keywordName = "WEFAC"; const std::string WEFAC::WELLNAME::itemName = "WELLNAME"; const std::string WEFAC::EFFICIENCY_FACTOR::itemName = "EFFICIENCY_FACTOR"; -const double WEFAC::EFFICIENCY_FACTOR::defaultValue = 1.000000; const std::string WEFAC::EXTENDED_NETWORK_OPT::itemName = "EXTENDED_NETWORK_OPT"; const std::string WEFAC::EXTENDED_NETWORK_OPT::defaultValue = "YES"; @@ -1690,33 +1632,48 @@ WELLDIMS::WELLDIMS() : ParserKeyword("WELLDIMS", KeywordSize(1, false)) { } const std::string WELLDIMS::keywordName = "WELLDIMS"; const std::string WELLDIMS::MAXWELLS::itemName = "MAXWELLS"; -const int WELLDIMS::MAXWELLS::defaultValue = 0; const std::string WELLDIMS::MAXCONN::itemName = "MAXCONN"; -const int WELLDIMS::MAXCONN::defaultValue = 0; const std::string WELLDIMS::MAXGROUPS::itemName = "MAXGROUPS"; -const int WELLDIMS::MAXGROUPS::defaultValue = 0; const std::string WELLDIMS::MAX_GROUPSIZE::itemName = "MAX_GROUPSIZE"; -const int WELLDIMS::MAX_GROUPSIZE::defaultValue = 0; const std::string WELLDIMS::MAX_STAGES::itemName = "MAX_STAGES"; -const int WELLDIMS::MAX_STAGES::defaultValue = 5; const std::string WELLDIMS::MAX_STREAMS::itemName = "MAX_STREAMS"; -const int WELLDIMS::MAX_STREAMS::defaultValue = 10; const std::string WELLDIMS::MAX_MIXTURES::itemName = "MAX_MIXTURES"; -const int WELLDIMS::MAX_MIXTURES::defaultValue = 5; const std::string WELLDIMS::MAX_SEPARATORS::itemName = "MAX_SEPARATORS"; -const int WELLDIMS::MAX_SEPARATORS::defaultValue = 4; const std::string WELLDIMS::MAX_MIXTURE_ITEMS::itemName = "MAX_MIXTURE_ITEMS"; -const int WELLDIMS::MAX_MIXTURE_ITEMS::defaultValue = 3; const std::string WELLDIMS::MAX_COMPLETION_X::itemName = "MAX_COMPLETION_X"; -const int WELLDIMS::MAX_COMPLETION_X::defaultValue = 0; const std::string WELLDIMS::MAX_WELLIST_PR_WELL::itemName = "MAX_WELLIST_PR_WELL"; -const int WELLDIMS::MAX_WELLIST_PR_WELL::defaultValue = 1; const std::string WELLDIMS::MAX_DYNAMIC_WELLIST::itemName = "MAX_DYNAMIC_WELLIST"; -const int WELLDIMS::MAX_DYNAMIC_WELLIST::defaultValue = 1; const std::string WELLDIMS::MAX_SECONDARY_WELLS::itemName = "MAX_SECONDARY_WELLS"; -const int WELLDIMS::MAX_SECONDARY_WELLS::defaultValue = 10; const std::string WELLDIMS::MAX_GPP_ROWS::itemName = "MAX_GPP_ROWS"; -const int WELLDIMS::MAX_GPP_ROWS::defaultValue = 201; + + +WELLSTRE::WELLSTRE() : ParserKeyword("WELLSTRE", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("WELLSTRE"); + { + ParserRecord record; + { + ParserItem item("STREAM", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("XMOLE1", ParserItem::itype::DOUBLE); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("XMOLE2", ParserItem::itype::DOUBLE); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WELLSTRE::keywordName = "WELLSTRE"; +const std::string WELLSTRE::STREAM::itemName = "STREAM"; +const std::string WELLSTRE::XMOLE1::itemName = "XMOLE1"; +const std::string WELLSTRE::XMOLE2::itemName = "XMOLE2"; WELL_COMPLETION_PROBE::WELL_COMPLETION_PROBE() : ParserKeyword("WELL_COMPLETION_PROBE", KeywordSize(SLASH_TERMINATED)) { @@ -1803,6 +1760,7 @@ WELL_PROBE::WELL_PROBE() : ParserKeyword("WELL_PROBE", KeywordSize(1, false)) { addDeckName("WOPI"); addDeckName("WOPI2"); addDeckName("WTPTSUR"); + addDeckName("WBHPT"); addDeckName("WGIRT"); addDeckName("WPI1"); addDeckName("WWPI"); @@ -1994,6 +1952,55 @@ const std::string WELL_PROBE::keywordName = "WELL_PROBE"; const std::string WELL_PROBE::WELLS::itemName = "WELLS"; +WELL_PROBE_COMP::WELL_PROBE_COMP() : ParserKeyword("WELL_PROBE_COMP", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("WXMF"); + addDeckName("WYMF"); + addDeckName("WCOMR"); + addDeckName("WCGMR"); + addDeckName("WZMF"); + { + ParserRecord record; + { + ParserItem item("WELLS", ParserItem::itype::STRING); + item.setSizeType(ParserItem::item_size::ALL); + record.addItem(item); + } + { + ParserItem item("COMP_NUM", ParserItem::itype::INT); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WELL_PROBE_COMP::keywordName = "WELL_PROBE_COMP"; +const std::string WELL_PROBE_COMP::WELLS::itemName = "WELLS"; +const std::string WELL_PROBE_COMP::COMP_NUM::itemName = "COMP_NUM"; + + +WELL_PROBE_OPM::WELL_PROBE_OPM() : ParserKeyword("WELL_PROBE_OPM", KeywordSize(1, false)) { + addValidSectionName("SUMMARY"); + clearDeckNames(); + addDeckName("WINJFC"); + addDeckName("WGMIR"); + addDeckName("WINJFVR"); + addDeckName("WGMIT"); + addDeckName("WINJFVT"); + { + ParserRecord record; + { + ParserItem item("WELLS", ParserItem::itype::STRING); + item.setSizeType(ParserItem::item_size::ALL); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WELL_PROBE_OPM::keywordName = "WELL_PROBE_OPM"; +const std::string WELL_PROBE_OPM::WELLS::itemName = "WELLS"; + + WELMOVEL::WELMOVEL() : ParserKeyword("WELMOVEL", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -2187,13 +2194,9 @@ WELPRI::WELPRI() : ParserKeyword("WELPRI", KeywordSize(SLASH_TERMINATED)) { const std::string WELPRI::keywordName = "WELPRI"; const std::string WELPRI::WELL_NAME::itemName = "WELL_NAME"; const std::string WELPRI::PRI1::itemName = "PRI1"; -const int WELPRI::PRI1::defaultValue = -1; const std::string WELPRI::SCALING1::itemName = "SCALING1"; -const double WELPRI::SCALING1::defaultValue = 1.000000; const std::string WELPRI::PRI2::itemName = "PRI2"; -const int WELPRI::PRI2::defaultValue = -1; const std::string WELPRI::SCALING2::itemName = "SCALING2"; -const double WELPRI::SCALING2::defaultValue = 1.000000; WELSEGS::WELSEGS() : ParserKeyword("WELSEGS", KeywordSize(SLASH_TERMINATED)) { @@ -2207,12 +2210,12 @@ WELSEGS::WELSEGS() : ParserKeyword("WELSEGS", KeywordSize(SLASH_TERMINATED)) { record.addItem(item); } { - ParserItem item("DEPTH", ParserItem::itype::DOUBLE); + ParserItem item("TOP_DEPTH", ParserItem::itype::DOUBLE); item.push_backDimension("Length"); record.addItem(item); } { - ParserItem item("LENGTH", ParserItem::itype::DOUBLE); + ParserItem item("TOP_LENGTH", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); item.push_backDimension("Length"); record.addItem(item); @@ -2270,12 +2273,12 @@ WELSEGS::WELSEGS() : ParserKeyword("WELSEGS", KeywordSize(SLASH_TERMINATED)) { record.addItem(item); } { - ParserItem item("SEGMENT_LENGTH", ParserItem::itype::DOUBLE); + ParserItem item("LENGTH", ParserItem::itype::DOUBLE); item.push_backDimension("Length"); record.addItem(item); } { - ParserItem item("DEPTH_CHANGE", ParserItem::itype::DOUBLE); + ParserItem item("DEPTH", ParserItem::itype::DOUBLE); item.push_backDimension("Length"); record.addItem(item); } @@ -2316,34 +2319,28 @@ WELSEGS::WELSEGS() : ParserKeyword("WELSEGS", KeywordSize(SLASH_TERMINATED)) { } const std::string WELSEGS::keywordName = "WELSEGS"; const std::string WELSEGS::WELL::itemName = "WELL"; -const std::string WELSEGS::DEPTH::itemName = "DEPTH"; -const std::string WELSEGS::LENGTH::itemName = "LENGTH"; -const double WELSEGS::LENGTH::defaultValue = 0; +const std::string WELSEGS::TOP_DEPTH::itemName = "TOP_DEPTH"; +const std::string WELSEGS::TOP_LENGTH::itemName = "TOP_LENGTH"; const std::string WELSEGS::WELLBORE_VOLUME::itemName = "WELLBORE_VOLUME"; -const double WELSEGS::WELLBORE_VOLUME::defaultValue = 1e-05; const std::string WELSEGS::INFO_TYPE::itemName = "INFO_TYPE"; const std::string WELSEGS::PRESSURE_COMPONENTS::itemName = "PRESSURE_COMPONENTS"; const std::string WELSEGS::PRESSURE_COMPONENTS::defaultValue = "HFA"; const std::string WELSEGS::FLOW_MODEL::itemName = "FLOW_MODEL"; const std::string WELSEGS::FLOW_MODEL::defaultValue = "HO"; const std::string WELSEGS::TOP_X::itemName = "TOP_X"; -const double WELSEGS::TOP_X::defaultValue = 0; const std::string WELSEGS::TOP_Y::itemName = "TOP_Y"; -const double WELSEGS::TOP_Y::defaultValue = 0; const std::string WELSEGS::SEGMENT1::itemName = "SEGMENT1"; const std::string WELSEGS::SEGMENT2::itemName = "SEGMENT2"; const std::string WELSEGS::BRANCH::itemName = "BRANCH"; const std::string WELSEGS::JOIN_SEGMENT::itemName = "JOIN_SEGMENT"; -const std::string WELSEGS::SEGMENT_LENGTH::itemName = "SEGMENT_LENGTH"; -const std::string WELSEGS::DEPTH_CHANGE::itemName = "DEPTH_CHANGE"; +const std::string WELSEGS::LENGTH::itemName = "LENGTH"; +const std::string WELSEGS::DEPTH::itemName = "DEPTH"; const std::string WELSEGS::DIAMETER::itemName = "DIAMETER"; const std::string WELSEGS::ROUGHNESS::itemName = "ROUGHNESS"; const std::string WELSEGS::AREA::itemName = "AREA"; const std::string WELSEGS::VOLUME::itemName = "VOLUME"; const std::string WELSEGS::LENGTH_X::itemName = "LENGTH_X"; -const double WELSEGS::LENGTH_X::defaultValue = 0; const std::string WELSEGS::LENGTH_Y::itemName = "LENGTH_Y"; -const double WELSEGS::LENGTH_Y::defaultValue = 0; WELSOMIN::WELSOMIN() : ParserKeyword("WELSOMIN", KeywordSize(1, false)) { @@ -2464,7 +2461,6 @@ const std::string WELSPECL::HEAD_J::itemName = "HEAD_J"; const std::string WELSPECL::REF_DEPTH::itemName = "REF_DEPTH"; const std::string WELSPECL::PHASE::itemName = "PHASE"; const std::string WELSPECL::D_RADIUS::itemName = "D_RADIUS"; -const double WELSPECL::D_RADIUS::defaultValue = 0; const std::string WELSPECL::INFLOW_EQ::itemName = "INFLOW_EQ"; const std::string WELSPECL::INFLOW_EQ::defaultValue = "STD"; const std::string WELSPECL::AUTO_SHUTIN::itemName = "AUTO_SHUTIN"; @@ -2472,17 +2468,14 @@ const std::string WELSPECL::AUTO_SHUTIN::defaultValue = "SHUT"; const std::string WELSPECL::CROSSFLOW::itemName = "CROSSFLOW"; const std::string WELSPECL::CROSSFLOW::defaultValue = "YES"; const std::string WELSPECL::P_TABLE::itemName = "P_TABLE"; -const int WELSPECL::P_TABLE::defaultValue = 0; const std::string WELSPECL::DENSITY_CALC::itemName = "DENSITY_CALC"; const std::string WELSPECL::DENSITY_CALC::defaultValue = "SEG"; const std::string WELSPECL::FIP_REGION::itemName = "FIP_REGION"; -const int WELSPECL::FIP_REGION::defaultValue = 0; const std::string WELSPECL::FRONTSIM1::itemName = "FRONTSIM1"; const std::string WELSPECL::FRONTSIM2::itemName = "FRONTSIM2"; const std::string WELSPECL::well_model::itemName = "well_model"; const std::string WELSPECL::well_model::defaultValue = "STD"; const std::string WELSPECL::POLYMER_TABLE::itemName = "POLYMER_TABLE"; -const int WELSPECL::POLYMER_TABLE::defaultValue = 0; WELSPECS::WELSPECS() : ParserKeyword("WELSPECS", KeywordSize(SLASH_TERMINATED)) { @@ -2501,10 +2494,12 @@ WELSPECS::WELSPECS() : ParserKeyword("WELSPECS", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("HEAD_I", ParserItem::itype::INT); + item.setDefault( 0 ); record.addItem(item); } { ParserItem item("HEAD_J", ParserItem::itype::INT); + item.setDefault( 0 ); record.addItem(item); } { @@ -2581,7 +2576,6 @@ const std::string WELSPECS::HEAD_J::itemName = "HEAD_J"; const std::string WELSPECS::REF_DEPTH::itemName = "REF_DEPTH"; const std::string WELSPECS::PHASE::itemName = "PHASE"; const std::string WELSPECS::D_RADIUS::itemName = "D_RADIUS"; -const double WELSPECS::D_RADIUS::defaultValue = 0; const std::string WELSPECS::INFLOW_EQ::itemName = "INFLOW_EQ"; const std::string WELSPECS::INFLOW_EQ::defaultValue = "STD"; const std::string WELSPECS::AUTO_SHUTIN::itemName = "AUTO_SHUTIN"; @@ -2589,17 +2583,14 @@ const std::string WELSPECS::AUTO_SHUTIN::defaultValue = "SHUT"; const std::string WELSPECS::CROSSFLOW::itemName = "CROSSFLOW"; const std::string WELSPECS::CROSSFLOW::defaultValue = "YES"; const std::string WELSPECS::P_TABLE::itemName = "P_TABLE"; -const int WELSPECS::P_TABLE::defaultValue = 0; const std::string WELSPECS::DENSITY_CALC::itemName = "DENSITY_CALC"; const std::string WELSPECS::DENSITY_CALC::defaultValue = "SEG"; const std::string WELSPECS::FIP_REGION::itemName = "FIP_REGION"; -const int WELSPECS::FIP_REGION::defaultValue = 0; const std::string WELSPECS::FRONTSIM1::itemName = "FRONTSIM1"; const std::string WELSPECS::FRONTSIM2::itemName = "FRONTSIM2"; const std::string WELSPECS::well_model::itemName = "well_model"; const std::string WELSPECS::well_model::defaultValue = "STD"; const std::string WELSPECS::POLYMER_TABLE::itemName = "POLYMER_TABLE"; -const int WELSPECS::POLYMER_TABLE::defaultValue = 0; WELTARG::WELTARG() : ParserKeyword("WELTARG", KeywordSize(SLASH_TERMINATED)) { @@ -2629,6 +2620,53 @@ const std::string WELTARG::CMODE::itemName = "CMODE"; const std::string WELTARG::NEW_VALUE::itemName = "NEW_VALUE"; +WELTRAJ::WELTRAJ() : ParserKeyword("WELTRAJ", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("WELTRAJ"); + { + ParserRecord record; + { + ParserItem item("WELL", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("BRANCH_NUMBER", ParserItem::itype::INT); + item.setDefault( 1 ); + record.addItem(item); + } + { + ParserItem item("X", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("Y", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("TVD", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("MD", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WELTRAJ::keywordName = "WELTRAJ"; +const std::string WELTRAJ::WELL::itemName = "WELL"; +const std::string WELTRAJ::BRANCH_NUMBER::itemName = "BRANCH_NUMBER"; +const std::string WELTRAJ::X::itemName = "X"; +const std::string WELTRAJ::Y::itemName = "Y"; +const std::string WELTRAJ::TVD::itemName = "TVD"; +const std::string WELTRAJ::MD::itemName = "MD"; + + WFOAM::WFOAM() : ParserKeyword("WFOAM", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -2685,7 +2723,6 @@ const std::string WFRICSEG::WELL::itemName = "WELL"; const std::string WFRICSEG::TUBINGD::itemName = "TUBINGD"; const std::string WFRICSEG::ROUGHNESS::itemName = "ROUGHNESS"; const std::string WFRICSEG::FLOW_SCALING::itemName = "FLOW_SCALING"; -const double WFRICSEG::FLOW_SCALING::defaultValue = 1.000000; WFRICSGL::WFRICSGL() : ParserKeyword("WFRICSGL", KeywordSize(SLASH_TERMINATED)) { @@ -2721,7 +2758,6 @@ const std::string WFRICSGL::WELL::itemName = "WELL"; const std::string WFRICSGL::TUBINGD::itemName = "TUBINGD"; const std::string WFRICSGL::ROUGHNESS::itemName = "ROUGHNESS"; const std::string WFRICSGL::FLOW_SCALING::itemName = "FLOW_SCALING"; -const double WFRICSGL::FLOW_SCALING::defaultValue = 1.000000; WFRICTN::WFRICTN() : ParserKeyword("WFRICTN", KeywordSize(SLASH_TERMINATED)) { @@ -2757,7 +2793,6 @@ const std::string WFRICTN::WELL::itemName = "WELL"; const std::string WFRICTN::TUBINGD::itemName = "TUBINGD"; const std::string WFRICTN::ROUGHNESS::itemName = "ROUGHNESS"; const std::string WFRICTN::FLOW_SCALING::itemName = "FLOW_SCALING"; -const double WFRICTN::FLOW_SCALING::defaultValue = 1.000000; WFRICTNL::WFRICTNL() : ParserKeyword("WFRICTNL", KeywordSize(SLASH_TERMINATED)) { @@ -2793,7 +2828,6 @@ const std::string WFRICTNL::WELL::itemName = "WELL"; const std::string WFRICTNL::TUBINGD::itemName = "TUBINGD"; const std::string WFRICTNL::ROUGHNESS::itemName = "ROUGHNESS"; const std::string WFRICTNL::FLOW_SCALING::itemName = "FLOW_SCALING"; -const double WFRICTNL::FLOW_SCALING::defaultValue = 1.000000; WGASPROD::WGASPROD() : ParserKeyword("WGASPROD", KeywordSize(SLASH_TERMINATED)) { @@ -2893,10 +2927,8 @@ const std::string WGRUPCON::WELL::itemName = "WELL"; const std::string WGRUPCON::GROUP_CONTROLLED::itemName = "GROUP_CONTROLLED"; const std::string WGRUPCON::GROUP_CONTROLLED::defaultValue = "YES"; const std::string WGRUPCON::GUIDE_RATE::itemName = "GUIDE_RATE"; -const double WGRUPCON::GUIDE_RATE::defaultValue = -1.000000; const std::string WGRUPCON::PHASE::itemName = "PHASE"; const std::string WGRUPCON::SCALING_FACTOR::itemName = "SCALING_FACTOR"; -const double WGRUPCON::SCALING_FACTOR::defaultValue = 1.000000; WH2NUM::WH2NUM() : ParserKeyword("WH2NUM", KeywordSize(1, false)) { @@ -3012,6 +3044,179 @@ const std::string WHTEMP::VFP_TABLE::itemName = "VFP_TABLE"; const std::string WHTEMP::THP_TEMP::itemName = "THP_TEMP"; +WINJCLN::WINJCLN() : ParserKeyword("WINJCLN", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("WINJCLN"); + { + ParserRecord record; + { + ParserItem item("WELL_NAME", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("FRAC_REMOVE", ParserItem::itype::DOUBLE); + item.setDefault( double(1.000000) ); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("I", ParserItem::itype::INT); + item.setDefault( -1 ); + record.addItem(item); + } + { + ParserItem item("J", ParserItem::itype::INT); + item.setDefault( -1 ); + record.addItem(item); + } + { + ParserItem item("K", ParserItem::itype::INT); + item.setDefault( -1 ); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WINJCLN::keywordName = "WINJCLN"; +const std::string WINJCLN::WELL_NAME::itemName = "WELL_NAME"; +const std::string WINJCLN::FRAC_REMOVE::itemName = "FRAC_REMOVE"; +const std::string WINJCLN::I::itemName = "I"; +const std::string WINJCLN::J::itemName = "J"; +const std::string WINJCLN::K::itemName = "K"; + + +WINJDAM::WINJDAM() : ParserKeyword("WINJDAM", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("WINJDAM"); + { + ParserRecord record; + { + ParserItem item("WELL_NAME", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("GEOMETRY", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("FILTER_CAKE_PERM", ParserItem::itype::DOUBLE); + item.push_backDimension("Permeability"); + record.addItem(item); + } + { + ParserItem item("FILTER_CAKE_PORO", ParserItem::itype::DOUBLE); + item.setDefault( double(0.300000) ); + item.push_backDimension("1"); + record.addItem(item); + } + { + ParserItem item("FILTER_CAKE_RADIUS", ParserItem::itype::DOUBLE); + item.push_backDimension("Length"); + record.addItem(item); + } + { + ParserItem item("FILTER_CAKE_AREA", ParserItem::itype::DOUBLE); + item.push_backDimension("Length*Length"); + record.addItem(item); + } + { + ParserItem item("I", ParserItem::itype::INT); + item.setDefault( -1 ); + record.addItem(item); + } + { + ParserItem item("J", ParserItem::itype::INT); + item.setDefault( -1 ); + record.addItem(item); + } + { + ParserItem item("K", ParserItem::itype::INT); + item.setDefault( -1 ); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WINJDAM::keywordName = "WINJDAM"; +const std::string WINJDAM::WELL_NAME::itemName = "WELL_NAME"; +const std::string WINJDAM::GEOMETRY::itemName = "GEOMETRY"; +const std::string WINJDAM::FILTER_CAKE_PERM::itemName = "FILTER_CAKE_PERM"; +const std::string WINJDAM::FILTER_CAKE_PORO::itemName = "FILTER_CAKE_PORO"; +const std::string WINJDAM::FILTER_CAKE_RADIUS::itemName = "FILTER_CAKE_RADIUS"; +const std::string WINJDAM::FILTER_CAKE_AREA::itemName = "FILTER_CAKE_AREA"; +const std::string WINJDAM::I::itemName = "I"; +const std::string WINJDAM::J::itemName = "J"; +const std::string WINJDAM::K::itemName = "K"; + + +WINJFCNC::WINJFCNC() : ParserKeyword("WINJFCNC", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("WINJFCNC"); + { + ParserRecord record; + { + ParserItem item("WELL", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("VOL_CONCENTRATION", ParserItem::itype::UDA); + item.setDefault( UDAValue(0) ); + item.push_backDimension("PPM"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WINJFCNC::keywordName = "WINJFCNC"; +const std::string WINJFCNC::WELL::itemName = "WELL"; +const std::string WINJFCNC::VOL_CONCENTRATION::itemName = "VOL_CONCENTRATION"; +const UDAValue WINJFCNC::VOL_CONCENTRATION::defaultValue = UDAValue(0); + + +WINJGAS::WINJGAS() : ParserKeyword("WINJGAS", KeywordSize(SLASH_TERMINATED)) { + addValidSectionName("SCHEDULE"); + clearDeckNames(); + addDeckName("WINJGAS"); + { + ParserRecord record; + { + ParserItem item("WELL", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("FLUID", ParserItem::itype::STRING); + item.setDefault( std::string("GRUP") ); + record.addItem(item); + } + { + ParserItem item("STREAM", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("MAKEUPGAS", ParserItem::itype::STRING); + record.addItem(item); + } + { + ParserItem item("STAGE", ParserItem::itype::DOUBLE); + item.setDefault( double(0) ); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WINJGAS::keywordName = "WINJGAS"; +const std::string WINJGAS::WELL::itemName = "WELL"; +const std::string WINJGAS::FLUID::itemName = "FLUID"; +const std::string WINJGAS::FLUID::defaultValue = "GRUP"; +const std::string WINJGAS::STREAM::itemName = "STREAM"; +const std::string WINJGAS::MAKEUPGAS::itemName = "MAKEUPGAS"; +const std::string WINJGAS::STAGE::itemName = "STAGE"; + + WINJMULT::WINJMULT() : ParserKeyword("WINJMULT", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -3024,11 +3229,13 @@ WINJMULT::WINJMULT() : ParserKeyword("WINJMULT", KeywordSize(SLASH_TERMINATED)) } { ParserItem item("FRACTURING_PRESSURE", ParserItem::itype::DOUBLE); + item.push_backDimension("Pressure"); record.addItem(item); } { ParserItem item("MULTIPLIER_GRADIENT", ParserItem::itype::DOUBLE); item.setDefault( double(0) ); + item.push_backDimension("1/Pressure"); record.addItem(item); } { @@ -3058,15 +3265,11 @@ const std::string WINJMULT::keywordName = "WINJMULT"; const std::string WINJMULT::WELL_NAME::itemName = "WELL_NAME"; const std::string WINJMULT::FRACTURING_PRESSURE::itemName = "FRACTURING_PRESSURE"; const std::string WINJMULT::MULTIPLIER_GRADIENT::itemName = "MULTIPLIER_GRADIENT"; -const double WINJMULT::MULTIPLIER_GRADIENT::defaultValue = 0; const std::string WINJMULT::MODE::itemName = "MODE"; const std::string WINJMULT::MODE::defaultValue = "WREV"; const std::string WINJMULT::I::itemName = "I"; -const int WINJMULT::I::defaultValue = -1; const std::string WINJMULT::J::itemName = "J"; -const int WINJMULT::J::defaultValue = -1; const std::string WINJMULT::K::itemName = "K"; -const int WINJMULT::K::defaultValue = -1; WINJTEMP::WINJTEMP() : ParserKeyword("WINJTEMP", KeywordSize(SLASH_TERMINATED)) { @@ -3108,13 +3311,9 @@ WINJTEMP::WINJTEMP() : ParserKeyword("WINJTEMP", KeywordSize(SLASH_TERMINATED)) const std::string WINJTEMP::keywordName = "WINJTEMP"; const std::string WINJTEMP::WELL::itemName = "WELL"; const std::string WINJTEMP::STEAM_QUALITY::itemName = "STEAM_QUALITY"; -const double WINJTEMP::STEAM_QUALITY::defaultValue = 1.000000; const std::string WINJTEMP::TEMPERATURE::itemName = "TEMPERATURE"; -const double WINJTEMP::TEMPERATURE::defaultValue = 15.560000; const std::string WINJTEMP::PRESSURE::itemName = "PRESSURE"; -const double WINJTEMP::PRESSURE::defaultValue = 0; const std::string WINJTEMP::ENTHALPY::itemName = "ENTHALPY"; -const double WINJTEMP::ENTHALPY::defaultValue = 0; WLIFT::WLIFT() : ParserKeyword("WLIFT", KeywordSize(SLASH_TERMINATED)) { @@ -3234,11 +3433,8 @@ const std::string WLIFTOPT::WELL::itemName = "WELL"; const std::string WLIFTOPT::USE_OPTIMIZER::itemName = "USE_OPTIMIZER"; const std::string WLIFTOPT::MAX_LIFT_GAS_RATE::itemName = "MAX_LIFT_GAS_RATE"; const std::string WLIFTOPT::WEIGHT_FACTOR::itemName = "WEIGHT_FACTOR"; -const double WLIFTOPT::WEIGHT_FACTOR::defaultValue = 1.000000; const std::string WLIFTOPT::MIN_LIFT_GAS_RATE::itemName = "MIN_LIFT_GAS_RATE"; -const double WLIFTOPT::MIN_LIFT_GAS_RATE::defaultValue = 0; const std::string WLIFTOPT::DELTA_GAS_RATE_WEIGHT_FACTOR::itemName = "DELTA_GAS_RATE_WEIGHT_FACTOR"; -const double WLIFTOPT::DELTA_GAS_RATE_WEIGHT_FACTOR::defaultValue = 0; const std::string WLIFTOPT::ALLOCATE_EXTRA_LIFT_GAS::itemName = "ALLOCATE_EXTRA_LIFT_GAS"; const std::string WLIFTOPT::ALLOCATE_EXTRA_LIFT_GAS::defaultValue = "NO"; @@ -3420,7 +3616,6 @@ WNETDP::WNETDP() : ParserKeyword("WNETDP", KeywordSize(SLASH_TERMINATED)) { const std::string WNETDP::keywordName = "WNETDP"; const std::string WNETDP::WELL::itemName = "WELL"; const std::string WNETDP::DP::itemName = "DP"; -const double WNETDP::DP::defaultValue = 0; WORKLIM::WORKLIM() : ParserKeyword("WORKLIM", KeywordSize(1, false)) { @@ -3495,9 +3690,7 @@ WPAVE::WPAVE() : ParserKeyword("WPAVE", KeywordSize(1, false)) { } const std::string WPAVE::keywordName = "WPAVE"; const std::string WPAVE::F1::itemName = "F1"; -const double WPAVE::F1::defaultValue = 0.500000; const std::string WPAVE::F2::itemName = "F2"; -const double WPAVE::F2::defaultValue = 1.000000; const std::string WPAVE::DEPTH_CORRECTION::itemName = "DEPTH_CORRECTION"; const std::string WPAVE::DEPTH_CORRECTION::defaultValue = "WELL"; const std::string WPAVE::CONNECTION::itemName = "CONNECTION"; @@ -3568,7 +3761,6 @@ WPIMULT::WPIMULT() : ParserKeyword("WPIMULT", KeywordSize(SLASH_TERMINATED)) { const std::string WPIMULT::keywordName = "WPIMULT"; const std::string WPIMULT::WELL::itemName = "WELL"; const std::string WPIMULT::WELLPI::itemName = "WELLPI"; -const double WPIMULT::WELLPI::defaultValue = 1.000000; const std::string WPIMULT::I::itemName = "I"; const std::string WPIMULT::J::itemName = "J"; const std::string WPIMULT::K::itemName = "K"; @@ -3622,7 +3814,6 @@ WPIMULTL::WPIMULTL() : ParserKeyword("WPIMULTL", KeywordSize(SLASH_TERMINATED)) const std::string WPIMULTL::keywordName = "WPIMULTL"; const std::string WPIMULTL::WELL::itemName = "WELL"; const std::string WPIMULTL::WELLPI::itemName = "WELLPI"; -const double WPIMULTL::WELLPI::defaultValue = 1.000000; const std::string WPIMULTL::GRID::itemName = "GRID"; const std::string WPIMULTL::GRID::defaultValue = ""; const std::string WPIMULTL::I::itemName = "I"; @@ -3653,7 +3844,6 @@ WPITAB::WPITAB() : ParserKeyword("WPITAB", KeywordSize(SLASH_TERMINATED)) { const std::string WPITAB::keywordName = "WPITAB"; const std::string WPITAB::WELL::itemName = "WELL"; const std::string WPITAB::PI::itemName = "PI"; -const double WPITAB::PI::defaultValue = 0; WPLUG::WPLUG() : ParserKeyword("WPLUG", KeywordSize(SLASH_TERMINATED)) { @@ -3715,7 +3905,6 @@ const std::string WPMITAB::TABLE_NUMBER::itemName = "TABLE_NUMBER"; WPOLYMER::WPOLYMER() : ParserKeyword("WPOLYMER", KeywordSize(SLASH_TERMINATED)) { - addValidSectionName("SPECIAL"); addValidSectionName("SCHEDULE"); clearDeckNames(); addDeckName("WPOLYMER"); @@ -3775,7 +3964,6 @@ WPOLYRED::WPOLYRED() : ParserKeyword("WPOLYRED", KeywordSize(SLASH_TERMINATED)) const std::string WPOLYRED::keywordName = "WPOLYRED"; const std::string WPOLYRED::WELL::itemName = "WELL"; const std::string WPOLYRED::POLYMER_VISCOSITY_RED::itemName = "POLYMER_VISCOSITY_RED"; -const double WPOLYRED::POLYMER_VISCOSITY_RED::defaultValue = 1.000000; WPOTCALC::WPOTCALC() : ParserKeyword("WPOTCALC", KeywordSize(1, false)) { @@ -3846,10 +4034,8 @@ const std::string WREGROUP::QUANTITY::itemName = "QUANTITY"; const std::string WREGROUP::QUANTITY::defaultValue = " "; const std::string WREGROUP::GROUP_UPPER::itemName = "GROUP_UPPER"; const std::string WREGROUP::UPPER_LIMIT::itemName = "UPPER_LIMIT"; -const double WREGROUP::UPPER_LIMIT::defaultValue = 100000000000000000000.000000; const std::string WREGROUP::GROUP_LOWER::itemName = "GROUP_LOWER"; const std::string WREGROUP::LOWER_LIMIT::itemName = "LOWER_LIMIT"; -const double WREGROUP::LOWER_LIMIT::defaultValue = 0; WRFT::WRFT() : ParserKeyword("WRFT", KeywordSize(SLASH_TERMINATED)) { @@ -3976,17 +4162,11 @@ WSCCLEAN::WSCCLEAN() : ParserKeyword("WSCCLEAN", KeywordSize(SLASH_TERMINATED)) const std::string WSCCLEAN::keywordName = "WSCCLEAN"; const std::string WSCCLEAN::WELL::itemName = "WELL"; const std::string WSCCLEAN::SCALE_MULTIPLIER::itemName = "SCALE_MULTIPLIER"; -const double WSCCLEAN::SCALE_MULTIPLIER::defaultValue = 1.000000; const std::string WSCCLEAN::I::itemName = "I"; -const int WSCCLEAN::I::defaultValue = -1; const std::string WSCCLEAN::J::itemName = "J"; -const int WSCCLEAN::J::defaultValue = -1; const std::string WSCCLEAN::K::itemName = "K"; -const int WSCCLEAN::K::defaultValue = -1; const std::string WSCCLEAN::C1::itemName = "C1"; -const int WSCCLEAN::C1::defaultValue = -1; const std::string WSCCLEAN::C2::itemName = "C2"; -const int WSCCLEAN::C2::defaultValue = -1; WSCCLENL::WSCCLENL() : ParserKeyword("WSCCLENL", KeywordSize(SLASH_TERMINATED)) { @@ -4039,18 +4219,12 @@ WSCCLENL::WSCCLENL() : ParserKeyword("WSCCLENL", KeywordSize(SLASH_TERMINATED)) const std::string WSCCLENL::keywordName = "WSCCLENL"; const std::string WSCCLENL::WELL::itemName = "WELL"; const std::string WSCCLENL::SCALE_MULTIPLIER::itemName = "SCALE_MULTIPLIER"; -const double WSCCLENL::SCALE_MULTIPLIER::defaultValue = 1.000000; const std::string WSCCLENL::LGR::itemName = "LGR"; const std::string WSCCLENL::I::itemName = "I"; -const int WSCCLENL::I::defaultValue = -1; const std::string WSCCLENL::J::itemName = "J"; -const int WSCCLENL::J::defaultValue = -1; const std::string WSCCLENL::K::itemName = "K"; -const int WSCCLENL::K::defaultValue = -1; const std::string WSCCLENL::C1::itemName = "C1"; -const int WSCCLENL::C1::defaultValue = -1; const std::string WSCCLENL::C2::itemName = "C2"; -const int WSCCLENL::C2::defaultValue = -1; WSCTAB::WSCTAB() : ParserKeyword("WSCTAB", KeywordSize(SLASH_TERMINATED)) { @@ -4088,12 +4262,9 @@ WSCTAB::WSCTAB() : ParserKeyword("WSCTAB", KeywordSize(SLASH_TERMINATED)) { const std::string WSCTAB::keywordName = "WSCTAB"; const std::string WSCTAB::WELL::itemName = "WELL"; const std::string WSCTAB::SCALE_DEPOSITION_TABLE::itemName = "SCALE_DEPOSITION_TABLE"; -const int WSCTAB::SCALE_DEPOSITION_TABLE::defaultValue = 0; const std::string WSCTAB::SCALE_DAMAGE_TABLE::itemName = "SCALE_DAMAGE_TABLE"; -const int WSCTAB::SCALE_DAMAGE_TABLE::defaultValue = 0; const std::string WSCTAB::UNUSED::itemName = "UNUSED"; const std::string WSCTAB::SCALE_DISSOLUTION_TABLE::itemName = "SCALE_DISSOLUTION_TABLE"; -const int WSCTAB::SCALE_DISSOLUTION_TABLE::defaultValue = 0; WSEGAICD::WSEGAICD() : ParserKeyword("WSEGAICD", KeywordSize(SLASH_TERMINATED)) { @@ -4217,36 +4388,23 @@ const std::string WSEGAICD::SEGMENT1::itemName = "SEGMENT1"; const std::string WSEGAICD::SEGMENT2::itemName = "SEGMENT2"; const std::string WSEGAICD::STRENGTH::itemName = "STRENGTH"; const std::string WSEGAICD::LENGTH::itemName = "LENGTH"; -const double WSEGAICD::LENGTH::defaultValue = 12.000000; const std::string WSEGAICD::DENSITY_CALI::itemName = "DENSITY_CALI"; -const double WSEGAICD::DENSITY_CALI::defaultValue = 1000.250000; const std::string WSEGAICD::VISCOSITY_CALI::itemName = "VISCOSITY_CALI"; -const double WSEGAICD::VISCOSITY_CALI::defaultValue = 1.450000; const std::string WSEGAICD::CRITICAL_VALUE::itemName = "CRITICAL_VALUE"; -const double WSEGAICD::CRITICAL_VALUE::defaultValue = 0.500000; const std::string WSEGAICD::WIDTH_TRANS::itemName = "WIDTH_TRANS"; -const double WSEGAICD::WIDTH_TRANS::defaultValue = 0.050000; const std::string WSEGAICD::MAX_VISC_RATIO::itemName = "MAX_VISC_RATIO"; -const double WSEGAICD::MAX_VISC_RATIO::defaultValue = 5.000000; const std::string WSEGAICD::METHOD_SCALING_FACTOR::itemName = "METHOD_SCALING_FACTOR"; -const int WSEGAICD::METHOD_SCALING_FACTOR::defaultValue = -1; const std::string WSEGAICD::MAX_ABS_RATE::itemName = "MAX_ABS_RATE"; const std::string WSEGAICD::FLOW_RATE_EXPONENT::itemName = "FLOW_RATE_EXPONENT"; const std::string WSEGAICD::VISC_EXPONENT::itemName = "VISC_EXPONENT"; const std::string WSEGAICD::STATUS::itemName = "STATUS"; const std::string WSEGAICD::STATUS::defaultValue = "OPEN"; const std::string WSEGAICD::OIL_FLOW_FRACTION::itemName = "OIL_FLOW_FRACTION"; -const double WSEGAICD::OIL_FLOW_FRACTION::defaultValue = 1.000000; const std::string WSEGAICD::WATER_FLOW_FRACTION::itemName = "WATER_FLOW_FRACTION"; -const double WSEGAICD::WATER_FLOW_FRACTION::defaultValue = 1.000000; const std::string WSEGAICD::GAS_FLOW_FRACTION::itemName = "GAS_FLOW_FRACTION"; -const double WSEGAICD::GAS_FLOW_FRACTION::defaultValue = 1.000000; const std::string WSEGAICD::OIL_VISC_FRACTION::itemName = "OIL_VISC_FRACTION"; -const double WSEGAICD::OIL_VISC_FRACTION::defaultValue = 1.000000; const std::string WSEGAICD::WATER_VISC_FRACTION::itemName = "WATER_VISC_FRACTION"; -const double WSEGAICD::WATER_VISC_FRACTION::defaultValue = 1.000000; const std::string WSEGAICD::GAS_VISC_FRACTION::itemName = "GAS_VISC_FRACTION"; -const double WSEGAICD::GAS_VISC_FRACTION::defaultValue = 1.000000; WSEGDFIN::WSEGDFIN() : ParserKeyword("WSEGDFIN", KeywordSize(1, false)) { @@ -4359,16 +4517,12 @@ WSEGDFPA::WSEGDFPA() : ParserKeyword("WSEGDFPA", KeywordSize(1, false)) { } const std::string WSEGDFPA::keywordName = "WSEGDFPA"; const std::string WSEGDFPA::GAS_LIQUID_VD_FACTOR::itemName = "GAS_LIQUID_VD_FACTOR"; -const double WSEGDFPA::GAS_LIQUID_VD_FACTOR::defaultValue = 1.000000; const std::string WSEGDFPA::A1::itemName = "A1"; const std::string WSEGDFPA::A2::itemName = "A2"; const std::string WSEGDFPA::C0_A::itemName = "C0_A"; -const double WSEGDFPA::C0_A::defaultValue = 1.200000; const std::string WSEGDFPA::C0_B::itemName = "C0_B"; const std::string WSEGDFPA::FV::itemName = "FV"; -const double WSEGDFPA::FV::defaultValue = 1.000000; const std::string WSEGDFPA::OIL_WATER_VD_FACTOR::itemName = "OIL_WATER_VD_FACTOR"; -const double WSEGDFPA::OIL_WATER_VD_FACTOR::defaultValue = -1.000000; const std::string WSEGDFPA::A::itemName = "A"; const std::string WSEGDFPA::B1::itemName = "B1"; const std::string WSEGDFPA::B2::itemName = "B2"; @@ -4406,13 +4560,9 @@ WSEGDIMS::WSEGDIMS() : ParserKeyword("WSEGDIMS", KeywordSize(1, false)) { } const std::string WSEGDIMS::keywordName = "WSEGDIMS"; const std::string WSEGDIMS::NSWLMX::itemName = "NSWLMX"; -const int WSEGDIMS::NSWLMX::defaultValue = 0; const std::string WSEGDIMS::NSEGMX::itemName = "NSEGMX"; -const int WSEGDIMS::NSEGMX::defaultValue = 1; const std::string WSEGDIMS::NLBRMX::itemName = "NLBRMX"; -const int WSEGDIMS::NLBRMX::defaultValue = 1; const std::string WSEGDIMS::NCRDMX::itemName = "NCRDMX"; -const int WSEGDIMS::NCRDMX::defaultValue = 0; WSEGEXSS::WSEGEXSS() : ParserKeyword("WSEGEXSS", KeywordSize(SLASH_TERMINATED)) { @@ -4461,9 +4611,7 @@ const std::string WSEGEXSS::TYPE::itemName = "TYPE"; const std::string WSEGEXSS::TYPE::defaultValue = "NONE"; const std::string WSEGEXSS::GAS_IMPORT_RATE::itemName = "GAS_IMPORT_RATE"; const std::string WSEGEXSS::R::itemName = "R"; -const double WSEGEXSS::R::defaultValue = 0; const std::string WSEGEXSS::PEXT::itemName = "PEXT"; -const double WSEGEXSS::PEXT::defaultValue = 0; WSEGFLIM::WSEGFLIM() : ParserKeyword("WSEGFLIM", KeywordSize(SLASH_TERMINATED)) { @@ -4701,13 +4849,9 @@ WSEGITER::WSEGITER() : ParserKeyword("WSEGITER", KeywordSize(1, false)) { } const std::string WSEGITER::keywordName = "WSEGITER"; const std::string WSEGITER::MAX_WELL_ITERATIONS::itemName = "MAX_WELL_ITERATIONS"; -const int WSEGITER::MAX_WELL_ITERATIONS::defaultValue = 40; const std::string WSEGITER::MAX_TIMES_REDUCED::itemName = "MAX_TIMES_REDUCED"; -const int WSEGITER::MAX_TIMES_REDUCED::defaultValue = 5; const std::string WSEGITER::REDUCTION_FACTOR::itemName = "REDUCTION_FACTOR"; -const double WSEGITER::REDUCTION_FACTOR::defaultValue = 0.300000; const std::string WSEGITER::INCREASING_FACTOR::itemName = "INCREASING_FACTOR"; -const double WSEGITER::INCREASING_FACTOR::defaultValue = 2.000000; WSEGLABY::WSEGLABY() : ParserKeyword("WSEGLABY", KeywordSize(SLASH_TERMINATED)) { @@ -4796,23 +4940,14 @@ const std::string WSEGLABY::SEGMENT1::itemName = "SEGMENT1"; const std::string WSEGLABY::SEGMENT2::itemName = "SEGMENT2"; const std::string WSEGLABY::NCONFIG::itemName = "NCONFIG"; const std::string WSEGLABY::CHANNELS::itemName = "CHANNELS"; -const int WSEGLABY::CHANNELS::defaultValue = 2; const std::string WSEGLABY::A::itemName = "A"; -const double WSEGLABY::A::defaultValue = 6e-05; const std::string WSEGLABY::L1::itemName = "L1"; -const double WSEGLABY::L1::defaultValue = 0.186300; const std::string WSEGLABY::L2::itemName = "L2"; -const double WSEGLABY::L2::defaultValue = 0.283200; const std::string WSEGLABY::D::itemName = "D"; -const double WSEGLABY::D::defaultValue = 0.006316; const std::string WSEGLABY::R::itemName = "R"; -const double WSEGLABY::R::defaultValue = 1e-05; const std::string WSEGLABY::GAMMA_INLET::itemName = "GAMMA_INLET"; -const double WSEGLABY::GAMMA_INLET::defaultValue = 0.350000; const std::string WSEGLABY::GAMMA_OUTLET::itemName = "GAMMA_OUTLET"; -const double WSEGLABY::GAMMA_OUTLET::defaultValue = 0.500000; const std::string WSEGLABY::GAMMA_LAB::itemName = "GAMMA_LAB"; -const double WSEGLABY::GAMMA_LAB::defaultValue = 0.500000; const std::string WSEGLABY::STATUS::itemName = "STATUS"; const std::string WSEGLABY::STATUS::defaultValue = "OPEN"; @@ -4900,17 +5035,11 @@ const std::string WSEGMULT::WELL::itemName = "WELL"; const std::string WSEGMULT::SEGMENT1::itemName = "SEGMENT1"; const std::string WSEGMULT::SEGMENT2::itemName = "SEGMENT2"; const std::string WSEGMULT::A::itemName = "A"; -const double WSEGMULT::A::defaultValue = 1.000000; const std::string WSEGMULT::B::itemName = "B"; -const double WSEGMULT::B::defaultValue = 0; const std::string WSEGMULT::C::itemName = "C"; -const double WSEGMULT::C::defaultValue = 0; const std::string WSEGMULT::D::itemName = "D"; -const double WSEGMULT::D::defaultValue = 0; const std::string WSEGMULT::E::itemName = "E"; -const double WSEGMULT::E::defaultValue = 0; const std::string WSEGMULT::GOR::itemName = "GOR"; -const double WSEGMULT::GOR::defaultValue = 0; WSEGPROP::WSEGPROP() : ParserKeyword("WSEGPROP", KeywordSize(SLASH_TERMINATED)) { @@ -5023,9 +5152,7 @@ const std::string WSEGSEP::SEGMENT2::itemName = "SEGMENT2"; const std::string WSEGSEP::PHASE::itemName = "PHASE"; const std::string WSEGSEP::PHASE::defaultValue = "NONE"; const std::string WSEGSEP::EMAX::itemName = "EMAX"; -const double WSEGSEP::EMAX::defaultValue = 1.000000; const std::string WSEGSEP::HOLDUP_FRACTION::itemName = "HOLDUP_FRACTION"; -const double WSEGSEP::HOLDUP_FRACTION::defaultValue = 0.010000; WSEGSICD::WSEGSICD() : ParserKeyword("WSEGSICD", KeywordSize(SLASH_TERMINATED)) { @@ -5111,19 +5238,12 @@ const std::string WSEGSICD::SEGMENT1::itemName = "SEGMENT1"; const std::string WSEGSICD::SEGMENT2::itemName = "SEGMENT2"; const std::string WSEGSICD::STRENGTH::itemName = "STRENGTH"; const std::string WSEGSICD::LENGTH::itemName = "LENGTH"; -const double WSEGSICD::LENGTH::defaultValue = 12.000000; const std::string WSEGSICD::DENSITY_CALI::itemName = "DENSITY_CALI"; -const double WSEGSICD::DENSITY_CALI::defaultValue = 1000.250000; const std::string WSEGSICD::VISCOSITY_CALI::itemName = "VISCOSITY_CALI"; -const double WSEGSICD::VISCOSITY_CALI::defaultValue = 1.450000; const std::string WSEGSICD::CRITICAL_VALUE::itemName = "CRITICAL_VALUE"; -const double WSEGSICD::CRITICAL_VALUE::defaultValue = 0.500000; const std::string WSEGSICD::WIDTH_TRANS::itemName = "WIDTH_TRANS"; -const double WSEGSICD::WIDTH_TRANS::defaultValue = 0.050000; const std::string WSEGSICD::MAX_VISC_RATIO::itemName = "MAX_VISC_RATIO"; -const double WSEGSICD::MAX_VISC_RATIO::defaultValue = 5.000000; const std::string WSEGSICD::METHOD_SCALING_FACTOR::itemName = "METHOD_SCALING_FACTOR"; -const int WSEGSICD::METHOD_SCALING_FACTOR::defaultValue = -1; const std::string WSEGSICD::MAX_ABS_RATE::itemName = "MAX_ABS_RATE"; const std::string WSEGSICD::STATUS::itemName = "STATUS"; const std::string WSEGSICD::STATUS::defaultValue = "OPEN"; @@ -5183,19 +5303,12 @@ const std::string WSEGSOLV::keywordName = "WSEGSOLV"; const std::string WSEGSOLV::USE_ITERATIVE_SOLVER::itemName = "USE_ITERATIVE_SOLVER"; const std::string WSEGSOLV::USE_ITERATIVE_SOLVER::defaultValue = "NO"; const std::string WSEGSOLV::MAX_LINEAR_ITER::itemName = "MAX_LINEAR_ITER"; -const int WSEGSOLV::MAX_LINEAR_ITER::defaultValue = 30; const std::string WSEGSOLV::CONVERGENCE_TARGET::itemName = "CONVERGENCE_TARGET"; -const double WSEGSOLV::CONVERGENCE_TARGET::defaultValue = 1e-10; const std::string WSEGSOLV::PC_FILL::itemName = "PC_FILL"; -const int WSEGSOLV::PC_FILL::defaultValue = 2; const std::string WSEGSOLV::DROP_TOL::itemName = "DROP_TOL"; -const double WSEGSOLV::DROP_TOL::defaultValue = 0; const std::string WSEGSOLV::P_LIMIT::itemName = "P_LIMIT"; -const double WSEGSOLV::P_LIMIT::defaultValue = 1e-08; const std::string WSEGSOLV::LOOP_THRESHOLD::itemName = "LOOP_THRESHOLD"; -const double WSEGSOLV::LOOP_THRESHOLD::defaultValue = -1.000000; const std::string WSEGSOLV::LOOP_MULTIPLIER::itemName = "LOOP_MULTIPLIER"; -const double WSEGSOLV::LOOP_MULTIPLIER::defaultValue = -1.000000; WSEGTABL::WSEGTABL() : ParserKeyword("WSEGTABL", KeywordSize(SLASH_TERMINATED)) { @@ -5253,14 +5366,12 @@ const std::string WSEGTABL::WELL::itemName = "WELL"; const std::string WSEGTABL::SEGMENT1::itemName = "SEGMENT1"; const std::string WSEGTABL::SEGMENT2::itemName = "SEGMENT2"; const std::string WSEGTABL::VFP::itemName = "VFP"; -const int WSEGTABL::VFP::defaultValue = 0; const std::string WSEGTABL::VFP_COMPONENTS::itemName = "VFP_COMPONENTS"; const std::string WSEGTABL::VFP_COMPONENTS::defaultValue = "FH"; const std::string WSEGTABL::VFP_OUTLIER::itemName = "VFP_OUTLIER"; const std::string WSEGTABL::DP_SCALING::itemName = "DP_SCALING"; const std::string WSEGTABL::DP_SCALING::defaultValue = "LEN"; const std::string WSEGTABL::ALQ_VALUE::itemName = "ALQ_VALUE"; -const double WSEGTABL::ALQ_VALUE::defaultValue = 0; const std::string WSEGTABL::STATUS::itemName = "STATUS"; const std::string WSEGTABL::STATUS::defaultValue = "OPEN"; @@ -5284,7 +5395,7 @@ WSEGVALV::WSEGVALV() : ParserKeyword("WSEGVALV", KeywordSize(SLASH_TERMINATED)) record.addItem(item); } { - ParserItem item("AREA", ParserItem::itype::DOUBLE); + ParserItem item("AREA", ParserItem::itype::UDA); item.push_backDimension("Length*Length"); record.addItem(item); } @@ -5335,6 +5446,30 @@ const std::string WSEGVALV::STATUS::defaultValue = "OPEN"; const std::string WSEGVALV::MAX_A::itemName = "MAX_A"; +WSF::WSF() : ParserKeyword("WSF", KeywordSize("TABDIMS", "NTSFUN", false, 0)) { + addValidSectionName("PROPS"); + setProhibitedKeywords({ + "SWOF", + "SWFN", + }); + clearDeckNames(); + addDeckName("WSF"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string WSF::keywordName = "WSF"; +const std::string WSF::DATA::itemName = "DATA"; + + WSKPTAB::WSKPTAB() : ParserKeyword("WSKPTAB", KeywordSize(SLASH_TERMINATED)) { addValidSectionName("SCHEDULE"); clearDeckNames(); @@ -5439,7 +5574,6 @@ const std::string WTADD::WELL::itemName = "WELL"; const std::string WTADD::CONTROL::itemName = "CONTROL"; const std::string WTADD::SHIFT::itemName = "SHIFT"; const std::string WTADD::NUM::itemName = "NUM"; -const int WTADD::NUM::defaultValue = 1; WTEMP::WTEMP() : ParserKeyword("WTEMP", KeywordSize(SLASH_TERMINATED)) { @@ -5527,9 +5661,7 @@ const std::string WTEST::INTERVAL::itemName = "INTERVAL"; const std::string WTEST::REASON::itemName = "REASON"; const std::string WTEST::REASON::defaultValue = ""; const std::string WTEST::TEST_NUM::itemName = "TEST_NUM"; -const int WTEST::TEST_NUM::defaultValue = 0; const std::string WTEST::START_TIME::itemName = "START_TIME"; -const double WTEST::START_TIME::defaultValue = 0; WTHPMAX::WTHPMAX() : ParserKeyword("WTHPMAX", KeywordSize(SLASH_TERMINATED)) { @@ -5604,7 +5736,6 @@ const std::string WTMULT::WELL::itemName = "WELL"; const std::string WTMULT::CONTROL::itemName = "CONTROL"; const std::string WTMULT::FACTOR::itemName = "FACTOR"; const std::string WTMULT::NUM::itemName = "NUM"; -const int WTMULT::NUM::defaultValue = 1; WTRACER::WTRACER() : ParserKeyword("WTRACER", KeywordSize(SLASH_TERMINATED)) { @@ -5671,7 +5802,6 @@ const std::string WVFPDP::keywordName = "WVFPDP"; const std::string WVFPDP::WELL::itemName = "WELL"; const std::string WVFPDP::DELTA_P::itemName = "DELTA_P"; const std::string WVFPDP::LOSS_SCALING_FACTOR::itemName = "LOSS_SCALING_FACTOR"; -const double WVFPDP::LOSS_SCALING_FACTOR::defaultValue = 1.000000; WVFPEXP::WVFPEXP() : ParserKeyword("WVFPEXP", KeywordSize(SLASH_TERMINATED)) { @@ -5755,9 +5885,7 @@ WWPAVE::WWPAVE() : ParserKeyword("WWPAVE", KeywordSize(SLASH_TERMINATED)) { const std::string WWPAVE::keywordName = "WWPAVE"; const std::string WWPAVE::WELL::itemName = "WELL"; const std::string WWPAVE::F1::itemName = "F1"; -const double WWPAVE::F1::defaultValue = 0.500000; const std::string WWPAVE::F2::itemName = "F2"; -const double WWPAVE::F2::defaultValue = 0.500000; const std::string WWPAVE::DEPTH_CORRECTION::itemName = "DEPTH_CORRECTION"; const std::string WWPAVE::DEPTH_CORRECTION::defaultValue = "WELL"; const std::string WWPAVE::CONNECTION::itemName = "CONNECTION"; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/X.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/X.cpp index b1d5460521..b504dd35cf 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/X.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/X.cpp @@ -11,5 +11,24 @@ #include namespace Opm { namespace ParserKeywords { +XMF::XMF() : ParserKeyword("XMF", KeywordSize(1, false)) { + addValidSectionName("SOLUTION"); + clearDeckNames(); + addDeckName("XMF"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string XMF::keywordName = "XMF"; +const std::string XMF::data::itemName = "data"; + + } } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Y.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Y.cpp index 76fb95f4b0..1b1d57d500 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Y.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Y.cpp @@ -11,5 +11,43 @@ #include namespace Opm { namespace ParserKeywords { +YMF::YMF() : ParserKeyword("YMF", KeywordSize(1, false)) { + addValidSectionName("SOLUTION"); + clearDeckNames(); + addDeckName("YMF"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string YMF::keywordName = "YMF"; +const std::string YMF::data::itemName = "data"; + + +YMODULE::YMODULE() : ParserKeyword("YMODULE", KeywordSize(1, false)) { + addValidSectionName("GRID"); + clearDeckNames(); + addDeckName("YMODULE"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Ymodule"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string YMODULE::keywordName = "YMODULE"; +const std::string YMODULE::data::itemName = "data"; + + } } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Z.cpp b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Z.cpp index 0cdde0a604..9b74e451c4 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Z.cpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/ParserKeywords/Z.cpp @@ -33,7 +33,7 @@ const std::string ZCORN::keywordName = "ZCORN"; const std::string ZCORN::data::itemName = "data"; -ZFACT1::ZFACT1() : ParserKeyword("ZFACT1", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +ZFACT1::ZFACT1() : ParserKeyword("ZFACT1", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("ZFACT1"); @@ -52,7 +52,7 @@ const std::string ZFACT1::keywordName = "ZFACT1"; const std::string ZFACT1::Z0::itemName = "Z0"; -ZFACT1S::ZFACT1S() : ParserKeyword("ZFACT1S", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +ZFACT1S::ZFACT1S() : ParserKeyword("ZFACT1S", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("ZFACT1S"); @@ -71,7 +71,7 @@ const std::string ZFACT1S::keywordName = "ZFACT1S"; const std::string ZFACT1S::Z0::itemName = "Z0"; -ZFACTOR::ZFACTOR() : ParserKeyword("ZFACTOR", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +ZFACTOR::ZFACTOR() : ParserKeyword("ZFACTOR", KeywordSize("TABDIMS", "NUM_EOS_RES", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("ZFACTOR"); @@ -90,7 +90,7 @@ const std::string ZFACTOR::keywordName = "ZFACTOR"; const std::string ZFACTOR::Z0::itemName = "Z0"; -ZFACTORS::ZFACTORS() : ParserKeyword("ZFACTORS", KeywordSize("TABDIMS", "NUM_STATE_EQ", false, 0)) { +ZFACTORS::ZFACTORS() : ParserKeyword("ZFACTORS", KeywordSize("TABDIMS", "NUM_EOS_SURFACE", false, 0)) { addValidSectionName("PROPS"); clearDeckNames(); addDeckName("ZFACTORS"); @@ -135,5 +135,45 @@ const std::string ZIPPY2::keywordName = "ZIPPY2"; const std::string ZIPPY2::SETTINGS::itemName = "SETTINGS"; +ZMF::ZMF() : ParserKeyword("ZMF", KeywordSize(1, false)) { + addValidSectionName("SOLUTION"); + clearDeckNames(); + addDeckName("ZMF"); + { + ParserRecord record; + { + ParserItem item("data", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("1"); + record.addDataItem(item); + } + addDataRecord( record ); + } +} +const std::string ZMF::keywordName = "ZMF"; +const std::string ZMF::data::itemName = "data"; + + +ZMFVD::ZMFVD() : ParserKeyword("ZMFVD", KeywordSize("EQLDIMS", "NTEQUL", false, 0)) { + addValidSectionName("PROPS"); + clearDeckNames(); + addDeckName("ZMFVD"); + { + ParserRecord record; + { + ParserItem item("DATA", ParserItem::itype::DOUBLE); + item.setSizeType(ParserItem::item_size::ALL); + item.push_backDimension("Length"); + item.push_backDimension("1"); + item.push_backDimension("1"); + record.addItem(item); + } + addRecord( record ); + } +} +const std::string ZMFVD::keywordName = "ZMFVD"; +const std::string ZMFVD::DATA::itemName = "DATA"; + + } } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/config.h b/ThirdParty/custom-opm-common/generated-opm-common/config.h index 8cbb2bdc58..d94f52b1c5 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/config.h +++ b/ThirdParty/custom-opm-common/generated-opm-common/config.h @@ -1,2 +1,8 @@ #define HAVE_OPENMP 1 -#define HAVE_DYNAMIC_BOOST_TEST 0 +/* #undef HAVE_TYPE_TRAITS */ +/* #undef HAVE_VALGRIND */ +/* #undef HAVE_FINAL */ +#define HAVE_ECL_INPUT 1 +/* #undef HAVE_CXA_DEMANGLE */ +/* #undef HAVE_FNMATCH_H */ +#define HAVE_DYNAMIC_BOOST_TEST 1 \ No newline at end of file diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/A.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/A.hpp index ce5f730ff5..122f26ecb2 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/A.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/A.hpp @@ -4,6 +4,33 @@ namespace Opm { namespace ParserKeywords { + class ACF : public ParserKeyword { + public: + ACF(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + + class ACTCO2S : public ParserKeyword { + public: + ACTCO2S(); + static const std::string keywordName; + + class ACTIVITY_MODEL { + public: + static const std::string itemName; + static constexpr int defaultValue = 3; + }; + }; + + + class ACTDIMS : public ParserKeyword { public: ACTDIMS(); @@ -12,25 +39,25 @@ namespace ParserKeywords { class MAX_ACTION { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class MAX_ACTION_LINES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 50; }; class MAX_ACTION_LINE_CHARACTERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 80; }; class MAX_ACTION_COND { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 3; }; }; @@ -97,13 +124,13 @@ namespace ParserKeywords { class REPETITIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INCREMENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -147,13 +174,13 @@ namespace ParserKeywords { class REPETITIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INCREMENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -197,13 +224,13 @@ namespace ParserKeywords { class REPETITIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INCREMENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -242,13 +269,13 @@ namespace ParserKeywords { class REPETITIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INCREMENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -267,13 +294,13 @@ namespace ParserKeywords { class NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MIN_WAIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class CONDITION { @@ -305,7 +332,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; }; @@ -372,7 +399,7 @@ namespace ParserKeywords { class SHIFT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class REGION_NUMBER { @@ -504,13 +531,13 @@ namespace ParserKeywords { class M { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class N { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class K_REF { @@ -647,7 +674,7 @@ namespace ParserKeywords { class MAX_OIL_PVT_GROUP_COUNT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -683,7 +710,7 @@ namespace ParserKeywords { class NUM_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; }; @@ -760,7 +787,7 @@ namespace ParserKeywords { class AQUIFER_INFLUX_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class ALLOW { @@ -799,7 +826,7 @@ namespace ParserKeywords { class AREA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -899,7 +926,7 @@ namespace ParserKeywords { class INFLUX_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class CONNECT_ADJOINING_ACTIVE_CELL { @@ -939,7 +966,7 @@ namespace ParserKeywords { class TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class TEMPERATURE { @@ -983,25 +1010,25 @@ namespace ParserKeywords { class TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INIT_SALT_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MINIMUM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAXIMUM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class IGNORE_CAP_PRESSURE { @@ -1013,13 +1040,13 @@ namespace ParserKeywords { class MIN_FLOW_PR_CONN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_FLOW_PR_CONN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class REMOVE_DEPTH_TERM { @@ -1031,7 +1058,7 @@ namespace ParserKeywords { class IMPORT_MAX_MIN_FLOW_RATE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class TEMPERATURE { @@ -1090,13 +1117,13 @@ namespace ParserKeywords { class TRANS_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class TRANS_OPTION { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ALLOW_INTERNAL_CELLS { @@ -1108,13 +1135,13 @@ namespace ParserKeywords { class VEFRAC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class VEFRACP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -1148,7 +1175,7 @@ namespace ParserKeywords { class PORO_AQ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class C_T { @@ -1169,25 +1196,25 @@ namespace ParserKeywords { class INFLUENCE_ANGLE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 360.000000; }; class TABLE_NUM_WATER_PRESS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class TABLE_NUM_INFLUENCE_FN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INI_SALT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class TEMP_AQUIFER { @@ -1206,13 +1233,13 @@ namespace ParserKeywords { class ADD_TO_DEPTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MULTIPLY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -1226,49 +1253,49 @@ namespace ParserKeywords { class MXNAQN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXNAQC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NIFTBL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NRIFTB { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 36; }; class NANAQU { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NCAMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXNALI { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXAAQL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1347,7 +1374,7 @@ namespace ParserKeywords { class SC_0 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1391,13 +1418,13 @@ namespace ParserKeywords { class TABLE_NUM_WATER_PRESS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class SALINITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class TEMP { @@ -1418,7 +1445,7 @@ namespace ParserKeywords { static const std::string itemName; }; - class DAT_DEPTH { + class FLUX { public: static const std::string itemName; }; @@ -1426,7 +1453,7 @@ namespace ParserKeywords { class SC_0 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class TEMP { @@ -1524,7 +1551,7 @@ namespace ParserKeywords { class TRAN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class IST1 { @@ -1707,25 +1734,25 @@ namespace ParserKeywords { class NX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NY { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NZ { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class OPTION_TRANS_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/B.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/B.hpp index 6814a43011..8f08358a93 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/B.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/B.hpp @@ -39,12 +39,12 @@ namespace ParserKeywords { static const std::string itemName; }; - class TYPE { + class DIRECTION { public: static const std::string itemName; }; - class DIRECTION { + class TYPE { public: static const std::string itemName; }; @@ -58,7 +58,167 @@ namespace ParserKeywords { class RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; + }; + + class PRESSURE { + public: + static const std::string itemName; + static constexpr double defaultValue = 1.000000; + }; + + class TEMPERATURE { + public: + static const std::string itemName; + }; + }; + + + + class BCCON : public ParserKeyword { + public: + BCCON(); + static const std::string keywordName; + + class INDEX { + public: + static const std::string itemName; + }; + + class I1 { + public: + static const std::string itemName; + }; + + class I2 { + public: + static const std::string itemName; + }; + + class J1 { + public: + static const std::string itemName; + }; + + class J2 { + public: + static const std::string itemName; + }; + + class K1 { + public: + static const std::string itemName; + }; + + class K2 { + public: + static const std::string itemName; + }; + + class DIRECTION { + public: + static const std::string itemName; + }; + }; + + + + class BCPROP : public ParserKeyword { + public: + BCPROP(); + static const std::string keywordName; + + class INDEX { + public: + static const std::string itemName; + }; + + class TYPE { + public: + static const std::string itemName; + }; + + class COMPONENT { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class RATE { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class PRESSURE { + public: + static const std::string itemName; + static constexpr double defaultValue = 1.000000; + }; + + class TEMPERATURE { + public: + static const std::string itemName; + }; + + class MECHTYPE { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class FIXEDX { + public: + static const std::string itemName; + static constexpr int defaultValue = 1; + }; + + class FIXEDY { + public: + static const std::string itemName; + static constexpr int defaultValue = 1; + }; + + class FIXEDZ { + public: + static const std::string itemName; + static constexpr int defaultValue = 1; + }; + + class STRESSXX { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class STRESSYY { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class STRESSZZ { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class DISPX { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class DISPY { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class DISPZ { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; }; }; @@ -95,6 +255,20 @@ namespace ParserKeywords { + class BIC : public ParserKeyword { + public: + BIC(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + }; + + + class BIGMODEL : public ParserKeyword { public: BIGMODEL(); @@ -103,6 +277,19 @@ namespace ParserKeywords { + class BIOTCOEF : public ParserKeyword { + public: + BIOTCOEF(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class BLACKOIL : public ParserKeyword { public: BLACKOIL(); @@ -213,7 +400,7 @@ namespace ParserKeywords { class ORIENTATION_INDEX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class DUAL_PORO_FLAG { @@ -279,13 +466,13 @@ namespace ParserKeywords { class MXNBIP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class MXNLBI { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -314,7 +501,7 @@ namespace ParserKeywords { class ALQ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class ALQ_SURFACE_DENSITY { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp index 162d8f7002..bbbf7469a3 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp @@ -2,3413 +2,1285 @@ #define PARSER_KEYWORDS_BUILTIN_HPP #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include namespace Opm { namespace ParserKeywords { struct Builtin { - const ::Opm::ParserKeywords::ACTDIMS ACTDIMS; - const ::Opm::ParserKeywords::ACTION ACTION; - const ::Opm::ParserKeywords::ACTIONG ACTIONG; - const ::Opm::ParserKeywords::ACTIONR ACTIONR; - const ::Opm::ParserKeywords::ACTIONS ACTIONS; - const ::Opm::ParserKeywords::ACTIONW ACTIONW; - const ::Opm::ParserKeywords::ACTIONX ACTIONX; - const ::Opm::ParserKeywords::ACTNUM ACTNUM; - const ::Opm::ParserKeywords::ACTPARAM ACTPARAM; - const ::Opm::ParserKeywords::ADD ADD; - const ::Opm::ParserKeywords::ADDREG ADDREG; - const ::Opm::ParserKeywords::ADDZCORN ADDZCORN; - const ::Opm::ParserKeywords::ADSALNOD ADSALNOD; - const ::Opm::ParserKeywords::ADSORP ADSORP; - const ::Opm::ParserKeywords::AITS AITS; - const ::Opm::ParserKeywords::AITSOFF AITSOFF; - const ::Opm::ParserKeywords::ALKADS ALKADS; - const ::Opm::ParserKeywords::ALKALINE ALKALINE; - const ::Opm::ParserKeywords::ALKROCK ALKROCK; - const ::Opm::ParserKeywords::ALL ALL; - const ::Opm::ParserKeywords::ALPOLADS ALPOLADS; - const ::Opm::ParserKeywords::ALSURFAD ALSURFAD; - const ::Opm::ParserKeywords::ALSURFST ALSURFST; - const ::Opm::ParserKeywords::AMALGAM AMALGAM; - const ::Opm::ParserKeywords::API API; - const ::Opm::ParserKeywords::APIGROUP APIGROUP; - const ::Opm::ParserKeywords::APILIM APILIM; - const ::Opm::ParserKeywords::APIVD APIVD; - const ::Opm::ParserKeywords::AQANCONL AQANCONL; - const ::Opm::ParserKeywords::AQANNC AQANNC; - const ::Opm::ParserKeywords::AQANTRC AQANTRC; - const ::Opm::ParserKeywords::AQUALIST AQUALIST; - const ::Opm::ParserKeywords::AQUANCON AQUANCON; - const ::Opm::ParserKeywords::AQUCHGAS AQUCHGAS; - const ::Opm::ParserKeywords::AQUCHWAT AQUCHWAT; - const ::Opm::ParserKeywords::AQUCON AQUCON; - const ::Opm::ParserKeywords::AQUCT AQUCT; - const ::Opm::ParserKeywords::AQUCWFAC AQUCWFAC; - const ::Opm::ParserKeywords::AQUDIMS AQUDIMS; - const ::Opm::ParserKeywords::AQUFET AQUFET; - const ::Opm::ParserKeywords::AQUFETP AQUFETP; - const ::Opm::ParserKeywords::AQUFLUX AQUFLUX; - const ::Opm::ParserKeywords::AQUIFER_PROBE_ANALYTIC AQUIFER_PROBE_ANALYTIC; - const ::Opm::ParserKeywords::AQUIFER_PROBE_ANALYTIC_NAMED AQUIFER_PROBE_ANALYTIC_NAMED; - const ::Opm::ParserKeywords::AQUIFER_PROBE_NUMERIC AQUIFER_PROBE_NUMERIC; - const ::Opm::ParserKeywords::AQUNNC AQUNNC; - const ::Opm::ParserKeywords::AQUNUM AQUNUM; - const ::Opm::ParserKeywords::AQUTAB AQUTAB; - const ::Opm::ParserKeywords::AUTOCOAR AUTOCOAR; - const ::Opm::ParserKeywords::AUTOREF AUTOREF; - const ::Opm::ParserKeywords::BC BC; - const ::Opm::ParserKeywords::BDENSITY BDENSITY; - const ::Opm::ParserKeywords::BGGI BGGI; - const ::Opm::ParserKeywords::BIGMODEL BIGMODEL; - const ::Opm::ParserKeywords::BLACKOIL BLACKOIL; - const ::Opm::ParserKeywords::BLOCK_PROBE BLOCK_PROBE; - const ::Opm::ParserKeywords::BLOCK_PROBE300 BLOCK_PROBE300; - const ::Opm::ParserKeywords::BOGI BOGI; - const ::Opm::ParserKeywords::BOUNDARY BOUNDARY; - const ::Opm::ParserKeywords::BOX BOX; - const ::Opm::ParserKeywords::BPARA BPARA; - const ::Opm::ParserKeywords::BPIDIMS BPIDIMS; - const ::Opm::ParserKeywords::BRANPROP BRANPROP; - const ::Opm::ParserKeywords::BRINE BRINE; - const ::Opm::ParserKeywords::BTOBALFA BTOBALFA; - const ::Opm::ParserKeywords::BTOBALFV BTOBALFV; - const ::Opm::ParserKeywords::CALTRAC CALTRAC; - const ::Opm::ParserKeywords::CARFIN CARFIN; - const ::Opm::ParserKeywords::CART CART; - const ::Opm::ParserKeywords::CBMOPTS CBMOPTS; - const ::Opm::ParserKeywords::CECON CECON; - const ::Opm::ParserKeywords::CECONT CECONT; - const ::Opm::ParserKeywords::CIRCLE CIRCLE; - const ::Opm::ParserKeywords::CO2STOR CO2STOR; - const ::Opm::ParserKeywords::CO2STORE CO2STORE; - const ::Opm::ParserKeywords::COAL COAL; - const ::Opm::ParserKeywords::COALADS COALADS; - const ::Opm::ParserKeywords::COALNUM COALNUM; - const ::Opm::ParserKeywords::COALPP COALPP; - const ::Opm::ParserKeywords::COARSEN COARSEN; - const ::Opm::ParserKeywords::COLLAPSE COLLAPSE; - const ::Opm::ParserKeywords::COLUMNS COLUMNS; - const ::Opm::ParserKeywords::COMPDAT COMPDAT; - const ::Opm::ParserKeywords::COMPDATX COMPDATX; - const ::Opm::ParserKeywords::COMPFLSH COMPFLSH; - const ::Opm::ParserKeywords::COMPIMB COMPIMB; - const ::Opm::ParserKeywords::COMPINJK COMPINJK; - const ::Opm::ParserKeywords::COMPLMPL COMPLMPL; - const ::Opm::ParserKeywords::COMPLUMP COMPLUMP; - const ::Opm::ParserKeywords::COMPOFF COMPOFF; - const ::Opm::ParserKeywords::COMPORD COMPORD; - const ::Opm::ParserKeywords::COMPRIV COMPRIV; - const ::Opm::ParserKeywords::COMPRP COMPRP; - const ::Opm::ParserKeywords::COMPRPL COMPRPL; - const ::Opm::ParserKeywords::COMPS COMPS; - const ::Opm::ParserKeywords::COMPSEGL COMPSEGL; - const ::Opm::ParserKeywords::COMPSEGS COMPSEGS; - const ::Opm::ParserKeywords::COMPVE COMPVE; - const ::Opm::ParserKeywords::COMPVEL COMPVEL; - const ::Opm::ParserKeywords::CONNECTION_PROBE CONNECTION_PROBE; - const ::Opm::ParserKeywords::COORD COORD; - const ::Opm::ParserKeywords::COORDSYS COORDSYS; - const ::Opm::ParserKeywords::COPY COPY; - const ::Opm::ParserKeywords::COPYBOX COPYBOX; - const ::Opm::ParserKeywords::COPYREG COPYREG; - const ::Opm::ParserKeywords::CPIFACT CPIFACT; - const ::Opm::ParserKeywords::CPIFACTL CPIFACTL; - const ::Opm::ParserKeywords::CPR CPR; - const ::Opm::ParserKeywords::CREF CREF; - const ::Opm::ParserKeywords::CREFS CREFS; - const ::Opm::ParserKeywords::CRITPERM CRITPERM; - const ::Opm::ParserKeywords::CSKIN CSKIN; - const ::Opm::ParserKeywords::DATE DATE; - const ::Opm::ParserKeywords::DATES DATES; - const ::Opm::ParserKeywords::DATUM DATUM; - const ::Opm::ParserKeywords::DATUMR DATUMR; - const ::Opm::ParserKeywords::DATUMRX DATUMRX; - const ::Opm::ParserKeywords::DCQDEFN DCQDEFN; - const ::Opm::ParserKeywords::DEBUG_ DEBUG_; - const ::Opm::ParserKeywords::DELAYACT DELAYACT; - const ::Opm::ParserKeywords::DENSITY DENSITY; - const ::Opm::ParserKeywords::DEPTH DEPTH; - const ::Opm::ParserKeywords::DEPTHTAB DEPTHTAB; - const ::Opm::ParserKeywords::DEPTHZ DEPTHZ; - const ::Opm::ParserKeywords::DIAGDISP DIAGDISP; - const ::Opm::ParserKeywords::DIFF DIFF; - const ::Opm::ParserKeywords::DIFFC DIFFC; - const ::Opm::ParserKeywords::DIFFCOAL DIFFCOAL; - const ::Opm::ParserKeywords::DIFFDP DIFFDP; - const ::Opm::ParserKeywords::DIFFMMF DIFFMMF; - const ::Opm::ParserKeywords::DIFFMR DIFFMR; - const ::Opm::ParserKeywords::DIFFMTHT DIFFMTHT; - const ::Opm::ParserKeywords::DIFFMX DIFFMX; - const ::Opm::ParserKeywords::DIFFMY DIFFMY; - const ::Opm::ParserKeywords::DIFFMZ DIFFMZ; - const ::Opm::ParserKeywords::DIFFR DIFFR; - const ::Opm::ParserKeywords::DIFFTHT DIFFTHT; - const ::Opm::ParserKeywords::DIFFUSE DIFFUSE; - const ::Opm::ParserKeywords::DIFFX DIFFX; - const ::Opm::ParserKeywords::DIFFY DIFFY; - const ::Opm::ParserKeywords::DIFFZ DIFFZ; - const ::Opm::ParserKeywords::DIMENS DIMENS; - const ::Opm::ParserKeywords::DIMPES DIMPES; - const ::Opm::ParserKeywords::DIMPLICT DIMPLICT; - const ::Opm::ParserKeywords::DISGAS DISGAS; - const ::Opm::ParserKeywords::DISPDIMS DISPDIMS; - const ::Opm::ParserKeywords::DISPERSE DISPERSE; - const ::Opm::ParserKeywords::DOMAINS DOMAINS; - const ::Opm::ParserKeywords::DPGRID DPGRID; - const ::Opm::ParserKeywords::DPKRMOD DPKRMOD; - const ::Opm::ParserKeywords::DPNUM DPNUM; - const ::Opm::ParserKeywords::DR DR; - const ::Opm::ParserKeywords::DREF DREF; - const ::Opm::ParserKeywords::DREFS DREFS; - const ::Opm::ParserKeywords::DRILPRI DRILPRI; - const ::Opm::ParserKeywords::DRSDT DRSDT; - const ::Opm::ParserKeywords::DRSDTCON DRSDTCON; - const ::Opm::ParserKeywords::DRSDTR DRSDTR; - const ::Opm::ParserKeywords::DRV DRV; - const ::Opm::ParserKeywords::DRVDT DRVDT; - const ::Opm::ParserKeywords::DRVDTR DRVDTR; - const ::Opm::ParserKeywords::DSPDEINT DSPDEINT; - const ::Opm::ParserKeywords::DTHETA DTHETA; - const ::Opm::ParserKeywords::DTHETAV DTHETAV; - const ::Opm::ParserKeywords::DUALPERM DUALPERM; - const ::Opm::ParserKeywords::DUALPORO DUALPORO; - const ::Opm::ParserKeywords::DUMPCUPL DUMPCUPL; - const ::Opm::ParserKeywords::DUMPFLUX DUMPFLUX; - const ::Opm::ParserKeywords::DX DX; - const ::Opm::ParserKeywords::DXV DXV; - const ::Opm::ParserKeywords::DY DY; - const ::Opm::ParserKeywords::DYNAMICR DYNAMICR; - const ::Opm::ParserKeywords::DYNRDIMS DYNRDIMS; - const ::Opm::ParserKeywords::DYV DYV; - const ::Opm::ParserKeywords::DZ DZ; - const ::Opm::ParserKeywords::DZMATRIX DZMATRIX; - const ::Opm::ParserKeywords::DZMTRX DZMTRX; - const ::Opm::ParserKeywords::DZMTRXV DZMTRXV; - const ::Opm::ParserKeywords::DZNET DZNET; - const ::Opm::ParserKeywords::DZV DZV; - const ::Opm::ParserKeywords::ECHO ECHO; - const ::Opm::ParserKeywords::ECLMC ECLMC; - const ::Opm::ParserKeywords::EDIT EDIT; - const ::Opm::ParserKeywords::EDITNNC EDITNNC; - const ::Opm::ParserKeywords::EDITNNCR EDITNNCR; - const ::Opm::ParserKeywords::EHYSTR EHYSTR; - const ::Opm::ParserKeywords::EHYSTRR EHYSTRR; - const ::Opm::ParserKeywords::END END; - const ::Opm::ParserKeywords::ENDACTIO ENDACTIO; - const ::Opm::ParserKeywords::ENDBOX ENDBOX; - const ::Opm::ParserKeywords::ENDDYN ENDDYN; - const ::Opm::ParserKeywords::ENDFIN ENDFIN; - const ::Opm::ParserKeywords::ENDINC ENDINC; - const ::Opm::ParserKeywords::ENDNUM ENDNUM; - const ::Opm::ParserKeywords::ENDPOINT_SPECIFIERS ENDPOINT_SPECIFIERS; - const ::Opm::ParserKeywords::ENDSCALE ENDSCALE; - const ::Opm::ParserKeywords::ENDSKIP ENDSKIP; - const ::Opm::ParserKeywords::ENKRVD ENKRVD; - const ::Opm::ParserKeywords::ENPCVD ENPCVD; - const ::Opm::ParserKeywords::ENPTVD ENPTVD; - const ::Opm::ParserKeywords::ENSPCVD ENSPCVD; - const ::Opm::ParserKeywords::EPSDBGS EPSDBGS; - const ::Opm::ParserKeywords::EPSDEBUG EPSDEBUG; - const ::Opm::ParserKeywords::EQLDIMS EQLDIMS; - const ::Opm::ParserKeywords::EQLNUM EQLNUM; - const ::Opm::ParserKeywords::EQLOPTS EQLOPTS; - const ::Opm::ParserKeywords::EQLZCORN EQLZCORN; - const ::Opm::ParserKeywords::EQUALREG EQUALREG; - const ::Opm::ParserKeywords::EQUALS EQUALS; - const ::Opm::ParserKeywords::EQUIL EQUIL; - const ::Opm::ParserKeywords::ESSNODE ESSNODE; - const ::Opm::ParserKeywords::EXCAVATE EXCAVATE; - const ::Opm::ParserKeywords::EXCEL EXCEL; - const ::Opm::ParserKeywords::EXIT EXIT; - const ::Opm::ParserKeywords::EXTFIN EXTFIN; - const ::Opm::ParserKeywords::EXTHOST EXTHOST; - const ::Opm::ParserKeywords::EXTRAPMS EXTRAPMS; - const ::Opm::ParserKeywords::EXTREPGL EXTREPGL; - const ::Opm::ParserKeywords::FAULTDIM FAULTDIM; - const ::Opm::ParserKeywords::FAULTS FAULTS; - const ::Opm::ParserKeywords::FBHPDEF FBHPDEF; - const ::Opm::ParserKeywords::FHERCHBL FHERCHBL; - const ::Opm::ParserKeywords::FIELD FIELD; - const ::Opm::ParserKeywords::FIELD_PROBE FIELD_PROBE; - const ::Opm::ParserKeywords::FILEUNIT FILEUNIT; - const ::Opm::ParserKeywords::FILLEPS FILLEPS; - const ::Opm::ParserKeywords::FIPNUM FIPNUM; - const ::Opm::ParserKeywords::FIPOWG FIPOWG; - const ::Opm::ParserKeywords::FIPSEP FIPSEP; - const ::Opm::ParserKeywords::FIP_PROBE FIP_PROBE; - const ::Opm::ParserKeywords::FLUXNUM FLUXNUM; - const ::Opm::ParserKeywords::FLUXREG FLUXREG; - const ::Opm::ParserKeywords::FLUXTYPE FLUXTYPE; - const ::Opm::ParserKeywords::FMTHMD FMTHMD; - const ::Opm::ParserKeywords::FMTIN FMTIN; - const ::Opm::ParserKeywords::FMTOUT FMTOUT; - const ::Opm::ParserKeywords::FMWSET FMWSET; - const ::Opm::ParserKeywords::FOAM FOAM; - const ::Opm::ParserKeywords::FOAMADS FOAMADS; - const ::Opm::ParserKeywords::FOAMDCYO FOAMDCYO; - const ::Opm::ParserKeywords::FOAMDCYW FOAMDCYW; - const ::Opm::ParserKeywords::FOAMFCN FOAMFCN; - const ::Opm::ParserKeywords::FOAMFRM FOAMFRM; - const ::Opm::ParserKeywords::FOAMFSC FOAMFSC; - const ::Opm::ParserKeywords::FOAMFSO FOAMFSO; - const ::Opm::ParserKeywords::FOAMFST FOAMFST; - const ::Opm::ParserKeywords::FOAMFSW FOAMFSW; - const ::Opm::ParserKeywords::FOAMMOB FOAMMOB; - const ::Opm::ParserKeywords::FOAMMOBP FOAMMOBP; - const ::Opm::ParserKeywords::FOAMMOBS FOAMMOBS; - const ::Opm::ParserKeywords::FOAMOPTS FOAMOPTS; - const ::Opm::ParserKeywords::FOAMROCK FOAMROCK; - const ::Opm::ParserKeywords::FORMFEED FORMFEED; - const ::Opm::ParserKeywords::FRICTION FRICTION; - const ::Opm::ParserKeywords::FULLIMP FULLIMP; - const ::Opm::ParserKeywords::GAS GAS; - const ::Opm::ParserKeywords::GASBEGIN GASBEGIN; - const ::Opm::ParserKeywords::GASCONC GASCONC; - const ::Opm::ParserKeywords::GASDENT GASDENT; - const ::Opm::ParserKeywords::GASEND GASEND; - const ::Opm::ParserKeywords::GASFCOMP GASFCOMP; - const ::Opm::ParserKeywords::GASFDECR GASFDECR; - const ::Opm::ParserKeywords::GASFDELC GASFDELC; - const ::Opm::ParserKeywords::GASFIELD GASFIELD; - const ::Opm::ParserKeywords::GASFTARG GASFTARG; - const ::Opm::ParserKeywords::GASJT GASJT; - const ::Opm::ParserKeywords::GASMONTH GASMONTH; - const ::Opm::ParserKeywords::GASPERIO GASPERIO; - const ::Opm::ParserKeywords::GASSATC GASSATC; - const ::Opm::ParserKeywords::GASVISCT GASVISCT; - const ::Opm::ParserKeywords::GASYEAR GASYEAR; - const ::Opm::ParserKeywords::GCALECON GCALECON; - const ::Opm::ParserKeywords::GCOMPIDX GCOMPIDX; - const ::Opm::ParserKeywords::GCONCAL GCONCAL; - const ::Opm::ParserKeywords::GCONENG GCONENG; - const ::Opm::ParserKeywords::GCONINJE GCONINJE; - const ::Opm::ParserKeywords::GCONPRI GCONPRI; - const ::Opm::ParserKeywords::GCONPROD GCONPROD; - const ::Opm::ParserKeywords::GCONSALE GCONSALE; - const ::Opm::ParserKeywords::GCONSUMP GCONSUMP; - const ::Opm::ParserKeywords::GCONTOL GCONTOL; - const ::Opm::ParserKeywords::GCUTBACK GCUTBACK; - const ::Opm::ParserKeywords::GCUTBACT GCUTBACT; - const ::Opm::ParserKeywords::GCVD GCVD; - const ::Opm::ParserKeywords::GDCQ GDCQ; - const ::Opm::ParserKeywords::GDCQECON GDCQECON; - const ::Opm::ParserKeywords::GDFILE GDFILE; - const ::Opm::ParserKeywords::GDIMS GDIMS; - const ::Opm::ParserKeywords::GDORIENT GDORIENT; - const ::Opm::ParserKeywords::GDRILPOT GDRILPOT; - const ::Opm::ParserKeywords::GECON GECON; - const ::Opm::ParserKeywords::GECONT GECONT; - const ::Opm::ParserKeywords::GEFAC GEFAC; - const ::Opm::ParserKeywords::GETDATA GETDATA; - const ::Opm::ParserKeywords::GETGLOB GETGLOB; - const ::Opm::ParserKeywords::GI GI; - const ::Opm::ParserKeywords::GIALL GIALL; - const ::Opm::ParserKeywords::GIMODEL GIMODEL; - const ::Opm::ParserKeywords::GINODE GINODE; - const ::Opm::ParserKeywords::GLIFTLIM GLIFTLIM; - const ::Opm::ParserKeywords::GLIFTOPT GLIFTOPT; - const ::Opm::ParserKeywords::GMWSET GMWSET; - const ::Opm::ParserKeywords::GNETDP GNETDP; - const ::Opm::ParserKeywords::GNETINJE GNETINJE; - const ::Opm::ParserKeywords::GNETPUMP GNETPUMP; - const ::Opm::ParserKeywords::GPMAINT GPMAINT; - const ::Opm::ParserKeywords::GRADGRUP GRADGRUP; - const ::Opm::ParserKeywords::GRADRESV GRADRESV; - const ::Opm::ParserKeywords::GRADRFT GRADRFT; - const ::Opm::ParserKeywords::GRADWELL GRADWELL; - const ::Opm::ParserKeywords::GRAVCONS GRAVCONS; - const ::Opm::ParserKeywords::GRAVDR GRAVDR; - const ::Opm::ParserKeywords::GRAVDRB GRAVDRB; - const ::Opm::ParserKeywords::GRAVDRM GRAVDRM; - const ::Opm::ParserKeywords::GRAVITY GRAVITY; - const ::Opm::ParserKeywords::GRDREACH GRDREACH; - const ::Opm::ParserKeywords::GRID GRID; - const ::Opm::ParserKeywords::GRIDFILE GRIDFILE; - const ::Opm::ParserKeywords::GRIDOPTS GRIDOPTS; - const ::Opm::ParserKeywords::GRIDUNIT GRIDUNIT; - const ::Opm::ParserKeywords::GROUP_PROBE GROUP_PROBE; - const ::Opm::ParserKeywords::GRUPMAST GRUPMAST; - const ::Opm::ParserKeywords::GRUPNET GRUPNET; - const ::Opm::ParserKeywords::GRUPRIG GRUPRIG; - const ::Opm::ParserKeywords::GRUPSLAV GRUPSLAV; - const ::Opm::ParserKeywords::GRUPTARG GRUPTARG; - const ::Opm::ParserKeywords::GRUPTREE GRUPTREE; - const ::Opm::ParserKeywords::GSATINJE GSATINJE; - const ::Opm::ParserKeywords::GSATPROD GSATPROD; - const ::Opm::ParserKeywords::GSEPCOND GSEPCOND; - const ::Opm::ParserKeywords::GSSCPTST GSSCPTST; - const ::Opm::ParserKeywords::GSWINGF GSWINGF; - const ::Opm::ParserKeywords::GTADD GTADD; - const ::Opm::ParserKeywords::GTMULT GTMULT; - const ::Opm::ParserKeywords::GUIDECAL GUIDECAL; - const ::Opm::ParserKeywords::GUIDERAT GUIDERAT; - const ::Opm::ParserKeywords::GUPFREQ GUPFREQ; - const ::Opm::ParserKeywords::GWRTWCV GWRTWCV; - const ::Opm::ParserKeywords::HALFTRAN HALFTRAN; - const ::Opm::ParserKeywords::HAxxxxxx HAxxxxxx; - const ::Opm::ParserKeywords::HBNUM HBNUM; - const ::Opm::ParserKeywords::HDISP HDISP; - const ::Opm::ParserKeywords::HEATCR HEATCR; - const ::Opm::ParserKeywords::HEATCRT HEATCRT; - const ::Opm::ParserKeywords::HMAQUCT HMAQUCT; - const ::Opm::ParserKeywords::HMAQUFET HMAQUFET; - const ::Opm::ParserKeywords::HMAQUNUM HMAQUNUM; - const ::Opm::ParserKeywords::HMDIMS HMDIMS; - const ::Opm::ParserKeywords::HMFAULTS HMFAULTS; - const ::Opm::ParserKeywords::HMMLAQUN HMMLAQUN; - const ::Opm::ParserKeywords::HMMLCTAQ HMMLCTAQ; - const ::Opm::ParserKeywords::HMMLFTAQ HMMLFTAQ; - const ::Opm::ParserKeywords::HMMLTWCN HMMLTWCN; - const ::Opm::ParserKeywords::HMMULTFT HMMULTFT; - const ::Opm::ParserKeywords::HMMULTSG HMMULTSG; - const ::Opm::ParserKeywords::HMMULTxx HMMULTxx; - const ::Opm::ParserKeywords::HMPROPS HMPROPS; - const ::Opm::ParserKeywords::HMROCK HMROCK; - const ::Opm::ParserKeywords::HMROCKT HMROCKT; - const ::Opm::ParserKeywords::HMRREF HMRREF; - const ::Opm::ParserKeywords::HMWELCON HMWELCON; - const ::Opm::ParserKeywords::HMWPIMLT HMWPIMLT; - const ::Opm::ParserKeywords::HMxxxxxx HMxxxxxx; - const ::Opm::ParserKeywords::HRFIN HRFIN; - const ::Opm::ParserKeywords::HWKRO HWKRO; - const ::Opm::ParserKeywords::HWKRORG HWKRORG; - const ::Opm::ParserKeywords::HWKRORW HWKRORW; - const ::Opm::ParserKeywords::HWKRW HWKRW; - const ::Opm::ParserKeywords::HWKRWR HWKRWR; - const ::Opm::ParserKeywords::HWPCW HWPCW; - const ::Opm::ParserKeywords::HWSNUM HWSNUM; - const ::Opm::ParserKeywords::HWSOGCR HWSOGCR; - const ::Opm::ParserKeywords::HWSOWCR HWSOWCR; - const ::Opm::ParserKeywords::HWSWCR HWSWCR; - const ::Opm::ParserKeywords::HWSWL HWSWL; - const ::Opm::ParserKeywords::HWSWLPC HWSWLPC; - const ::Opm::ParserKeywords::HWSWU HWSWU; - const ::Opm::ParserKeywords::HXFIN HXFIN; - const ::Opm::ParserKeywords::HYDRHEAD HYDRHEAD; - const ::Opm::ParserKeywords::HYFIN HYFIN; - const ::Opm::ParserKeywords::HYMOBGDR HYMOBGDR; - const ::Opm::ParserKeywords::HYST HYST; - const ::Opm::ParserKeywords::HYSTCHCK HYSTCHCK; - const ::Opm::ParserKeywords::HZFIN HZFIN; - const ::Opm::ParserKeywords::IHOST IHOST; - const ::Opm::ParserKeywords::IMBNUM IMBNUM; - const ::Opm::ParserKeywords::IMBNUMMF IMBNUMMF; - const ::Opm::ParserKeywords::IMKRVD IMKRVD; - const ::Opm::ParserKeywords::IMPCVD IMPCVD; - const ::Opm::ParserKeywords::IMPES IMPES; - const ::Opm::ParserKeywords::IMPLICIT IMPLICIT; - const ::Opm::ParserKeywords::IMPORT IMPORT; - const ::Opm::ParserKeywords::IMPTVD IMPTVD; - const ::Opm::ParserKeywords::IMSPCVD IMSPCVD; - const ::Opm::ParserKeywords::INCLUDE INCLUDE; - const ::Opm::ParserKeywords::INIT INIT; - const ::Opm::ParserKeywords::INRAD INRAD; - const ::Opm::ParserKeywords::INSPEC INSPEC; - const ::Opm::ParserKeywords::INTPC INTPC; - const ::Opm::ParserKeywords::IONROCK IONROCK; - const ::Opm::ParserKeywords::IONXROCK IONXROCK; - const ::Opm::ParserKeywords::IONXSURF IONXSURF; - const ::Opm::ParserKeywords::IPCG IPCG; - const ::Opm::ParserKeywords::IPCW IPCW; - const ::Opm::ParserKeywords::ISGCR ISGCR; - const ::Opm::ParserKeywords::ISGL ISGL; - const ::Opm::ParserKeywords::ISGLPC ISGLPC; - const ::Opm::ParserKeywords::ISGU ISGU; - const ::Opm::ParserKeywords::ISOGCR ISOGCR; - const ::Opm::ParserKeywords::ISOLNUM ISOLNUM; - const ::Opm::ParserKeywords::ISOWCR ISOWCR; - const ::Opm::ParserKeywords::ISWCR ISWCR; - const ::Opm::ParserKeywords::ISWL ISWL; - const ::Opm::ParserKeywords::ISWLPC ISWLPC; - const ::Opm::ParserKeywords::ISWU ISWU; - const ::Opm::ParserKeywords::JFUNC JFUNC; - const ::Opm::ParserKeywords::JFUNCR JFUNCR; - const ::Opm::ParserKeywords::KRNUM KRNUM; - const ::Opm::ParserKeywords::KRNUMMF KRNUMMF; - const ::Opm::ParserKeywords::LAB LAB; - const ::Opm::ParserKeywords::LANGMPL LANGMPL; - const ::Opm::ParserKeywords::LANGMUIR LANGMUIR; - const ::Opm::ParserKeywords::LANGSOLV LANGSOLV; - const ::Opm::ParserKeywords::LCUNIT LCUNIT; - const ::Opm::ParserKeywords::LGR LGR; - const ::Opm::ParserKeywords::LGRCOPY LGRCOPY; - const ::Opm::ParserKeywords::LGRFREE LGRFREE; - const ::Opm::ParserKeywords::LGRLOCK LGRLOCK; - const ::Opm::ParserKeywords::LGROFF LGROFF; - const ::Opm::ParserKeywords::LGRON LGRON; - const ::Opm::ParserKeywords::LICENSES LICENSES; - const ::Opm::ParserKeywords::LIFTOPT LIFTOPT; - const ::Opm::ParserKeywords::LINCOM LINCOM; - const ::Opm::ParserKeywords::LINKPERM LINKPERM; - const ::Opm::ParserKeywords::LIVEOIL LIVEOIL; - const ::Opm::ParserKeywords::LKRO LKRO; - const ::Opm::ParserKeywords::LKRORG LKRORG; - const ::Opm::ParserKeywords::LKRORW LKRORW; - const ::Opm::ParserKeywords::LKRW LKRW; - const ::Opm::ParserKeywords::LKRWR LKRWR; - const ::Opm::ParserKeywords::LOAD LOAD; - const ::Opm::ParserKeywords::LOWSALT LOWSALT; - const ::Opm::ParserKeywords::LPCW LPCW; - const ::Opm::ParserKeywords::LSALTFNC LSALTFNC; - const ::Opm::ParserKeywords::LSLTWNUM LSLTWNUM; - const ::Opm::ParserKeywords::LSNUM LSNUM; - const ::Opm::ParserKeywords::LSOGCR LSOGCR; - const ::Opm::ParserKeywords::LSOWCR LSOWCR; - const ::Opm::ParserKeywords::LSWCR LSWCR; - const ::Opm::ParserKeywords::LSWL LSWL; - const ::Opm::ParserKeywords::LSWLPC LSWLPC; - const ::Opm::ParserKeywords::LSWU LSWU; - const ::Opm::ParserKeywords::LTOSIGMA LTOSIGMA; - const ::Opm::ParserKeywords::LWKRO LWKRO; - const ::Opm::ParserKeywords::LWKRORG LWKRORG; - const ::Opm::ParserKeywords::LWKRORW LWKRORW; - const ::Opm::ParserKeywords::LWKRW LWKRW; - const ::Opm::ParserKeywords::LWKRWR LWKRWR; - const ::Opm::ParserKeywords::LWPCW LWPCW; - const ::Opm::ParserKeywords::LWSLTNUM LWSLTNUM; - const ::Opm::ParserKeywords::LWSNUM LWSNUM; - const ::Opm::ParserKeywords::LWSOGCR LWSOGCR; - const ::Opm::ParserKeywords::LWSOWCR LWSOWCR; - const ::Opm::ParserKeywords::LWSWCR LWSWCR; - const ::Opm::ParserKeywords::LWSWL LWSWL; - const ::Opm::ParserKeywords::LWSWLPC LWSWLPC; - const ::Opm::ParserKeywords::LWSWU LWSWU; - const ::Opm::ParserKeywords::LX LX; - const ::Opm::ParserKeywords::LXFIN LXFIN; - const ::Opm::ParserKeywords::LY LY; - const ::Opm::ParserKeywords::LYFIN LYFIN; - const ::Opm::ParserKeywords::LZ LZ; - const ::Opm::ParserKeywords::LZFIN LZFIN; - const ::Opm::ParserKeywords::MAPAXES MAPAXES; - const ::Opm::ParserKeywords::MAPUNITS MAPUNITS; - const ::Opm::ParserKeywords::MASSFLOW MASSFLOW; - const ::Opm::ParserKeywords::MATCORR MATCORR; - const ::Opm::ParserKeywords::MAXVALUE MAXVALUE; - const ::Opm::ParserKeywords::MEMORY MEMORY; - const ::Opm::ParserKeywords::MESSAGE MESSAGE; - const ::Opm::ParserKeywords::MESSAGES MESSAGES; - const ::Opm::ParserKeywords::MESSOPTS MESSOPTS; - const ::Opm::ParserKeywords::MESSSRVC MESSSRVC; - const ::Opm::ParserKeywords::METRIC METRIC; - const ::Opm::ParserKeywords::MICP MICP; - const ::Opm::ParserKeywords::MICPPARA MICPPARA; - const ::Opm::ParserKeywords::MINNNCT MINNNCT; - const ::Opm::ParserKeywords::MINNPCOL MINNPCOL; - const ::Opm::ParserKeywords::MINPORV MINPORV; - const ::Opm::ParserKeywords::MINPV MINPV; - const ::Opm::ParserKeywords::MINPVFIL MINPVFIL; - const ::Opm::ParserKeywords::MINPVV MINPVV; - const ::Opm::ParserKeywords::MINVALUE MINVALUE; - const ::Opm::ParserKeywords::MISC MISC; - const ::Opm::ParserKeywords::MISCIBLE MISCIBLE; - const ::Opm::ParserKeywords::MISCNUM MISCNUM; - const ::Opm::ParserKeywords::MLANG MLANG; - const ::Opm::ParserKeywords::MLANGSLV MLANGSLV; - const ::Opm::ParserKeywords::MONITOR MONITOR; - const ::Opm::ParserKeywords::MPFANUM MPFANUM; - const ::Opm::ParserKeywords::MPFNNC MPFNNC; - const ::Opm::ParserKeywords::MSFN MSFN; - const ::Opm::ParserKeywords::MSGFILE MSGFILE; - const ::Opm::ParserKeywords::MSUM_PROBE MSUM_PROBE; - const ::Opm::ParserKeywords::MULSGGD MULSGGD; - const ::Opm::ParserKeywords::MULSGGDV MULSGGDV; - const ::Opm::ParserKeywords::MULTFLT MULTFLT; - const ::Opm::ParserKeywords::MULTIN MULTIN; - const ::Opm::ParserKeywords::MULTIPLY MULTIPLY; - const ::Opm::ParserKeywords::MULTIREG MULTIREG; - const ::Opm::ParserKeywords::MULTNUM MULTNUM; - const ::Opm::ParserKeywords::MULTOUT MULTOUT; - const ::Opm::ParserKeywords::MULTOUTS MULTOUTS; - const ::Opm::ParserKeywords::MULTPV MULTPV; - const ::Opm::ParserKeywords::MULTREAL MULTREAL; - const ::Opm::ParserKeywords::MULTREGD MULTREGD; - const ::Opm::ParserKeywords::MULTREGH MULTREGH; - const ::Opm::ParserKeywords::MULTREGP MULTREGP; - const ::Opm::ParserKeywords::MULTREGT MULTREGT; - const ::Opm::ParserKeywords::MULTSIG MULTSIG; - const ::Opm::ParserKeywords::MULTSIGV MULTSIGV; - const ::Opm::ParserKeywords::MULT_XYZ MULT_XYZ; - const ::Opm::ParserKeywords::MW MW; - const ::Opm::ParserKeywords::MWS MWS; - const ::Opm::ParserKeywords::NARROW NARROW; - const ::Opm::ParserKeywords::NCONSUMP NCONSUMP; - const ::Opm::ParserKeywords::NEFAC NEFAC; - const ::Opm::ParserKeywords::NETBALAN NETBALAN; - const ::Opm::ParserKeywords::NETCOMPA NETCOMPA; - const ::Opm::ParserKeywords::NETWORK NETWORK; - const ::Opm::ParserKeywords::NEWTRAN NEWTRAN; - const ::Opm::ParserKeywords::NEXTSTEP NEXTSTEP; - const ::Opm::ParserKeywords::NEXTSTPL NEXTSTPL; - const ::Opm::ParserKeywords::NINENUM NINENUM; - const ::Opm::ParserKeywords::NINEPOIN NINEPOIN; - const ::Opm::ParserKeywords::NMATOPTS NMATOPTS; - const ::Opm::ParserKeywords::NMATRIX NMATRIX; - const ::Opm::ParserKeywords::NMESSAGE NMESSAGE; - const ::Opm::ParserKeywords::NNC NNC; - const ::Opm::ParserKeywords::NNEWTF NNEWTF; - const ::Opm::ParserKeywords::NOCASC NOCASC; - const ::Opm::ParserKeywords::NODEPROP NODEPROP; - const ::Opm::ParserKeywords::NODPPM NODPPM; - const ::Opm::ParserKeywords::NOECHO NOECHO; - const ::Opm::ParserKeywords::NOGGF NOGGF; - const ::Opm::ParserKeywords::NOGRAV NOGRAV; - const ::Opm::ParserKeywords::NOHMD NOHMD; - const ::Opm::ParserKeywords::NOHMO NOHMO; - const ::Opm::ParserKeywords::NOHYST NOHYST; - const ::Opm::ParserKeywords::NOINSPEC NOINSPEC; - const ::Opm::ParserKeywords::NOMONITO NOMONITO; - const ::Opm::ParserKeywords::NONNC NONNC; - const ::Opm::ParserKeywords::NORSSPEC NORSSPEC; - const ::Opm::ParserKeywords::NOSIM NOSIM; - const ::Opm::ParserKeywords::NOWARN NOWARN; - const ::Opm::ParserKeywords::NOWARNEP NOWARNEP; - const ::Opm::ParserKeywords::NRSOUT NRSOUT; - const ::Opm::ParserKeywords::NSTACK NSTACK; - const ::Opm::ParserKeywords::NTG NTG; - const ::Opm::ParserKeywords::NUMRES NUMRES; - const ::Opm::ParserKeywords::NUPCOL NUPCOL; - const ::Opm::ParserKeywords::NWATREM NWATREM; - const ::Opm::ParserKeywords::NXFIN NXFIN; - const ::Opm::ParserKeywords::NYFIN NYFIN; - const ::Opm::ParserKeywords::NZFIN NZFIN; - const ::Opm::ParserKeywords::OCOMPIDX OCOMPIDX; - const ::Opm::ParserKeywords::OFM OFM; - const ::Opm::ParserKeywords::OIL OIL; - const ::Opm::ParserKeywords::OILAPI OILAPI; - const ::Opm::ParserKeywords::OILCOMPR OILCOMPR; - const ::Opm::ParserKeywords::OILDENT OILDENT; - const ::Opm::ParserKeywords::OILJT OILJT; - const ::Opm::ParserKeywords::OILMW OILMW; - const ::Opm::ParserKeywords::OILVISCT OILVISCT; - const ::Opm::ParserKeywords::OILVTIM OILVTIM; - const ::Opm::ParserKeywords::OLDTRAN OLDTRAN; - const ::Opm::ParserKeywords::OLDTRANR OLDTRANR; - const ::Opm::ParserKeywords::OPERATE OPERATE; - const ::Opm::ParserKeywords::OPERATER OPERATER; - const ::Opm::ParserKeywords::OPERNUM OPERNUM; - const ::Opm::ParserKeywords::OPTIONS OPTIONS; - const ::Opm::ParserKeywords::OPTIONS3 OPTIONS3; - const ::Opm::ParserKeywords::OUTRAD OUTRAD; - const ::Opm::ParserKeywords::OUTSOL OUTSOL; - const ::Opm::ParserKeywords::OVERBURD OVERBURD; - const ::Opm::ParserKeywords::PARALLEL PARALLEL; - const ::Opm::ParserKeywords::PARAOPTS PARAOPTS; - const ::Opm::ParserKeywords::PARTTRAC PARTTRAC; - const ::Opm::ParserKeywords::PATHS PATHS; - const ::Opm::ParserKeywords::PBUB PBUB; - const ::Opm::ParserKeywords::PBVD PBVD; - const ::Opm::ParserKeywords::PCG PCG; - const ::Opm::ParserKeywords::PCG32D PCG32D; - const ::Opm::ParserKeywords::PCW PCW; - const ::Opm::ParserKeywords::PCW32D PCW32D; - const ::Opm::ParserKeywords::PDEW PDEW; - const ::Opm::ParserKeywords::PDVD PDVD; - const ::Opm::ParserKeywords::PEBI PEBI; - const ::Opm::ParserKeywords::PECOEFS PECOEFS; - const ::Opm::ParserKeywords::PEDIMS PEDIMS; - const ::Opm::ParserKeywords::PEGTABX PEGTABX; - const ::Opm::ParserKeywords::PEKTABX PEKTABX; - const ::Opm::ParserKeywords::PENUM PENUM; - const ::Opm::ParserKeywords::PERFORMANCE_PROBE PERFORMANCE_PROBE; - const ::Opm::ParserKeywords::PERMAVE PERMAVE; - const ::Opm::ParserKeywords::PERMFACT PERMFACT; - const ::Opm::ParserKeywords::PERMJFUN PERMJFUN; - const ::Opm::ParserKeywords::PERMR PERMR; - const ::Opm::ParserKeywords::PERMTHT PERMTHT; - const ::Opm::ParserKeywords::PERMX PERMX; - const ::Opm::ParserKeywords::PERMXY PERMXY; - const ::Opm::ParserKeywords::PERMY PERMY; - const ::Opm::ParserKeywords::PERMYZ PERMYZ; - const ::Opm::ParserKeywords::PERMZ PERMZ; - const ::Opm::ParserKeywords::PERMZX PERMZX; - const ::Opm::ParserKeywords::PETGRID PETGRID; - const ::Opm::ParserKeywords::PETOPTS PETOPTS; - const ::Opm::ParserKeywords::PICOND PICOND; - const ::Opm::ParserKeywords::PIMTDIMS PIMTDIMS; - const ::Opm::ParserKeywords::PIMULTAB PIMULTAB; - const ::Opm::ParserKeywords::PINCH PINCH; - const ::Opm::ParserKeywords::PINCHNUM PINCHNUM; - const ::Opm::ParserKeywords::PINCHOUT PINCHOUT; - const ::Opm::ParserKeywords::PINCHREG PINCHREG; - const ::Opm::ParserKeywords::PINCHXY PINCHXY; - const ::Opm::ParserKeywords::PINTDIMS PINTDIMS; - const ::Opm::ParserKeywords::PLMIXNUM PLMIXNUM; - const ::Opm::ParserKeywords::PLMIXPAR PLMIXPAR; - const ::Opm::ParserKeywords::PLYADS PLYADS; - const ::Opm::ParserKeywords::PLYADSS PLYADSS; - const ::Opm::ParserKeywords::PLYATEMP PLYATEMP; - const ::Opm::ParserKeywords::PLYCAMAX PLYCAMAX; - const ::Opm::ParserKeywords::PLYDHFLF PLYDHFLF; - const ::Opm::ParserKeywords::PLYESAL PLYESAL; - const ::Opm::ParserKeywords::PLYKRRF PLYKRRF; - const ::Opm::ParserKeywords::PLYMAX PLYMAX; - const ::Opm::ParserKeywords::PLYMWINJ PLYMWINJ; - const ::Opm::ParserKeywords::PLYOPTS PLYOPTS; - const ::Opm::ParserKeywords::PLYRMDEN PLYRMDEN; - const ::Opm::ParserKeywords::PLYROCK PLYROCK; - const ::Opm::ParserKeywords::PLYROCKM PLYROCKM; - const ::Opm::ParserKeywords::PLYSHEAR PLYSHEAR; - const ::Opm::ParserKeywords::PLYSHLOG PLYSHLOG; - const ::Opm::ParserKeywords::PLYTRRF PLYTRRF; - const ::Opm::ParserKeywords::PLYTRRFA PLYTRRFA; - const ::Opm::ParserKeywords::PLYVISC PLYVISC; - const ::Opm::ParserKeywords::PLYVISCS PLYVISCS; - const ::Opm::ParserKeywords::PLYVISCT PLYVISCT; - const ::Opm::ParserKeywords::PLYVMH PLYVMH; - const ::Opm::ParserKeywords::PLYVSCST PLYVSCST; - const ::Opm::ParserKeywords::PMAX PMAX; - const ::Opm::ParserKeywords::PMISC PMISC; - const ::Opm::ParserKeywords::POLYMER POLYMER; - const ::Opm::ParserKeywords::POLYMW POLYMW; - const ::Opm::ParserKeywords::PORO PORO; - const ::Opm::ParserKeywords::PORV PORV; - const ::Opm::ParserKeywords::PPCWMAX PPCWMAX; - const ::Opm::ParserKeywords::PRECSALT PRECSALT; - const ::Opm::ParserKeywords::PREF PREF; - const ::Opm::ParserKeywords::PREFS PREFS; - const ::Opm::ParserKeywords::PRESSURE PRESSURE; - const ::Opm::ParserKeywords::PRIORITY PRIORITY; - const ::Opm::ParserKeywords::PROPS PROPS; - const ::Opm::ParserKeywords::PRORDER PRORDER; - const ::Opm::ParserKeywords::PRVD PRVD; - const ::Opm::ParserKeywords::PSTEADY PSTEADY; - const ::Opm::ParserKeywords::PSWRG PSWRG; - const ::Opm::ParserKeywords::PSWRO PSWRO; - const ::Opm::ParserKeywords::PVCDO PVCDO; - const ::Opm::ParserKeywords::PVCO PVCO; - const ::Opm::ParserKeywords::PVDG PVDG; - const ::Opm::ParserKeywords::PVDO PVDO; - const ::Opm::ParserKeywords::PVDS PVDS; - const ::Opm::ParserKeywords::PVTG PVTG; - const ::Opm::ParserKeywords::PVTGW PVTGW; - const ::Opm::ParserKeywords::PVTGWO PVTGWO; - const ::Opm::ParserKeywords::PVTNUM PVTNUM; - const ::Opm::ParserKeywords::PVTO PVTO; - const ::Opm::ParserKeywords::PVTSOL PVTSOL; - const ::Opm::ParserKeywords::PVTW PVTW; - const ::Opm::ParserKeywords::PVTWSALT PVTWSALT; - const ::Opm::ParserKeywords::PVT_M PVT_M; - const ::Opm::ParserKeywords::PVZG PVZG; - const ::Opm::ParserKeywords::PYACTION PYACTION; - const ::Opm::ParserKeywords::PYINPUT PYINPUT; - const ::Opm::ParserKeywords::QDRILL QDRILL; - const ::Opm::ParserKeywords::QHRATING QHRATING; - const ::Opm::ParserKeywords::QMOBIL QMOBIL; - const ::Opm::ParserKeywords::RADFIN RADFIN; - const ::Opm::ParserKeywords::RADFIN4 RADFIN4; - const ::Opm::ParserKeywords::RADIAL RADIAL; - const ::Opm::ParserKeywords::RAINFALL RAINFALL; - const ::Opm::ParserKeywords::RBEDCONT RBEDCONT; - const ::Opm::ParserKeywords::RCMASTS RCMASTS; - const ::Opm::ParserKeywords::REACHES REACHES; - const ::Opm::ParserKeywords::READDATA READDATA; - const ::Opm::ParserKeywords::REFINE REFINE; - const ::Opm::ParserKeywords::REGDIMS REGDIMS; - const ::Opm::ParserKeywords::REGION2REGION_PROBE REGION2REGION_PROBE; - const ::Opm::ParserKeywords::REGION2REGION_PROBE_E300 REGION2REGION_PROBE_E300; - const ::Opm::ParserKeywords::REGIONS REGIONS; - const ::Opm::ParserKeywords::REGION_PROBE REGION_PROBE; - const ::Opm::ParserKeywords::RESIDNUM RESIDNUM; - const ::Opm::ParserKeywords::RESTART RESTART; - const ::Opm::ParserKeywords::RESVNUM RESVNUM; - const ::Opm::ParserKeywords::RHO RHO; - const ::Opm::ParserKeywords::RIVDEBUG RIVDEBUG; - const ::Opm::ParserKeywords::RIVERSYS RIVERSYS; - const ::Opm::ParserKeywords::RIVRDIMS RIVRDIMS; - const ::Opm::ParserKeywords::RIVRPROP RIVRPROP; - const ::Opm::ParserKeywords::RIVRXSEC RIVRXSEC; - const ::Opm::ParserKeywords::RIVSALT RIVSALT; - const ::Opm::ParserKeywords::RIVTRACE RIVTRACE; - const ::Opm::ParserKeywords::RKTRMDIR RKTRMDIR; - const ::Opm::ParserKeywords::ROCK ROCK; - const ::Opm::ParserKeywords::ROCK2D ROCK2D; - const ::Opm::ParserKeywords::ROCK2DTR ROCK2DTR; - const ::Opm::ParserKeywords::ROCKCOMP ROCKCOMP; - const ::Opm::ParserKeywords::ROCKFRAC ROCKFRAC; - const ::Opm::ParserKeywords::ROCKNUM ROCKNUM; - const ::Opm::ParserKeywords::ROCKOPTS ROCKOPTS; - const ::Opm::ParserKeywords::ROCKPAMA ROCKPAMA; - const ::Opm::ParserKeywords::ROCKTAB ROCKTAB; - const ::Opm::ParserKeywords::ROCKTABH ROCKTABH; - const ::Opm::ParserKeywords::ROCKTABW ROCKTABW; - const ::Opm::ParserKeywords::ROCKTHSG ROCKTHSG; - const ::Opm::ParserKeywords::ROCKTSIG ROCKTSIG; - const ::Opm::ParserKeywords::ROCKV ROCKV; - const ::Opm::ParserKeywords::ROCKWNOD ROCKWNOD; - const ::Opm::ParserKeywords::RPTCPL RPTCPL; - const ::Opm::ParserKeywords::RPTGRID RPTGRID; - const ::Opm::ParserKeywords::RPTGRIDL RPTGRIDL; - const ::Opm::ParserKeywords::RPTHMD RPTHMD; - const ::Opm::ParserKeywords::RPTHMG RPTHMG; - const ::Opm::ParserKeywords::RPTHMW RPTHMW; - const ::Opm::ParserKeywords::RPTINIT RPTINIT; - const ::Opm::ParserKeywords::RPTISOL RPTISOL; - const ::Opm::ParserKeywords::RPTONLY RPTONLY; - const ::Opm::ParserKeywords::RPTONLYO RPTONLYO; - const ::Opm::ParserKeywords::RPTPROPS RPTPROPS; - const ::Opm::ParserKeywords::RPTREGS RPTREGS; - const ::Opm::ParserKeywords::RPTRST RPTRST; - const ::Opm::ParserKeywords::RPTRUNSP RPTRUNSP; - const ::Opm::ParserKeywords::RPTSCHED RPTSCHED; - const ::Opm::ParserKeywords::RPTSMRY RPTSMRY; - const ::Opm::ParserKeywords::RPTSOL RPTSOL; - const ::Opm::ParserKeywords::RS RS; - const ::Opm::ParserKeywords::RSCONST RSCONST; - const ::Opm::ParserKeywords::RSCONSTT RSCONSTT; - const ::Opm::ParserKeywords::RSGI RSGI; - const ::Opm::ParserKeywords::RSSPEC RSSPEC; - const ::Opm::ParserKeywords::RSVD RSVD; - const ::Opm::ParserKeywords::RTEMP RTEMP; - const ::Opm::ParserKeywords::RTEMPA RTEMPA; - const ::Opm::ParserKeywords::RTEMPVD RTEMPVD; - const ::Opm::ParserKeywords::RUNSPEC RUNSPEC; - const ::Opm::ParserKeywords::RUNSUM RUNSUM; - const ::Opm::ParserKeywords::RV RV; - const ::Opm::ParserKeywords::RVCONST RVCONST; - const ::Opm::ParserKeywords::RVCONSTT RVCONSTT; - const ::Opm::ParserKeywords::RVGI RVGI; - const ::Opm::ParserKeywords::RVVD RVVD; - const ::Opm::ParserKeywords::RVW RVW; - const ::Opm::ParserKeywords::RWGSALT RWGSALT; - const ::Opm::ParserKeywords::SALINITY SALINITY; - const ::Opm::ParserKeywords::SALT SALT; - const ::Opm::ParserKeywords::SALTNODE SALTNODE; - const ::Opm::ParserKeywords::SALTP SALTP; - const ::Opm::ParserKeywords::SALTPVD SALTPVD; - const ::Opm::ParserKeywords::SALTREST SALTREST; - const ::Opm::ParserKeywords::SALTSOL SALTSOL; - const ::Opm::ParserKeywords::SALTVD SALTVD; - const ::Opm::ParserKeywords::SAMG SAMG; - const ::Opm::ParserKeywords::SATNUM SATNUM; - const ::Opm::ParserKeywords::SATOPTS SATOPTS; - const ::Opm::ParserKeywords::SAVE SAVE; - const ::Opm::ParserKeywords::SBIOF SBIOF; - const ::Opm::ParserKeywords::SCALC SCALC; - const ::Opm::ParserKeywords::SCALECRS SCALECRS; - const ::Opm::ParserKeywords::SCALELIM SCALELIM; - const ::Opm::ParserKeywords::SCDATAB SCDATAB; - const ::Opm::ParserKeywords::SCDETAB SCDETAB; - const ::Opm::ParserKeywords::SCDPDIMS SCDPDIMS; - const ::Opm::ParserKeywords::SCDPTAB SCDPTAB; - const ::Opm::ParserKeywords::SCDPTRAC SCDPTRAC; - const ::Opm::ParserKeywords::SCHEDULE SCHEDULE; - const ::Opm::ParserKeywords::SCVD SCVD; - const ::Opm::ParserKeywords::SDENSITY SDENSITY; - const ::Opm::ParserKeywords::SEGMENT_PROBE SEGMENT_PROBE; - const ::Opm::ParserKeywords::SEPARATE SEPARATE; - const ::Opm::ParserKeywords::SEPVALS SEPVALS; - const ::Opm::ParserKeywords::SFOAM SFOAM; - const ::Opm::ParserKeywords::SGAS SGAS; - const ::Opm::ParserKeywords::SGCR SGCR; - const ::Opm::ParserKeywords::SGCWMIS SGCWMIS; - const ::Opm::ParserKeywords::SGF32D SGF32D; - const ::Opm::ParserKeywords::SGFN SGFN; - const ::Opm::ParserKeywords::SGL SGL; - const ::Opm::ParserKeywords::SGLPC SGLPC; - const ::Opm::ParserKeywords::SGOF SGOF; - const ::Opm::ParserKeywords::SGOFLET SGOFLET; - const ::Opm::ParserKeywords::SGU SGU; - const ::Opm::ParserKeywords::SGWFN SGWFN; - const ::Opm::ParserKeywords::SHRATE SHRATE; - const ::Opm::ParserKeywords::SIGMA SIGMA; - const ::Opm::ParserKeywords::SIGMAGDV SIGMAGDV; - const ::Opm::ParserKeywords::SIGMATH SIGMATH; - const ::Opm::ParserKeywords::SIGMAV SIGMAV; - const ::Opm::ParserKeywords::SIMULATE SIMULATE; - const ::Opm::ParserKeywords::SKIP SKIP; - const ::Opm::ParserKeywords::SKIP100 SKIP100; - const ::Opm::ParserKeywords::SKIP300 SKIP300; - const ::Opm::ParserKeywords::SKIPREST SKIPREST; - const ::Opm::ParserKeywords::SKPRPOLY SKPRPOLY; - const ::Opm::ParserKeywords::SKPRWAT SKPRWAT; - const ::Opm::ParserKeywords::SKRO SKRO; - const ::Opm::ParserKeywords::SKRORG SKRORG; - const ::Opm::ParserKeywords::SKRORW SKRORW; - const ::Opm::ParserKeywords::SKRW SKRW; - const ::Opm::ParserKeywords::SKRWR SKRWR; - const ::Opm::ParserKeywords::SLAVES SLAVES; - const ::Opm::ParserKeywords::SLGOF SLGOF; - const ::Opm::ParserKeywords::SMICR SMICR; - const ::Opm::ParserKeywords::SMRYDIMS SMRYDIMS; - const ::Opm::ParserKeywords::SMULTX SMULTX; - const ::Opm::ParserKeywords::SMULTY SMULTY; - const ::Opm::ParserKeywords::SMULTZ SMULTZ; - const ::Opm::ParserKeywords::SOCRS SOCRS; - const ::Opm::ParserKeywords::SOF2 SOF2; - const ::Opm::ParserKeywords::SOF3 SOF3; - const ::Opm::ParserKeywords::SOF32D SOF32D; - const ::Opm::ParserKeywords::SOGCR SOGCR; - const ::Opm::ParserKeywords::SOIL SOIL; - const ::Opm::ParserKeywords::SOLUTION SOLUTION; - const ::Opm::ParserKeywords::SOLVCONC SOLVCONC; - const ::Opm::ParserKeywords::SOLVDIMS SOLVDIMS; - const ::Opm::ParserKeywords::SOLVDIRS SOLVDIRS; - const ::Opm::ParserKeywords::SOLVENT SOLVENT; - const ::Opm::ParserKeywords::SOLVFRAC SOLVFRAC; - const ::Opm::ParserKeywords::SOLVNUM SOLVNUM; - const ::Opm::ParserKeywords::SOMGAS SOMGAS; - const ::Opm::ParserKeywords::SOMWAT SOMWAT; - const ::Opm::ParserKeywords::SORWMIS SORWMIS; - const ::Opm::ParserKeywords::SOWCR SOWCR; - const ::Opm::ParserKeywords::SOXYG SOXYG; - const ::Opm::ParserKeywords::SPECGRID SPECGRID; - const ::Opm::ParserKeywords::SPECHEAT SPECHEAT; - const ::Opm::ParserKeywords::SPECROCK SPECROCK; - const ::Opm::ParserKeywords::SPIDER SPIDER; - const ::Opm::ParserKeywords::SPOLY SPOLY; - const ::Opm::ParserKeywords::SPOLYMW SPOLYMW; - const ::Opm::ParserKeywords::SSFN SSFN; - const ::Opm::ParserKeywords::SSGCR SSGCR; - const ::Opm::ParserKeywords::SSGL SSGL; - const ::Opm::ParserKeywords::SSOGCR SSOGCR; - const ::Opm::ParserKeywords::SSOL SSOL; - const ::Opm::ParserKeywords::SSOWCR SSOWCR; - const ::Opm::ParserKeywords::SSWCR SSWCR; - const ::Opm::ParserKeywords::SSWL SSWL; - const ::Opm::ParserKeywords::SSWU SSWU; - const ::Opm::ParserKeywords::START START; - const ::Opm::ParserKeywords::STCOND STCOND; - const ::Opm::ParserKeywords::STOG STOG; - const ::Opm::ParserKeywords::STONE STONE; - const ::Opm::ParserKeywords::STONE1 STONE1; - const ::Opm::ParserKeywords::STONE1EX STONE1EX; - const ::Opm::ParserKeywords::STONE2 STONE2; - const ::Opm::ParserKeywords::STOW STOW; - const ::Opm::ParserKeywords::STWG STWG; - const ::Opm::ParserKeywords::SUMMARY SUMMARY; - const ::Opm::ParserKeywords::SUMTHIN SUMTHIN; - const ::Opm::ParserKeywords::SUREA SUREA; - const ::Opm::ParserKeywords::SURF SURF; - const ::Opm::ParserKeywords::SURFACT SURFACT; - const ::Opm::ParserKeywords::SURFACTW SURFACTW; - const ::Opm::ParserKeywords::SURFADDW SURFADDW; - const ::Opm::ParserKeywords::SURFADS SURFADS; - const ::Opm::ParserKeywords::SURFCAPD SURFCAPD; - const ::Opm::ParserKeywords::SURFESAL SURFESAL; - const ::Opm::ParserKeywords::SURFNUM SURFNUM; - const ::Opm::ParserKeywords::SURFOPTS SURFOPTS; - const ::Opm::ParserKeywords::SURFROCK SURFROCK; - const ::Opm::ParserKeywords::SURFST SURFST; - const ::Opm::ParserKeywords::SURFSTES SURFSTES; - const ::Opm::ParserKeywords::SURFVISC SURFVISC; - const ::Opm::ParserKeywords::SURFWNUM SURFWNUM; - const ::Opm::ParserKeywords::SWAT SWAT; - const ::Opm::ParserKeywords::SWATINIT SWATINIT; - const ::Opm::ParserKeywords::SWCR SWCR; - const ::Opm::ParserKeywords::SWF32D SWF32D; - const ::Opm::ParserKeywords::SWFN SWFN; - const ::Opm::ParserKeywords::SWINGFAC SWINGFAC; - const ::Opm::ParserKeywords::SWL SWL; - const ::Opm::ParserKeywords::SWLPC SWLPC; - const ::Opm::ParserKeywords::SWOF SWOF; - const ::Opm::ParserKeywords::SWOFLET SWOFLET; - const ::Opm::ParserKeywords::SWU SWU; - const ::Opm::ParserKeywords::TABDIMS TABDIMS; - const ::Opm::ParserKeywords::TBLK TBLK; - const ::Opm::ParserKeywords::TEMP TEMP; - const ::Opm::ParserKeywords::TEMPI TEMPI; - const ::Opm::ParserKeywords::TEMPNODE TEMPNODE; - const ::Opm::ParserKeywords::TEMPTVD TEMPTVD; - const ::Opm::ParserKeywords::TEMPVD TEMPVD; - const ::Opm::ParserKeywords::THCGAS THCGAS; - const ::Opm::ParserKeywords::THCOIL THCOIL; - const ::Opm::ParserKeywords::THCONR THCONR; - const ::Opm::ParserKeywords::THCONSF THCONSF; - const ::Opm::ParserKeywords::THCROCK THCROCK; - const ::Opm::ParserKeywords::THCWATER THCWATER; - const ::Opm::ParserKeywords::THERMAL THERMAL; - const ::Opm::ParserKeywords::THPRES THPRES; - const ::Opm::ParserKeywords::THPRESFT THPRESFT; - const ::Opm::ParserKeywords::TIGHTEN TIGHTEN; - const ::Opm::ParserKeywords::TIGHTENP TIGHTENP; - const ::Opm::ParserKeywords::TIME TIME; - const ::Opm::ParserKeywords::TITLE TITLE; - const ::Opm::ParserKeywords::TLMIXPAR TLMIXPAR; - const ::Opm::ParserKeywords::TLPMIXPA TLPMIXPA; - const ::Opm::ParserKeywords::TNUM TNUM; - const ::Opm::ParserKeywords::TOLCRIT TOLCRIT; - const ::Opm::ParserKeywords::TOPS TOPS; - const ::Opm::ParserKeywords::TPAMEPS TPAMEPS; - const ::Opm::ParserKeywords::TPAMEPSS TPAMEPSS; - const ::Opm::ParserKeywords::TRACER TRACER; - const ::Opm::ParserKeywords::TRACERKM TRACERKM; - const ::Opm::ParserKeywords::TRACERKP TRACERKP; - const ::Opm::ParserKeywords::TRACERS TRACERS; - const ::Opm::ParserKeywords::TRACITVD TRACITVD; - const ::Opm::ParserKeywords::TRACTVD TRACTVD; - const ::Opm::ParserKeywords::TRADS TRADS; - const ::Opm::ParserKeywords::TRANGL TRANGL; - const ::Opm::ParserKeywords::TRANR TRANR; - const ::Opm::ParserKeywords::TRANTHT TRANTHT; - const ::Opm::ParserKeywords::TRANX TRANX; - const ::Opm::ParserKeywords::TRANY TRANY; - const ::Opm::ParserKeywords::TRANZ TRANZ; - const ::Opm::ParserKeywords::TRDCY TRDCY; - const ::Opm::ParserKeywords::TRDIF TRDIF; - const ::Opm::ParserKeywords::TRDIS TRDIS; - const ::Opm::ParserKeywords::TREF TREF; - const ::Opm::ParserKeywords::TREFS TREFS; - const ::Opm::ParserKeywords::TRKPF TRKPF; - const ::Opm::ParserKeywords::TRNHD TRNHD; - const ::Opm::ParserKeywords::TRPLPORO TRPLPORO; - const ::Opm::ParserKeywords::TRROCK TRROCK; - const ::Opm::ParserKeywords::TSTEP TSTEP; - const ::Opm::ParserKeywords::TUNING TUNING; - const ::Opm::ParserKeywords::TUNINGDP TUNINGDP; - const ::Opm::ParserKeywords::TUNINGH TUNINGH; - const ::Opm::ParserKeywords::TUNINGL TUNINGL; - const ::Opm::ParserKeywords::TUNINGS TUNINGS; - const ::Opm::ParserKeywords::TVDP TVDP; - const ::Opm::ParserKeywords::TZONE TZONE; - const ::Opm::ParserKeywords::UDADIMS UDADIMS; - const ::Opm::ParserKeywords::UDQ UDQ; - const ::Opm::ParserKeywords::UDQDIMS UDQDIMS; - const ::Opm::ParserKeywords::UDQPARAM UDQPARAM; - const ::Opm::ParserKeywords::UDT UDT; - const ::Opm::ParserKeywords::UDTDIMS UDTDIMS; - const ::Opm::ParserKeywords::UNCODHMD UNCODHMD; - const ::Opm::ParserKeywords::UNIFIN UNIFIN; - const ::Opm::ParserKeywords::UNIFOUT UNIFOUT; - const ::Opm::ParserKeywords::UNIFOUTS UNIFOUTS; - const ::Opm::ParserKeywords::UNIFSAVE UNIFSAVE; - const ::Opm::ParserKeywords::USECUPL USECUPL; - const ::Opm::ParserKeywords::USEFLUX USEFLUX; - const ::Opm::ParserKeywords::USENOFLO USENOFLO; - const ::Opm::ParserKeywords::VAPOIL VAPOIL; - const ::Opm::ParserKeywords::VAPPARS VAPPARS; - const ::Opm::ParserKeywords::VAPWAT VAPWAT; - const ::Opm::ParserKeywords::VDFLOW VDFLOW; - const ::Opm::ParserKeywords::VDFLOWR VDFLOWR; - const ::Opm::ParserKeywords::VE VE; - const ::Opm::ParserKeywords::VEDEBUG VEDEBUG; - const ::Opm::ParserKeywords::VEFIN VEFIN; - const ::Opm::ParserKeywords::VEFRAC VEFRAC; - const ::Opm::ParserKeywords::VEFRACP VEFRACP; - const ::Opm::ParserKeywords::VEFRACPV VEFRACPV; - const ::Opm::ParserKeywords::VEFRACV VEFRACV; - const ::Opm::ParserKeywords::VFPCHK VFPCHK; - const ::Opm::ParserKeywords::VFPIDIMS VFPIDIMS; - const ::Opm::ParserKeywords::VFPINJ VFPINJ; - const ::Opm::ParserKeywords::VFPPDIMS VFPPDIMS; - const ::Opm::ParserKeywords::VFPPROD VFPPROD; - const ::Opm::ParserKeywords::VFPTABL VFPTABL; - const ::Opm::ParserKeywords::VISAGE VISAGE; - const ::Opm::ParserKeywords::VISCD VISCD; - const ::Opm::ParserKeywords::VISCREF VISCREF; - const ::Opm::ParserKeywords::VISDATES VISDATES; - const ::Opm::ParserKeywords::VISOPTS VISOPTS; - const ::Opm::ParserKeywords::WAGHYSTR WAGHYSTR; - const ::Opm::ParserKeywords::WAITBAL WAITBAL; - const ::Opm::ParserKeywords::WALKALIN WALKALIN; - const ::Opm::ParserKeywords::WALQCALC WALQCALC; - const ::Opm::ParserKeywords::WAPI WAPI; - const ::Opm::ParserKeywords::WARN WARN; - const ::Opm::ParserKeywords::WATDENT WATDENT; - const ::Opm::ParserKeywords::WATER WATER; - const ::Opm::ParserKeywords::WATJT WATJT; - const ::Opm::ParserKeywords::WATVISCT WATVISCT; - const ::Opm::ParserKeywords::WBHGLR WBHGLR; - const ::Opm::ParserKeywords::WBOREVOL WBOREVOL; - const ::Opm::ParserKeywords::WCALCVAL WCALCVAL; - const ::Opm::ParserKeywords::WCONHIST WCONHIST; - const ::Opm::ParserKeywords::WCONINJ WCONINJ; - const ::Opm::ParserKeywords::WCONINJE WCONINJE; - const ::Opm::ParserKeywords::WCONINJH WCONINJH; - const ::Opm::ParserKeywords::WCONINJP WCONINJP; - const ::Opm::ParserKeywords::WCONPROD WCONPROD; - const ::Opm::ParserKeywords::WCUTBACK WCUTBACK; - const ::Opm::ParserKeywords::WCUTBACT WCUTBACT; - const ::Opm::ParserKeywords::WCYCLE WCYCLE; - const ::Opm::ParserKeywords::WDFAC WDFAC; - const ::Opm::ParserKeywords::WDFACCOR WDFACCOR; - const ::Opm::ParserKeywords::WDRILPRI WDRILPRI; - const ::Opm::ParserKeywords::WDRILRES WDRILRES; - const ::Opm::ParserKeywords::WDRILTIM WDRILTIM; - const ::Opm::ParserKeywords::WECON WECON; - const ::Opm::ParserKeywords::WECONINJ WECONINJ; - const ::Opm::ParserKeywords::WECONT WECONT; - const ::Opm::ParserKeywords::WEFAC WEFAC; - const ::Opm::ParserKeywords::WELCNTL WELCNTL; - const ::Opm::ParserKeywords::WELDEBUG WELDEBUG; - const ::Opm::ParserKeywords::WELDRAW WELDRAW; - const ::Opm::ParserKeywords::WELEVNT WELEVNT; - const ::Opm::ParserKeywords::WELLDIMS WELLDIMS; - const ::Opm::ParserKeywords::WELL_COMPLETION_PROBE WELL_COMPLETION_PROBE; - const ::Opm::ParserKeywords::WELL_PROBE WELL_PROBE; - const ::Opm::ParserKeywords::WELMOVEL WELMOVEL; - const ::Opm::ParserKeywords::WELOPEN WELOPEN; - const ::Opm::ParserKeywords::WELOPENL WELOPENL; - const ::Opm::ParserKeywords::WELPI WELPI; - const ::Opm::ParserKeywords::WELPRI WELPRI; - const ::Opm::ParserKeywords::WELSEGS WELSEGS; - const ::Opm::ParserKeywords::WELSOMIN WELSOMIN; - const ::Opm::ParserKeywords::WELSPECL WELSPECL; - const ::Opm::ParserKeywords::WELSPECS WELSPECS; - const ::Opm::ParserKeywords::WELTARG WELTARG; - const ::Opm::ParserKeywords::WFOAM WFOAM; - const ::Opm::ParserKeywords::WFRICSEG WFRICSEG; - const ::Opm::ParserKeywords::WFRICSGL WFRICSGL; - const ::Opm::ParserKeywords::WFRICTN WFRICTN; - const ::Opm::ParserKeywords::WFRICTNL WFRICTNL; - const ::Opm::ParserKeywords::WGASPROD WGASPROD; - const ::Opm::ParserKeywords::WGORPEN WGORPEN; - const ::Opm::ParserKeywords::WGRUPCON WGRUPCON; - const ::Opm::ParserKeywords::WH2NUM WH2NUM; - const ::Opm::ParserKeywords::WH3NUM WH3NUM; - const ::Opm::ParserKeywords::WHEDREFD WHEDREFD; - const ::Opm::ParserKeywords::WHISTCTL WHISTCTL; - const ::Opm::ParserKeywords::WHTEMP WHTEMP; - const ::Opm::ParserKeywords::WINJMULT WINJMULT; - const ::Opm::ParserKeywords::WINJTEMP WINJTEMP; - const ::Opm::ParserKeywords::WLIFT WLIFT; - const ::Opm::ParserKeywords::WLIFTOPT WLIFTOPT; - const ::Opm::ParserKeywords::WLIMTOL WLIMTOL; - const ::Opm::ParserKeywords::WLIST WLIST; - const ::Opm::ParserKeywords::WLISTARG WLISTARG; - const ::Opm::ParserKeywords::WLISTNAM WLISTNAM; - const ::Opm::ParserKeywords::WMICP WMICP; - const ::Opm::ParserKeywords::WNETCTRL WNETCTRL; - const ::Opm::ParserKeywords::WNETDP WNETDP; - const ::Opm::ParserKeywords::WORKLIM WORKLIM; - const ::Opm::ParserKeywords::WORKTHP WORKTHP; - const ::Opm::ParserKeywords::WPAVE WPAVE; - const ::Opm::ParserKeywords::WPAVEDEP WPAVEDEP; - const ::Opm::ParserKeywords::WPIMULT WPIMULT; - const ::Opm::ParserKeywords::WPIMULTL WPIMULTL; - const ::Opm::ParserKeywords::WPITAB WPITAB; - const ::Opm::ParserKeywords::WPLUG WPLUG; - const ::Opm::ParserKeywords::WPMITAB WPMITAB; - const ::Opm::ParserKeywords::WPOLYMER WPOLYMER; - const ::Opm::ParserKeywords::WPOLYRED WPOLYRED; - const ::Opm::ParserKeywords::WPOTCALC WPOTCALC; - const ::Opm::ParserKeywords::WREGROUP WREGROUP; - const ::Opm::ParserKeywords::WRFT WRFT; - const ::Opm::ParserKeywords::WRFTPLT WRFTPLT; - const ::Opm::ParserKeywords::WSALT WSALT; - const ::Opm::ParserKeywords::WSCCLEAN WSCCLEAN; - const ::Opm::ParserKeywords::WSCCLENL WSCCLENL; - const ::Opm::ParserKeywords::WSCTAB WSCTAB; - const ::Opm::ParserKeywords::WSEGAICD WSEGAICD; - const ::Opm::ParserKeywords::WSEGDFIN WSEGDFIN; - const ::Opm::ParserKeywords::WSEGDFMD WSEGDFMD; - const ::Opm::ParserKeywords::WSEGDFPA WSEGDFPA; - const ::Opm::ParserKeywords::WSEGDIMS WSEGDIMS; - const ::Opm::ParserKeywords::WSEGEXSS WSEGEXSS; - const ::Opm::ParserKeywords::WSEGFLIM WSEGFLIM; - const ::Opm::ParserKeywords::WSEGFMOD WSEGFMOD; - const ::Opm::ParserKeywords::WSEGINIT WSEGINIT; - const ::Opm::ParserKeywords::WSEGITER WSEGITER; - const ::Opm::ParserKeywords::WSEGLABY WSEGLABY; - const ::Opm::ParserKeywords::WSEGLINK WSEGLINK; - const ::Opm::ParserKeywords::WSEGMULT WSEGMULT; - const ::Opm::ParserKeywords::WSEGPROP WSEGPROP; - const ::Opm::ParserKeywords::WSEGSEP WSEGSEP; - const ::Opm::ParserKeywords::WSEGSICD WSEGSICD; - const ::Opm::ParserKeywords::WSEGSOLV WSEGSOLV; - const ::Opm::ParserKeywords::WSEGTABL WSEGTABL; - const ::Opm::ParserKeywords::WSEGVALV WSEGVALV; - const ::Opm::ParserKeywords::WSKPTAB WSKPTAB; - const ::Opm::ParserKeywords::WSOLVENT WSOLVENT; - const ::Opm::ParserKeywords::WSURFACT WSURFACT; - const ::Opm::ParserKeywords::WTADD WTADD; - const ::Opm::ParserKeywords::WTEMP WTEMP; - const ::Opm::ParserKeywords::WTEMPQ WTEMPQ; - const ::Opm::ParserKeywords::WTEST WTEST; - const ::Opm::ParserKeywords::WTHPMAX WTHPMAX; - const ::Opm::ParserKeywords::WTMULT WTMULT; - const ::Opm::ParserKeywords::WTRACER WTRACER; - const ::Opm::ParserKeywords::WVFPDP WVFPDP; - const ::Opm::ParserKeywords::WVFPEXP WVFPEXP; - const ::Opm::ParserKeywords::WWPAVE WWPAVE; - const ::Opm::ParserKeywords::ZCORN ZCORN; - const ::Opm::ParserKeywords::ZFACT1 ZFACT1; - const ::Opm::ParserKeywords::ZFACT1S ZFACT1S; - const ::Opm::ParserKeywords::ZFACTOR ZFACTOR; - const ::Opm::ParserKeywords::ZFACTORS ZFACTORS; - const ::Opm::ParserKeywords::ZIPP2OFF ZIPP2OFF; - const ::Opm::ParserKeywords::ZIPPY2 ZIPPY2; - const ::Opm::ParserKeyword& get_ACTDIMS() { return this->ACTDIMS; }; - const ::Opm::ParserKeyword& get_ACTION() { return this->ACTION; }; - const ::Opm::ParserKeyword& get_ACTIONG() { return this->ACTIONG; }; - const ::Opm::ParserKeyword& get_ACTIONR() { return this->ACTIONR; }; - const ::Opm::ParserKeyword& get_ACTIONS() { return this->ACTIONS; }; - const ::Opm::ParserKeyword& get_ACTIONW() { return this->ACTIONW; }; - const ::Opm::ParserKeyword& get_ACTIONX() { return this->ACTIONX; }; - const ::Opm::ParserKeyword& get_ACTNUM() { return this->ACTNUM; }; - const ::Opm::ParserKeyword& get_ACTPARAM() { return this->ACTPARAM; }; - const ::Opm::ParserKeyword& get_ADD() { return this->ADD; }; - const ::Opm::ParserKeyword& get_ADDREG() { return this->ADDREG; }; - const ::Opm::ParserKeyword& get_ADDZCORN() { return this->ADDZCORN; }; - const ::Opm::ParserKeyword& get_ADSALNOD() { return this->ADSALNOD; }; - const ::Opm::ParserKeyword& get_ADSORP() { return this->ADSORP; }; - const ::Opm::ParserKeyword& get_AITS() { return this->AITS; }; - const ::Opm::ParserKeyword& get_AITSOFF() { return this->AITSOFF; }; - const ::Opm::ParserKeyword& get_ALKADS() { return this->ALKADS; }; - const ::Opm::ParserKeyword& get_ALKALINE() { return this->ALKALINE; }; - const ::Opm::ParserKeyword& get_ALKROCK() { return this->ALKROCK; }; - const ::Opm::ParserKeyword& get_ALL() { return this->ALL; }; - const ::Opm::ParserKeyword& get_ALPOLADS() { return this->ALPOLADS; }; - const ::Opm::ParserKeyword& get_ALSURFAD() { return this->ALSURFAD; }; - const ::Opm::ParserKeyword& get_ALSURFST() { return this->ALSURFST; }; - const ::Opm::ParserKeyword& get_AMALGAM() { return this->AMALGAM; }; - const ::Opm::ParserKeyword& get_API() { return this->API; }; - const ::Opm::ParserKeyword& get_APIGROUP() { return this->APIGROUP; }; - const ::Opm::ParserKeyword& get_APILIM() { return this->APILIM; }; - const ::Opm::ParserKeyword& get_APIVD() { return this->APIVD; }; - const ::Opm::ParserKeyword& get_AQANCONL() { return this->AQANCONL; }; - const ::Opm::ParserKeyword& get_AQANNC() { return this->AQANNC; }; - const ::Opm::ParserKeyword& get_AQANTRC() { return this->AQANTRC; }; - const ::Opm::ParserKeyword& get_AQUALIST() { return this->AQUALIST; }; - const ::Opm::ParserKeyword& get_AQUANCON() { return this->AQUANCON; }; - const ::Opm::ParserKeyword& get_AQUCHGAS() { return this->AQUCHGAS; }; - const ::Opm::ParserKeyword& get_AQUCHWAT() { return this->AQUCHWAT; }; - const ::Opm::ParserKeyword& get_AQUCON() { return this->AQUCON; }; - const ::Opm::ParserKeyword& get_AQUCT() { return this->AQUCT; }; - const ::Opm::ParserKeyword& get_AQUCWFAC() { return this->AQUCWFAC; }; - const ::Opm::ParserKeyword& get_AQUDIMS() { return this->AQUDIMS; }; - const ::Opm::ParserKeyword& get_AQUFET() { return this->AQUFET; }; - const ::Opm::ParserKeyword& get_AQUFETP() { return this->AQUFETP; }; - const ::Opm::ParserKeyword& get_AQUFLUX() { return this->AQUFLUX; }; - const ::Opm::ParserKeyword& get_AQUIFER_PROBE_ANALYTIC() { return this->AQUIFER_PROBE_ANALYTIC; }; - const ::Opm::ParserKeyword& get_AQUIFER_PROBE_ANALYTIC_NAMED() { return this->AQUIFER_PROBE_ANALYTIC_NAMED; }; - const ::Opm::ParserKeyword& get_AQUIFER_PROBE_NUMERIC() { return this->AQUIFER_PROBE_NUMERIC; }; - const ::Opm::ParserKeyword& get_AQUNNC() { return this->AQUNNC; }; - const ::Opm::ParserKeyword& get_AQUNUM() { return this->AQUNUM; }; - const ::Opm::ParserKeyword& get_AQUTAB() { return this->AQUTAB; }; - const ::Opm::ParserKeyword& get_AUTOCOAR() { return this->AUTOCOAR; }; - const ::Opm::ParserKeyword& get_AUTOREF() { return this->AUTOREF; }; - const ::Opm::ParserKeyword& get_BC() { return this->BC; }; - const ::Opm::ParserKeyword& get_BDENSITY() { return this->BDENSITY; }; - const ::Opm::ParserKeyword& get_BGGI() { return this->BGGI; }; - const ::Opm::ParserKeyword& get_BIGMODEL() { return this->BIGMODEL; }; - const ::Opm::ParserKeyword& get_BLACKOIL() { return this->BLACKOIL; }; - const ::Opm::ParserKeyword& get_BLOCK_PROBE() { return this->BLOCK_PROBE; }; - const ::Opm::ParserKeyword& get_BLOCK_PROBE300() { return this->BLOCK_PROBE300; }; - const ::Opm::ParserKeyword& get_BOGI() { return this->BOGI; }; - const ::Opm::ParserKeyword& get_BOUNDARY() { return this->BOUNDARY; }; - const ::Opm::ParserKeyword& get_BOX() { return this->BOX; }; - const ::Opm::ParserKeyword& get_BPARA() { return this->BPARA; }; - const ::Opm::ParserKeyword& get_BPIDIMS() { return this->BPIDIMS; }; - const ::Opm::ParserKeyword& get_BRANPROP() { return this->BRANPROP; }; - const ::Opm::ParserKeyword& get_BRINE() { return this->BRINE; }; - const ::Opm::ParserKeyword& get_BTOBALFA() { return this->BTOBALFA; }; - const ::Opm::ParserKeyword& get_BTOBALFV() { return this->BTOBALFV; }; - const ::Opm::ParserKeyword& get_CALTRAC() { return this->CALTRAC; }; - const ::Opm::ParserKeyword& get_CARFIN() { return this->CARFIN; }; - const ::Opm::ParserKeyword& get_CART() { return this->CART; }; - const ::Opm::ParserKeyword& get_CBMOPTS() { return this->CBMOPTS; }; - const ::Opm::ParserKeyword& get_CECON() { return this->CECON; }; - const ::Opm::ParserKeyword& get_CECONT() { return this->CECONT; }; - const ::Opm::ParserKeyword& get_CIRCLE() { return this->CIRCLE; }; - const ::Opm::ParserKeyword& get_CO2STOR() { return this->CO2STOR; }; - const ::Opm::ParserKeyword& get_CO2STORE() { return this->CO2STORE; }; - const ::Opm::ParserKeyword& get_COAL() { return this->COAL; }; - const ::Opm::ParserKeyword& get_COALADS() { return this->COALADS; }; - const ::Opm::ParserKeyword& get_COALNUM() { return this->COALNUM; }; - const ::Opm::ParserKeyword& get_COALPP() { return this->COALPP; }; - const ::Opm::ParserKeyword& get_COARSEN() { return this->COARSEN; }; - const ::Opm::ParserKeyword& get_COLLAPSE() { return this->COLLAPSE; }; - const ::Opm::ParserKeyword& get_COLUMNS() { return this->COLUMNS; }; - const ::Opm::ParserKeyword& get_COMPDAT() { return this->COMPDAT; }; - const ::Opm::ParserKeyword& get_COMPDATX() { return this->COMPDATX; }; - const ::Opm::ParserKeyword& get_COMPFLSH() { return this->COMPFLSH; }; - const ::Opm::ParserKeyword& get_COMPIMB() { return this->COMPIMB; }; - const ::Opm::ParserKeyword& get_COMPINJK() { return this->COMPINJK; }; - const ::Opm::ParserKeyword& get_COMPLMPL() { return this->COMPLMPL; }; - const ::Opm::ParserKeyword& get_COMPLUMP() { return this->COMPLUMP; }; - const ::Opm::ParserKeyword& get_COMPOFF() { return this->COMPOFF; }; - const ::Opm::ParserKeyword& get_COMPORD() { return this->COMPORD; }; - const ::Opm::ParserKeyword& get_COMPRIV() { return this->COMPRIV; }; - const ::Opm::ParserKeyword& get_COMPRP() { return this->COMPRP; }; - const ::Opm::ParserKeyword& get_COMPRPL() { return this->COMPRPL; }; - const ::Opm::ParserKeyword& get_COMPS() { return this->COMPS; }; - const ::Opm::ParserKeyword& get_COMPSEGL() { return this->COMPSEGL; }; - const ::Opm::ParserKeyword& get_COMPSEGS() { return this->COMPSEGS; }; - const ::Opm::ParserKeyword& get_COMPVE() { return this->COMPVE; }; - const ::Opm::ParserKeyword& get_COMPVEL() { return this->COMPVEL; }; - const ::Opm::ParserKeyword& get_CONNECTION_PROBE() { return this->CONNECTION_PROBE; }; - const ::Opm::ParserKeyword& get_COORD() { return this->COORD; }; - const ::Opm::ParserKeyword& get_COORDSYS() { return this->COORDSYS; }; - const ::Opm::ParserKeyword& get_COPY() { return this->COPY; }; - const ::Opm::ParserKeyword& get_COPYBOX() { return this->COPYBOX; }; - const ::Opm::ParserKeyword& get_COPYREG() { return this->COPYREG; }; - const ::Opm::ParserKeyword& get_CPIFACT() { return this->CPIFACT; }; - const ::Opm::ParserKeyword& get_CPIFACTL() { return this->CPIFACTL; }; - const ::Opm::ParserKeyword& get_CPR() { return this->CPR; }; - const ::Opm::ParserKeyword& get_CREF() { return this->CREF; }; - const ::Opm::ParserKeyword& get_CREFS() { return this->CREFS; }; - const ::Opm::ParserKeyword& get_CRITPERM() { return this->CRITPERM; }; - const ::Opm::ParserKeyword& get_CSKIN() { return this->CSKIN; }; - const ::Opm::ParserKeyword& get_DATE() { return this->DATE; }; - const ::Opm::ParserKeyword& get_DATES() { return this->DATES; }; - const ::Opm::ParserKeyword& get_DATUM() { return this->DATUM; }; - const ::Opm::ParserKeyword& get_DATUMR() { return this->DATUMR; }; - const ::Opm::ParserKeyword& get_DATUMRX() { return this->DATUMRX; }; - const ::Opm::ParserKeyword& get_DCQDEFN() { return this->DCQDEFN; }; - const ::Opm::ParserKeyword& get_DEBUG_() { return this->DEBUG_; }; - const ::Opm::ParserKeyword& get_DELAYACT() { return this->DELAYACT; }; - const ::Opm::ParserKeyword& get_DENSITY() { return this->DENSITY; }; - const ::Opm::ParserKeyword& get_DEPTH() { return this->DEPTH; }; - const ::Opm::ParserKeyword& get_DEPTHTAB() { return this->DEPTHTAB; }; - const ::Opm::ParserKeyword& get_DEPTHZ() { return this->DEPTHZ; }; - const ::Opm::ParserKeyword& get_DIAGDISP() { return this->DIAGDISP; }; - const ::Opm::ParserKeyword& get_DIFF() { return this->DIFF; }; - const ::Opm::ParserKeyword& get_DIFFC() { return this->DIFFC; }; - const ::Opm::ParserKeyword& get_DIFFCOAL() { return this->DIFFCOAL; }; - const ::Opm::ParserKeyword& get_DIFFDP() { return this->DIFFDP; }; - const ::Opm::ParserKeyword& get_DIFFMMF() { return this->DIFFMMF; }; - const ::Opm::ParserKeyword& get_DIFFMR() { return this->DIFFMR; }; - const ::Opm::ParserKeyword& get_DIFFMTHT() { return this->DIFFMTHT; }; - const ::Opm::ParserKeyword& get_DIFFMX() { return this->DIFFMX; }; - const ::Opm::ParserKeyword& get_DIFFMY() { return this->DIFFMY; }; - const ::Opm::ParserKeyword& get_DIFFMZ() { return this->DIFFMZ; }; - const ::Opm::ParserKeyword& get_DIFFR() { return this->DIFFR; }; - const ::Opm::ParserKeyword& get_DIFFTHT() { return this->DIFFTHT; }; - const ::Opm::ParserKeyword& get_DIFFUSE() { return this->DIFFUSE; }; - const ::Opm::ParserKeyword& get_DIFFX() { return this->DIFFX; }; - const ::Opm::ParserKeyword& get_DIFFY() { return this->DIFFY; }; - const ::Opm::ParserKeyword& get_DIFFZ() { return this->DIFFZ; }; - const ::Opm::ParserKeyword& get_DIMENS() { return this->DIMENS; }; - const ::Opm::ParserKeyword& get_DIMPES() { return this->DIMPES; }; - const ::Opm::ParserKeyword& get_DIMPLICT() { return this->DIMPLICT; }; - const ::Opm::ParserKeyword& get_DISGAS() { return this->DISGAS; }; - const ::Opm::ParserKeyword& get_DISPDIMS() { return this->DISPDIMS; }; - const ::Opm::ParserKeyword& get_DISPERSE() { return this->DISPERSE; }; - const ::Opm::ParserKeyword& get_DOMAINS() { return this->DOMAINS; }; - const ::Opm::ParserKeyword& get_DPGRID() { return this->DPGRID; }; - const ::Opm::ParserKeyword& get_DPKRMOD() { return this->DPKRMOD; }; - const ::Opm::ParserKeyword& get_DPNUM() { return this->DPNUM; }; - const ::Opm::ParserKeyword& get_DR() { return this->DR; }; - const ::Opm::ParserKeyword& get_DREF() { return this->DREF; }; - const ::Opm::ParserKeyword& get_DREFS() { return this->DREFS; }; - const ::Opm::ParserKeyword& get_DRILPRI() { return this->DRILPRI; }; - const ::Opm::ParserKeyword& get_DRSDT() { return this->DRSDT; }; - const ::Opm::ParserKeyword& get_DRSDTCON() { return this->DRSDTCON; }; - const ::Opm::ParserKeyword& get_DRSDTR() { return this->DRSDTR; }; - const ::Opm::ParserKeyword& get_DRV() { return this->DRV; }; - const ::Opm::ParserKeyword& get_DRVDT() { return this->DRVDT; }; - const ::Opm::ParserKeyword& get_DRVDTR() { return this->DRVDTR; }; - const ::Opm::ParserKeyword& get_DSPDEINT() { return this->DSPDEINT; }; - const ::Opm::ParserKeyword& get_DTHETA() { return this->DTHETA; }; - const ::Opm::ParserKeyword& get_DTHETAV() { return this->DTHETAV; }; - const ::Opm::ParserKeyword& get_DUALPERM() { return this->DUALPERM; }; - const ::Opm::ParserKeyword& get_DUALPORO() { return this->DUALPORO; }; - const ::Opm::ParserKeyword& get_DUMPCUPL() { return this->DUMPCUPL; }; - const ::Opm::ParserKeyword& get_DUMPFLUX() { return this->DUMPFLUX; }; - const ::Opm::ParserKeyword& get_DX() { return this->DX; }; - const ::Opm::ParserKeyword& get_DXV() { return this->DXV; }; - const ::Opm::ParserKeyword& get_DY() { return this->DY; }; - const ::Opm::ParserKeyword& get_DYNAMICR() { return this->DYNAMICR; }; - const ::Opm::ParserKeyword& get_DYNRDIMS() { return this->DYNRDIMS; }; - const ::Opm::ParserKeyword& get_DYV() { return this->DYV; }; - const ::Opm::ParserKeyword& get_DZ() { return this->DZ; }; - const ::Opm::ParserKeyword& get_DZMATRIX() { return this->DZMATRIX; }; - const ::Opm::ParserKeyword& get_DZMTRX() { return this->DZMTRX; }; - const ::Opm::ParserKeyword& get_DZMTRXV() { return this->DZMTRXV; }; - const ::Opm::ParserKeyword& get_DZNET() { return this->DZNET; }; - const ::Opm::ParserKeyword& get_DZV() { return this->DZV; }; - const ::Opm::ParserKeyword& get_ECHO() { return this->ECHO; }; - const ::Opm::ParserKeyword& get_ECLMC() { return this->ECLMC; }; - const ::Opm::ParserKeyword& get_EDIT() { return this->EDIT; }; - const ::Opm::ParserKeyword& get_EDITNNC() { return this->EDITNNC; }; - const ::Opm::ParserKeyword& get_EDITNNCR() { return this->EDITNNCR; }; - const ::Opm::ParserKeyword& get_EHYSTR() { return this->EHYSTR; }; - const ::Opm::ParserKeyword& get_EHYSTRR() { return this->EHYSTRR; }; - const ::Opm::ParserKeyword& get_END() { return this->END; }; - const ::Opm::ParserKeyword& get_ENDACTIO() { return this->ENDACTIO; }; - const ::Opm::ParserKeyword& get_ENDBOX() { return this->ENDBOX; }; - const ::Opm::ParserKeyword& get_ENDDYN() { return this->ENDDYN; }; - const ::Opm::ParserKeyword& get_ENDFIN() { return this->ENDFIN; }; - const ::Opm::ParserKeyword& get_ENDINC() { return this->ENDINC; }; - const ::Opm::ParserKeyword& get_ENDNUM() { return this->ENDNUM; }; - const ::Opm::ParserKeyword& get_ENDPOINT_SPECIFIERS() { return this->ENDPOINT_SPECIFIERS; }; - const ::Opm::ParserKeyword& get_ENDSCALE() { return this->ENDSCALE; }; - const ::Opm::ParserKeyword& get_ENDSKIP() { return this->ENDSKIP; }; - const ::Opm::ParserKeyword& get_ENKRVD() { return this->ENKRVD; }; - const ::Opm::ParserKeyword& get_ENPCVD() { return this->ENPCVD; }; - const ::Opm::ParserKeyword& get_ENPTVD() { return this->ENPTVD; }; - const ::Opm::ParserKeyword& get_ENSPCVD() { return this->ENSPCVD; }; - const ::Opm::ParserKeyword& get_EPSDBGS() { return this->EPSDBGS; }; - const ::Opm::ParserKeyword& get_EPSDEBUG() { return this->EPSDEBUG; }; - const ::Opm::ParserKeyword& get_EQLDIMS() { return this->EQLDIMS; }; - const ::Opm::ParserKeyword& get_EQLNUM() { return this->EQLNUM; }; - const ::Opm::ParserKeyword& get_EQLOPTS() { return this->EQLOPTS; }; - const ::Opm::ParserKeyword& get_EQLZCORN() { return this->EQLZCORN; }; - const ::Opm::ParserKeyword& get_EQUALREG() { return this->EQUALREG; }; - const ::Opm::ParserKeyword& get_EQUALS() { return this->EQUALS; }; - const ::Opm::ParserKeyword& get_EQUIL() { return this->EQUIL; }; - const ::Opm::ParserKeyword& get_ESSNODE() { return this->ESSNODE; }; - const ::Opm::ParserKeyword& get_EXCAVATE() { return this->EXCAVATE; }; - const ::Opm::ParserKeyword& get_EXCEL() { return this->EXCEL; }; - const ::Opm::ParserKeyword& get_EXIT() { return this->EXIT; }; - const ::Opm::ParserKeyword& get_EXTFIN() { return this->EXTFIN; }; - const ::Opm::ParserKeyword& get_EXTHOST() { return this->EXTHOST; }; - const ::Opm::ParserKeyword& get_EXTRAPMS() { return this->EXTRAPMS; }; - const ::Opm::ParserKeyword& get_EXTREPGL() { return this->EXTREPGL; }; - const ::Opm::ParserKeyword& get_FAULTDIM() { return this->FAULTDIM; }; - const ::Opm::ParserKeyword& get_FAULTS() { return this->FAULTS; }; - const ::Opm::ParserKeyword& get_FBHPDEF() { return this->FBHPDEF; }; - const ::Opm::ParserKeyword& get_FHERCHBL() { return this->FHERCHBL; }; - const ::Opm::ParserKeyword& get_FIELD() { return this->FIELD; }; - const ::Opm::ParserKeyword& get_FIELD_PROBE() { return this->FIELD_PROBE; }; - const ::Opm::ParserKeyword& get_FILEUNIT() { return this->FILEUNIT; }; - const ::Opm::ParserKeyword& get_FILLEPS() { return this->FILLEPS; }; - const ::Opm::ParserKeyword& get_FIPNUM() { return this->FIPNUM; }; - const ::Opm::ParserKeyword& get_FIPOWG() { return this->FIPOWG; }; - const ::Opm::ParserKeyword& get_FIPSEP() { return this->FIPSEP; }; - const ::Opm::ParserKeyword& get_FIP_PROBE() { return this->FIP_PROBE; }; - const ::Opm::ParserKeyword& get_FLUXNUM() { return this->FLUXNUM; }; - const ::Opm::ParserKeyword& get_FLUXREG() { return this->FLUXREG; }; - const ::Opm::ParserKeyword& get_FLUXTYPE() { return this->FLUXTYPE; }; - const ::Opm::ParserKeyword& get_FMTHMD() { return this->FMTHMD; }; - const ::Opm::ParserKeyword& get_FMTIN() { return this->FMTIN; }; - const ::Opm::ParserKeyword& get_FMTOUT() { return this->FMTOUT; }; - const ::Opm::ParserKeyword& get_FMWSET() { return this->FMWSET; }; - const ::Opm::ParserKeyword& get_FOAM() { return this->FOAM; }; - const ::Opm::ParserKeyword& get_FOAMADS() { return this->FOAMADS; }; - const ::Opm::ParserKeyword& get_FOAMDCYO() { return this->FOAMDCYO; }; - const ::Opm::ParserKeyword& get_FOAMDCYW() { return this->FOAMDCYW; }; - const ::Opm::ParserKeyword& get_FOAMFCN() { return this->FOAMFCN; }; - const ::Opm::ParserKeyword& get_FOAMFRM() { return this->FOAMFRM; }; - const ::Opm::ParserKeyword& get_FOAMFSC() { return this->FOAMFSC; }; - const ::Opm::ParserKeyword& get_FOAMFSO() { return this->FOAMFSO; }; - const ::Opm::ParserKeyword& get_FOAMFST() { return this->FOAMFST; }; - const ::Opm::ParserKeyword& get_FOAMFSW() { return this->FOAMFSW; }; - const ::Opm::ParserKeyword& get_FOAMMOB() { return this->FOAMMOB; }; - const ::Opm::ParserKeyword& get_FOAMMOBP() { return this->FOAMMOBP; }; - const ::Opm::ParserKeyword& get_FOAMMOBS() { return this->FOAMMOBS; }; - const ::Opm::ParserKeyword& get_FOAMOPTS() { return this->FOAMOPTS; }; - const ::Opm::ParserKeyword& get_FOAMROCK() { return this->FOAMROCK; }; - const ::Opm::ParserKeyword& get_FORMFEED() { return this->FORMFEED; }; - const ::Opm::ParserKeyword& get_FRICTION() { return this->FRICTION; }; - const ::Opm::ParserKeyword& get_FULLIMP() { return this->FULLIMP; }; - const ::Opm::ParserKeyword& get_GAS() { return this->GAS; }; - const ::Opm::ParserKeyword& get_GASBEGIN() { return this->GASBEGIN; }; - const ::Opm::ParserKeyword& get_GASCONC() { return this->GASCONC; }; - const ::Opm::ParserKeyword& get_GASDENT() { return this->GASDENT; }; - const ::Opm::ParserKeyword& get_GASEND() { return this->GASEND; }; - const ::Opm::ParserKeyword& get_GASFCOMP() { return this->GASFCOMP; }; - const ::Opm::ParserKeyword& get_GASFDECR() { return this->GASFDECR; }; - const ::Opm::ParserKeyword& get_GASFDELC() { return this->GASFDELC; }; - const ::Opm::ParserKeyword& get_GASFIELD() { return this->GASFIELD; }; - const ::Opm::ParserKeyword& get_GASFTARG() { return this->GASFTARG; }; - const ::Opm::ParserKeyword& get_GASJT() { return this->GASJT; }; - const ::Opm::ParserKeyword& get_GASMONTH() { return this->GASMONTH; }; - const ::Opm::ParserKeyword& get_GASPERIO() { return this->GASPERIO; }; - const ::Opm::ParserKeyword& get_GASSATC() { return this->GASSATC; }; - const ::Opm::ParserKeyword& get_GASVISCT() { return this->GASVISCT; }; - const ::Opm::ParserKeyword& get_GASYEAR() { return this->GASYEAR; }; - const ::Opm::ParserKeyword& get_GCALECON() { return this->GCALECON; }; - const ::Opm::ParserKeyword& get_GCOMPIDX() { return this->GCOMPIDX; }; - const ::Opm::ParserKeyword& get_GCONCAL() { return this->GCONCAL; }; - const ::Opm::ParserKeyword& get_GCONENG() { return this->GCONENG; }; - const ::Opm::ParserKeyword& get_GCONINJE() { return this->GCONINJE; }; - const ::Opm::ParserKeyword& get_GCONPRI() { return this->GCONPRI; }; - const ::Opm::ParserKeyword& get_GCONPROD() { return this->GCONPROD; }; - const ::Opm::ParserKeyword& get_GCONSALE() { return this->GCONSALE; }; - const ::Opm::ParserKeyword& get_GCONSUMP() { return this->GCONSUMP; }; - const ::Opm::ParserKeyword& get_GCONTOL() { return this->GCONTOL; }; - const ::Opm::ParserKeyword& get_GCUTBACK() { return this->GCUTBACK; }; - const ::Opm::ParserKeyword& get_GCUTBACT() { return this->GCUTBACT; }; - const ::Opm::ParserKeyword& get_GCVD() { return this->GCVD; }; - const ::Opm::ParserKeyword& get_GDCQ() { return this->GDCQ; }; - const ::Opm::ParserKeyword& get_GDCQECON() { return this->GDCQECON; }; - const ::Opm::ParserKeyword& get_GDFILE() { return this->GDFILE; }; - const ::Opm::ParserKeyword& get_GDIMS() { return this->GDIMS; }; - const ::Opm::ParserKeyword& get_GDORIENT() { return this->GDORIENT; }; - const ::Opm::ParserKeyword& get_GDRILPOT() { return this->GDRILPOT; }; - const ::Opm::ParserKeyword& get_GECON() { return this->GECON; }; - const ::Opm::ParserKeyword& get_GECONT() { return this->GECONT; }; - const ::Opm::ParserKeyword& get_GEFAC() { return this->GEFAC; }; - const ::Opm::ParserKeyword& get_GETDATA() { return this->GETDATA; }; - const ::Opm::ParserKeyword& get_GETGLOB() { return this->GETGLOB; }; - const ::Opm::ParserKeyword& get_GI() { return this->GI; }; - const ::Opm::ParserKeyword& get_GIALL() { return this->GIALL; }; - const ::Opm::ParserKeyword& get_GIMODEL() { return this->GIMODEL; }; - const ::Opm::ParserKeyword& get_GINODE() { return this->GINODE; }; - const ::Opm::ParserKeyword& get_GLIFTLIM() { return this->GLIFTLIM; }; - const ::Opm::ParserKeyword& get_GLIFTOPT() { return this->GLIFTOPT; }; - const ::Opm::ParserKeyword& get_GMWSET() { return this->GMWSET; }; - const ::Opm::ParserKeyword& get_GNETDP() { return this->GNETDP; }; - const ::Opm::ParserKeyword& get_GNETINJE() { return this->GNETINJE; }; - const ::Opm::ParserKeyword& get_GNETPUMP() { return this->GNETPUMP; }; - const ::Opm::ParserKeyword& get_GPMAINT() { return this->GPMAINT; }; - const ::Opm::ParserKeyword& get_GRADGRUP() { return this->GRADGRUP; }; - const ::Opm::ParserKeyword& get_GRADRESV() { return this->GRADRESV; }; - const ::Opm::ParserKeyword& get_GRADRFT() { return this->GRADRFT; }; - const ::Opm::ParserKeyword& get_GRADWELL() { return this->GRADWELL; }; - const ::Opm::ParserKeyword& get_GRAVCONS() { return this->GRAVCONS; }; - const ::Opm::ParserKeyword& get_GRAVDR() { return this->GRAVDR; }; - const ::Opm::ParserKeyword& get_GRAVDRB() { return this->GRAVDRB; }; - const ::Opm::ParserKeyword& get_GRAVDRM() { return this->GRAVDRM; }; - const ::Opm::ParserKeyword& get_GRAVITY() { return this->GRAVITY; }; - const ::Opm::ParserKeyword& get_GRDREACH() { return this->GRDREACH; }; - const ::Opm::ParserKeyword& get_GRID() { return this->GRID; }; - const ::Opm::ParserKeyword& get_GRIDFILE() { return this->GRIDFILE; }; - const ::Opm::ParserKeyword& get_GRIDOPTS() { return this->GRIDOPTS; }; - const ::Opm::ParserKeyword& get_GRIDUNIT() { return this->GRIDUNIT; }; - const ::Opm::ParserKeyword& get_GROUP_PROBE() { return this->GROUP_PROBE; }; - const ::Opm::ParserKeyword& get_GRUPMAST() { return this->GRUPMAST; }; - const ::Opm::ParserKeyword& get_GRUPNET() { return this->GRUPNET; }; - const ::Opm::ParserKeyword& get_GRUPRIG() { return this->GRUPRIG; }; - const ::Opm::ParserKeyword& get_GRUPSLAV() { return this->GRUPSLAV; }; - const ::Opm::ParserKeyword& get_GRUPTARG() { return this->GRUPTARG; }; - const ::Opm::ParserKeyword& get_GRUPTREE() { return this->GRUPTREE; }; - const ::Opm::ParserKeyword& get_GSATINJE() { return this->GSATINJE; }; - const ::Opm::ParserKeyword& get_GSATPROD() { return this->GSATPROD; }; - const ::Opm::ParserKeyword& get_GSEPCOND() { return this->GSEPCOND; }; - const ::Opm::ParserKeyword& get_GSSCPTST() { return this->GSSCPTST; }; - const ::Opm::ParserKeyword& get_GSWINGF() { return this->GSWINGF; }; - const ::Opm::ParserKeyword& get_GTADD() { return this->GTADD; }; - const ::Opm::ParserKeyword& get_GTMULT() { return this->GTMULT; }; - const ::Opm::ParserKeyword& get_GUIDECAL() { return this->GUIDECAL; }; - const ::Opm::ParserKeyword& get_GUIDERAT() { return this->GUIDERAT; }; - const ::Opm::ParserKeyword& get_GUPFREQ() { return this->GUPFREQ; }; - const ::Opm::ParserKeyword& get_GWRTWCV() { return this->GWRTWCV; }; - const ::Opm::ParserKeyword& get_HALFTRAN() { return this->HALFTRAN; }; - const ::Opm::ParserKeyword& get_HAxxxxxx() { return this->HAxxxxxx; }; - const ::Opm::ParserKeyword& get_HBNUM() { return this->HBNUM; }; - const ::Opm::ParserKeyword& get_HDISP() { return this->HDISP; }; - const ::Opm::ParserKeyword& get_HEATCR() { return this->HEATCR; }; - const ::Opm::ParserKeyword& get_HEATCRT() { return this->HEATCRT; }; - const ::Opm::ParserKeyword& get_HMAQUCT() { return this->HMAQUCT; }; - const ::Opm::ParserKeyword& get_HMAQUFET() { return this->HMAQUFET; }; - const ::Opm::ParserKeyword& get_HMAQUNUM() { return this->HMAQUNUM; }; - const ::Opm::ParserKeyword& get_HMDIMS() { return this->HMDIMS; }; - const ::Opm::ParserKeyword& get_HMFAULTS() { return this->HMFAULTS; }; - const ::Opm::ParserKeyword& get_HMMLAQUN() { return this->HMMLAQUN; }; - const ::Opm::ParserKeyword& get_HMMLCTAQ() { return this->HMMLCTAQ; }; - const ::Opm::ParserKeyword& get_HMMLFTAQ() { return this->HMMLFTAQ; }; - const ::Opm::ParserKeyword& get_HMMLTWCN() { return this->HMMLTWCN; }; - const ::Opm::ParserKeyword& get_HMMULTFT() { return this->HMMULTFT; }; - const ::Opm::ParserKeyword& get_HMMULTSG() { return this->HMMULTSG; }; - const ::Opm::ParserKeyword& get_HMMULTxx() { return this->HMMULTxx; }; - const ::Opm::ParserKeyword& get_HMPROPS() { return this->HMPROPS; }; - const ::Opm::ParserKeyword& get_HMROCK() { return this->HMROCK; }; - const ::Opm::ParserKeyword& get_HMROCKT() { return this->HMROCKT; }; - const ::Opm::ParserKeyword& get_HMRREF() { return this->HMRREF; }; - const ::Opm::ParserKeyword& get_HMWELCON() { return this->HMWELCON; }; - const ::Opm::ParserKeyword& get_HMWPIMLT() { return this->HMWPIMLT; }; - const ::Opm::ParserKeyword& get_HMxxxxxx() { return this->HMxxxxxx; }; - const ::Opm::ParserKeyword& get_HRFIN() { return this->HRFIN; }; - const ::Opm::ParserKeyword& get_HWKRO() { return this->HWKRO; }; - const ::Opm::ParserKeyword& get_HWKRORG() { return this->HWKRORG; }; - const ::Opm::ParserKeyword& get_HWKRORW() { return this->HWKRORW; }; - const ::Opm::ParserKeyword& get_HWKRW() { return this->HWKRW; }; - const ::Opm::ParserKeyword& get_HWKRWR() { return this->HWKRWR; }; - const ::Opm::ParserKeyword& get_HWPCW() { return this->HWPCW; }; - const ::Opm::ParserKeyword& get_HWSNUM() { return this->HWSNUM; }; - const ::Opm::ParserKeyword& get_HWSOGCR() { return this->HWSOGCR; }; - const ::Opm::ParserKeyword& get_HWSOWCR() { return this->HWSOWCR; }; - const ::Opm::ParserKeyword& get_HWSWCR() { return this->HWSWCR; }; - const ::Opm::ParserKeyword& get_HWSWL() { return this->HWSWL; }; - const ::Opm::ParserKeyword& get_HWSWLPC() { return this->HWSWLPC; }; - const ::Opm::ParserKeyword& get_HWSWU() { return this->HWSWU; }; - const ::Opm::ParserKeyword& get_HXFIN() { return this->HXFIN; }; - const ::Opm::ParserKeyword& get_HYDRHEAD() { return this->HYDRHEAD; }; - const ::Opm::ParserKeyword& get_HYFIN() { return this->HYFIN; }; - const ::Opm::ParserKeyword& get_HYMOBGDR() { return this->HYMOBGDR; }; - const ::Opm::ParserKeyword& get_HYST() { return this->HYST; }; - const ::Opm::ParserKeyword& get_HYSTCHCK() { return this->HYSTCHCK; }; - const ::Opm::ParserKeyword& get_HZFIN() { return this->HZFIN; }; - const ::Opm::ParserKeyword& get_IHOST() { return this->IHOST; }; - const ::Opm::ParserKeyword& get_IMBNUM() { return this->IMBNUM; }; - const ::Opm::ParserKeyword& get_IMBNUMMF() { return this->IMBNUMMF; }; - const ::Opm::ParserKeyword& get_IMKRVD() { return this->IMKRVD; }; - const ::Opm::ParserKeyword& get_IMPCVD() { return this->IMPCVD; }; - const ::Opm::ParserKeyword& get_IMPES() { return this->IMPES; }; - const ::Opm::ParserKeyword& get_IMPLICIT() { return this->IMPLICIT; }; - const ::Opm::ParserKeyword& get_IMPORT() { return this->IMPORT; }; - const ::Opm::ParserKeyword& get_IMPTVD() { return this->IMPTVD; }; - const ::Opm::ParserKeyword& get_IMSPCVD() { return this->IMSPCVD; }; - const ::Opm::ParserKeyword& get_INCLUDE() { return this->INCLUDE; }; - const ::Opm::ParserKeyword& get_INIT() { return this->INIT; }; - const ::Opm::ParserKeyword& get_INRAD() { return this->INRAD; }; - const ::Opm::ParserKeyword& get_INSPEC() { return this->INSPEC; }; - const ::Opm::ParserKeyword& get_INTPC() { return this->INTPC; }; - const ::Opm::ParserKeyword& get_IONROCK() { return this->IONROCK; }; - const ::Opm::ParserKeyword& get_IONXROCK() { return this->IONXROCK; }; - const ::Opm::ParserKeyword& get_IONXSURF() { return this->IONXSURF; }; - const ::Opm::ParserKeyword& get_IPCG() { return this->IPCG; }; - const ::Opm::ParserKeyword& get_IPCW() { return this->IPCW; }; - const ::Opm::ParserKeyword& get_ISGCR() { return this->ISGCR; }; - const ::Opm::ParserKeyword& get_ISGL() { return this->ISGL; }; - const ::Opm::ParserKeyword& get_ISGLPC() { return this->ISGLPC; }; - const ::Opm::ParserKeyword& get_ISGU() { return this->ISGU; }; - const ::Opm::ParserKeyword& get_ISOGCR() { return this->ISOGCR; }; - const ::Opm::ParserKeyword& get_ISOLNUM() { return this->ISOLNUM; }; - const ::Opm::ParserKeyword& get_ISOWCR() { return this->ISOWCR; }; - const ::Opm::ParserKeyword& get_ISWCR() { return this->ISWCR; }; - const ::Opm::ParserKeyword& get_ISWL() { return this->ISWL; }; - const ::Opm::ParserKeyword& get_ISWLPC() { return this->ISWLPC; }; - const ::Opm::ParserKeyword& get_ISWU() { return this->ISWU; }; - const ::Opm::ParserKeyword& get_JFUNC() { return this->JFUNC; }; - const ::Opm::ParserKeyword& get_JFUNCR() { return this->JFUNCR; }; - const ::Opm::ParserKeyword& get_KRNUM() { return this->KRNUM; }; - const ::Opm::ParserKeyword& get_KRNUMMF() { return this->KRNUMMF; }; - const ::Opm::ParserKeyword& get_LAB() { return this->LAB; }; - const ::Opm::ParserKeyword& get_LANGMPL() { return this->LANGMPL; }; - const ::Opm::ParserKeyword& get_LANGMUIR() { return this->LANGMUIR; }; - const ::Opm::ParserKeyword& get_LANGSOLV() { return this->LANGSOLV; }; - const ::Opm::ParserKeyword& get_LCUNIT() { return this->LCUNIT; }; - const ::Opm::ParserKeyword& get_LGR() { return this->LGR; }; - const ::Opm::ParserKeyword& get_LGRCOPY() { return this->LGRCOPY; }; - const ::Opm::ParserKeyword& get_LGRFREE() { return this->LGRFREE; }; - const ::Opm::ParserKeyword& get_LGRLOCK() { return this->LGRLOCK; }; - const ::Opm::ParserKeyword& get_LGROFF() { return this->LGROFF; }; - const ::Opm::ParserKeyword& get_LGRON() { return this->LGRON; }; - const ::Opm::ParserKeyword& get_LICENSES() { return this->LICENSES; }; - const ::Opm::ParserKeyword& get_LIFTOPT() { return this->LIFTOPT; }; - const ::Opm::ParserKeyword& get_LINCOM() { return this->LINCOM; }; - const ::Opm::ParserKeyword& get_LINKPERM() { return this->LINKPERM; }; - const ::Opm::ParserKeyword& get_LIVEOIL() { return this->LIVEOIL; }; - const ::Opm::ParserKeyword& get_LKRO() { return this->LKRO; }; - const ::Opm::ParserKeyword& get_LKRORG() { return this->LKRORG; }; - const ::Opm::ParserKeyword& get_LKRORW() { return this->LKRORW; }; - const ::Opm::ParserKeyword& get_LKRW() { return this->LKRW; }; - const ::Opm::ParserKeyword& get_LKRWR() { return this->LKRWR; }; - const ::Opm::ParserKeyword& get_LOAD() { return this->LOAD; }; - const ::Opm::ParserKeyword& get_LOWSALT() { return this->LOWSALT; }; - const ::Opm::ParserKeyword& get_LPCW() { return this->LPCW; }; - const ::Opm::ParserKeyword& get_LSALTFNC() { return this->LSALTFNC; }; - const ::Opm::ParserKeyword& get_LSLTWNUM() { return this->LSLTWNUM; }; - const ::Opm::ParserKeyword& get_LSNUM() { return this->LSNUM; }; - const ::Opm::ParserKeyword& get_LSOGCR() { return this->LSOGCR; }; - const ::Opm::ParserKeyword& get_LSOWCR() { return this->LSOWCR; }; - const ::Opm::ParserKeyword& get_LSWCR() { return this->LSWCR; }; - const ::Opm::ParserKeyword& get_LSWL() { return this->LSWL; }; - const ::Opm::ParserKeyword& get_LSWLPC() { return this->LSWLPC; }; - const ::Opm::ParserKeyword& get_LSWU() { return this->LSWU; }; - const ::Opm::ParserKeyword& get_LTOSIGMA() { return this->LTOSIGMA; }; - const ::Opm::ParserKeyword& get_LWKRO() { return this->LWKRO; }; - const ::Opm::ParserKeyword& get_LWKRORG() { return this->LWKRORG; }; - const ::Opm::ParserKeyword& get_LWKRORW() { return this->LWKRORW; }; - const ::Opm::ParserKeyword& get_LWKRW() { return this->LWKRW; }; - const ::Opm::ParserKeyword& get_LWKRWR() { return this->LWKRWR; }; - const ::Opm::ParserKeyword& get_LWPCW() { return this->LWPCW; }; - const ::Opm::ParserKeyword& get_LWSLTNUM() { return this->LWSLTNUM; }; - const ::Opm::ParserKeyword& get_LWSNUM() { return this->LWSNUM; }; - const ::Opm::ParserKeyword& get_LWSOGCR() { return this->LWSOGCR; }; - const ::Opm::ParserKeyword& get_LWSOWCR() { return this->LWSOWCR; }; - const ::Opm::ParserKeyword& get_LWSWCR() { return this->LWSWCR; }; - const ::Opm::ParserKeyword& get_LWSWL() { return this->LWSWL; }; - const ::Opm::ParserKeyword& get_LWSWLPC() { return this->LWSWLPC; }; - const ::Opm::ParserKeyword& get_LWSWU() { return this->LWSWU; }; - const ::Opm::ParserKeyword& get_LX() { return this->LX; }; - const ::Opm::ParserKeyword& get_LXFIN() { return this->LXFIN; }; - const ::Opm::ParserKeyword& get_LY() { return this->LY; }; - const ::Opm::ParserKeyword& get_LYFIN() { return this->LYFIN; }; - const ::Opm::ParserKeyword& get_LZ() { return this->LZ; }; - const ::Opm::ParserKeyword& get_LZFIN() { return this->LZFIN; }; - const ::Opm::ParserKeyword& get_MAPAXES() { return this->MAPAXES; }; - const ::Opm::ParserKeyword& get_MAPUNITS() { return this->MAPUNITS; }; - const ::Opm::ParserKeyword& get_MASSFLOW() { return this->MASSFLOW; }; - const ::Opm::ParserKeyword& get_MATCORR() { return this->MATCORR; }; - const ::Opm::ParserKeyword& get_MAXVALUE() { return this->MAXVALUE; }; - const ::Opm::ParserKeyword& get_MEMORY() { return this->MEMORY; }; - const ::Opm::ParserKeyword& get_MESSAGE() { return this->MESSAGE; }; - const ::Opm::ParserKeyword& get_MESSAGES() { return this->MESSAGES; }; - const ::Opm::ParserKeyword& get_MESSOPTS() { return this->MESSOPTS; }; - const ::Opm::ParserKeyword& get_MESSSRVC() { return this->MESSSRVC; }; - const ::Opm::ParserKeyword& get_METRIC() { return this->METRIC; }; - const ::Opm::ParserKeyword& get_MICP() { return this->MICP; }; - const ::Opm::ParserKeyword& get_MICPPARA() { return this->MICPPARA; }; - const ::Opm::ParserKeyword& get_MINNNCT() { return this->MINNNCT; }; - const ::Opm::ParserKeyword& get_MINNPCOL() { return this->MINNPCOL; }; - const ::Opm::ParserKeyword& get_MINPORV() { return this->MINPORV; }; - const ::Opm::ParserKeyword& get_MINPV() { return this->MINPV; }; - const ::Opm::ParserKeyword& get_MINPVFIL() { return this->MINPVFIL; }; - const ::Opm::ParserKeyword& get_MINPVV() { return this->MINPVV; }; - const ::Opm::ParserKeyword& get_MINVALUE() { return this->MINVALUE; }; - const ::Opm::ParserKeyword& get_MISC() { return this->MISC; }; - const ::Opm::ParserKeyword& get_MISCIBLE() { return this->MISCIBLE; }; - const ::Opm::ParserKeyword& get_MISCNUM() { return this->MISCNUM; }; - const ::Opm::ParserKeyword& get_MLANG() { return this->MLANG; }; - const ::Opm::ParserKeyword& get_MLANGSLV() { return this->MLANGSLV; }; - const ::Opm::ParserKeyword& get_MONITOR() { return this->MONITOR; }; - const ::Opm::ParserKeyword& get_MPFANUM() { return this->MPFANUM; }; - const ::Opm::ParserKeyword& get_MPFNNC() { return this->MPFNNC; }; - const ::Opm::ParserKeyword& get_MSFN() { return this->MSFN; }; - const ::Opm::ParserKeyword& get_MSGFILE() { return this->MSGFILE; }; - const ::Opm::ParserKeyword& get_MSUM_PROBE() { return this->MSUM_PROBE; }; - const ::Opm::ParserKeyword& get_MULSGGD() { return this->MULSGGD; }; - const ::Opm::ParserKeyword& get_MULSGGDV() { return this->MULSGGDV; }; - const ::Opm::ParserKeyword& get_MULTFLT() { return this->MULTFLT; }; - const ::Opm::ParserKeyword& get_MULTIN() { return this->MULTIN; }; - const ::Opm::ParserKeyword& get_MULTIPLY() { return this->MULTIPLY; }; - const ::Opm::ParserKeyword& get_MULTIREG() { return this->MULTIREG; }; - const ::Opm::ParserKeyword& get_MULTNUM() { return this->MULTNUM; }; - const ::Opm::ParserKeyword& get_MULTOUT() { return this->MULTOUT; }; - const ::Opm::ParserKeyword& get_MULTOUTS() { return this->MULTOUTS; }; - const ::Opm::ParserKeyword& get_MULTPV() { return this->MULTPV; }; - const ::Opm::ParserKeyword& get_MULTREAL() { return this->MULTREAL; }; - const ::Opm::ParserKeyword& get_MULTREGD() { return this->MULTREGD; }; - const ::Opm::ParserKeyword& get_MULTREGH() { return this->MULTREGH; }; - const ::Opm::ParserKeyword& get_MULTREGP() { return this->MULTREGP; }; - const ::Opm::ParserKeyword& get_MULTREGT() { return this->MULTREGT; }; - const ::Opm::ParserKeyword& get_MULTSIG() { return this->MULTSIG; }; - const ::Opm::ParserKeyword& get_MULTSIGV() { return this->MULTSIGV; }; - const ::Opm::ParserKeyword& get_MULT_XYZ() { return this->MULT_XYZ; }; - const ::Opm::ParserKeyword& get_MW() { return this->MW; }; - const ::Opm::ParserKeyword& get_MWS() { return this->MWS; }; - const ::Opm::ParserKeyword& get_NARROW() { return this->NARROW; }; - const ::Opm::ParserKeyword& get_NCONSUMP() { return this->NCONSUMP; }; - const ::Opm::ParserKeyword& get_NEFAC() { return this->NEFAC; }; - const ::Opm::ParserKeyword& get_NETBALAN() { return this->NETBALAN; }; - const ::Opm::ParserKeyword& get_NETCOMPA() { return this->NETCOMPA; }; - const ::Opm::ParserKeyword& get_NETWORK() { return this->NETWORK; }; - const ::Opm::ParserKeyword& get_NEWTRAN() { return this->NEWTRAN; }; - const ::Opm::ParserKeyword& get_NEXTSTEP() { return this->NEXTSTEP; }; - const ::Opm::ParserKeyword& get_NEXTSTPL() { return this->NEXTSTPL; }; - const ::Opm::ParserKeyword& get_NINENUM() { return this->NINENUM; }; - const ::Opm::ParserKeyword& get_NINEPOIN() { return this->NINEPOIN; }; - const ::Opm::ParserKeyword& get_NMATOPTS() { return this->NMATOPTS; }; - const ::Opm::ParserKeyword& get_NMATRIX() { return this->NMATRIX; }; - const ::Opm::ParserKeyword& get_NMESSAGE() { return this->NMESSAGE; }; - const ::Opm::ParserKeyword& get_NNC() { return this->NNC; }; - const ::Opm::ParserKeyword& get_NNEWTF() { return this->NNEWTF; }; - const ::Opm::ParserKeyword& get_NOCASC() { return this->NOCASC; }; - const ::Opm::ParserKeyword& get_NODEPROP() { return this->NODEPROP; }; - const ::Opm::ParserKeyword& get_NODPPM() { return this->NODPPM; }; - const ::Opm::ParserKeyword& get_NOECHO() { return this->NOECHO; }; - const ::Opm::ParserKeyword& get_NOGGF() { return this->NOGGF; }; - const ::Opm::ParserKeyword& get_NOGRAV() { return this->NOGRAV; }; - const ::Opm::ParserKeyword& get_NOHMD() { return this->NOHMD; }; - const ::Opm::ParserKeyword& get_NOHMO() { return this->NOHMO; }; - const ::Opm::ParserKeyword& get_NOHYST() { return this->NOHYST; }; - const ::Opm::ParserKeyword& get_NOINSPEC() { return this->NOINSPEC; }; - const ::Opm::ParserKeyword& get_NOMONITO() { return this->NOMONITO; }; - const ::Opm::ParserKeyword& get_NONNC() { return this->NONNC; }; - const ::Opm::ParserKeyword& get_NORSSPEC() { return this->NORSSPEC; }; - const ::Opm::ParserKeyword& get_NOSIM() { return this->NOSIM; }; - const ::Opm::ParserKeyword& get_NOWARN() { return this->NOWARN; }; - const ::Opm::ParserKeyword& get_NOWARNEP() { return this->NOWARNEP; }; - const ::Opm::ParserKeyword& get_NRSOUT() { return this->NRSOUT; }; - const ::Opm::ParserKeyword& get_NSTACK() { return this->NSTACK; }; - const ::Opm::ParserKeyword& get_NTG() { return this->NTG; }; - const ::Opm::ParserKeyword& get_NUMRES() { return this->NUMRES; }; - const ::Opm::ParserKeyword& get_NUPCOL() { return this->NUPCOL; }; - const ::Opm::ParserKeyword& get_NWATREM() { return this->NWATREM; }; - const ::Opm::ParserKeyword& get_NXFIN() { return this->NXFIN; }; - const ::Opm::ParserKeyword& get_NYFIN() { return this->NYFIN; }; - const ::Opm::ParserKeyword& get_NZFIN() { return this->NZFIN; }; - const ::Opm::ParserKeyword& get_OCOMPIDX() { return this->OCOMPIDX; }; - const ::Opm::ParserKeyword& get_OFM() { return this->OFM; }; - const ::Opm::ParserKeyword& get_OIL() { return this->OIL; }; - const ::Opm::ParserKeyword& get_OILAPI() { return this->OILAPI; }; - const ::Opm::ParserKeyword& get_OILCOMPR() { return this->OILCOMPR; }; - const ::Opm::ParserKeyword& get_OILDENT() { return this->OILDENT; }; - const ::Opm::ParserKeyword& get_OILJT() { return this->OILJT; }; - const ::Opm::ParserKeyword& get_OILMW() { return this->OILMW; }; - const ::Opm::ParserKeyword& get_OILVISCT() { return this->OILVISCT; }; - const ::Opm::ParserKeyword& get_OILVTIM() { return this->OILVTIM; }; - const ::Opm::ParserKeyword& get_OLDTRAN() { return this->OLDTRAN; }; - const ::Opm::ParserKeyword& get_OLDTRANR() { return this->OLDTRANR; }; - const ::Opm::ParserKeyword& get_OPERATE() { return this->OPERATE; }; - const ::Opm::ParserKeyword& get_OPERATER() { return this->OPERATER; }; - const ::Opm::ParserKeyword& get_OPERNUM() { return this->OPERNUM; }; - const ::Opm::ParserKeyword& get_OPTIONS() { return this->OPTIONS; }; - const ::Opm::ParserKeyword& get_OPTIONS3() { return this->OPTIONS3; }; - const ::Opm::ParserKeyword& get_OUTRAD() { return this->OUTRAD; }; - const ::Opm::ParserKeyword& get_OUTSOL() { return this->OUTSOL; }; - const ::Opm::ParserKeyword& get_OVERBURD() { return this->OVERBURD; }; - const ::Opm::ParserKeyword& get_PARALLEL() { return this->PARALLEL; }; - const ::Opm::ParserKeyword& get_PARAOPTS() { return this->PARAOPTS; }; - const ::Opm::ParserKeyword& get_PARTTRAC() { return this->PARTTRAC; }; - const ::Opm::ParserKeyword& get_PATHS() { return this->PATHS; }; - const ::Opm::ParserKeyword& get_PBUB() { return this->PBUB; }; - const ::Opm::ParserKeyword& get_PBVD() { return this->PBVD; }; - const ::Opm::ParserKeyword& get_PCG() { return this->PCG; }; - const ::Opm::ParserKeyword& get_PCG32D() { return this->PCG32D; }; - const ::Opm::ParserKeyword& get_PCW() { return this->PCW; }; - const ::Opm::ParserKeyword& get_PCW32D() { return this->PCW32D; }; - const ::Opm::ParserKeyword& get_PDEW() { return this->PDEW; }; - const ::Opm::ParserKeyword& get_PDVD() { return this->PDVD; }; - const ::Opm::ParserKeyword& get_PEBI() { return this->PEBI; }; - const ::Opm::ParserKeyword& get_PECOEFS() { return this->PECOEFS; }; - const ::Opm::ParserKeyword& get_PEDIMS() { return this->PEDIMS; }; - const ::Opm::ParserKeyword& get_PEGTABX() { return this->PEGTABX; }; - const ::Opm::ParserKeyword& get_PEKTABX() { return this->PEKTABX; }; - const ::Opm::ParserKeyword& get_PENUM() { return this->PENUM; }; - const ::Opm::ParserKeyword& get_PERFORMANCE_PROBE() { return this->PERFORMANCE_PROBE; }; - const ::Opm::ParserKeyword& get_PERMAVE() { return this->PERMAVE; }; - const ::Opm::ParserKeyword& get_PERMFACT() { return this->PERMFACT; }; - const ::Opm::ParserKeyword& get_PERMJFUN() { return this->PERMJFUN; }; - const ::Opm::ParserKeyword& get_PERMR() { return this->PERMR; }; - const ::Opm::ParserKeyword& get_PERMTHT() { return this->PERMTHT; }; - const ::Opm::ParserKeyword& get_PERMX() { return this->PERMX; }; - const ::Opm::ParserKeyword& get_PERMXY() { return this->PERMXY; }; - const ::Opm::ParserKeyword& get_PERMY() { return this->PERMY; }; - const ::Opm::ParserKeyword& get_PERMYZ() { return this->PERMYZ; }; - const ::Opm::ParserKeyword& get_PERMZ() { return this->PERMZ; }; - const ::Opm::ParserKeyword& get_PERMZX() { return this->PERMZX; }; - const ::Opm::ParserKeyword& get_PETGRID() { return this->PETGRID; }; - const ::Opm::ParserKeyword& get_PETOPTS() { return this->PETOPTS; }; - const ::Opm::ParserKeyword& get_PICOND() { return this->PICOND; }; - const ::Opm::ParserKeyword& get_PIMTDIMS() { return this->PIMTDIMS; }; - const ::Opm::ParserKeyword& get_PIMULTAB() { return this->PIMULTAB; }; - const ::Opm::ParserKeyword& get_PINCH() { return this->PINCH; }; - const ::Opm::ParserKeyword& get_PINCHNUM() { return this->PINCHNUM; }; - const ::Opm::ParserKeyword& get_PINCHOUT() { return this->PINCHOUT; }; - const ::Opm::ParserKeyword& get_PINCHREG() { return this->PINCHREG; }; - const ::Opm::ParserKeyword& get_PINCHXY() { return this->PINCHXY; }; - const ::Opm::ParserKeyword& get_PINTDIMS() { return this->PINTDIMS; }; - const ::Opm::ParserKeyword& get_PLMIXNUM() { return this->PLMIXNUM; }; - const ::Opm::ParserKeyword& get_PLMIXPAR() { return this->PLMIXPAR; }; - const ::Opm::ParserKeyword& get_PLYADS() { return this->PLYADS; }; - const ::Opm::ParserKeyword& get_PLYADSS() { return this->PLYADSS; }; - const ::Opm::ParserKeyword& get_PLYATEMP() { return this->PLYATEMP; }; - const ::Opm::ParserKeyword& get_PLYCAMAX() { return this->PLYCAMAX; }; - const ::Opm::ParserKeyword& get_PLYDHFLF() { return this->PLYDHFLF; }; - const ::Opm::ParserKeyword& get_PLYESAL() { return this->PLYESAL; }; - const ::Opm::ParserKeyword& get_PLYKRRF() { return this->PLYKRRF; }; - const ::Opm::ParserKeyword& get_PLYMAX() { return this->PLYMAX; }; - const ::Opm::ParserKeyword& get_PLYMWINJ() { return this->PLYMWINJ; }; - const ::Opm::ParserKeyword& get_PLYOPTS() { return this->PLYOPTS; }; - const ::Opm::ParserKeyword& get_PLYRMDEN() { return this->PLYRMDEN; }; - const ::Opm::ParserKeyword& get_PLYROCK() { return this->PLYROCK; }; - const ::Opm::ParserKeyword& get_PLYROCKM() { return this->PLYROCKM; }; - const ::Opm::ParserKeyword& get_PLYSHEAR() { return this->PLYSHEAR; }; - const ::Opm::ParserKeyword& get_PLYSHLOG() { return this->PLYSHLOG; }; - const ::Opm::ParserKeyword& get_PLYTRRF() { return this->PLYTRRF; }; - const ::Opm::ParserKeyword& get_PLYTRRFA() { return this->PLYTRRFA; }; - const ::Opm::ParserKeyword& get_PLYVISC() { return this->PLYVISC; }; - const ::Opm::ParserKeyword& get_PLYVISCS() { return this->PLYVISCS; }; - const ::Opm::ParserKeyword& get_PLYVISCT() { return this->PLYVISCT; }; - const ::Opm::ParserKeyword& get_PLYVMH() { return this->PLYVMH; }; - const ::Opm::ParserKeyword& get_PLYVSCST() { return this->PLYVSCST; }; - const ::Opm::ParserKeyword& get_PMAX() { return this->PMAX; }; - const ::Opm::ParserKeyword& get_PMISC() { return this->PMISC; }; - const ::Opm::ParserKeyword& get_POLYMER() { return this->POLYMER; }; - const ::Opm::ParserKeyword& get_POLYMW() { return this->POLYMW; }; - const ::Opm::ParserKeyword& get_PORO() { return this->PORO; }; - const ::Opm::ParserKeyword& get_PORV() { return this->PORV; }; - const ::Opm::ParserKeyword& get_PPCWMAX() { return this->PPCWMAX; }; - const ::Opm::ParserKeyword& get_PRECSALT() { return this->PRECSALT; }; - const ::Opm::ParserKeyword& get_PREF() { return this->PREF; }; - const ::Opm::ParserKeyword& get_PREFS() { return this->PREFS; }; - const ::Opm::ParserKeyword& get_PRESSURE() { return this->PRESSURE; }; - const ::Opm::ParserKeyword& get_PRIORITY() { return this->PRIORITY; }; - const ::Opm::ParserKeyword& get_PROPS() { return this->PROPS; }; - const ::Opm::ParserKeyword& get_PRORDER() { return this->PRORDER; }; - const ::Opm::ParserKeyword& get_PRVD() { return this->PRVD; }; - const ::Opm::ParserKeyword& get_PSTEADY() { return this->PSTEADY; }; - const ::Opm::ParserKeyword& get_PSWRG() { return this->PSWRG; }; - const ::Opm::ParserKeyword& get_PSWRO() { return this->PSWRO; }; - const ::Opm::ParserKeyword& get_PVCDO() { return this->PVCDO; }; - const ::Opm::ParserKeyword& get_PVCO() { return this->PVCO; }; - const ::Opm::ParserKeyword& get_PVDG() { return this->PVDG; }; - const ::Opm::ParserKeyword& get_PVDO() { return this->PVDO; }; - const ::Opm::ParserKeyword& get_PVDS() { return this->PVDS; }; - const ::Opm::ParserKeyword& get_PVTG() { return this->PVTG; }; - const ::Opm::ParserKeyword& get_PVTGW() { return this->PVTGW; }; - const ::Opm::ParserKeyword& get_PVTGWO() { return this->PVTGWO; }; - const ::Opm::ParserKeyword& get_PVTNUM() { return this->PVTNUM; }; - const ::Opm::ParserKeyword& get_PVTO() { return this->PVTO; }; - const ::Opm::ParserKeyword& get_PVTSOL() { return this->PVTSOL; }; - const ::Opm::ParserKeyword& get_PVTW() { return this->PVTW; }; - const ::Opm::ParserKeyword& get_PVTWSALT() { return this->PVTWSALT; }; - const ::Opm::ParserKeyword& get_PVT_M() { return this->PVT_M; }; - const ::Opm::ParserKeyword& get_PVZG() { return this->PVZG; }; - const ::Opm::ParserKeyword& get_PYACTION() { return this->PYACTION; }; - const ::Opm::ParserKeyword& get_PYINPUT() { return this->PYINPUT; }; - const ::Opm::ParserKeyword& get_QDRILL() { return this->QDRILL; }; - const ::Opm::ParserKeyword& get_QHRATING() { return this->QHRATING; }; - const ::Opm::ParserKeyword& get_QMOBIL() { return this->QMOBIL; }; - const ::Opm::ParserKeyword& get_RADFIN() { return this->RADFIN; }; - const ::Opm::ParserKeyword& get_RADFIN4() { return this->RADFIN4; }; - const ::Opm::ParserKeyword& get_RADIAL() { return this->RADIAL; }; - const ::Opm::ParserKeyword& get_RAINFALL() { return this->RAINFALL; }; - const ::Opm::ParserKeyword& get_RBEDCONT() { return this->RBEDCONT; }; - const ::Opm::ParserKeyword& get_RCMASTS() { return this->RCMASTS; }; - const ::Opm::ParserKeyword& get_REACHES() { return this->REACHES; }; - const ::Opm::ParserKeyword& get_READDATA() { return this->READDATA; }; - const ::Opm::ParserKeyword& get_REFINE() { return this->REFINE; }; - const ::Opm::ParserKeyword& get_REGDIMS() { return this->REGDIMS; }; - const ::Opm::ParserKeyword& get_REGION2REGION_PROBE() { return this->REGION2REGION_PROBE; }; - const ::Opm::ParserKeyword& get_REGION2REGION_PROBE_E300() { return this->REGION2REGION_PROBE_E300; }; - const ::Opm::ParserKeyword& get_REGIONS() { return this->REGIONS; }; - const ::Opm::ParserKeyword& get_REGION_PROBE() { return this->REGION_PROBE; }; - const ::Opm::ParserKeyword& get_RESIDNUM() { return this->RESIDNUM; }; - const ::Opm::ParserKeyword& get_RESTART() { return this->RESTART; }; - const ::Opm::ParserKeyword& get_RESVNUM() { return this->RESVNUM; }; - const ::Opm::ParserKeyword& get_RHO() { return this->RHO; }; - const ::Opm::ParserKeyword& get_RIVDEBUG() { return this->RIVDEBUG; }; - const ::Opm::ParserKeyword& get_RIVERSYS() { return this->RIVERSYS; }; - const ::Opm::ParserKeyword& get_RIVRDIMS() { return this->RIVRDIMS; }; - const ::Opm::ParserKeyword& get_RIVRPROP() { return this->RIVRPROP; }; - const ::Opm::ParserKeyword& get_RIVRXSEC() { return this->RIVRXSEC; }; - const ::Opm::ParserKeyword& get_RIVSALT() { return this->RIVSALT; }; - const ::Opm::ParserKeyword& get_RIVTRACE() { return this->RIVTRACE; }; - const ::Opm::ParserKeyword& get_RKTRMDIR() { return this->RKTRMDIR; }; - const ::Opm::ParserKeyword& get_ROCK() { return this->ROCK; }; - const ::Opm::ParserKeyword& get_ROCK2D() { return this->ROCK2D; }; - const ::Opm::ParserKeyword& get_ROCK2DTR() { return this->ROCK2DTR; }; - const ::Opm::ParserKeyword& get_ROCKCOMP() { return this->ROCKCOMP; }; - const ::Opm::ParserKeyword& get_ROCKFRAC() { return this->ROCKFRAC; }; - const ::Opm::ParserKeyword& get_ROCKNUM() { return this->ROCKNUM; }; - const ::Opm::ParserKeyword& get_ROCKOPTS() { return this->ROCKOPTS; }; - const ::Opm::ParserKeyword& get_ROCKPAMA() { return this->ROCKPAMA; }; - const ::Opm::ParserKeyword& get_ROCKTAB() { return this->ROCKTAB; }; - const ::Opm::ParserKeyword& get_ROCKTABH() { return this->ROCKTABH; }; - const ::Opm::ParserKeyword& get_ROCKTABW() { return this->ROCKTABW; }; - const ::Opm::ParserKeyword& get_ROCKTHSG() { return this->ROCKTHSG; }; - const ::Opm::ParserKeyword& get_ROCKTSIG() { return this->ROCKTSIG; }; - const ::Opm::ParserKeyword& get_ROCKV() { return this->ROCKV; }; - const ::Opm::ParserKeyword& get_ROCKWNOD() { return this->ROCKWNOD; }; - const ::Opm::ParserKeyword& get_RPTCPL() { return this->RPTCPL; }; - const ::Opm::ParserKeyword& get_RPTGRID() { return this->RPTGRID; }; - const ::Opm::ParserKeyword& get_RPTGRIDL() { return this->RPTGRIDL; }; - const ::Opm::ParserKeyword& get_RPTHMD() { return this->RPTHMD; }; - const ::Opm::ParserKeyword& get_RPTHMG() { return this->RPTHMG; }; - const ::Opm::ParserKeyword& get_RPTHMW() { return this->RPTHMW; }; - const ::Opm::ParserKeyword& get_RPTINIT() { return this->RPTINIT; }; - const ::Opm::ParserKeyword& get_RPTISOL() { return this->RPTISOL; }; - const ::Opm::ParserKeyword& get_RPTONLY() { return this->RPTONLY; }; - const ::Opm::ParserKeyword& get_RPTONLYO() { return this->RPTONLYO; }; - const ::Opm::ParserKeyword& get_RPTPROPS() { return this->RPTPROPS; }; - const ::Opm::ParserKeyword& get_RPTREGS() { return this->RPTREGS; }; - const ::Opm::ParserKeyword& get_RPTRST() { return this->RPTRST; }; - const ::Opm::ParserKeyword& get_RPTRUNSP() { return this->RPTRUNSP; }; - const ::Opm::ParserKeyword& get_RPTSCHED() { return this->RPTSCHED; }; - const ::Opm::ParserKeyword& get_RPTSMRY() { return this->RPTSMRY; }; - const ::Opm::ParserKeyword& get_RPTSOL() { return this->RPTSOL; }; - const ::Opm::ParserKeyword& get_RS() { return this->RS; }; - const ::Opm::ParserKeyword& get_RSCONST() { return this->RSCONST; }; - const ::Opm::ParserKeyword& get_RSCONSTT() { return this->RSCONSTT; }; - const ::Opm::ParserKeyword& get_RSGI() { return this->RSGI; }; - const ::Opm::ParserKeyword& get_RSSPEC() { return this->RSSPEC; }; - const ::Opm::ParserKeyword& get_RSVD() { return this->RSVD; }; - const ::Opm::ParserKeyword& get_RTEMP() { return this->RTEMP; }; - const ::Opm::ParserKeyword& get_RTEMPA() { return this->RTEMPA; }; - const ::Opm::ParserKeyword& get_RTEMPVD() { return this->RTEMPVD; }; - const ::Opm::ParserKeyword& get_RUNSPEC() { return this->RUNSPEC; }; - const ::Opm::ParserKeyword& get_RUNSUM() { return this->RUNSUM; }; - const ::Opm::ParserKeyword& get_RV() { return this->RV; }; - const ::Opm::ParserKeyword& get_RVCONST() { return this->RVCONST; }; - const ::Opm::ParserKeyword& get_RVCONSTT() { return this->RVCONSTT; }; - const ::Opm::ParserKeyword& get_RVGI() { return this->RVGI; }; - const ::Opm::ParserKeyword& get_RVVD() { return this->RVVD; }; - const ::Opm::ParserKeyword& get_RVW() { return this->RVW; }; - const ::Opm::ParserKeyword& get_RWGSALT() { return this->RWGSALT; }; - const ::Opm::ParserKeyword& get_SALINITY() { return this->SALINITY; }; - const ::Opm::ParserKeyword& get_SALT() { return this->SALT; }; - const ::Opm::ParserKeyword& get_SALTNODE() { return this->SALTNODE; }; - const ::Opm::ParserKeyword& get_SALTP() { return this->SALTP; }; - const ::Opm::ParserKeyword& get_SALTPVD() { return this->SALTPVD; }; - const ::Opm::ParserKeyword& get_SALTREST() { return this->SALTREST; }; - const ::Opm::ParserKeyword& get_SALTSOL() { return this->SALTSOL; }; - const ::Opm::ParserKeyword& get_SALTVD() { return this->SALTVD; }; - const ::Opm::ParserKeyword& get_SAMG() { return this->SAMG; }; - const ::Opm::ParserKeyword& get_SATNUM() { return this->SATNUM; }; - const ::Opm::ParserKeyword& get_SATOPTS() { return this->SATOPTS; }; - const ::Opm::ParserKeyword& get_SAVE() { return this->SAVE; }; - const ::Opm::ParserKeyword& get_SBIOF() { return this->SBIOF; }; - const ::Opm::ParserKeyword& get_SCALC() { return this->SCALC; }; - const ::Opm::ParserKeyword& get_SCALECRS() { return this->SCALECRS; }; - const ::Opm::ParserKeyword& get_SCALELIM() { return this->SCALELIM; }; - const ::Opm::ParserKeyword& get_SCDATAB() { return this->SCDATAB; }; - const ::Opm::ParserKeyword& get_SCDETAB() { return this->SCDETAB; }; - const ::Opm::ParserKeyword& get_SCDPDIMS() { return this->SCDPDIMS; }; - const ::Opm::ParserKeyword& get_SCDPTAB() { return this->SCDPTAB; }; - const ::Opm::ParserKeyword& get_SCDPTRAC() { return this->SCDPTRAC; }; - const ::Opm::ParserKeyword& get_SCHEDULE() { return this->SCHEDULE; }; - const ::Opm::ParserKeyword& get_SCVD() { return this->SCVD; }; - const ::Opm::ParserKeyword& get_SDENSITY() { return this->SDENSITY; }; - const ::Opm::ParserKeyword& get_SEGMENT_PROBE() { return this->SEGMENT_PROBE; }; - const ::Opm::ParserKeyword& get_SEPARATE() { return this->SEPARATE; }; - const ::Opm::ParserKeyword& get_SEPVALS() { return this->SEPVALS; }; - const ::Opm::ParserKeyword& get_SFOAM() { return this->SFOAM; }; - const ::Opm::ParserKeyword& get_SGAS() { return this->SGAS; }; - const ::Opm::ParserKeyword& get_SGCR() { return this->SGCR; }; - const ::Opm::ParserKeyword& get_SGCWMIS() { return this->SGCWMIS; }; - const ::Opm::ParserKeyword& get_SGF32D() { return this->SGF32D; }; - const ::Opm::ParserKeyword& get_SGFN() { return this->SGFN; }; - const ::Opm::ParserKeyword& get_SGL() { return this->SGL; }; - const ::Opm::ParserKeyword& get_SGLPC() { return this->SGLPC; }; - const ::Opm::ParserKeyword& get_SGOF() { return this->SGOF; }; - const ::Opm::ParserKeyword& get_SGOFLET() { return this->SGOFLET; }; - const ::Opm::ParserKeyword& get_SGU() { return this->SGU; }; - const ::Opm::ParserKeyword& get_SGWFN() { return this->SGWFN; }; - const ::Opm::ParserKeyword& get_SHRATE() { return this->SHRATE; }; - const ::Opm::ParserKeyword& get_SIGMA() { return this->SIGMA; }; - const ::Opm::ParserKeyword& get_SIGMAGDV() { return this->SIGMAGDV; }; - const ::Opm::ParserKeyword& get_SIGMATH() { return this->SIGMATH; }; - const ::Opm::ParserKeyword& get_SIGMAV() { return this->SIGMAV; }; - const ::Opm::ParserKeyword& get_SIMULATE() { return this->SIMULATE; }; - const ::Opm::ParserKeyword& get_SKIP() { return this->SKIP; }; - const ::Opm::ParserKeyword& get_SKIP100() { return this->SKIP100; }; - const ::Opm::ParserKeyword& get_SKIP300() { return this->SKIP300; }; - const ::Opm::ParserKeyword& get_SKIPREST() { return this->SKIPREST; }; - const ::Opm::ParserKeyword& get_SKPRPOLY() { return this->SKPRPOLY; }; - const ::Opm::ParserKeyword& get_SKPRWAT() { return this->SKPRWAT; }; - const ::Opm::ParserKeyword& get_SKRO() { return this->SKRO; }; - const ::Opm::ParserKeyword& get_SKRORG() { return this->SKRORG; }; - const ::Opm::ParserKeyword& get_SKRORW() { return this->SKRORW; }; - const ::Opm::ParserKeyword& get_SKRW() { return this->SKRW; }; - const ::Opm::ParserKeyword& get_SKRWR() { return this->SKRWR; }; - const ::Opm::ParserKeyword& get_SLAVES() { return this->SLAVES; }; - const ::Opm::ParserKeyword& get_SLGOF() { return this->SLGOF; }; - const ::Opm::ParserKeyword& get_SMICR() { return this->SMICR; }; - const ::Opm::ParserKeyword& get_SMRYDIMS() { return this->SMRYDIMS; }; - const ::Opm::ParserKeyword& get_SMULTX() { return this->SMULTX; }; - const ::Opm::ParserKeyword& get_SMULTY() { return this->SMULTY; }; - const ::Opm::ParserKeyword& get_SMULTZ() { return this->SMULTZ; }; - const ::Opm::ParserKeyword& get_SOCRS() { return this->SOCRS; }; - const ::Opm::ParserKeyword& get_SOF2() { return this->SOF2; }; - const ::Opm::ParserKeyword& get_SOF3() { return this->SOF3; }; - const ::Opm::ParserKeyword& get_SOF32D() { return this->SOF32D; }; - const ::Opm::ParserKeyword& get_SOGCR() { return this->SOGCR; }; - const ::Opm::ParserKeyword& get_SOIL() { return this->SOIL; }; - const ::Opm::ParserKeyword& get_SOLUTION() { return this->SOLUTION; }; - const ::Opm::ParserKeyword& get_SOLVCONC() { return this->SOLVCONC; }; - const ::Opm::ParserKeyword& get_SOLVDIMS() { return this->SOLVDIMS; }; - const ::Opm::ParserKeyword& get_SOLVDIRS() { return this->SOLVDIRS; }; - const ::Opm::ParserKeyword& get_SOLVENT() { return this->SOLVENT; }; - const ::Opm::ParserKeyword& get_SOLVFRAC() { return this->SOLVFRAC; }; - const ::Opm::ParserKeyword& get_SOLVNUM() { return this->SOLVNUM; }; - const ::Opm::ParserKeyword& get_SOMGAS() { return this->SOMGAS; }; - const ::Opm::ParserKeyword& get_SOMWAT() { return this->SOMWAT; }; - const ::Opm::ParserKeyword& get_SORWMIS() { return this->SORWMIS; }; - const ::Opm::ParserKeyword& get_SOWCR() { return this->SOWCR; }; - const ::Opm::ParserKeyword& get_SOXYG() { return this->SOXYG; }; - const ::Opm::ParserKeyword& get_SPECGRID() { return this->SPECGRID; }; - const ::Opm::ParserKeyword& get_SPECHEAT() { return this->SPECHEAT; }; - const ::Opm::ParserKeyword& get_SPECROCK() { return this->SPECROCK; }; - const ::Opm::ParserKeyword& get_SPIDER() { return this->SPIDER; }; - const ::Opm::ParserKeyword& get_SPOLY() { return this->SPOLY; }; - const ::Opm::ParserKeyword& get_SPOLYMW() { return this->SPOLYMW; }; - const ::Opm::ParserKeyword& get_SSFN() { return this->SSFN; }; - const ::Opm::ParserKeyword& get_SSGCR() { return this->SSGCR; }; - const ::Opm::ParserKeyword& get_SSGL() { return this->SSGL; }; - const ::Opm::ParserKeyword& get_SSOGCR() { return this->SSOGCR; }; - const ::Opm::ParserKeyword& get_SSOL() { return this->SSOL; }; - const ::Opm::ParserKeyword& get_SSOWCR() { return this->SSOWCR; }; - const ::Opm::ParserKeyword& get_SSWCR() { return this->SSWCR; }; - const ::Opm::ParserKeyword& get_SSWL() { return this->SSWL; }; - const ::Opm::ParserKeyword& get_SSWU() { return this->SSWU; }; - const ::Opm::ParserKeyword& get_START() { return this->START; }; - const ::Opm::ParserKeyword& get_STCOND() { return this->STCOND; }; - const ::Opm::ParserKeyword& get_STOG() { return this->STOG; }; - const ::Opm::ParserKeyword& get_STONE() { return this->STONE; }; - const ::Opm::ParserKeyword& get_STONE1() { return this->STONE1; }; - const ::Opm::ParserKeyword& get_STONE1EX() { return this->STONE1EX; }; - const ::Opm::ParserKeyword& get_STONE2() { return this->STONE2; }; - const ::Opm::ParserKeyword& get_STOW() { return this->STOW; }; - const ::Opm::ParserKeyword& get_STWG() { return this->STWG; }; - const ::Opm::ParserKeyword& get_SUMMARY() { return this->SUMMARY; }; - const ::Opm::ParserKeyword& get_SUMTHIN() { return this->SUMTHIN; }; - const ::Opm::ParserKeyword& get_SUREA() { return this->SUREA; }; - const ::Opm::ParserKeyword& get_SURF() { return this->SURF; }; - const ::Opm::ParserKeyword& get_SURFACT() { return this->SURFACT; }; - const ::Opm::ParserKeyword& get_SURFACTW() { return this->SURFACTW; }; - const ::Opm::ParserKeyword& get_SURFADDW() { return this->SURFADDW; }; - const ::Opm::ParserKeyword& get_SURFADS() { return this->SURFADS; }; - const ::Opm::ParserKeyword& get_SURFCAPD() { return this->SURFCAPD; }; - const ::Opm::ParserKeyword& get_SURFESAL() { return this->SURFESAL; }; - const ::Opm::ParserKeyword& get_SURFNUM() { return this->SURFNUM; }; - const ::Opm::ParserKeyword& get_SURFOPTS() { return this->SURFOPTS; }; - const ::Opm::ParserKeyword& get_SURFROCK() { return this->SURFROCK; }; - const ::Opm::ParserKeyword& get_SURFST() { return this->SURFST; }; - const ::Opm::ParserKeyword& get_SURFSTES() { return this->SURFSTES; }; - const ::Opm::ParserKeyword& get_SURFVISC() { return this->SURFVISC; }; - const ::Opm::ParserKeyword& get_SURFWNUM() { return this->SURFWNUM; }; - const ::Opm::ParserKeyword& get_SWAT() { return this->SWAT; }; - const ::Opm::ParserKeyword& get_SWATINIT() { return this->SWATINIT; }; - const ::Opm::ParserKeyword& get_SWCR() { return this->SWCR; }; - const ::Opm::ParserKeyword& get_SWF32D() { return this->SWF32D; }; - const ::Opm::ParserKeyword& get_SWFN() { return this->SWFN; }; - const ::Opm::ParserKeyword& get_SWINGFAC() { return this->SWINGFAC; }; - const ::Opm::ParserKeyword& get_SWL() { return this->SWL; }; - const ::Opm::ParserKeyword& get_SWLPC() { return this->SWLPC; }; - const ::Opm::ParserKeyword& get_SWOF() { return this->SWOF; }; - const ::Opm::ParserKeyword& get_SWOFLET() { return this->SWOFLET; }; - const ::Opm::ParserKeyword& get_SWU() { return this->SWU; }; - const ::Opm::ParserKeyword& get_TABDIMS() { return this->TABDIMS; }; - const ::Opm::ParserKeyword& get_TBLK() { return this->TBLK; }; - const ::Opm::ParserKeyword& get_TEMP() { return this->TEMP; }; - const ::Opm::ParserKeyword& get_TEMPI() { return this->TEMPI; }; - const ::Opm::ParserKeyword& get_TEMPNODE() { return this->TEMPNODE; }; - const ::Opm::ParserKeyword& get_TEMPTVD() { return this->TEMPTVD; }; - const ::Opm::ParserKeyword& get_TEMPVD() { return this->TEMPVD; }; - const ::Opm::ParserKeyword& get_THCGAS() { return this->THCGAS; }; - const ::Opm::ParserKeyword& get_THCOIL() { return this->THCOIL; }; - const ::Opm::ParserKeyword& get_THCONR() { return this->THCONR; }; - const ::Opm::ParserKeyword& get_THCONSF() { return this->THCONSF; }; - const ::Opm::ParserKeyword& get_THCROCK() { return this->THCROCK; }; - const ::Opm::ParserKeyword& get_THCWATER() { return this->THCWATER; }; - const ::Opm::ParserKeyword& get_THERMAL() { return this->THERMAL; }; - const ::Opm::ParserKeyword& get_THPRES() { return this->THPRES; }; - const ::Opm::ParserKeyword& get_THPRESFT() { return this->THPRESFT; }; - const ::Opm::ParserKeyword& get_TIGHTEN() { return this->TIGHTEN; }; - const ::Opm::ParserKeyword& get_TIGHTENP() { return this->TIGHTENP; }; - const ::Opm::ParserKeyword& get_TIME() { return this->TIME; }; - const ::Opm::ParserKeyword& get_TITLE() { return this->TITLE; }; - const ::Opm::ParserKeyword& get_TLMIXPAR() { return this->TLMIXPAR; }; - const ::Opm::ParserKeyword& get_TLPMIXPA() { return this->TLPMIXPA; }; - const ::Opm::ParserKeyword& get_TNUM() { return this->TNUM; }; - const ::Opm::ParserKeyword& get_TOLCRIT() { return this->TOLCRIT; }; - const ::Opm::ParserKeyword& get_TOPS() { return this->TOPS; }; - const ::Opm::ParserKeyword& get_TPAMEPS() { return this->TPAMEPS; }; - const ::Opm::ParserKeyword& get_TPAMEPSS() { return this->TPAMEPSS; }; - const ::Opm::ParserKeyword& get_TRACER() { return this->TRACER; }; - const ::Opm::ParserKeyword& get_TRACERKM() { return this->TRACERKM; }; - const ::Opm::ParserKeyword& get_TRACERKP() { return this->TRACERKP; }; - const ::Opm::ParserKeyword& get_TRACERS() { return this->TRACERS; }; - const ::Opm::ParserKeyword& get_TRACITVD() { return this->TRACITVD; }; - const ::Opm::ParserKeyword& get_TRACTVD() { return this->TRACTVD; }; - const ::Opm::ParserKeyword& get_TRADS() { return this->TRADS; }; - const ::Opm::ParserKeyword& get_TRANGL() { return this->TRANGL; }; - const ::Opm::ParserKeyword& get_TRANR() { return this->TRANR; }; - const ::Opm::ParserKeyword& get_TRANTHT() { return this->TRANTHT; }; - const ::Opm::ParserKeyword& get_TRANX() { return this->TRANX; }; - const ::Opm::ParserKeyword& get_TRANY() { return this->TRANY; }; - const ::Opm::ParserKeyword& get_TRANZ() { return this->TRANZ; }; - const ::Opm::ParserKeyword& get_TRDCY() { return this->TRDCY; }; - const ::Opm::ParserKeyword& get_TRDIF() { return this->TRDIF; }; - const ::Opm::ParserKeyword& get_TRDIS() { return this->TRDIS; }; - const ::Opm::ParserKeyword& get_TREF() { return this->TREF; }; - const ::Opm::ParserKeyword& get_TREFS() { return this->TREFS; }; - const ::Opm::ParserKeyword& get_TRKPF() { return this->TRKPF; }; - const ::Opm::ParserKeyword& get_TRNHD() { return this->TRNHD; }; - const ::Opm::ParserKeyword& get_TRPLPORO() { return this->TRPLPORO; }; - const ::Opm::ParserKeyword& get_TRROCK() { return this->TRROCK; }; - const ::Opm::ParserKeyword& get_TSTEP() { return this->TSTEP; }; - const ::Opm::ParserKeyword& get_TUNING() { return this->TUNING; }; - const ::Opm::ParserKeyword& get_TUNINGDP() { return this->TUNINGDP; }; - const ::Opm::ParserKeyword& get_TUNINGH() { return this->TUNINGH; }; - const ::Opm::ParserKeyword& get_TUNINGL() { return this->TUNINGL; }; - const ::Opm::ParserKeyword& get_TUNINGS() { return this->TUNINGS; }; - const ::Opm::ParserKeyword& get_TVDP() { return this->TVDP; }; - const ::Opm::ParserKeyword& get_TZONE() { return this->TZONE; }; - const ::Opm::ParserKeyword& get_UDADIMS() { return this->UDADIMS; }; - const ::Opm::ParserKeyword& get_UDQ() { return this->UDQ; }; - const ::Opm::ParserKeyword& get_UDQDIMS() { return this->UDQDIMS; }; - const ::Opm::ParserKeyword& get_UDQPARAM() { return this->UDQPARAM; }; - const ::Opm::ParserKeyword& get_UDT() { return this->UDT; }; - const ::Opm::ParserKeyword& get_UDTDIMS() { return this->UDTDIMS; }; - const ::Opm::ParserKeyword& get_UNCODHMD() { return this->UNCODHMD; }; - const ::Opm::ParserKeyword& get_UNIFIN() { return this->UNIFIN; }; - const ::Opm::ParserKeyword& get_UNIFOUT() { return this->UNIFOUT; }; - const ::Opm::ParserKeyword& get_UNIFOUTS() { return this->UNIFOUTS; }; - const ::Opm::ParserKeyword& get_UNIFSAVE() { return this->UNIFSAVE; }; - const ::Opm::ParserKeyword& get_USECUPL() { return this->USECUPL; }; - const ::Opm::ParserKeyword& get_USEFLUX() { return this->USEFLUX; }; - const ::Opm::ParserKeyword& get_USENOFLO() { return this->USENOFLO; }; - const ::Opm::ParserKeyword& get_VAPOIL() { return this->VAPOIL; }; - const ::Opm::ParserKeyword& get_VAPPARS() { return this->VAPPARS; }; - const ::Opm::ParserKeyword& get_VAPWAT() { return this->VAPWAT; }; - const ::Opm::ParserKeyword& get_VDFLOW() { return this->VDFLOW; }; - const ::Opm::ParserKeyword& get_VDFLOWR() { return this->VDFLOWR; }; - const ::Opm::ParserKeyword& get_VE() { return this->VE; }; - const ::Opm::ParserKeyword& get_VEDEBUG() { return this->VEDEBUG; }; - const ::Opm::ParserKeyword& get_VEFIN() { return this->VEFIN; }; - const ::Opm::ParserKeyword& get_VEFRAC() { return this->VEFRAC; }; - const ::Opm::ParserKeyword& get_VEFRACP() { return this->VEFRACP; }; - const ::Opm::ParserKeyword& get_VEFRACPV() { return this->VEFRACPV; }; - const ::Opm::ParserKeyword& get_VEFRACV() { return this->VEFRACV; }; - const ::Opm::ParserKeyword& get_VFPCHK() { return this->VFPCHK; }; - const ::Opm::ParserKeyword& get_VFPIDIMS() { return this->VFPIDIMS; }; - const ::Opm::ParserKeyword& get_VFPINJ() { return this->VFPINJ; }; - const ::Opm::ParserKeyword& get_VFPPDIMS() { return this->VFPPDIMS; }; - const ::Opm::ParserKeyword& get_VFPPROD() { return this->VFPPROD; }; - const ::Opm::ParserKeyword& get_VFPTABL() { return this->VFPTABL; }; - const ::Opm::ParserKeyword& get_VISAGE() { return this->VISAGE; }; - const ::Opm::ParserKeyword& get_VISCD() { return this->VISCD; }; - const ::Opm::ParserKeyword& get_VISCREF() { return this->VISCREF; }; - const ::Opm::ParserKeyword& get_VISDATES() { return this->VISDATES; }; - const ::Opm::ParserKeyword& get_VISOPTS() { return this->VISOPTS; }; - const ::Opm::ParserKeyword& get_WAGHYSTR() { return this->WAGHYSTR; }; - const ::Opm::ParserKeyword& get_WAITBAL() { return this->WAITBAL; }; - const ::Opm::ParserKeyword& get_WALKALIN() { return this->WALKALIN; }; - const ::Opm::ParserKeyword& get_WALQCALC() { return this->WALQCALC; }; - const ::Opm::ParserKeyword& get_WAPI() { return this->WAPI; }; - const ::Opm::ParserKeyword& get_WARN() { return this->WARN; }; - const ::Opm::ParserKeyword& get_WATDENT() { return this->WATDENT; }; - const ::Opm::ParserKeyword& get_WATER() { return this->WATER; }; - const ::Opm::ParserKeyword& get_WATJT() { return this->WATJT; }; - const ::Opm::ParserKeyword& get_WATVISCT() { return this->WATVISCT; }; - const ::Opm::ParserKeyword& get_WBHGLR() { return this->WBHGLR; }; - const ::Opm::ParserKeyword& get_WBOREVOL() { return this->WBOREVOL; }; - const ::Opm::ParserKeyword& get_WCALCVAL() { return this->WCALCVAL; }; - const ::Opm::ParserKeyword& get_WCONHIST() { return this->WCONHIST; }; - const ::Opm::ParserKeyword& get_WCONINJ() { return this->WCONINJ; }; - const ::Opm::ParserKeyword& get_WCONINJE() { return this->WCONINJE; }; - const ::Opm::ParserKeyword& get_WCONINJH() { return this->WCONINJH; }; - const ::Opm::ParserKeyword& get_WCONINJP() { return this->WCONINJP; }; - const ::Opm::ParserKeyword& get_WCONPROD() { return this->WCONPROD; }; - const ::Opm::ParserKeyword& get_WCUTBACK() { return this->WCUTBACK; }; - const ::Opm::ParserKeyword& get_WCUTBACT() { return this->WCUTBACT; }; - const ::Opm::ParserKeyword& get_WCYCLE() { return this->WCYCLE; }; - const ::Opm::ParserKeyword& get_WDFAC() { return this->WDFAC; }; - const ::Opm::ParserKeyword& get_WDFACCOR() { return this->WDFACCOR; }; - const ::Opm::ParserKeyword& get_WDRILPRI() { return this->WDRILPRI; }; - const ::Opm::ParserKeyword& get_WDRILRES() { return this->WDRILRES; }; - const ::Opm::ParserKeyword& get_WDRILTIM() { return this->WDRILTIM; }; - const ::Opm::ParserKeyword& get_WECON() { return this->WECON; }; - const ::Opm::ParserKeyword& get_WECONINJ() { return this->WECONINJ; }; - const ::Opm::ParserKeyword& get_WECONT() { return this->WECONT; }; - const ::Opm::ParserKeyword& get_WEFAC() { return this->WEFAC; }; - const ::Opm::ParserKeyword& get_WELCNTL() { return this->WELCNTL; }; - const ::Opm::ParserKeyword& get_WELDEBUG() { return this->WELDEBUG; }; - const ::Opm::ParserKeyword& get_WELDRAW() { return this->WELDRAW; }; - const ::Opm::ParserKeyword& get_WELEVNT() { return this->WELEVNT; }; - const ::Opm::ParserKeyword& get_WELLDIMS() { return this->WELLDIMS; }; - const ::Opm::ParserKeyword& get_WELL_COMPLETION_PROBE() { return this->WELL_COMPLETION_PROBE; }; - const ::Opm::ParserKeyword& get_WELL_PROBE() { return this->WELL_PROBE; }; - const ::Opm::ParserKeyword& get_WELMOVEL() { return this->WELMOVEL; }; - const ::Opm::ParserKeyword& get_WELOPEN() { return this->WELOPEN; }; - const ::Opm::ParserKeyword& get_WELOPENL() { return this->WELOPENL; }; - const ::Opm::ParserKeyword& get_WELPI() { return this->WELPI; }; - const ::Opm::ParserKeyword& get_WELPRI() { return this->WELPRI; }; - const ::Opm::ParserKeyword& get_WELSEGS() { return this->WELSEGS; }; - const ::Opm::ParserKeyword& get_WELSOMIN() { return this->WELSOMIN; }; - const ::Opm::ParserKeyword& get_WELSPECL() { return this->WELSPECL; }; - const ::Opm::ParserKeyword& get_WELSPECS() { return this->WELSPECS; }; - const ::Opm::ParserKeyword& get_WELTARG() { return this->WELTARG; }; - const ::Opm::ParserKeyword& get_WFOAM() { return this->WFOAM; }; - const ::Opm::ParserKeyword& get_WFRICSEG() { return this->WFRICSEG; }; - const ::Opm::ParserKeyword& get_WFRICSGL() { return this->WFRICSGL; }; - const ::Opm::ParserKeyword& get_WFRICTN() { return this->WFRICTN; }; - const ::Opm::ParserKeyword& get_WFRICTNL() { return this->WFRICTNL; }; - const ::Opm::ParserKeyword& get_WGASPROD() { return this->WGASPROD; }; - const ::Opm::ParserKeyword& get_WGORPEN() { return this->WGORPEN; }; - const ::Opm::ParserKeyword& get_WGRUPCON() { return this->WGRUPCON; }; - const ::Opm::ParserKeyword& get_WH2NUM() { return this->WH2NUM; }; - const ::Opm::ParserKeyword& get_WH3NUM() { return this->WH3NUM; }; - const ::Opm::ParserKeyword& get_WHEDREFD() { return this->WHEDREFD; }; - const ::Opm::ParserKeyword& get_WHISTCTL() { return this->WHISTCTL; }; - const ::Opm::ParserKeyword& get_WHTEMP() { return this->WHTEMP; }; - const ::Opm::ParserKeyword& get_WINJMULT() { return this->WINJMULT; }; - const ::Opm::ParserKeyword& get_WINJTEMP() { return this->WINJTEMP; }; - const ::Opm::ParserKeyword& get_WLIFT() { return this->WLIFT; }; - const ::Opm::ParserKeyword& get_WLIFTOPT() { return this->WLIFTOPT; }; - const ::Opm::ParserKeyword& get_WLIMTOL() { return this->WLIMTOL; }; - const ::Opm::ParserKeyword& get_WLIST() { return this->WLIST; }; - const ::Opm::ParserKeyword& get_WLISTARG() { return this->WLISTARG; }; - const ::Opm::ParserKeyword& get_WLISTNAM() { return this->WLISTNAM; }; - const ::Opm::ParserKeyword& get_WMICP() { return this->WMICP; }; - const ::Opm::ParserKeyword& get_WNETCTRL() { return this->WNETCTRL; }; - const ::Opm::ParserKeyword& get_WNETDP() { return this->WNETDP; }; - const ::Opm::ParserKeyword& get_WORKLIM() { return this->WORKLIM; }; - const ::Opm::ParserKeyword& get_WORKTHP() { return this->WORKTHP; }; - const ::Opm::ParserKeyword& get_WPAVE() { return this->WPAVE; }; - const ::Opm::ParserKeyword& get_WPAVEDEP() { return this->WPAVEDEP; }; - const ::Opm::ParserKeyword& get_WPIMULT() { return this->WPIMULT; }; - const ::Opm::ParserKeyword& get_WPIMULTL() { return this->WPIMULTL; }; - const ::Opm::ParserKeyword& get_WPITAB() { return this->WPITAB; }; - const ::Opm::ParserKeyword& get_WPLUG() { return this->WPLUG; }; - const ::Opm::ParserKeyword& get_WPMITAB() { return this->WPMITAB; }; - const ::Opm::ParserKeyword& get_WPOLYMER() { return this->WPOLYMER; }; - const ::Opm::ParserKeyword& get_WPOLYRED() { return this->WPOLYRED; }; - const ::Opm::ParserKeyword& get_WPOTCALC() { return this->WPOTCALC; }; - const ::Opm::ParserKeyword& get_WREGROUP() { return this->WREGROUP; }; - const ::Opm::ParserKeyword& get_WRFT() { return this->WRFT; }; - const ::Opm::ParserKeyword& get_WRFTPLT() { return this->WRFTPLT; }; - const ::Opm::ParserKeyword& get_WSALT() { return this->WSALT; }; - const ::Opm::ParserKeyword& get_WSCCLEAN() { return this->WSCCLEAN; }; - const ::Opm::ParserKeyword& get_WSCCLENL() { return this->WSCCLENL; }; - const ::Opm::ParserKeyword& get_WSCTAB() { return this->WSCTAB; }; - const ::Opm::ParserKeyword& get_WSEGAICD() { return this->WSEGAICD; }; - const ::Opm::ParserKeyword& get_WSEGDFIN() { return this->WSEGDFIN; }; - const ::Opm::ParserKeyword& get_WSEGDFMD() { return this->WSEGDFMD; }; - const ::Opm::ParserKeyword& get_WSEGDFPA() { return this->WSEGDFPA; }; - const ::Opm::ParserKeyword& get_WSEGDIMS() { return this->WSEGDIMS; }; - const ::Opm::ParserKeyword& get_WSEGEXSS() { return this->WSEGEXSS; }; - const ::Opm::ParserKeyword& get_WSEGFLIM() { return this->WSEGFLIM; }; - const ::Opm::ParserKeyword& get_WSEGFMOD() { return this->WSEGFMOD; }; - const ::Opm::ParserKeyword& get_WSEGINIT() { return this->WSEGINIT; }; - const ::Opm::ParserKeyword& get_WSEGITER() { return this->WSEGITER; }; - const ::Opm::ParserKeyword& get_WSEGLABY() { return this->WSEGLABY; }; - const ::Opm::ParserKeyword& get_WSEGLINK() { return this->WSEGLINK; }; - const ::Opm::ParserKeyword& get_WSEGMULT() { return this->WSEGMULT; }; - const ::Opm::ParserKeyword& get_WSEGPROP() { return this->WSEGPROP; }; - const ::Opm::ParserKeyword& get_WSEGSEP() { return this->WSEGSEP; }; - const ::Opm::ParserKeyword& get_WSEGSICD() { return this->WSEGSICD; }; - const ::Opm::ParserKeyword& get_WSEGSOLV() { return this->WSEGSOLV; }; - const ::Opm::ParserKeyword& get_WSEGTABL() { return this->WSEGTABL; }; - const ::Opm::ParserKeyword& get_WSEGVALV() { return this->WSEGVALV; }; - const ::Opm::ParserKeyword& get_WSKPTAB() { return this->WSKPTAB; }; - const ::Opm::ParserKeyword& get_WSOLVENT() { return this->WSOLVENT; }; - const ::Opm::ParserKeyword& get_WSURFACT() { return this->WSURFACT; }; - const ::Opm::ParserKeyword& get_WTADD() { return this->WTADD; }; - const ::Opm::ParserKeyword& get_WTEMP() { return this->WTEMP; }; - const ::Opm::ParserKeyword& get_WTEMPQ() { return this->WTEMPQ; }; - const ::Opm::ParserKeyword& get_WTEST() { return this->WTEST; }; - const ::Opm::ParserKeyword& get_WTHPMAX() { return this->WTHPMAX; }; - const ::Opm::ParserKeyword& get_WTMULT() { return this->WTMULT; }; - const ::Opm::ParserKeyword& get_WTRACER() { return this->WTRACER; }; - const ::Opm::ParserKeyword& get_WVFPDP() { return this->WVFPDP; }; - const ::Opm::ParserKeyword& get_WVFPEXP() { return this->WVFPEXP; }; - const ::Opm::ParserKeyword& get_WWPAVE() { return this->WWPAVE; }; - const ::Opm::ParserKeyword& get_ZCORN() { return this->ZCORN; }; - const ::Opm::ParserKeyword& get_ZFACT1() { return this->ZFACT1; }; - const ::Opm::ParserKeyword& get_ZFACT1S() { return this->ZFACT1S; }; - const ::Opm::ParserKeyword& get_ZFACTOR() { return this->ZFACTOR; }; - const ::Opm::ParserKeyword& get_ZFACTORS() { return this->ZFACTORS; }; - const ::Opm::ParserKeyword& get_ZIPP2OFF() { return this->ZIPP2OFF; }; - const ::Opm::ParserKeyword& get_ZIPPY2() { return this->ZIPPY2; }; + const ::Opm::ParserKeyword get_ACF(); + const ::Opm::ParserKeyword get_ACTCO2S(); + const ::Opm::ParserKeyword get_ACTDIMS(); + const ::Opm::ParserKeyword get_ACTION(); + const ::Opm::ParserKeyword get_ACTIONG(); + const ::Opm::ParserKeyword get_ACTIONR(); + const ::Opm::ParserKeyword get_ACTIONS(); + const ::Opm::ParserKeyword get_ACTIONW(); + const ::Opm::ParserKeyword get_ACTIONX(); + const ::Opm::ParserKeyword get_ACTNUM(); + const ::Opm::ParserKeyword get_ACTPARAM(); + const ::Opm::ParserKeyword get_ADD(); + const ::Opm::ParserKeyword get_ADDREG(); + const ::Opm::ParserKeyword get_ADDZCORN(); + const ::Opm::ParserKeyword get_ADSALNOD(); + const ::Opm::ParserKeyword get_ADSORP(); + const ::Opm::ParserKeyword get_AITS(); + const ::Opm::ParserKeyword get_AITSOFF(); + const ::Opm::ParserKeyword get_ALKADS(); + const ::Opm::ParserKeyword get_ALKALINE(); + const ::Opm::ParserKeyword get_ALKROCK(); + const ::Opm::ParserKeyword get_ALL(); + const ::Opm::ParserKeyword get_ALPOLADS(); + const ::Opm::ParserKeyword get_ALSURFAD(); + const ::Opm::ParserKeyword get_ALSURFST(); + const ::Opm::ParserKeyword get_AMALGAM(); + const ::Opm::ParserKeyword get_API(); + const ::Opm::ParserKeyword get_APIGROUP(); + const ::Opm::ParserKeyword get_APILIM(); + const ::Opm::ParserKeyword get_APIVD(); + const ::Opm::ParserKeyword get_AQANCONL(); + const ::Opm::ParserKeyword get_AQANNC(); + const ::Opm::ParserKeyword get_AQANTRC(); + const ::Opm::ParserKeyword get_AQUALIST(); + const ::Opm::ParserKeyword get_AQUANCON(); + const ::Opm::ParserKeyword get_AQUCHGAS(); + const ::Opm::ParserKeyword get_AQUCHWAT(); + const ::Opm::ParserKeyword get_AQUCON(); + const ::Opm::ParserKeyword get_AQUCT(); + const ::Opm::ParserKeyword get_AQUCWFAC(); + const ::Opm::ParserKeyword get_AQUDIMS(); + const ::Opm::ParserKeyword get_AQUFET(); + const ::Opm::ParserKeyword get_AQUFETP(); + const ::Opm::ParserKeyword get_AQUFLUX(); + const ::Opm::ParserKeyword get_AQUIFER_PROBE_ANALYTIC(); + const ::Opm::ParserKeyword get_AQUIFER_PROBE_ANALYTIC_NAMED(); + const ::Opm::ParserKeyword get_AQUIFER_PROBE_NUMERIC(); + const ::Opm::ParserKeyword get_AQUNNC(); + const ::Opm::ParserKeyword get_AQUNUM(); + const ::Opm::ParserKeyword get_AQUTAB(); + const ::Opm::ParserKeyword get_AUTOCOAR(); + const ::Opm::ParserKeyword get_AUTOREF(); + const ::Opm::ParserKeyword get_BC(); + const ::Opm::ParserKeyword get_BCCON(); + const ::Opm::ParserKeyword get_BCPROP(); + const ::Opm::ParserKeyword get_BDENSITY(); + const ::Opm::ParserKeyword get_BGGI(); + const ::Opm::ParserKeyword get_BIC(); + const ::Opm::ParserKeyword get_BIGMODEL(); + const ::Opm::ParserKeyword get_BIOTCOEF(); + const ::Opm::ParserKeyword get_BLACKOIL(); + const ::Opm::ParserKeyword get_BLOCK_PROBE(); + const ::Opm::ParserKeyword get_BLOCK_PROBE300(); + const ::Opm::ParserKeyword get_BOGI(); + const ::Opm::ParserKeyword get_BOUNDARY(); + const ::Opm::ParserKeyword get_BOX(); + const ::Opm::ParserKeyword get_BPARA(); + const ::Opm::ParserKeyword get_BPIDIMS(); + const ::Opm::ParserKeyword get_BRANPROP(); + const ::Opm::ParserKeyword get_BRINE(); + const ::Opm::ParserKeyword get_BTOBALFA(); + const ::Opm::ParserKeyword get_BTOBALFV(); + const ::Opm::ParserKeyword get_CALTRAC(); + const ::Opm::ParserKeyword get_CARFIN(); + const ::Opm::ParserKeyword get_CART(); + const ::Opm::ParserKeyword get_CBMOPTS(); + const ::Opm::ParserKeyword get_CECON(); + const ::Opm::ParserKeyword get_CECONT(); + const ::Opm::ParserKeyword get_CIRCLE(); + const ::Opm::ParserKeyword get_CNAMES(); + const ::Opm::ParserKeyword get_CO2SOL(); + const ::Opm::ParserKeyword get_CO2STOR(); + const ::Opm::ParserKeyword get_CO2STORE(); + const ::Opm::ParserKeyword get_COAL(); + const ::Opm::ParserKeyword get_COALADS(); + const ::Opm::ParserKeyword get_COALNUM(); + const ::Opm::ParserKeyword get_COALPP(); + const ::Opm::ParserKeyword get_COARSEN(); + const ::Opm::ParserKeyword get_COLLAPSE(); + const ::Opm::ParserKeyword get_COLUMNS(); + const ::Opm::ParserKeyword get_COMPDAT(); + const ::Opm::ParserKeyword get_COMPDATX(); + const ::Opm::ParserKeyword get_COMPFLSH(); + const ::Opm::ParserKeyword get_COMPIMB(); + const ::Opm::ParserKeyword get_COMPINJK(); + const ::Opm::ParserKeyword get_COMPLMPL(); + const ::Opm::ParserKeyword get_COMPLUMP(); + const ::Opm::ParserKeyword get_COMPOFF(); + const ::Opm::ParserKeyword get_COMPORD(); + const ::Opm::ParserKeyword get_COMPRIV(); + const ::Opm::ParserKeyword get_COMPRP(); + const ::Opm::ParserKeyword get_COMPRPL(); + const ::Opm::ParserKeyword get_COMPS(); + const ::Opm::ParserKeyword get_COMPSEGL(); + const ::Opm::ParserKeyword get_COMPSEGS(); + const ::Opm::ParserKeyword get_COMPTRAJ(); + const ::Opm::ParserKeyword get_COMPVE(); + const ::Opm::ParserKeyword get_COMPVEL(); + const ::Opm::ParserKeyword get_CONNECTION_PROBE(); + const ::Opm::ParserKeyword get_CONNECTION_PROBE_OPM(); + const ::Opm::ParserKeyword get_COORD(); + const ::Opm::ParserKeyword get_COORDSYS(); + const ::Opm::ParserKeyword get_COPY(); + const ::Opm::ParserKeyword get_COPYBOX(); + const ::Opm::ParserKeyword get_COPYREG(); + const ::Opm::ParserKeyword get_CPIFACT(); + const ::Opm::ParserKeyword get_CPIFACTL(); + const ::Opm::ParserKeyword get_CPR(); + const ::Opm::ParserKeyword get_CREF(); + const ::Opm::ParserKeyword get_CREFW(); + const ::Opm::ParserKeyword get_CREFWS(); + const ::Opm::ParserKeyword get_CRITPERM(); + const ::Opm::ParserKeyword get_CSKIN(); + const ::Opm::ParserKeyword get_DATE(); + const ::Opm::ParserKeyword get_DATES(); + const ::Opm::ParserKeyword get_DATUM(); + const ::Opm::ParserKeyword get_DATUMR(); + const ::Opm::ParserKeyword get_DATUMRX(); + const ::Opm::ParserKeyword get_DCQDEFN(); + const ::Opm::ParserKeyword get_DEBUG_(); + const ::Opm::ParserKeyword get_DELAYACT(); + const ::Opm::ParserKeyword get_DENAQA(); + const ::Opm::ParserKeyword get_DENSITY(); + const ::Opm::ParserKeyword get_DEPTH(); + const ::Opm::ParserKeyword get_DEPTHTAB(); + const ::Opm::ParserKeyword get_DEPTHZ(); + const ::Opm::ParserKeyword get_DIAGDISP(); + const ::Opm::ParserKeyword get_DIFF(); + const ::Opm::ParserKeyword get_DIFFAGAS(); + const ::Opm::ParserKeyword get_DIFFAWAT(); + const ::Opm::ParserKeyword get_DIFFC(); + const ::Opm::ParserKeyword get_DIFFCGAS(); + const ::Opm::ParserKeyword get_DIFFCOAL(); + const ::Opm::ParserKeyword get_DIFFCWAT(); + const ::Opm::ParserKeyword get_DIFFDP(); + const ::Opm::ParserKeyword get_DIFFMMF(); + const ::Opm::ParserKeyword get_DIFFMR(); + const ::Opm::ParserKeyword get_DIFFMTHT(); + const ::Opm::ParserKeyword get_DIFFMX(); + const ::Opm::ParserKeyword get_DIFFMY(); + const ::Opm::ParserKeyword get_DIFFMZ(); + const ::Opm::ParserKeyword get_DIFFR(); + const ::Opm::ParserKeyword get_DIFFTHT(); + const ::Opm::ParserKeyword get_DIFFUSE(); + const ::Opm::ParserKeyword get_DIFFX(); + const ::Opm::ParserKeyword get_DIFFY(); + const ::Opm::ParserKeyword get_DIFFZ(); + const ::Opm::ParserKeyword get_DIMENS(); + const ::Opm::ParserKeyword get_DIMPES(); + const ::Opm::ParserKeyword get_DIMPLICT(); + const ::Opm::ParserKeyword get_DISGAS(); + const ::Opm::ParserKeyword get_DISGASW(); + const ::Opm::ParserKeyword get_DISPDIMS(); + const ::Opm::ParserKeyword get_DISPERC(); + const ::Opm::ParserKeyword get_DISPERSE(); + const ::Opm::ParserKeyword get_DOMAINS(); + const ::Opm::ParserKeyword get_DPGRID(); + const ::Opm::ParserKeyword get_DPKRMOD(); + const ::Opm::ParserKeyword get_DPNUM(); + const ::Opm::ParserKeyword get_DR(); + const ::Opm::ParserKeyword get_DREF(); + const ::Opm::ParserKeyword get_DREFS(); + const ::Opm::ParserKeyword get_DRILPRI(); + const ::Opm::ParserKeyword get_DRSDT(); + const ::Opm::ParserKeyword get_DRSDTCON(); + const ::Opm::ParserKeyword get_DRSDTR(); + const ::Opm::ParserKeyword get_DRV(); + const ::Opm::ParserKeyword get_DRVDT(); + const ::Opm::ParserKeyword get_DRVDTR(); + const ::Opm::ParserKeyword get_DSPDEINT(); + const ::Opm::ParserKeyword get_DTHETA(); + const ::Opm::ParserKeyword get_DTHETAV(); + const ::Opm::ParserKeyword get_DUALPERM(); + const ::Opm::ParserKeyword get_DUALPORO(); + const ::Opm::ParserKeyword get_DUMPCUPL(); + const ::Opm::ParserKeyword get_DUMPFLUX(); + const ::Opm::ParserKeyword get_DX(); + const ::Opm::ParserKeyword get_DXV(); + const ::Opm::ParserKeyword get_DY(); + const ::Opm::ParserKeyword get_DYNAMICR(); + const ::Opm::ParserKeyword get_DYNRDIMS(); + const ::Opm::ParserKeyword get_DYV(); + const ::Opm::ParserKeyword get_DZ(); + const ::Opm::ParserKeyword get_DZMATRIX(); + const ::Opm::ParserKeyword get_DZMTRX(); + const ::Opm::ParserKeyword get_DZMTRXV(); + const ::Opm::ParserKeyword get_DZNET(); + const ::Opm::ParserKeyword get_DZV(); + const ::Opm::ParserKeyword get_ECHO(); + const ::Opm::ParserKeyword get_ECLMC(); + const ::Opm::ParserKeyword get_EDIT(); + const ::Opm::ParserKeyword get_EDITNNC(); + const ::Opm::ParserKeyword get_EDITNNCR(); + const ::Opm::ParserKeyword get_EHYSTR(); + const ::Opm::ParserKeyword get_EHYSTRR(); + const ::Opm::ParserKeyword get_END(); + const ::Opm::ParserKeyword get_ENDACTIO(); + const ::Opm::ParserKeyword get_ENDBOX(); + const ::Opm::ParserKeyword get_ENDDYN(); + const ::Opm::ParserKeyword get_ENDFIN(); + const ::Opm::ParserKeyword get_ENDINC(); + const ::Opm::ParserKeyword get_ENDNUM(); + const ::Opm::ParserKeyword get_ENDPOINT_SPECIFIERS(); + const ::Opm::ParserKeyword get_ENDSCALE(); + const ::Opm::ParserKeyword get_ENDSKIP(); + const ::Opm::ParserKeyword get_ENKRVD(); + const ::Opm::ParserKeyword get_ENPCVD(); + const ::Opm::ParserKeyword get_ENPTVD(); + const ::Opm::ParserKeyword get_ENSPCVD(); + const ::Opm::ParserKeyword get_EOS(); + const ::Opm::ParserKeyword get_EOSNUM(); + const ::Opm::ParserKeyword get_EPSDBGS(); + const ::Opm::ParserKeyword get_EPSDEBUG(); + const ::Opm::ParserKeyword get_EQLDIMS(); + const ::Opm::ParserKeyword get_EQLNUM(); + const ::Opm::ParserKeyword get_EQLOPTS(); + const ::Opm::ParserKeyword get_EQLZCORN(); + const ::Opm::ParserKeyword get_EQUALREG(); + const ::Opm::ParserKeyword get_EQUALS(); + const ::Opm::ParserKeyword get_EQUIL(); + const ::Opm::ParserKeyword get_ESSNODE(); + const ::Opm::ParserKeyword get_EXCAVATE(); + const ::Opm::ParserKeyword get_EXCEL(); + const ::Opm::ParserKeyword get_EXIT(); + const ::Opm::ParserKeyword get_EXTFIN(); + const ::Opm::ParserKeyword get_EXTHOST(); + const ::Opm::ParserKeyword get_EXTRAPMS(); + const ::Opm::ParserKeyword get_EXTREPGL(); + const ::Opm::ParserKeyword get_FAULTDIM(); + const ::Opm::ParserKeyword get_FAULTS(); + const ::Opm::ParserKeyword get_FBHPDEF(); + const ::Opm::ParserKeyword get_FHERCHBL(); + const ::Opm::ParserKeyword get_FIELD(); + const ::Opm::ParserKeyword get_FIELDSEP(); + const ::Opm::ParserKeyword get_FIELD_PROBE(); + const ::Opm::ParserKeyword get_FIELD_PROBE_OPM(); + const ::Opm::ParserKeyword get_FILEUNIT(); + const ::Opm::ParserKeyword get_FILLEPS(); + const ::Opm::ParserKeyword get_FIPNUM(); + const ::Opm::ParserKeyword get_FIPOWG(); + const ::Opm::ParserKeyword get_FIPSEP(); + const ::Opm::ParserKeyword get_FIP_PROBE(); + const ::Opm::ParserKeyword get_FLUXNUM(); + const ::Opm::ParserKeyword get_FLUXREG(); + const ::Opm::ParserKeyword get_FLUXTYPE(); + const ::Opm::ParserKeyword get_FMTHMD(); + const ::Opm::ParserKeyword get_FMTIN(); + const ::Opm::ParserKeyword get_FMTOUT(); + const ::Opm::ParserKeyword get_FMWSET(); + const ::Opm::ParserKeyword get_FOAM(); + const ::Opm::ParserKeyword get_FOAMADS(); + const ::Opm::ParserKeyword get_FOAMDCYO(); + const ::Opm::ParserKeyword get_FOAMDCYW(); + const ::Opm::ParserKeyword get_FOAMFCN(); + const ::Opm::ParserKeyword get_FOAMFRM(); + const ::Opm::ParserKeyword get_FOAMFSC(); + const ::Opm::ParserKeyword get_FOAMFSO(); + const ::Opm::ParserKeyword get_FOAMFST(); + const ::Opm::ParserKeyword get_FOAMFSW(); + const ::Opm::ParserKeyword get_FOAMMOB(); + const ::Opm::ParserKeyword get_FOAMMOBP(); + const ::Opm::ParserKeyword get_FOAMMOBS(); + const ::Opm::ParserKeyword get_FOAMOPTS(); + const ::Opm::ParserKeyword get_FOAMROCK(); + const ::Opm::ParserKeyword get_FORMFEED(); + const ::Opm::ParserKeyword get_FRICTION(); + const ::Opm::ParserKeyword get_FULLIMP(); + const ::Opm::ParserKeyword get_GAS(); + const ::Opm::ParserKeyword get_GASBEGIN(); + const ::Opm::ParserKeyword get_GASCONC(); + const ::Opm::ParserKeyword get_GASDENT(); + const ::Opm::ParserKeyword get_GASEND(); + const ::Opm::ParserKeyword get_GASFCOMP(); + const ::Opm::ParserKeyword get_GASFDECR(); + const ::Opm::ParserKeyword get_GASFDELC(); + const ::Opm::ParserKeyword get_GASFIELD(); + const ::Opm::ParserKeyword get_GASFTARG(); + const ::Opm::ParserKeyword get_GASJT(); + const ::Opm::ParserKeyword get_GASMONTH(); + const ::Opm::ParserKeyword get_GASPERIO(); + const ::Opm::ParserKeyword get_GASSATC(); + const ::Opm::ParserKeyword get_GASVISCT(); + const ::Opm::ParserKeyword get_GASWAT(); + const ::Opm::ParserKeyword get_GASYEAR(); + const ::Opm::ParserKeyword get_GCALECON(); + const ::Opm::ParserKeyword get_GCOMPIDX(); + const ::Opm::ParserKeyword get_GCONCAL(); + const ::Opm::ParserKeyword get_GCONENG(); + const ::Opm::ParserKeyword get_GCONINJE(); + const ::Opm::ParserKeyword get_GCONPRI(); + const ::Opm::ParserKeyword get_GCONPROD(); + const ::Opm::ParserKeyword get_GCONSALE(); + const ::Opm::ParserKeyword get_GCONSUMP(); + const ::Opm::ParserKeyword get_GCONTOL(); + const ::Opm::ParserKeyword get_GCUTBACK(); + const ::Opm::ParserKeyword get_GCUTBACT(); + const ::Opm::ParserKeyword get_GCVD(); + const ::Opm::ParserKeyword get_GDCQ(); + const ::Opm::ParserKeyword get_GDCQECON(); + const ::Opm::ParserKeyword get_GDFILE(); + const ::Opm::ParserKeyword get_GDIMS(); + const ::Opm::ParserKeyword get_GDORIENT(); + const ::Opm::ParserKeyword get_GDRILPOT(); + const ::Opm::ParserKeyword get_GECON(); + const ::Opm::ParserKeyword get_GECONT(); + const ::Opm::ParserKeyword get_GEFAC(); + const ::Opm::ParserKeyword get_GETDATA(); + const ::Opm::ParserKeyword get_GETGLOB(); + const ::Opm::ParserKeyword get_GI(); + const ::Opm::ParserKeyword get_GIALL(); + const ::Opm::ParserKeyword get_GIMODEL(); + const ::Opm::ParserKeyword get_GINODE(); + const ::Opm::ParserKeyword get_GLIFTLIM(); + const ::Opm::ParserKeyword get_GLIFTOPT(); + const ::Opm::ParserKeyword get_GMWSET(); + const ::Opm::ParserKeyword get_GNETDP(); + const ::Opm::ParserKeyword get_GNETINJE(); + const ::Opm::ParserKeyword get_GNETPUMP(); + const ::Opm::ParserKeyword get_GPMAINT(); + const ::Opm::ParserKeyword get_GRADGRUP(); + const ::Opm::ParserKeyword get_GRADRESV(); + const ::Opm::ParserKeyword get_GRADRFT(); + const ::Opm::ParserKeyword get_GRADWELL(); + const ::Opm::ParserKeyword get_GRAVCONS(); + const ::Opm::ParserKeyword get_GRAVDR(); + const ::Opm::ParserKeyword get_GRAVDRB(); + const ::Opm::ParserKeyword get_GRAVDRM(); + const ::Opm::ParserKeyword get_GRAVITY(); + const ::Opm::ParserKeyword get_GRDREACH(); + const ::Opm::ParserKeyword get_GRID(); + const ::Opm::ParserKeyword get_GRIDFILE(); + const ::Opm::ParserKeyword get_GRIDOPTS(); + const ::Opm::ParserKeyword get_GRIDUNIT(); + const ::Opm::ParserKeyword get_GROUP_PROBE(); + const ::Opm::ParserKeyword get_GROUP_PROBE_OPM(); + const ::Opm::ParserKeyword get_GRUPMAST(); + const ::Opm::ParserKeyword get_GRUPNET(); + const ::Opm::ParserKeyword get_GRUPRIG(); + const ::Opm::ParserKeyword get_GRUPSLAV(); + const ::Opm::ParserKeyword get_GRUPTARG(); + const ::Opm::ParserKeyword get_GRUPTREE(); + const ::Opm::ParserKeyword get_GSATINJE(); + const ::Opm::ParserKeyword get_GSATPROD(); + const ::Opm::ParserKeyword get_GSEPCOND(); + const ::Opm::ParserKeyword get_GSF(); + const ::Opm::ParserKeyword get_GSSCPTST(); + const ::Opm::ParserKeyword get_GSWINGF(); + const ::Opm::ParserKeyword get_GTADD(); + const ::Opm::ParserKeyword get_GTMULT(); + const ::Opm::ParserKeyword get_GUIDECAL(); + const ::Opm::ParserKeyword get_GUIDERAT(); + const ::Opm::ParserKeyword get_GUPFREQ(); + const ::Opm::ParserKeyword get_GWRTWCV(); + const ::Opm::ParserKeyword get_H2SOL(); + const ::Opm::ParserKeyword get_H2STORE(); + const ::Opm::ParserKeyword get_HALFTRAN(); + const ::Opm::ParserKeyword get_HAxxxxxx(); + const ::Opm::ParserKeyword get_HBNUM(); + const ::Opm::ParserKeyword get_HDISP(); + const ::Opm::ParserKeyword get_HEATCR(); + const ::Opm::ParserKeyword get_HEATCRT(); + const ::Opm::ParserKeyword get_HMAQUCT(); + const ::Opm::ParserKeyword get_HMAQUFET(); + const ::Opm::ParserKeyword get_HMAQUNUM(); + const ::Opm::ParserKeyword get_HMDIMS(); + const ::Opm::ParserKeyword get_HMFAULTS(); + const ::Opm::ParserKeyword get_HMMLAQUN(); + const ::Opm::ParserKeyword get_HMMLCTAQ(); + const ::Opm::ParserKeyword get_HMMLFTAQ(); + const ::Opm::ParserKeyword get_HMMLTWCN(); + const ::Opm::ParserKeyword get_HMMULTFT(); + const ::Opm::ParserKeyword get_HMMULTSG(); + const ::Opm::ParserKeyword get_HMMULTxx(); + const ::Opm::ParserKeyword get_HMPROPS(); + const ::Opm::ParserKeyword get_HMROCK(); + const ::Opm::ParserKeyword get_HMROCKT(); + const ::Opm::ParserKeyword get_HMRREF(); + const ::Opm::ParserKeyword get_HMWELCON(); + const ::Opm::ParserKeyword get_HMWPIMLT(); + const ::Opm::ParserKeyword get_HMxxxxxx(); + const ::Opm::ParserKeyword get_HRFIN(); + const ::Opm::ParserKeyword get_HWELLS(); + const ::Opm::ParserKeyword get_HWKRO(); + const ::Opm::ParserKeyword get_HWKRORG(); + const ::Opm::ParserKeyword get_HWKRORW(); + const ::Opm::ParserKeyword get_HWKRW(); + const ::Opm::ParserKeyword get_HWKRWR(); + const ::Opm::ParserKeyword get_HWPCW(); + const ::Opm::ParserKeyword get_HWSNUM(); + const ::Opm::ParserKeyword get_HWSOGCR(); + const ::Opm::ParserKeyword get_HWSOWCR(); + const ::Opm::ParserKeyword get_HWSWCR(); + const ::Opm::ParserKeyword get_HWSWL(); + const ::Opm::ParserKeyword get_HWSWLPC(); + const ::Opm::ParserKeyword get_HWSWU(); + const ::Opm::ParserKeyword get_HXFIN(); + const ::Opm::ParserKeyword get_HYDRHEAD(); + const ::Opm::ParserKeyword get_HYFIN(); + const ::Opm::ParserKeyword get_HYMOBGDR(); + const ::Opm::ParserKeyword get_HYST(); + const ::Opm::ParserKeyword get_HYSTCHCK(); + const ::Opm::ParserKeyword get_HZFIN(); + const ::Opm::ParserKeyword get_IHOST(); + const ::Opm::ParserKeyword get_IMBNUM(); + const ::Opm::ParserKeyword get_IMBNUMMF(); + const ::Opm::ParserKeyword get_IMKRVD(); + const ::Opm::ParserKeyword get_IMPCVD(); + const ::Opm::ParserKeyword get_IMPES(); + const ::Opm::ParserKeyword get_IMPLICIT(); + const ::Opm::ParserKeyword get_IMPORT(); + const ::Opm::ParserKeyword get_IMPTVD(); + const ::Opm::ParserKeyword get_IMSPCVD(); + const ::Opm::ParserKeyword get_INCLUDE(); + const ::Opm::ParserKeyword get_INIT(); + const ::Opm::ParserKeyword get_INRAD(); + const ::Opm::ParserKeyword get_INSPEC(); + const ::Opm::ParserKeyword get_INTPC(); + const ::Opm::ParserKeyword get_IONROCK(); + const ::Opm::ParserKeyword get_IONXROCK(); + const ::Opm::ParserKeyword get_IONXSURF(); + const ::Opm::ParserKeyword get_IPCG(); + const ::Opm::ParserKeyword get_IPCW(); + const ::Opm::ParserKeyword get_ISGCR(); + const ::Opm::ParserKeyword get_ISGL(); + const ::Opm::ParserKeyword get_ISGLPC(); + const ::Opm::ParserKeyword get_ISGU(); + const ::Opm::ParserKeyword get_ISOGCR(); + const ::Opm::ParserKeyword get_ISOLNUM(); + const ::Opm::ParserKeyword get_ISOWCR(); + const ::Opm::ParserKeyword get_ISWCR(); + const ::Opm::ParserKeyword get_ISWL(); + const ::Opm::ParserKeyword get_ISWLPC(); + const ::Opm::ParserKeyword get_ISWU(); + const ::Opm::ParserKeyword get_JFUNC(); + const ::Opm::ParserKeyword get_JFUNCR(); + const ::Opm::ParserKeyword get_KRNUM(); + const ::Opm::ParserKeyword get_KRNUMMF(); + const ::Opm::ParserKeyword get_LAB(); + const ::Opm::ParserKeyword get_LANGMPL(); + const ::Opm::ParserKeyword get_LANGMUIR(); + const ::Opm::ParserKeyword get_LANGSOLV(); + const ::Opm::ParserKeyword get_LCUNIT(); + const ::Opm::ParserKeyword get_LGR(); + const ::Opm::ParserKeyword get_LGRCOPY(); + const ::Opm::ParserKeyword get_LGRFREE(); + const ::Opm::ParserKeyword get_LGRLOCK(); + const ::Opm::ParserKeyword get_LGROFF(); + const ::Opm::ParserKeyword get_LGRON(); + const ::Opm::ParserKeyword get_LICENSES(); + const ::Opm::ParserKeyword get_LIFTOPT(); + const ::Opm::ParserKeyword get_LINCOM(); + const ::Opm::ParserKeyword get_LINKPERM(); + const ::Opm::ParserKeyword get_LIVEOIL(); + const ::Opm::ParserKeyword get_LKRO(); + const ::Opm::ParserKeyword get_LKRORG(); + const ::Opm::ParserKeyword get_LKRORW(); + const ::Opm::ParserKeyword get_LKRW(); + const ::Opm::ParserKeyword get_LKRWR(); + const ::Opm::ParserKeyword get_LOAD(); + const ::Opm::ParserKeyword get_LOWSALT(); + const ::Opm::ParserKeyword get_LPCW(); + const ::Opm::ParserKeyword get_LSALTFNC(); + const ::Opm::ParserKeyword get_LSLTWNUM(); + const ::Opm::ParserKeyword get_LSNUM(); + const ::Opm::ParserKeyword get_LSOGCR(); + const ::Opm::ParserKeyword get_LSOWCR(); + const ::Opm::ParserKeyword get_LSWCR(); + const ::Opm::ParserKeyword get_LSWL(); + const ::Opm::ParserKeyword get_LSWLPC(); + const ::Opm::ParserKeyword get_LSWU(); + const ::Opm::ParserKeyword get_LTOSIGMA(); + const ::Opm::ParserKeyword get_LWKRO(); + const ::Opm::ParserKeyword get_LWKRORG(); + const ::Opm::ParserKeyword get_LWKRORW(); + const ::Opm::ParserKeyword get_LWKRW(); + const ::Opm::ParserKeyword get_LWKRWR(); + const ::Opm::ParserKeyword get_LWPCW(); + const ::Opm::ParserKeyword get_LWSLTNUM(); + const ::Opm::ParserKeyword get_LWSNUM(); + const ::Opm::ParserKeyword get_LWSOGCR(); + const ::Opm::ParserKeyword get_LWSOWCR(); + const ::Opm::ParserKeyword get_LWSWCR(); + const ::Opm::ParserKeyword get_LWSWL(); + const ::Opm::ParserKeyword get_LWSWLPC(); + const ::Opm::ParserKeyword get_LWSWU(); + const ::Opm::ParserKeyword get_LX(); + const ::Opm::ParserKeyword get_LXFIN(); + const ::Opm::ParserKeyword get_LY(); + const ::Opm::ParserKeyword get_LYFIN(); + const ::Opm::ParserKeyword get_LZ(); + const ::Opm::ParserKeyword get_LZFIN(); + const ::Opm::ParserKeyword get_MAPAXES(); + const ::Opm::ParserKeyword get_MAPUNITS(); + const ::Opm::ParserKeyword get_MASSFLOW(); + const ::Opm::ParserKeyword get_MATCORR(); + const ::Opm::ParserKeyword get_MAXVALUE(); + const ::Opm::ParserKeyword get_MECH(); + const ::Opm::ParserKeyword get_MEMORY(); + const ::Opm::ParserKeyword get_MESSAGE(); + const ::Opm::ParserKeyword get_MESSAGES(); + const ::Opm::ParserKeyword get_MESSOPTS(); + const ::Opm::ParserKeyword get_MESSSRVC(); + const ::Opm::ParserKeyword get_METRIC(); + const ::Opm::ParserKeyword get_MICP(); + const ::Opm::ParserKeyword get_MICPPARA(); + const ::Opm::ParserKeyword get_MINNNCT(); + const ::Opm::ParserKeyword get_MINNPCOL(); + const ::Opm::ParserKeyword get_MINPORV(); + const ::Opm::ParserKeyword get_MINPV(); + const ::Opm::ParserKeyword get_MINPVV(); + const ::Opm::ParserKeyword get_MINVALUE(); + const ::Opm::ParserKeyword get_MISC(); + const ::Opm::ParserKeyword get_MISCIBLE(); + const ::Opm::ParserKeyword get_MISCNUM(); + const ::Opm::ParserKeyword get_MLANG(); + const ::Opm::ParserKeyword get_MLANGSLV(); + const ::Opm::ParserKeyword get_MONITOR(); + const ::Opm::ParserKeyword get_MPFANUM(); + const ::Opm::ParserKeyword get_MPFNNC(); + const ::Opm::ParserKeyword get_MSFN(); + const ::Opm::ParserKeyword get_MSGFILE(); + const ::Opm::ParserKeyword get_MSUM_PROBE(); + const ::Opm::ParserKeyword get_MULSGGD(); + const ::Opm::ParserKeyword get_MULSGGDV(); + const ::Opm::ParserKeyword get_MULTFLT(); + const ::Opm::ParserKeyword get_MULTIN(); + const ::Opm::ParserKeyword get_MULTIPLY(); + const ::Opm::ParserKeyword get_MULTIREG(); + const ::Opm::ParserKeyword get_MULTNUM(); + const ::Opm::ParserKeyword get_MULTOUT(); + const ::Opm::ParserKeyword get_MULTOUTS(); + const ::Opm::ParserKeyword get_MULTPV(); + const ::Opm::ParserKeyword get_MULTREAL(); + const ::Opm::ParserKeyword get_MULTREGD(); + const ::Opm::ParserKeyword get_MULTREGH(); + const ::Opm::ParserKeyword get_MULTREGP(); + const ::Opm::ParserKeyword get_MULTREGT(); + const ::Opm::ParserKeyword get_MULTSIG(); + const ::Opm::ParserKeyword get_MULTSIGV(); + const ::Opm::ParserKeyword get_MULT_XYZ(); + const ::Opm::ParserKeyword get_MW(); + const ::Opm::ParserKeyword get_MWS(); + const ::Opm::ParserKeyword get_NARROW(); + const ::Opm::ParserKeyword get_NCOMPS(); + const ::Opm::ParserKeyword get_NCONSUMP(); + const ::Opm::ParserKeyword get_NEFAC(); + const ::Opm::ParserKeyword get_NETBALAN(); + const ::Opm::ParserKeyword get_NETCOMPA(); + const ::Opm::ParserKeyword get_NETWORK(); + const ::Opm::ParserKeyword get_NETWORK_PROBE(); + const ::Opm::ParserKeyword get_NEWTRAN(); + const ::Opm::ParserKeyword get_NEXTSTEP(); + const ::Opm::ParserKeyword get_NEXTSTPL(); + const ::Opm::ParserKeyword get_NINENUM(); + const ::Opm::ParserKeyword get_NINEPOIN(); + const ::Opm::ParserKeyword get_NMATOPTS(); + const ::Opm::ParserKeyword get_NMATRIX(); + const ::Opm::ParserKeyword get_NMESSAGE(); + const ::Opm::ParserKeyword get_NNC(); + const ::Opm::ParserKeyword get_NNEWTF(); + const ::Opm::ParserKeyword get_NOCASC(); + const ::Opm::ParserKeyword get_NODEPROP(); + const ::Opm::ParserKeyword get_NODPPM(); + const ::Opm::ParserKeyword get_NOECHO(); + const ::Opm::ParserKeyword get_NOGGF(); + const ::Opm::ParserKeyword get_NOGRAV(); + const ::Opm::ParserKeyword get_NOHMD(); + const ::Opm::ParserKeyword get_NOHMO(); + const ::Opm::ParserKeyword get_NOHYST(); + const ::Opm::ParserKeyword get_NOINSPEC(); + const ::Opm::ParserKeyword get_NOMONITO(); + const ::Opm::ParserKeyword get_NONNC(); + const ::Opm::ParserKeyword get_NORSSPEC(); + const ::Opm::ParserKeyword get_NOSIM(); + const ::Opm::ParserKeyword get_NOWARN(); + const ::Opm::ParserKeyword get_NOWARNEP(); + const ::Opm::ParserKeyword get_NRSOUT(); + const ::Opm::ParserKeyword get_NSTACK(); + const ::Opm::ParserKeyword get_NTG(); + const ::Opm::ParserKeyword get_NUMRES(); + const ::Opm::ParserKeyword get_NUPCOL(); + const ::Opm::ParserKeyword get_NWATREM(); + const ::Opm::ParserKeyword get_NXFIN(); + const ::Opm::ParserKeyword get_NYFIN(); + const ::Opm::ParserKeyword get_NZFIN(); + const ::Opm::ParserKeyword get_OCOMPIDX(); + const ::Opm::ParserKeyword get_OFM(); + const ::Opm::ParserKeyword get_OIL(); + const ::Opm::ParserKeyword get_OILAPI(); + const ::Opm::ParserKeyword get_OILCOMPR(); + const ::Opm::ParserKeyword get_OILDENT(); + const ::Opm::ParserKeyword get_OILJT(); + const ::Opm::ParserKeyword get_OILMW(); + const ::Opm::ParserKeyword get_OILVISCT(); + const ::Opm::ParserKeyword get_OILVTIM(); + const ::Opm::ParserKeyword get_OLDTRAN(); + const ::Opm::ParserKeyword get_OLDTRANR(); + const ::Opm::ParserKeyword get_OPERATE(); + const ::Opm::ParserKeyword get_OPERATER(); + const ::Opm::ParserKeyword get_OPERNUM(); + const ::Opm::ParserKeyword get_OPTIONS(); + const ::Opm::ParserKeyword get_OPTIONS3(); + const ::Opm::ParserKeyword get_OUTRAD(); + const ::Opm::ParserKeyword get_OUTSOL(); + const ::Opm::ParserKeyword get_OVERBURD(); + const ::Opm::ParserKeyword get_PARALLEL(); + const ::Opm::ParserKeyword get_PARAOPTS(); + const ::Opm::ParserKeyword get_PARTTRAC(); + const ::Opm::ParserKeyword get_PATHS(); + const ::Opm::ParserKeyword get_PBUB(); + const ::Opm::ParserKeyword get_PBVD(); + const ::Opm::ParserKeyword get_PCFACT(); + const ::Opm::ParserKeyword get_PCG(); + const ::Opm::ParserKeyword get_PCG32D(); + const ::Opm::ParserKeyword get_PCRIT(); + const ::Opm::ParserKeyword get_PCW(); + const ::Opm::ParserKeyword get_PCW32D(); + const ::Opm::ParserKeyword get_PDEW(); + const ::Opm::ParserKeyword get_PDVD(); + const ::Opm::ParserKeyword get_PEBI(); + const ::Opm::ParserKeyword get_PECOEFS(); + const ::Opm::ParserKeyword get_PEDIMS(); + const ::Opm::ParserKeyword get_PEGTABX(); + const ::Opm::ParserKeyword get_PEKTABX(); + const ::Opm::ParserKeyword get_PENUM(); + const ::Opm::ParserKeyword get_PERFORMANCE_PROBE(); + const ::Opm::ParserKeyword get_PERMAVE(); + const ::Opm::ParserKeyword get_PERMFACT(); + const ::Opm::ParserKeyword get_PERMJFUN(); + const ::Opm::ParserKeyword get_PERMR(); + const ::Opm::ParserKeyword get_PERMTHT(); + const ::Opm::ParserKeyword get_PERMX(); + const ::Opm::ParserKeyword get_PERMXY(); + const ::Opm::ParserKeyword get_PERMY(); + const ::Opm::ParserKeyword get_PERMYZ(); + const ::Opm::ParserKeyword get_PERMZ(); + const ::Opm::ParserKeyword get_PERMZX(); + const ::Opm::ParserKeyword get_PETGRID(); + const ::Opm::ParserKeyword get_PETOPTS(); + const ::Opm::ParserKeyword get_PICOND(); + const ::Opm::ParserKeyword get_PIMTDIMS(); + const ::Opm::ParserKeyword get_PIMULTAB(); + const ::Opm::ParserKeyword get_PINCH(); + const ::Opm::ParserKeyword get_PINCHNUM(); + const ::Opm::ParserKeyword get_PINCHOUT(); + const ::Opm::ParserKeyword get_PINCHREG(); + const ::Opm::ParserKeyword get_PINCHXY(); + const ::Opm::ParserKeyword get_PINTDIMS(); + const ::Opm::ParserKeyword get_PLMIXNUM(); + const ::Opm::ParserKeyword get_PLMIXPAR(); + const ::Opm::ParserKeyword get_PLYADS(); + const ::Opm::ParserKeyword get_PLYADSS(); + const ::Opm::ParserKeyword get_PLYATEMP(); + const ::Opm::ParserKeyword get_PLYCAMAX(); + const ::Opm::ParserKeyword get_PLYDHFLF(); + const ::Opm::ParserKeyword get_PLYESAL(); + const ::Opm::ParserKeyword get_PLYKRRF(); + const ::Opm::ParserKeyword get_PLYMAX(); + const ::Opm::ParserKeyword get_PLYMWINJ(); + const ::Opm::ParserKeyword get_PLYOPTS(); + const ::Opm::ParserKeyword get_PLYRMDEN(); + const ::Opm::ParserKeyword get_PLYROCK(); + const ::Opm::ParserKeyword get_PLYROCKM(); + const ::Opm::ParserKeyword get_PLYSHEAR(); + const ::Opm::ParserKeyword get_PLYSHLOG(); + const ::Opm::ParserKeyword get_PLYTRRF(); + const ::Opm::ParserKeyword get_PLYTRRFA(); + const ::Opm::ParserKeyword get_PLYVISC(); + const ::Opm::ParserKeyword get_PLYVISCS(); + const ::Opm::ParserKeyword get_PLYVISCT(); + const ::Opm::ParserKeyword get_PLYVMH(); + const ::Opm::ParserKeyword get_PLYVSCST(); + const ::Opm::ParserKeyword get_PMAX(); + const ::Opm::ParserKeyword get_PMISC(); + const ::Opm::ParserKeyword get_POELCOEF(); + const ::Opm::ParserKeyword get_POLYMER(); + const ::Opm::ParserKeyword get_POLYMW(); + const ::Opm::ParserKeyword get_PORO(); + const ::Opm::ParserKeyword get_PORV(); + const ::Opm::ParserKeyword get_PPCWMAX(); + const ::Opm::ParserKeyword get_PRATIO(); + const ::Opm::ParserKeyword get_PRECSALT(); + const ::Opm::ParserKeyword get_PREF(); + const ::Opm::ParserKeyword get_PREFS(); + const ::Opm::ParserKeyword get_PRESSURE(); + const ::Opm::ParserKeyword get_PRIORITY(); + const ::Opm::ParserKeyword get_PROPS(); + const ::Opm::ParserKeyword get_PRORDER(); + const ::Opm::ParserKeyword get_PRVD(); + const ::Opm::ParserKeyword get_PSTEADY(); + const ::Opm::ParserKeyword get_PSWRG(); + const ::Opm::ParserKeyword get_PSWRO(); + const ::Opm::ParserKeyword get_PVCDO(); + const ::Opm::ParserKeyword get_PVCO(); + const ::Opm::ParserKeyword get_PVDG(); + const ::Opm::ParserKeyword get_PVDO(); + const ::Opm::ParserKeyword get_PVDS(); + const ::Opm::ParserKeyword get_PVTG(); + const ::Opm::ParserKeyword get_PVTGW(); + const ::Opm::ParserKeyword get_PVTGWO(); + const ::Opm::ParserKeyword get_PVTNUM(); + const ::Opm::ParserKeyword get_PVTO(); + const ::Opm::ParserKeyword get_PVTSOL(); + const ::Opm::ParserKeyword get_PVTW(); + const ::Opm::ParserKeyword get_PVTWSALT(); + const ::Opm::ParserKeyword get_PVT_M(); + const ::Opm::ParserKeyword get_PVZG(); + const ::Opm::ParserKeyword get_PYACTION(); + const ::Opm::ParserKeyword get_PYINPUT(); + const ::Opm::ParserKeyword get_QDRILL(); + const ::Opm::ParserKeyword get_QHRATING(); + const ::Opm::ParserKeyword get_QMOBIL(); + const ::Opm::ParserKeyword get_RADFIN(); + const ::Opm::ParserKeyword get_RADFIN4(); + const ::Opm::ParserKeyword get_RADIAL(); + const ::Opm::ParserKeyword get_RAINFALL(); + const ::Opm::ParserKeyword get_RBEDCONT(); + const ::Opm::ParserKeyword get_RCMASTS(); + const ::Opm::ParserKeyword get_REACHES(); + const ::Opm::ParserKeyword get_READDATA(); + const ::Opm::ParserKeyword get_REFINE(); + const ::Opm::ParserKeyword get_REGDIMS(); + const ::Opm::ParserKeyword get_REGION2REGION_PROBE(); + const ::Opm::ParserKeyword get_REGION2REGION_PROBE_E300(); + const ::Opm::ParserKeyword get_REGIONS(); + const ::Opm::ParserKeyword get_REGION_PROBE(); + const ::Opm::ParserKeyword get_REGION_PROBE_OPM(); + const ::Opm::ParserKeyword get_RESIDNUM(); + const ::Opm::ParserKeyword get_RESTART(); + const ::Opm::ParserKeyword get_RESVNUM(); + const ::Opm::ParserKeyword get_RHO(); + const ::Opm::ParserKeyword get_RIVDEBUG(); + const ::Opm::ParserKeyword get_RIVERSYS(); + const ::Opm::ParserKeyword get_RIVRDIMS(); + const ::Opm::ParserKeyword get_RIVRPROP(); + const ::Opm::ParserKeyword get_RIVRXSEC(); + const ::Opm::ParserKeyword get_RIVSALT(); + const ::Opm::ParserKeyword get_RIVTRACE(); + const ::Opm::ParserKeyword get_RKTRMDIR(); + const ::Opm::ParserKeyword get_ROCK(); + const ::Opm::ParserKeyword get_ROCK2D(); + const ::Opm::ParserKeyword get_ROCK2DTR(); + const ::Opm::ParserKeyword get_ROCKCOMP(); + const ::Opm::ParserKeyword get_ROCKFRAC(); + const ::Opm::ParserKeyword get_ROCKNUM(); + const ::Opm::ParserKeyword get_ROCKOPTS(); + const ::Opm::ParserKeyword get_ROCKPAMA(); + const ::Opm::ParserKeyword get_ROCKTAB(); + const ::Opm::ParserKeyword get_ROCKTABH(); + const ::Opm::ParserKeyword get_ROCKTABW(); + const ::Opm::ParserKeyword get_ROCKTHSG(); + const ::Opm::ParserKeyword get_ROCKTSIG(); + const ::Opm::ParserKeyword get_ROCKV(); + const ::Opm::ParserKeyword get_ROCKWNOD(); + const ::Opm::ParserKeyword get_RPTCPL(); + const ::Opm::ParserKeyword get_RPTGRID(); + const ::Opm::ParserKeyword get_RPTGRIDL(); + const ::Opm::ParserKeyword get_RPTHMD(); + const ::Opm::ParserKeyword get_RPTHMG(); + const ::Opm::ParserKeyword get_RPTHMW(); + const ::Opm::ParserKeyword get_RPTINIT(); + const ::Opm::ParserKeyword get_RPTISOL(); + const ::Opm::ParserKeyword get_RPTONLY(); + const ::Opm::ParserKeyword get_RPTONLYO(); + const ::Opm::ParserKeyword get_RPTPROPS(); + const ::Opm::ParserKeyword get_RPTREGS(); + const ::Opm::ParserKeyword get_RPTRST(); + const ::Opm::ParserKeyword get_RPTRUNSP(); + const ::Opm::ParserKeyword get_RPTSCHED(); + const ::Opm::ParserKeyword get_RPTSMRY(); + const ::Opm::ParserKeyword get_RPTSOL(); + const ::Opm::ParserKeyword get_RS(); + const ::Opm::ParserKeyword get_RSCONST(); + const ::Opm::ParserKeyword get_RSCONSTT(); + const ::Opm::ParserKeyword get_RSGI(); + const ::Opm::ParserKeyword get_RSSPEC(); + const ::Opm::ParserKeyword get_RSVD(); + const ::Opm::ParserKeyword get_RTEMP(); + const ::Opm::ParserKeyword get_RTEMPA(); + const ::Opm::ParserKeyword get_RTEMPVD(); + const ::Opm::ParserKeyword get_RUNSPEC(); + const ::Opm::ParserKeyword get_RUNSUM(); + const ::Opm::ParserKeyword get_RV(); + const ::Opm::ParserKeyword get_RVCONST(); + const ::Opm::ParserKeyword get_RVCONSTT(); + const ::Opm::ParserKeyword get_RVGI(); + const ::Opm::ParserKeyword get_RVVD(); + const ::Opm::ParserKeyword get_RVW(); + const ::Opm::ParserKeyword get_RVWVD(); + const ::Opm::ParserKeyword get_RWGSALT(); + const ::Opm::ParserKeyword get_SALINITY(); + const ::Opm::ParserKeyword get_SALT(); + const ::Opm::ParserKeyword get_SALTMF(); + const ::Opm::ParserKeyword get_SALTNODE(); + const ::Opm::ParserKeyword get_SALTP(); + const ::Opm::ParserKeyword get_SALTPVD(); + const ::Opm::ParserKeyword get_SALTREST(); + const ::Opm::ParserKeyword get_SALTSOL(); + const ::Opm::ParserKeyword get_SALTVD(); + const ::Opm::ParserKeyword get_SAMG(); + const ::Opm::ParserKeyword get_SATNUM(); + const ::Opm::ParserKeyword get_SATOPTS(); + const ::Opm::ParserKeyword get_SAVE(); + const ::Opm::ParserKeyword get_SBIOF(); + const ::Opm::ParserKeyword get_SCALC(); + const ::Opm::ParserKeyword get_SCALECRS(); + const ::Opm::ParserKeyword get_SCALELIM(); + const ::Opm::ParserKeyword get_SCDATAB(); + const ::Opm::ParserKeyword get_SCDETAB(); + const ::Opm::ParserKeyword get_SCDPDIMS(); + const ::Opm::ParserKeyword get_SCDPTAB(); + const ::Opm::ParserKeyword get_SCDPTRAC(); + const ::Opm::ParserKeyword get_SCHEDULE(); + const ::Opm::ParserKeyword get_SCVD(); + const ::Opm::ParserKeyword get_SDENSITY(); + const ::Opm::ParserKeyword get_SEGMENT_PROBE(); + const ::Opm::ParserKeyword get_SEPARATE(); + const ::Opm::ParserKeyword get_SEPVALS(); + const ::Opm::ParserKeyword get_SFOAM(); + const ::Opm::ParserKeyword get_SGAS(); + const ::Opm::ParserKeyword get_SGCR(); + const ::Opm::ParserKeyword get_SGCWMIS(); + const ::Opm::ParserKeyword get_SGF32D(); + const ::Opm::ParserKeyword get_SGFN(); + const ::Opm::ParserKeyword get_SGL(); + const ::Opm::ParserKeyword get_SGLPC(); + const ::Opm::ParserKeyword get_SGOF(); + const ::Opm::ParserKeyword get_SGOFLET(); + const ::Opm::ParserKeyword get_SGU(); + const ::Opm::ParserKeyword get_SGWFN(); + const ::Opm::ParserKeyword get_SHRATE(); + const ::Opm::ParserKeyword get_SIGMA(); + const ::Opm::ParserKeyword get_SIGMAGDV(); + const ::Opm::ParserKeyword get_SIGMATH(); + const ::Opm::ParserKeyword get_SIGMAV(); + const ::Opm::ParserKeyword get_SIMULATE(); + const ::Opm::ParserKeyword get_SKIP(); + const ::Opm::ParserKeyword get_SKIP100(); + const ::Opm::ParserKeyword get_SKIP300(); + const ::Opm::ParserKeyword get_SKIPREST(); + const ::Opm::ParserKeyword get_SKPRPOLY(); + const ::Opm::ParserKeyword get_SKPRWAT(); + const ::Opm::ParserKeyword get_SKRO(); + const ::Opm::ParserKeyword get_SKRORG(); + const ::Opm::ParserKeyword get_SKRORW(); + const ::Opm::ParserKeyword get_SKRW(); + const ::Opm::ParserKeyword get_SKRWR(); + const ::Opm::ParserKeyword get_SLAVES(); + const ::Opm::ParserKeyword get_SLGOF(); + const ::Opm::ParserKeyword get_SMICR(); + const ::Opm::ParserKeyword get_SMRYDIMS(); + const ::Opm::ParserKeyword get_SMULTX(); + const ::Opm::ParserKeyword get_SMULTY(); + const ::Opm::ParserKeyword get_SMULTZ(); + const ::Opm::ParserKeyword get_SOCRS(); + const ::Opm::ParserKeyword get_SOF2(); + const ::Opm::ParserKeyword get_SOF3(); + const ::Opm::ParserKeyword get_SOF32D(); + const ::Opm::ParserKeyword get_SOGCR(); + const ::Opm::ParserKeyword get_SOIL(); + const ::Opm::ParserKeyword get_SOLID(); + const ::Opm::ParserKeyword get_SOLUTION(); + const ::Opm::ParserKeyword get_SOLVCONC(); + const ::Opm::ParserKeyword get_SOLVDIMS(); + const ::Opm::ParserKeyword get_SOLVDIRS(); + const ::Opm::ParserKeyword get_SOLVENT(); + const ::Opm::ParserKeyword get_SOLVFRAC(); + const ::Opm::ParserKeyword get_SOLVNUM(); + const ::Opm::ParserKeyword get_SOMGAS(); + const ::Opm::ParserKeyword get_SOMWAT(); + const ::Opm::ParserKeyword get_SORWMIS(); + const ::Opm::ParserKeyword get_SOURCE(); + const ::Opm::ParserKeyword get_SOWCR(); + const ::Opm::ParserKeyword get_SOXYG(); + const ::Opm::ParserKeyword get_SPECGRID(); + const ::Opm::ParserKeyword get_SPECHEAT(); + const ::Opm::ParserKeyword get_SPECROCK(); + const ::Opm::ParserKeyword get_SPIDER(); + const ::Opm::ParserKeyword get_SPOLY(); + const ::Opm::ParserKeyword get_SPOLYMW(); + const ::Opm::ParserKeyword get_SSFN(); + const ::Opm::ParserKeyword get_SSGCR(); + const ::Opm::ParserKeyword get_SSGL(); + const ::Opm::ParserKeyword get_SSOGCR(); + const ::Opm::ParserKeyword get_SSOL(); + const ::Opm::ParserKeyword get_SSOWCR(); + const ::Opm::ParserKeyword get_SSWCR(); + const ::Opm::ParserKeyword get_SSWL(); + const ::Opm::ParserKeyword get_SSWU(); + const ::Opm::ParserKeyword get_START(); + const ::Opm::ParserKeyword get_STCOND(); + const ::Opm::ParserKeyword get_STOG(); + const ::Opm::ParserKeyword get_STONE(); + const ::Opm::ParserKeyword get_STONE1(); + const ::Opm::ParserKeyword get_STONE1EX(); + const ::Opm::ParserKeyword get_STONE2(); + const ::Opm::ParserKeyword get_STOW(); + const ::Opm::ParserKeyword get_STREQUIL(); + const ::Opm::ParserKeyword get_STRESSEQUILNUM(); + const ::Opm::ParserKeyword get_STWG(); + const ::Opm::ParserKeyword get_SUMMARY(); + const ::Opm::ParserKeyword get_SUMTHIN(); + const ::Opm::ParserKeyword get_SUREA(); + const ::Opm::ParserKeyword get_SURF(); + const ::Opm::ParserKeyword get_SURFACT(); + const ::Opm::ParserKeyword get_SURFACTW(); + const ::Opm::ParserKeyword get_SURFADDW(); + const ::Opm::ParserKeyword get_SURFADS(); + const ::Opm::ParserKeyword get_SURFCAPD(); + const ::Opm::ParserKeyword get_SURFESAL(); + const ::Opm::ParserKeyword get_SURFNUM(); + const ::Opm::ParserKeyword get_SURFOPTS(); + const ::Opm::ParserKeyword get_SURFROCK(); + const ::Opm::ParserKeyword get_SURFST(); + const ::Opm::ParserKeyword get_SURFSTES(); + const ::Opm::ParserKeyword get_SURFVISC(); + const ::Opm::ParserKeyword get_SURFWNUM(); + const ::Opm::ParserKeyword get_SWAT(); + const ::Opm::ParserKeyword get_SWATINIT(); + const ::Opm::ParserKeyword get_SWCR(); + const ::Opm::ParserKeyword get_SWF32D(); + const ::Opm::ParserKeyword get_SWFN(); + const ::Opm::ParserKeyword get_SWINGFAC(); + const ::Opm::ParserKeyword get_SWL(); + const ::Opm::ParserKeyword get_SWLPC(); + const ::Opm::ParserKeyword get_SWOF(); + const ::Opm::ParserKeyword get_SWOFLET(); + const ::Opm::ParserKeyword get_SWU(); + const ::Opm::ParserKeyword get_TABDIMS(); + const ::Opm::ParserKeyword get_TBLK(); + const ::Opm::ParserKeyword get_TCRIT(); + const ::Opm::ParserKeyword get_TEMP(); + const ::Opm::ParserKeyword get_TEMPI(); + const ::Opm::ParserKeyword get_TEMPNODE(); + const ::Opm::ParserKeyword get_TEMPTVD(); + const ::Opm::ParserKeyword get_TEMPVD(); + const ::Opm::ParserKeyword get_THCGAS(); + const ::Opm::ParserKeyword get_THCO2MIX(); + const ::Opm::ParserKeyword get_THCOIL(); + const ::Opm::ParserKeyword get_THCONR(); + const ::Opm::ParserKeyword get_THCONSF(); + const ::Opm::ParserKeyword get_THCROCK(); + const ::Opm::ParserKeyword get_THCWATER(); + const ::Opm::ParserKeyword get_THELCOEF(); + const ::Opm::ParserKeyword get_THERMAL(); + const ::Opm::ParserKeyword get_THERMEXR(); + const ::Opm::ParserKeyword get_THPRES(); + const ::Opm::ParserKeyword get_THPRESFT(); + const ::Opm::ParserKeyword get_TIGHTEN(); + const ::Opm::ParserKeyword get_TIGHTENP(); + const ::Opm::ParserKeyword get_TIME(); + const ::Opm::ParserKeyword get_TITLE(); + const ::Opm::ParserKeyword get_TLMIXPAR(); + const ::Opm::ParserKeyword get_TLPMIXPA(); + const ::Opm::ParserKeyword get_TNUM(); + const ::Opm::ParserKeyword get_TOLCRIT(); + const ::Opm::ParserKeyword get_TOPS(); + const ::Opm::ParserKeyword get_TPAMEPS(); + const ::Opm::ParserKeyword get_TPAMEPSS(); + const ::Opm::ParserKeyword get_TRACER(); + const ::Opm::ParserKeyword get_TRACERKM(); + const ::Opm::ParserKeyword get_TRACERKP(); + const ::Opm::ParserKeyword get_TRACERS(); + const ::Opm::ParserKeyword get_TRACITVD(); + const ::Opm::ParserKeyword get_TRACTVD(); + const ::Opm::ParserKeyword get_TRADS(); + const ::Opm::ParserKeyword get_TRANGL(); + const ::Opm::ParserKeyword get_TRANR(); + const ::Opm::ParserKeyword get_TRANTHT(); + const ::Opm::ParserKeyword get_TRANX(); + const ::Opm::ParserKeyword get_TRANY(); + const ::Opm::ParserKeyword get_TRANZ(); + const ::Opm::ParserKeyword get_TRDCY(); + const ::Opm::ParserKeyword get_TRDIF(); + const ::Opm::ParserKeyword get_TRDIS(); + const ::Opm::ParserKeyword get_TREF(); + const ::Opm::ParserKeyword get_TREFS(); + const ::Opm::ParserKeyword get_TRKPF(); + const ::Opm::ParserKeyword get_TRNHD(); + const ::Opm::ParserKeyword get_TRPLPORO(); + const ::Opm::ParserKeyword get_TRROCK(); + const ::Opm::ParserKeyword get_TSTEP(); + const ::Opm::ParserKeyword get_TUNING(); + const ::Opm::ParserKeyword get_TUNINGDP(); + const ::Opm::ParserKeyword get_TUNINGH(); + const ::Opm::ParserKeyword get_TUNINGL(); + const ::Opm::ParserKeyword get_TUNINGS(); + const ::Opm::ParserKeyword get_TVDP(); + const ::Opm::ParserKeyword get_TZONE(); + const ::Opm::ParserKeyword get_UDADIMS(); + const ::Opm::ParserKeyword get_UDQ(); + const ::Opm::ParserKeyword get_UDQDIMS(); + const ::Opm::ParserKeyword get_UDQPARAM(); + const ::Opm::ParserKeyword get_UDT(); + const ::Opm::ParserKeyword get_UDTDIMS(); + const ::Opm::ParserKeyword get_UNCODHMD(); + const ::Opm::ParserKeyword get_UNIFIN(); + const ::Opm::ParserKeyword get_UNIFOUT(); + const ::Opm::ParserKeyword get_UNIFOUTS(); + const ::Opm::ParserKeyword get_UNIFSAVE(); + const ::Opm::ParserKeyword get_USECUPL(); + const ::Opm::ParserKeyword get_USEFLUX(); + const ::Opm::ParserKeyword get_USENOFLO(); + const ::Opm::ParserKeyword get_VAPOIL(); + const ::Opm::ParserKeyword get_VAPPARS(); + const ::Opm::ParserKeyword get_VAPWAT(); + const ::Opm::ParserKeyword get_VCRIT(); + const ::Opm::ParserKeyword get_VDFLOW(); + const ::Opm::ParserKeyword get_VDFLOWR(); + const ::Opm::ParserKeyword get_VE(); + const ::Opm::ParserKeyword get_VEDEBUG(); + const ::Opm::ParserKeyword get_VEFIN(); + const ::Opm::ParserKeyword get_VEFRAC(); + const ::Opm::ParserKeyword get_VEFRACP(); + const ::Opm::ParserKeyword get_VEFRACPV(); + const ::Opm::ParserKeyword get_VEFRACV(); + const ::Opm::ParserKeyword get_VFPCHK(); + const ::Opm::ParserKeyword get_VFPIDIMS(); + const ::Opm::ParserKeyword get_VFPINJ(); + const ::Opm::ParserKeyword get_VFPPDIMS(); + const ::Opm::ParserKeyword get_VFPPROD(); + const ::Opm::ParserKeyword get_VFPTABL(); + const ::Opm::ParserKeyword get_VISAGE(); + const ::Opm::ParserKeyword get_VISCAQA(); + const ::Opm::ParserKeyword get_VISCD(); + const ::Opm::ParserKeyword get_VISCREF(); + const ::Opm::ParserKeyword get_VISDATES(); + const ::Opm::ParserKeyword get_VISOPTS(); + const ::Opm::ParserKeyword get_WAGHYSTR(); + const ::Opm::ParserKeyword get_WAITBAL(); + const ::Opm::ParserKeyword get_WALKALIN(); + const ::Opm::ParserKeyword get_WALQCALC(); + const ::Opm::ParserKeyword get_WAPI(); + const ::Opm::ParserKeyword get_WARN(); + const ::Opm::ParserKeyword get_WATDENT(); + const ::Opm::ParserKeyword get_WATER(); + const ::Opm::ParserKeyword get_WATJT(); + const ::Opm::ParserKeyword get_WATVISCT(); + const ::Opm::ParserKeyword get_WBHGLR(); + const ::Opm::ParserKeyword get_WBOREVOL(); + const ::Opm::ParserKeyword get_WCALCVAL(); + const ::Opm::ParserKeyword get_WCONHIST(); + const ::Opm::ParserKeyword get_WCONINJ(); + const ::Opm::ParserKeyword get_WCONINJE(); + const ::Opm::ParserKeyword get_WCONINJH(); + const ::Opm::ParserKeyword get_WCONINJP(); + const ::Opm::ParserKeyword get_WCONPROD(); + const ::Opm::ParserKeyword get_WCUTBACK(); + const ::Opm::ParserKeyword get_WCUTBACT(); + const ::Opm::ParserKeyword get_WCYCLE(); + const ::Opm::ParserKeyword get_WDFAC(); + const ::Opm::ParserKeyword get_WDFACCOR(); + const ::Opm::ParserKeyword get_WDRILPRI(); + const ::Opm::ParserKeyword get_WDRILRES(); + const ::Opm::ParserKeyword get_WDRILTIM(); + const ::Opm::ParserKeyword get_WECON(); + const ::Opm::ParserKeyword get_WECONINJ(); + const ::Opm::ParserKeyword get_WECONT(); + const ::Opm::ParserKeyword get_WEFAC(); + const ::Opm::ParserKeyword get_WELCNTL(); + const ::Opm::ParserKeyword get_WELDEBUG(); + const ::Opm::ParserKeyword get_WELDRAW(); + const ::Opm::ParserKeyword get_WELEVNT(); + const ::Opm::ParserKeyword get_WELLDIMS(); + const ::Opm::ParserKeyword get_WELLSTRE(); + const ::Opm::ParserKeyword get_WELL_COMPLETION_PROBE(); + const ::Opm::ParserKeyword get_WELL_PROBE(); + const ::Opm::ParserKeyword get_WELL_PROBE_COMP(); + const ::Opm::ParserKeyword get_WELL_PROBE_OPM(); + const ::Opm::ParserKeyword get_WELMOVEL(); + const ::Opm::ParserKeyword get_WELOPEN(); + const ::Opm::ParserKeyword get_WELOPENL(); + const ::Opm::ParserKeyword get_WELPI(); + const ::Opm::ParserKeyword get_WELPRI(); + const ::Opm::ParserKeyword get_WELSEGS(); + const ::Opm::ParserKeyword get_WELSOMIN(); + const ::Opm::ParserKeyword get_WELSPECL(); + const ::Opm::ParserKeyword get_WELSPECS(); + const ::Opm::ParserKeyword get_WELTARG(); + const ::Opm::ParserKeyword get_WELTRAJ(); + const ::Opm::ParserKeyword get_WFOAM(); + const ::Opm::ParserKeyword get_WFRICSEG(); + const ::Opm::ParserKeyword get_WFRICSGL(); + const ::Opm::ParserKeyword get_WFRICTN(); + const ::Opm::ParserKeyword get_WFRICTNL(); + const ::Opm::ParserKeyword get_WGASPROD(); + const ::Opm::ParserKeyword get_WGORPEN(); + const ::Opm::ParserKeyword get_WGRUPCON(); + const ::Opm::ParserKeyword get_WH2NUM(); + const ::Opm::ParserKeyword get_WH3NUM(); + const ::Opm::ParserKeyword get_WHEDREFD(); + const ::Opm::ParserKeyword get_WHISTCTL(); + const ::Opm::ParserKeyword get_WHTEMP(); + const ::Opm::ParserKeyword get_WINJCLN(); + const ::Opm::ParserKeyword get_WINJDAM(); + const ::Opm::ParserKeyword get_WINJFCNC(); + const ::Opm::ParserKeyword get_WINJGAS(); + const ::Opm::ParserKeyword get_WINJMULT(); + const ::Opm::ParserKeyword get_WINJTEMP(); + const ::Opm::ParserKeyword get_WLIFT(); + const ::Opm::ParserKeyword get_WLIFTOPT(); + const ::Opm::ParserKeyword get_WLIMTOL(); + const ::Opm::ParserKeyword get_WLIST(); + const ::Opm::ParserKeyword get_WLISTARG(); + const ::Opm::ParserKeyword get_WLISTNAM(); + const ::Opm::ParserKeyword get_WMICP(); + const ::Opm::ParserKeyword get_WNETCTRL(); + const ::Opm::ParserKeyword get_WNETDP(); + const ::Opm::ParserKeyword get_WORKLIM(); + const ::Opm::ParserKeyword get_WORKTHP(); + const ::Opm::ParserKeyword get_WPAVE(); + const ::Opm::ParserKeyword get_WPAVEDEP(); + const ::Opm::ParserKeyword get_WPIMULT(); + const ::Opm::ParserKeyword get_WPIMULTL(); + const ::Opm::ParserKeyword get_WPITAB(); + const ::Opm::ParserKeyword get_WPLUG(); + const ::Opm::ParserKeyword get_WPMITAB(); + const ::Opm::ParserKeyword get_WPOLYMER(); + const ::Opm::ParserKeyword get_WPOLYRED(); + const ::Opm::ParserKeyword get_WPOTCALC(); + const ::Opm::ParserKeyword get_WREGROUP(); + const ::Opm::ParserKeyword get_WRFT(); + const ::Opm::ParserKeyword get_WRFTPLT(); + const ::Opm::ParserKeyword get_WSALT(); + const ::Opm::ParserKeyword get_WSCCLEAN(); + const ::Opm::ParserKeyword get_WSCCLENL(); + const ::Opm::ParserKeyword get_WSCTAB(); + const ::Opm::ParserKeyword get_WSEGAICD(); + const ::Opm::ParserKeyword get_WSEGDFIN(); + const ::Opm::ParserKeyword get_WSEGDFMD(); + const ::Opm::ParserKeyword get_WSEGDFPA(); + const ::Opm::ParserKeyword get_WSEGDIMS(); + const ::Opm::ParserKeyword get_WSEGEXSS(); + const ::Opm::ParserKeyword get_WSEGFLIM(); + const ::Opm::ParserKeyword get_WSEGFMOD(); + const ::Opm::ParserKeyword get_WSEGINIT(); + const ::Opm::ParserKeyword get_WSEGITER(); + const ::Opm::ParserKeyword get_WSEGLABY(); + const ::Opm::ParserKeyword get_WSEGLINK(); + const ::Opm::ParserKeyword get_WSEGMULT(); + const ::Opm::ParserKeyword get_WSEGPROP(); + const ::Opm::ParserKeyword get_WSEGSEP(); + const ::Opm::ParserKeyword get_WSEGSICD(); + const ::Opm::ParserKeyword get_WSEGSOLV(); + const ::Opm::ParserKeyword get_WSEGTABL(); + const ::Opm::ParserKeyword get_WSEGVALV(); + const ::Opm::ParserKeyword get_WSF(); + const ::Opm::ParserKeyword get_WSKPTAB(); + const ::Opm::ParserKeyword get_WSOLVENT(); + const ::Opm::ParserKeyword get_WSURFACT(); + const ::Opm::ParserKeyword get_WTADD(); + const ::Opm::ParserKeyword get_WTEMP(); + const ::Opm::ParserKeyword get_WTEMPQ(); + const ::Opm::ParserKeyword get_WTEST(); + const ::Opm::ParserKeyword get_WTHPMAX(); + const ::Opm::ParserKeyword get_WTMULT(); + const ::Opm::ParserKeyword get_WTRACER(); + const ::Opm::ParserKeyword get_WVFPDP(); + const ::Opm::ParserKeyword get_WVFPEXP(); + const ::Opm::ParserKeyword get_WWPAVE(); + const ::Opm::ParserKeyword get_XMF(); + const ::Opm::ParserKeyword get_YMF(); + const ::Opm::ParserKeyword get_YMODULE(); + const ::Opm::ParserKeyword get_ZCORN(); + const ::Opm::ParserKeyword get_ZFACT1(); + const ::Opm::ParserKeyword get_ZFACT1S(); + const ::Opm::ParserKeyword get_ZFACTOR(); + const ::Opm::ParserKeyword get_ZFACTORS(); + const ::Opm::ParserKeyword get_ZIPP2OFF(); + const ::Opm::ParserKeyword get_ZIPPY2(); + const ::Opm::ParserKeyword get_ZMF(); + const ::Opm::ParserKeyword get_ZMFVD(); - const ::Opm::ParserKeyword& operator[](const std::string& keyword) const { - if (this->keywords.empty()) { - this->keywords.emplace("ACTDIMS", this->ACTDIMS); - this->keywords.emplace("ACTION", this->ACTION); - this->keywords.emplace("ACTIONG", this->ACTIONG); - this->keywords.emplace("ACTIONR", this->ACTIONR); - this->keywords.emplace("ACTIONS", this->ACTIONS); - this->keywords.emplace("ACTIONW", this->ACTIONW); - this->keywords.emplace("ACTIONX", this->ACTIONX); - this->keywords.emplace("ACTNUM", this->ACTNUM); - this->keywords.emplace("ACTPARAM", this->ACTPARAM); - this->keywords.emplace("ADD", this->ADD); - this->keywords.emplace("ADDREG", this->ADDREG); - this->keywords.emplace("ADDZCORN", this->ADDZCORN); - this->keywords.emplace("ADSALNOD", this->ADSALNOD); - this->keywords.emplace("ADSORP", this->ADSORP); - this->keywords.emplace("AITS", this->AITS); - this->keywords.emplace("AITSOFF", this->AITSOFF); - this->keywords.emplace("ALKADS", this->ALKADS); - this->keywords.emplace("ALKALINE", this->ALKALINE); - this->keywords.emplace("ALKROCK", this->ALKROCK); - this->keywords.emplace("ALL", this->ALL); - this->keywords.emplace("ALPOLADS", this->ALPOLADS); - this->keywords.emplace("ALSURFAD", this->ALSURFAD); - this->keywords.emplace("ALSURFST", this->ALSURFST); - this->keywords.emplace("AMALGAM", this->AMALGAM); - this->keywords.emplace("API", this->API); - this->keywords.emplace("APIGROUP", this->APIGROUP); - this->keywords.emplace("APILIM", this->APILIM); - this->keywords.emplace("APIVD", this->APIVD); - this->keywords.emplace("AQANCONL", this->AQANCONL); - this->keywords.emplace("AQANNC", this->AQANNC); - this->keywords.emplace("AQANTRC", this->AQANTRC); - this->keywords.emplace("AQUALIST", this->AQUALIST); - this->keywords.emplace("AQUANCON", this->AQUANCON); - this->keywords.emplace("AQUCHGAS", this->AQUCHGAS); - this->keywords.emplace("AQUCHWAT", this->AQUCHWAT); - this->keywords.emplace("AQUCON", this->AQUCON); - this->keywords.emplace("AQUCT", this->AQUCT); - this->keywords.emplace("AQUCWFAC", this->AQUCWFAC); - this->keywords.emplace("AQUDIMS", this->AQUDIMS); - this->keywords.emplace("AQUFET", this->AQUFET); - this->keywords.emplace("AQUFETP", this->AQUFETP); - this->keywords.emplace("AQUFLUX", this->AQUFLUX); - this->keywords.emplace("AQUIFER_PROBE_ANALYTIC", this->AQUIFER_PROBE_ANALYTIC); - this->keywords.emplace("AQUIFER_PROBE_ANALYTIC_NAMED", this->AQUIFER_PROBE_ANALYTIC_NAMED); - this->keywords.emplace("AQUIFER_PROBE_NUMERIC", this->AQUIFER_PROBE_NUMERIC); - this->keywords.emplace("AQUNNC", this->AQUNNC); - this->keywords.emplace("AQUNUM", this->AQUNUM); - this->keywords.emplace("AQUTAB", this->AQUTAB); - this->keywords.emplace("AUTOCOAR", this->AUTOCOAR); - this->keywords.emplace("AUTOREF", this->AUTOREF); - this->keywords.emplace("BC", this->BC); - this->keywords.emplace("BDENSITY", this->BDENSITY); - this->keywords.emplace("BGGI", this->BGGI); - this->keywords.emplace("BIGMODEL", this->BIGMODEL); - this->keywords.emplace("BLACKOIL", this->BLACKOIL); - this->keywords.emplace("BLOCK_PROBE", this->BLOCK_PROBE); - this->keywords.emplace("BLOCK_PROBE300", this->BLOCK_PROBE300); - this->keywords.emplace("BOGI", this->BOGI); - this->keywords.emplace("BOUNDARY", this->BOUNDARY); - this->keywords.emplace("BOX", this->BOX); - this->keywords.emplace("BPARA", this->BPARA); - this->keywords.emplace("BPIDIMS", this->BPIDIMS); - this->keywords.emplace("BRANPROP", this->BRANPROP); - this->keywords.emplace("BRINE", this->BRINE); - this->keywords.emplace("BTOBALFA", this->BTOBALFA); - this->keywords.emplace("BTOBALFV", this->BTOBALFV); - this->keywords.emplace("CALTRAC", this->CALTRAC); - this->keywords.emplace("CARFIN", this->CARFIN); - this->keywords.emplace("CART", this->CART); - this->keywords.emplace("CBMOPTS", this->CBMOPTS); - this->keywords.emplace("CECON", this->CECON); - this->keywords.emplace("CECONT", this->CECONT); - this->keywords.emplace("CIRCLE", this->CIRCLE); - this->keywords.emplace("CO2STOR", this->CO2STOR); - this->keywords.emplace("CO2STORE", this->CO2STORE); - this->keywords.emplace("COAL", this->COAL); - this->keywords.emplace("COALADS", this->COALADS); - this->keywords.emplace("COALNUM", this->COALNUM); - this->keywords.emplace("COALPP", this->COALPP); - this->keywords.emplace("COARSEN", this->COARSEN); - this->keywords.emplace("COLLAPSE", this->COLLAPSE); - this->keywords.emplace("COLUMNS", this->COLUMNS); - this->keywords.emplace("COMPDAT", this->COMPDAT); - this->keywords.emplace("COMPDATX", this->COMPDATX); - this->keywords.emplace("COMPFLSH", this->COMPFLSH); - this->keywords.emplace("COMPIMB", this->COMPIMB); - this->keywords.emplace("COMPINJK", this->COMPINJK); - this->keywords.emplace("COMPLMPL", this->COMPLMPL); - this->keywords.emplace("COMPLUMP", this->COMPLUMP); - this->keywords.emplace("COMPOFF", this->COMPOFF); - this->keywords.emplace("COMPORD", this->COMPORD); - this->keywords.emplace("COMPRIV", this->COMPRIV); - this->keywords.emplace("COMPRP", this->COMPRP); - this->keywords.emplace("COMPRPL", this->COMPRPL); - this->keywords.emplace("COMPS", this->COMPS); - this->keywords.emplace("COMPSEGL", this->COMPSEGL); - this->keywords.emplace("COMPSEGS", this->COMPSEGS); - this->keywords.emplace("COMPVE", this->COMPVE); - this->keywords.emplace("COMPVEL", this->COMPVEL); - this->keywords.emplace("CONNECTION_PROBE", this->CONNECTION_PROBE); - this->keywords.emplace("COORD", this->COORD); - this->keywords.emplace("COORDSYS", this->COORDSYS); - this->keywords.emplace("COPY", this->COPY); - this->keywords.emplace("COPYBOX", this->COPYBOX); - this->keywords.emplace("COPYREG", this->COPYREG); - this->keywords.emplace("CPIFACT", this->CPIFACT); - this->keywords.emplace("CPIFACTL", this->CPIFACTL); - this->keywords.emplace("CPR", this->CPR); - this->keywords.emplace("CREF", this->CREF); - this->keywords.emplace("CREFS", this->CREFS); - this->keywords.emplace("CRITPERM", this->CRITPERM); - this->keywords.emplace("CSKIN", this->CSKIN); - this->keywords.emplace("DATE", this->DATE); - this->keywords.emplace("DATES", this->DATES); - this->keywords.emplace("DATUM", this->DATUM); - this->keywords.emplace("DATUMR", this->DATUMR); - this->keywords.emplace("DATUMRX", this->DATUMRX); - this->keywords.emplace("DCQDEFN", this->DCQDEFN); - this->keywords.emplace("DEBUG_", this->DEBUG_); - this->keywords.emplace("DELAYACT", this->DELAYACT); - this->keywords.emplace("DENSITY", this->DENSITY); - this->keywords.emplace("DEPTH", this->DEPTH); - this->keywords.emplace("DEPTHTAB", this->DEPTHTAB); - this->keywords.emplace("DEPTHZ", this->DEPTHZ); - this->keywords.emplace("DIAGDISP", this->DIAGDISP); - this->keywords.emplace("DIFF", this->DIFF); - this->keywords.emplace("DIFFC", this->DIFFC); - this->keywords.emplace("DIFFCOAL", this->DIFFCOAL); - this->keywords.emplace("DIFFDP", this->DIFFDP); - this->keywords.emplace("DIFFMMF", this->DIFFMMF); - this->keywords.emplace("DIFFMR", this->DIFFMR); - this->keywords.emplace("DIFFMTHT", this->DIFFMTHT); - this->keywords.emplace("DIFFMX", this->DIFFMX); - this->keywords.emplace("DIFFMY", this->DIFFMY); - this->keywords.emplace("DIFFMZ", this->DIFFMZ); - this->keywords.emplace("DIFFR", this->DIFFR); - this->keywords.emplace("DIFFTHT", this->DIFFTHT); - this->keywords.emplace("DIFFUSE", this->DIFFUSE); - this->keywords.emplace("DIFFX", this->DIFFX); - this->keywords.emplace("DIFFY", this->DIFFY); - this->keywords.emplace("DIFFZ", this->DIFFZ); - this->keywords.emplace("DIMENS", this->DIMENS); - this->keywords.emplace("DIMPES", this->DIMPES); - this->keywords.emplace("DIMPLICT", this->DIMPLICT); - this->keywords.emplace("DISGAS", this->DISGAS); - this->keywords.emplace("DISPDIMS", this->DISPDIMS); - this->keywords.emplace("DISPERSE", this->DISPERSE); - this->keywords.emplace("DOMAINS", this->DOMAINS); - this->keywords.emplace("DPGRID", this->DPGRID); - this->keywords.emplace("DPKRMOD", this->DPKRMOD); - this->keywords.emplace("DPNUM", this->DPNUM); - this->keywords.emplace("DR", this->DR); - this->keywords.emplace("DREF", this->DREF); - this->keywords.emplace("DREFS", this->DREFS); - this->keywords.emplace("DRILPRI", this->DRILPRI); - this->keywords.emplace("DRSDT", this->DRSDT); - this->keywords.emplace("DRSDTCON", this->DRSDTCON); - this->keywords.emplace("DRSDTR", this->DRSDTR); - this->keywords.emplace("DRV", this->DRV); - this->keywords.emplace("DRVDT", this->DRVDT); - this->keywords.emplace("DRVDTR", this->DRVDTR); - this->keywords.emplace("DSPDEINT", this->DSPDEINT); - this->keywords.emplace("DTHETA", this->DTHETA); - this->keywords.emplace("DTHETAV", this->DTHETAV); - this->keywords.emplace("DUALPERM", this->DUALPERM); - this->keywords.emplace("DUALPORO", this->DUALPORO); - this->keywords.emplace("DUMPCUPL", this->DUMPCUPL); - this->keywords.emplace("DUMPFLUX", this->DUMPFLUX); - this->keywords.emplace("DX", this->DX); - this->keywords.emplace("DXV", this->DXV); - this->keywords.emplace("DY", this->DY); - this->keywords.emplace("DYNAMICR", this->DYNAMICR); - this->keywords.emplace("DYNRDIMS", this->DYNRDIMS); - this->keywords.emplace("DYV", this->DYV); - this->keywords.emplace("DZ", this->DZ); - this->keywords.emplace("DZMATRIX", this->DZMATRIX); - this->keywords.emplace("DZMTRX", this->DZMTRX); - this->keywords.emplace("DZMTRXV", this->DZMTRXV); - this->keywords.emplace("DZNET", this->DZNET); - this->keywords.emplace("DZV", this->DZV); - this->keywords.emplace("ECHO", this->ECHO); - this->keywords.emplace("ECLMC", this->ECLMC); - this->keywords.emplace("EDIT", this->EDIT); - this->keywords.emplace("EDITNNC", this->EDITNNC); - this->keywords.emplace("EDITNNCR", this->EDITNNCR); - this->keywords.emplace("EHYSTR", this->EHYSTR); - this->keywords.emplace("EHYSTRR", this->EHYSTRR); - this->keywords.emplace("END", this->END); - this->keywords.emplace("ENDACTIO", this->ENDACTIO); - this->keywords.emplace("ENDBOX", this->ENDBOX); - this->keywords.emplace("ENDDYN", this->ENDDYN); - this->keywords.emplace("ENDFIN", this->ENDFIN); - this->keywords.emplace("ENDINC", this->ENDINC); - this->keywords.emplace("ENDNUM", this->ENDNUM); - this->keywords.emplace("ENDPOINT_SPECIFIERS", this->ENDPOINT_SPECIFIERS); - this->keywords.emplace("ENDSCALE", this->ENDSCALE); - this->keywords.emplace("ENDSKIP", this->ENDSKIP); - this->keywords.emplace("ENKRVD", this->ENKRVD); - this->keywords.emplace("ENPCVD", this->ENPCVD); - this->keywords.emplace("ENPTVD", this->ENPTVD); - this->keywords.emplace("ENSPCVD", this->ENSPCVD); - this->keywords.emplace("EPSDBGS", this->EPSDBGS); - this->keywords.emplace("EPSDEBUG", this->EPSDEBUG); - this->keywords.emplace("EQLDIMS", this->EQLDIMS); - this->keywords.emplace("EQLNUM", this->EQLNUM); - this->keywords.emplace("EQLOPTS", this->EQLOPTS); - this->keywords.emplace("EQLZCORN", this->EQLZCORN); - this->keywords.emplace("EQUALREG", this->EQUALREG); - this->keywords.emplace("EQUALS", this->EQUALS); - this->keywords.emplace("EQUIL", this->EQUIL); - this->keywords.emplace("ESSNODE", this->ESSNODE); - this->keywords.emplace("EXCAVATE", this->EXCAVATE); - this->keywords.emplace("EXCEL", this->EXCEL); - this->keywords.emplace("EXIT", this->EXIT); - this->keywords.emplace("EXTFIN", this->EXTFIN); - this->keywords.emplace("EXTHOST", this->EXTHOST); - this->keywords.emplace("EXTRAPMS", this->EXTRAPMS); - this->keywords.emplace("EXTREPGL", this->EXTREPGL); - this->keywords.emplace("FAULTDIM", this->FAULTDIM); - this->keywords.emplace("FAULTS", this->FAULTS); - this->keywords.emplace("FBHPDEF", this->FBHPDEF); - this->keywords.emplace("FHERCHBL", this->FHERCHBL); - this->keywords.emplace("FIELD", this->FIELD); - this->keywords.emplace("FIELD_PROBE", this->FIELD_PROBE); - this->keywords.emplace("FILEUNIT", this->FILEUNIT); - this->keywords.emplace("FILLEPS", this->FILLEPS); - this->keywords.emplace("FIPNUM", this->FIPNUM); - this->keywords.emplace("FIPOWG", this->FIPOWG); - this->keywords.emplace("FIPSEP", this->FIPSEP); - this->keywords.emplace("FIP_PROBE", this->FIP_PROBE); - this->keywords.emplace("FLUXNUM", this->FLUXNUM); - this->keywords.emplace("FLUXREG", this->FLUXREG); - this->keywords.emplace("FLUXTYPE", this->FLUXTYPE); - this->keywords.emplace("FMTHMD", this->FMTHMD); - this->keywords.emplace("FMTIN", this->FMTIN); - this->keywords.emplace("FMTOUT", this->FMTOUT); - this->keywords.emplace("FMWSET", this->FMWSET); - this->keywords.emplace("FOAM", this->FOAM); - this->keywords.emplace("FOAMADS", this->FOAMADS); - this->keywords.emplace("FOAMDCYO", this->FOAMDCYO); - this->keywords.emplace("FOAMDCYW", this->FOAMDCYW); - this->keywords.emplace("FOAMFCN", this->FOAMFCN); - this->keywords.emplace("FOAMFRM", this->FOAMFRM); - this->keywords.emplace("FOAMFSC", this->FOAMFSC); - this->keywords.emplace("FOAMFSO", this->FOAMFSO); - this->keywords.emplace("FOAMFST", this->FOAMFST); - this->keywords.emplace("FOAMFSW", this->FOAMFSW); - this->keywords.emplace("FOAMMOB", this->FOAMMOB); - this->keywords.emplace("FOAMMOBP", this->FOAMMOBP); - this->keywords.emplace("FOAMMOBS", this->FOAMMOBS); - this->keywords.emplace("FOAMOPTS", this->FOAMOPTS); - this->keywords.emplace("FOAMROCK", this->FOAMROCK); - this->keywords.emplace("FORMFEED", this->FORMFEED); - this->keywords.emplace("FRICTION", this->FRICTION); - this->keywords.emplace("FULLIMP", this->FULLIMP); - this->keywords.emplace("GAS", this->GAS); - this->keywords.emplace("GASBEGIN", this->GASBEGIN); - this->keywords.emplace("GASCONC", this->GASCONC); - this->keywords.emplace("GASDENT", this->GASDENT); - this->keywords.emplace("GASEND", this->GASEND); - this->keywords.emplace("GASFCOMP", this->GASFCOMP); - this->keywords.emplace("GASFDECR", this->GASFDECR); - this->keywords.emplace("GASFDELC", this->GASFDELC); - this->keywords.emplace("GASFIELD", this->GASFIELD); - this->keywords.emplace("GASFTARG", this->GASFTARG); - this->keywords.emplace("GASJT", this->GASJT); - this->keywords.emplace("GASMONTH", this->GASMONTH); - this->keywords.emplace("GASPERIO", this->GASPERIO); - this->keywords.emplace("GASSATC", this->GASSATC); - this->keywords.emplace("GASVISCT", this->GASVISCT); - this->keywords.emplace("GASYEAR", this->GASYEAR); - this->keywords.emplace("GCALECON", this->GCALECON); - this->keywords.emplace("GCOMPIDX", this->GCOMPIDX); - this->keywords.emplace("GCONCAL", this->GCONCAL); - this->keywords.emplace("GCONENG", this->GCONENG); - this->keywords.emplace("GCONINJE", this->GCONINJE); - this->keywords.emplace("GCONPRI", this->GCONPRI); - this->keywords.emplace("GCONPROD", this->GCONPROD); - this->keywords.emplace("GCONSALE", this->GCONSALE); - this->keywords.emplace("GCONSUMP", this->GCONSUMP); - this->keywords.emplace("GCONTOL", this->GCONTOL); - this->keywords.emplace("GCUTBACK", this->GCUTBACK); - this->keywords.emplace("GCUTBACT", this->GCUTBACT); - this->keywords.emplace("GCVD", this->GCVD); - this->keywords.emplace("GDCQ", this->GDCQ); - this->keywords.emplace("GDCQECON", this->GDCQECON); - this->keywords.emplace("GDFILE", this->GDFILE); - this->keywords.emplace("GDIMS", this->GDIMS); - this->keywords.emplace("GDORIENT", this->GDORIENT); - this->keywords.emplace("GDRILPOT", this->GDRILPOT); - this->keywords.emplace("GECON", this->GECON); - this->keywords.emplace("GECONT", this->GECONT); - this->keywords.emplace("GEFAC", this->GEFAC); - this->keywords.emplace("GETDATA", this->GETDATA); - this->keywords.emplace("GETGLOB", this->GETGLOB); - this->keywords.emplace("GI", this->GI); - this->keywords.emplace("GIALL", this->GIALL); - this->keywords.emplace("GIMODEL", this->GIMODEL); - this->keywords.emplace("GINODE", this->GINODE); - this->keywords.emplace("GLIFTLIM", this->GLIFTLIM); - this->keywords.emplace("GLIFTOPT", this->GLIFTOPT); - this->keywords.emplace("GMWSET", this->GMWSET); - this->keywords.emplace("GNETDP", this->GNETDP); - this->keywords.emplace("GNETINJE", this->GNETINJE); - this->keywords.emplace("GNETPUMP", this->GNETPUMP); - this->keywords.emplace("GPMAINT", this->GPMAINT); - this->keywords.emplace("GRADGRUP", this->GRADGRUP); - this->keywords.emplace("GRADRESV", this->GRADRESV); - this->keywords.emplace("GRADRFT", this->GRADRFT); - this->keywords.emplace("GRADWELL", this->GRADWELL); - this->keywords.emplace("GRAVCONS", this->GRAVCONS); - this->keywords.emplace("GRAVDR", this->GRAVDR); - this->keywords.emplace("GRAVDRB", this->GRAVDRB); - this->keywords.emplace("GRAVDRM", this->GRAVDRM); - this->keywords.emplace("GRAVITY", this->GRAVITY); - this->keywords.emplace("GRDREACH", this->GRDREACH); - this->keywords.emplace("GRID", this->GRID); - this->keywords.emplace("GRIDFILE", this->GRIDFILE); - this->keywords.emplace("GRIDOPTS", this->GRIDOPTS); - this->keywords.emplace("GRIDUNIT", this->GRIDUNIT); - this->keywords.emplace("GROUP_PROBE", this->GROUP_PROBE); - this->keywords.emplace("GRUPMAST", this->GRUPMAST); - this->keywords.emplace("GRUPNET", this->GRUPNET); - this->keywords.emplace("GRUPRIG", this->GRUPRIG); - this->keywords.emplace("GRUPSLAV", this->GRUPSLAV); - this->keywords.emplace("GRUPTARG", this->GRUPTARG); - this->keywords.emplace("GRUPTREE", this->GRUPTREE); - this->keywords.emplace("GSATINJE", this->GSATINJE); - this->keywords.emplace("GSATPROD", this->GSATPROD); - this->keywords.emplace("GSEPCOND", this->GSEPCOND); - this->keywords.emplace("GSSCPTST", this->GSSCPTST); - this->keywords.emplace("GSWINGF", this->GSWINGF); - this->keywords.emplace("GTADD", this->GTADD); - this->keywords.emplace("GTMULT", this->GTMULT); - this->keywords.emplace("GUIDECAL", this->GUIDECAL); - this->keywords.emplace("GUIDERAT", this->GUIDERAT); - this->keywords.emplace("GUPFREQ", this->GUPFREQ); - this->keywords.emplace("GWRTWCV", this->GWRTWCV); - this->keywords.emplace("HALFTRAN", this->HALFTRAN); - this->keywords.emplace("HAxxxxxx", this->HAxxxxxx); - this->keywords.emplace("HBNUM", this->HBNUM); - this->keywords.emplace("HDISP", this->HDISP); - this->keywords.emplace("HEATCR", this->HEATCR); - this->keywords.emplace("HEATCRT", this->HEATCRT); - this->keywords.emplace("HMAQUCT", this->HMAQUCT); - this->keywords.emplace("HMAQUFET", this->HMAQUFET); - this->keywords.emplace("HMAQUNUM", this->HMAQUNUM); - this->keywords.emplace("HMDIMS", this->HMDIMS); - this->keywords.emplace("HMFAULTS", this->HMFAULTS); - this->keywords.emplace("HMMLAQUN", this->HMMLAQUN); - this->keywords.emplace("HMMLCTAQ", this->HMMLCTAQ); - this->keywords.emplace("HMMLFTAQ", this->HMMLFTAQ); - this->keywords.emplace("HMMLTWCN", this->HMMLTWCN); - this->keywords.emplace("HMMULTFT", this->HMMULTFT); - this->keywords.emplace("HMMULTSG", this->HMMULTSG); - this->keywords.emplace("HMMULTxx", this->HMMULTxx); - this->keywords.emplace("HMPROPS", this->HMPROPS); - this->keywords.emplace("HMROCK", this->HMROCK); - this->keywords.emplace("HMROCKT", this->HMROCKT); - this->keywords.emplace("HMRREF", this->HMRREF); - this->keywords.emplace("HMWELCON", this->HMWELCON); - this->keywords.emplace("HMWPIMLT", this->HMWPIMLT); - this->keywords.emplace("HMxxxxxx", this->HMxxxxxx); - this->keywords.emplace("HRFIN", this->HRFIN); - this->keywords.emplace("HWKRO", this->HWKRO); - this->keywords.emplace("HWKRORG", this->HWKRORG); - this->keywords.emplace("HWKRORW", this->HWKRORW); - this->keywords.emplace("HWKRW", this->HWKRW); - this->keywords.emplace("HWKRWR", this->HWKRWR); - this->keywords.emplace("HWPCW", this->HWPCW); - this->keywords.emplace("HWSNUM", this->HWSNUM); - this->keywords.emplace("HWSOGCR", this->HWSOGCR); - this->keywords.emplace("HWSOWCR", this->HWSOWCR); - this->keywords.emplace("HWSWCR", this->HWSWCR); - this->keywords.emplace("HWSWL", this->HWSWL); - this->keywords.emplace("HWSWLPC", this->HWSWLPC); - this->keywords.emplace("HWSWU", this->HWSWU); - this->keywords.emplace("HXFIN", this->HXFIN); - this->keywords.emplace("HYDRHEAD", this->HYDRHEAD); - this->keywords.emplace("HYFIN", this->HYFIN); - this->keywords.emplace("HYMOBGDR", this->HYMOBGDR); - this->keywords.emplace("HYST", this->HYST); - this->keywords.emplace("HYSTCHCK", this->HYSTCHCK); - this->keywords.emplace("HZFIN", this->HZFIN); - this->keywords.emplace("IHOST", this->IHOST); - this->keywords.emplace("IMBNUM", this->IMBNUM); - this->keywords.emplace("IMBNUMMF", this->IMBNUMMF); - this->keywords.emplace("IMKRVD", this->IMKRVD); - this->keywords.emplace("IMPCVD", this->IMPCVD); - this->keywords.emplace("IMPES", this->IMPES); - this->keywords.emplace("IMPLICIT", this->IMPLICIT); - this->keywords.emplace("IMPORT", this->IMPORT); - this->keywords.emplace("IMPTVD", this->IMPTVD); - this->keywords.emplace("IMSPCVD", this->IMSPCVD); - this->keywords.emplace("INCLUDE", this->INCLUDE); - this->keywords.emplace("INIT", this->INIT); - this->keywords.emplace("INRAD", this->INRAD); - this->keywords.emplace("INSPEC", this->INSPEC); - this->keywords.emplace("INTPC", this->INTPC); - this->keywords.emplace("IONROCK", this->IONROCK); - this->keywords.emplace("IONXROCK", this->IONXROCK); - this->keywords.emplace("IONXSURF", this->IONXSURF); - this->keywords.emplace("IPCG", this->IPCG); - this->keywords.emplace("IPCW", this->IPCW); - this->keywords.emplace("ISGCR", this->ISGCR); - this->keywords.emplace("ISGL", this->ISGL); - this->keywords.emplace("ISGLPC", this->ISGLPC); - this->keywords.emplace("ISGU", this->ISGU); - this->keywords.emplace("ISOGCR", this->ISOGCR); - this->keywords.emplace("ISOLNUM", this->ISOLNUM); - this->keywords.emplace("ISOWCR", this->ISOWCR); - this->keywords.emplace("ISWCR", this->ISWCR); - this->keywords.emplace("ISWL", this->ISWL); - this->keywords.emplace("ISWLPC", this->ISWLPC); - this->keywords.emplace("ISWU", this->ISWU); - this->keywords.emplace("JFUNC", this->JFUNC); - this->keywords.emplace("JFUNCR", this->JFUNCR); - this->keywords.emplace("KRNUM", this->KRNUM); - this->keywords.emplace("KRNUMMF", this->KRNUMMF); - this->keywords.emplace("LAB", this->LAB); - this->keywords.emplace("LANGMPL", this->LANGMPL); - this->keywords.emplace("LANGMUIR", this->LANGMUIR); - this->keywords.emplace("LANGSOLV", this->LANGSOLV); - this->keywords.emplace("LCUNIT", this->LCUNIT); - this->keywords.emplace("LGR", this->LGR); - this->keywords.emplace("LGRCOPY", this->LGRCOPY); - this->keywords.emplace("LGRFREE", this->LGRFREE); - this->keywords.emplace("LGRLOCK", this->LGRLOCK); - this->keywords.emplace("LGROFF", this->LGROFF); - this->keywords.emplace("LGRON", this->LGRON); - this->keywords.emplace("LICENSES", this->LICENSES); - this->keywords.emplace("LIFTOPT", this->LIFTOPT); - this->keywords.emplace("LINCOM", this->LINCOM); - this->keywords.emplace("LINKPERM", this->LINKPERM); - this->keywords.emplace("LIVEOIL", this->LIVEOIL); - this->keywords.emplace("LKRO", this->LKRO); - this->keywords.emplace("LKRORG", this->LKRORG); - this->keywords.emplace("LKRORW", this->LKRORW); - this->keywords.emplace("LKRW", this->LKRW); - this->keywords.emplace("LKRWR", this->LKRWR); - this->keywords.emplace("LOAD", this->LOAD); - this->keywords.emplace("LOWSALT", this->LOWSALT); - this->keywords.emplace("LPCW", this->LPCW); - this->keywords.emplace("LSALTFNC", this->LSALTFNC); - this->keywords.emplace("LSLTWNUM", this->LSLTWNUM); - this->keywords.emplace("LSNUM", this->LSNUM); - this->keywords.emplace("LSOGCR", this->LSOGCR); - this->keywords.emplace("LSOWCR", this->LSOWCR); - this->keywords.emplace("LSWCR", this->LSWCR); - this->keywords.emplace("LSWL", this->LSWL); - this->keywords.emplace("LSWLPC", this->LSWLPC); - this->keywords.emplace("LSWU", this->LSWU); - this->keywords.emplace("LTOSIGMA", this->LTOSIGMA); - this->keywords.emplace("LWKRO", this->LWKRO); - this->keywords.emplace("LWKRORG", this->LWKRORG); - this->keywords.emplace("LWKRORW", this->LWKRORW); - this->keywords.emplace("LWKRW", this->LWKRW); - this->keywords.emplace("LWKRWR", this->LWKRWR); - this->keywords.emplace("LWPCW", this->LWPCW); - this->keywords.emplace("LWSLTNUM", this->LWSLTNUM); - this->keywords.emplace("LWSNUM", this->LWSNUM); - this->keywords.emplace("LWSOGCR", this->LWSOGCR); - this->keywords.emplace("LWSOWCR", this->LWSOWCR); - this->keywords.emplace("LWSWCR", this->LWSWCR); - this->keywords.emplace("LWSWL", this->LWSWL); - this->keywords.emplace("LWSWLPC", this->LWSWLPC); - this->keywords.emplace("LWSWU", this->LWSWU); - this->keywords.emplace("LX", this->LX); - this->keywords.emplace("LXFIN", this->LXFIN); - this->keywords.emplace("LY", this->LY); - this->keywords.emplace("LYFIN", this->LYFIN); - this->keywords.emplace("LZ", this->LZ); - this->keywords.emplace("LZFIN", this->LZFIN); - this->keywords.emplace("MAPAXES", this->MAPAXES); - this->keywords.emplace("MAPUNITS", this->MAPUNITS); - this->keywords.emplace("MASSFLOW", this->MASSFLOW); - this->keywords.emplace("MATCORR", this->MATCORR); - this->keywords.emplace("MAXVALUE", this->MAXVALUE); - this->keywords.emplace("MEMORY", this->MEMORY); - this->keywords.emplace("MESSAGE", this->MESSAGE); - this->keywords.emplace("MESSAGES", this->MESSAGES); - this->keywords.emplace("MESSOPTS", this->MESSOPTS); - this->keywords.emplace("MESSSRVC", this->MESSSRVC); - this->keywords.emplace("METRIC", this->METRIC); - this->keywords.emplace("MICP", this->MICP); - this->keywords.emplace("MICPPARA", this->MICPPARA); - this->keywords.emplace("MINNNCT", this->MINNNCT); - this->keywords.emplace("MINNPCOL", this->MINNPCOL); - this->keywords.emplace("MINPORV", this->MINPORV); - this->keywords.emplace("MINPV", this->MINPV); - this->keywords.emplace("MINPVFIL", this->MINPVFIL); - this->keywords.emplace("MINPVV", this->MINPVV); - this->keywords.emplace("MINVALUE", this->MINVALUE); - this->keywords.emplace("MISC", this->MISC); - this->keywords.emplace("MISCIBLE", this->MISCIBLE); - this->keywords.emplace("MISCNUM", this->MISCNUM); - this->keywords.emplace("MLANG", this->MLANG); - this->keywords.emplace("MLANGSLV", this->MLANGSLV); - this->keywords.emplace("MONITOR", this->MONITOR); - this->keywords.emplace("MPFANUM", this->MPFANUM); - this->keywords.emplace("MPFNNC", this->MPFNNC); - this->keywords.emplace("MSFN", this->MSFN); - this->keywords.emplace("MSGFILE", this->MSGFILE); - this->keywords.emplace("MSUM_PROBE", this->MSUM_PROBE); - this->keywords.emplace("MULSGGD", this->MULSGGD); - this->keywords.emplace("MULSGGDV", this->MULSGGDV); - this->keywords.emplace("MULTFLT", this->MULTFLT); - this->keywords.emplace("MULTIN", this->MULTIN); - this->keywords.emplace("MULTIPLY", this->MULTIPLY); - this->keywords.emplace("MULTIREG", this->MULTIREG); - this->keywords.emplace("MULTNUM", this->MULTNUM); - this->keywords.emplace("MULTOUT", this->MULTOUT); - this->keywords.emplace("MULTOUTS", this->MULTOUTS); - this->keywords.emplace("MULTPV", this->MULTPV); - this->keywords.emplace("MULTREAL", this->MULTREAL); - this->keywords.emplace("MULTREGD", this->MULTREGD); - this->keywords.emplace("MULTREGH", this->MULTREGH); - this->keywords.emplace("MULTREGP", this->MULTREGP); - this->keywords.emplace("MULTREGT", this->MULTREGT); - this->keywords.emplace("MULTSIG", this->MULTSIG); - this->keywords.emplace("MULTSIGV", this->MULTSIGV); - this->keywords.emplace("MULT_XYZ", this->MULT_XYZ); - this->keywords.emplace("MW", this->MW); - this->keywords.emplace("MWS", this->MWS); - this->keywords.emplace("NARROW", this->NARROW); - this->keywords.emplace("NCONSUMP", this->NCONSUMP); - this->keywords.emplace("NEFAC", this->NEFAC); - this->keywords.emplace("NETBALAN", this->NETBALAN); - this->keywords.emplace("NETCOMPA", this->NETCOMPA); - this->keywords.emplace("NETWORK", this->NETWORK); - this->keywords.emplace("NEWTRAN", this->NEWTRAN); - this->keywords.emplace("NEXTSTEP", this->NEXTSTEP); - this->keywords.emplace("NEXTSTPL", this->NEXTSTPL); - this->keywords.emplace("NINENUM", this->NINENUM); - this->keywords.emplace("NINEPOIN", this->NINEPOIN); - this->keywords.emplace("NMATOPTS", this->NMATOPTS); - this->keywords.emplace("NMATRIX", this->NMATRIX); - this->keywords.emplace("NMESSAGE", this->NMESSAGE); - this->keywords.emplace("NNC", this->NNC); - this->keywords.emplace("NNEWTF", this->NNEWTF); - this->keywords.emplace("NOCASC", this->NOCASC); - this->keywords.emplace("NODEPROP", this->NODEPROP); - this->keywords.emplace("NODPPM", this->NODPPM); - this->keywords.emplace("NOECHO", this->NOECHO); - this->keywords.emplace("NOGGF", this->NOGGF); - this->keywords.emplace("NOGRAV", this->NOGRAV); - this->keywords.emplace("NOHMD", this->NOHMD); - this->keywords.emplace("NOHMO", this->NOHMO); - this->keywords.emplace("NOHYST", this->NOHYST); - this->keywords.emplace("NOINSPEC", this->NOINSPEC); - this->keywords.emplace("NOMONITO", this->NOMONITO); - this->keywords.emplace("NONNC", this->NONNC); - this->keywords.emplace("NORSSPEC", this->NORSSPEC); - this->keywords.emplace("NOSIM", this->NOSIM); - this->keywords.emplace("NOWARN", this->NOWARN); - this->keywords.emplace("NOWARNEP", this->NOWARNEP); - this->keywords.emplace("NRSOUT", this->NRSOUT); - this->keywords.emplace("NSTACK", this->NSTACK); - this->keywords.emplace("NTG", this->NTG); - this->keywords.emplace("NUMRES", this->NUMRES); - this->keywords.emplace("NUPCOL", this->NUPCOL); - this->keywords.emplace("NWATREM", this->NWATREM); - this->keywords.emplace("NXFIN", this->NXFIN); - this->keywords.emplace("NYFIN", this->NYFIN); - this->keywords.emplace("NZFIN", this->NZFIN); - this->keywords.emplace("OCOMPIDX", this->OCOMPIDX); - this->keywords.emplace("OFM", this->OFM); - this->keywords.emplace("OIL", this->OIL); - this->keywords.emplace("OILAPI", this->OILAPI); - this->keywords.emplace("OILCOMPR", this->OILCOMPR); - this->keywords.emplace("OILDENT", this->OILDENT); - this->keywords.emplace("OILJT", this->OILJT); - this->keywords.emplace("OILMW", this->OILMW); - this->keywords.emplace("OILVISCT", this->OILVISCT); - this->keywords.emplace("OILVTIM", this->OILVTIM); - this->keywords.emplace("OLDTRAN", this->OLDTRAN); - this->keywords.emplace("OLDTRANR", this->OLDTRANR); - this->keywords.emplace("OPERATE", this->OPERATE); - this->keywords.emplace("OPERATER", this->OPERATER); - this->keywords.emplace("OPERNUM", this->OPERNUM); - this->keywords.emplace("OPTIONS", this->OPTIONS); - this->keywords.emplace("OPTIONS3", this->OPTIONS3); - this->keywords.emplace("OUTRAD", this->OUTRAD); - this->keywords.emplace("OUTSOL", this->OUTSOL); - this->keywords.emplace("OVERBURD", this->OVERBURD); - this->keywords.emplace("PARALLEL", this->PARALLEL); - this->keywords.emplace("PARAOPTS", this->PARAOPTS); - this->keywords.emplace("PARTTRAC", this->PARTTRAC); - this->keywords.emplace("PATHS", this->PATHS); - this->keywords.emplace("PBUB", this->PBUB); - this->keywords.emplace("PBVD", this->PBVD); - this->keywords.emplace("PCG", this->PCG); - this->keywords.emplace("PCG32D", this->PCG32D); - this->keywords.emplace("PCW", this->PCW); - this->keywords.emplace("PCW32D", this->PCW32D); - this->keywords.emplace("PDEW", this->PDEW); - this->keywords.emplace("PDVD", this->PDVD); - this->keywords.emplace("PEBI", this->PEBI); - this->keywords.emplace("PECOEFS", this->PECOEFS); - this->keywords.emplace("PEDIMS", this->PEDIMS); - this->keywords.emplace("PEGTABX", this->PEGTABX); - this->keywords.emplace("PEKTABX", this->PEKTABX); - this->keywords.emplace("PENUM", this->PENUM); - this->keywords.emplace("PERFORMANCE_PROBE", this->PERFORMANCE_PROBE); - this->keywords.emplace("PERMAVE", this->PERMAVE); - this->keywords.emplace("PERMFACT", this->PERMFACT); - this->keywords.emplace("PERMJFUN", this->PERMJFUN); - this->keywords.emplace("PERMR", this->PERMR); - this->keywords.emplace("PERMTHT", this->PERMTHT); - this->keywords.emplace("PERMX", this->PERMX); - this->keywords.emplace("PERMXY", this->PERMXY); - this->keywords.emplace("PERMY", this->PERMY); - this->keywords.emplace("PERMYZ", this->PERMYZ); - this->keywords.emplace("PERMZ", this->PERMZ); - this->keywords.emplace("PERMZX", this->PERMZX); - this->keywords.emplace("PETGRID", this->PETGRID); - this->keywords.emplace("PETOPTS", this->PETOPTS); - this->keywords.emplace("PICOND", this->PICOND); - this->keywords.emplace("PIMTDIMS", this->PIMTDIMS); - this->keywords.emplace("PIMULTAB", this->PIMULTAB); - this->keywords.emplace("PINCH", this->PINCH); - this->keywords.emplace("PINCHNUM", this->PINCHNUM); - this->keywords.emplace("PINCHOUT", this->PINCHOUT); - this->keywords.emplace("PINCHREG", this->PINCHREG); - this->keywords.emplace("PINCHXY", this->PINCHXY); - this->keywords.emplace("PINTDIMS", this->PINTDIMS); - this->keywords.emplace("PLMIXNUM", this->PLMIXNUM); - this->keywords.emplace("PLMIXPAR", this->PLMIXPAR); - this->keywords.emplace("PLYADS", this->PLYADS); - this->keywords.emplace("PLYADSS", this->PLYADSS); - this->keywords.emplace("PLYATEMP", this->PLYATEMP); - this->keywords.emplace("PLYCAMAX", this->PLYCAMAX); - this->keywords.emplace("PLYDHFLF", this->PLYDHFLF); - this->keywords.emplace("PLYESAL", this->PLYESAL); - this->keywords.emplace("PLYKRRF", this->PLYKRRF); - this->keywords.emplace("PLYMAX", this->PLYMAX); - this->keywords.emplace("PLYMWINJ", this->PLYMWINJ); - this->keywords.emplace("PLYOPTS", this->PLYOPTS); - this->keywords.emplace("PLYRMDEN", this->PLYRMDEN); - this->keywords.emplace("PLYROCK", this->PLYROCK); - this->keywords.emplace("PLYROCKM", this->PLYROCKM); - this->keywords.emplace("PLYSHEAR", this->PLYSHEAR); - this->keywords.emplace("PLYSHLOG", this->PLYSHLOG); - this->keywords.emplace("PLYTRRF", this->PLYTRRF); - this->keywords.emplace("PLYTRRFA", this->PLYTRRFA); - this->keywords.emplace("PLYVISC", this->PLYVISC); - this->keywords.emplace("PLYVISCS", this->PLYVISCS); - this->keywords.emplace("PLYVISCT", this->PLYVISCT); - this->keywords.emplace("PLYVMH", this->PLYVMH); - this->keywords.emplace("PLYVSCST", this->PLYVSCST); - this->keywords.emplace("PMAX", this->PMAX); - this->keywords.emplace("PMISC", this->PMISC); - this->keywords.emplace("POLYMER", this->POLYMER); - this->keywords.emplace("POLYMW", this->POLYMW); - this->keywords.emplace("PORO", this->PORO); - this->keywords.emplace("PORV", this->PORV); - this->keywords.emplace("PPCWMAX", this->PPCWMAX); - this->keywords.emplace("PRECSALT", this->PRECSALT); - this->keywords.emplace("PREF", this->PREF); - this->keywords.emplace("PREFS", this->PREFS); - this->keywords.emplace("PRESSURE", this->PRESSURE); - this->keywords.emplace("PRIORITY", this->PRIORITY); - this->keywords.emplace("PROPS", this->PROPS); - this->keywords.emplace("PRORDER", this->PRORDER); - this->keywords.emplace("PRVD", this->PRVD); - this->keywords.emplace("PSTEADY", this->PSTEADY); - this->keywords.emplace("PSWRG", this->PSWRG); - this->keywords.emplace("PSWRO", this->PSWRO); - this->keywords.emplace("PVCDO", this->PVCDO); - this->keywords.emplace("PVCO", this->PVCO); - this->keywords.emplace("PVDG", this->PVDG); - this->keywords.emplace("PVDO", this->PVDO); - this->keywords.emplace("PVDS", this->PVDS); - this->keywords.emplace("PVTG", this->PVTG); - this->keywords.emplace("PVTGW", this->PVTGW); - this->keywords.emplace("PVTGWO", this->PVTGWO); - this->keywords.emplace("PVTNUM", this->PVTNUM); - this->keywords.emplace("PVTO", this->PVTO); - this->keywords.emplace("PVTSOL", this->PVTSOL); - this->keywords.emplace("PVTW", this->PVTW); - this->keywords.emplace("PVTWSALT", this->PVTWSALT); - this->keywords.emplace("PVT_M", this->PVT_M); - this->keywords.emplace("PVZG", this->PVZG); - this->keywords.emplace("PYACTION", this->PYACTION); - this->keywords.emplace("PYINPUT", this->PYINPUT); - this->keywords.emplace("QDRILL", this->QDRILL); - this->keywords.emplace("QHRATING", this->QHRATING); - this->keywords.emplace("QMOBIL", this->QMOBIL); - this->keywords.emplace("RADFIN", this->RADFIN); - this->keywords.emplace("RADFIN4", this->RADFIN4); - this->keywords.emplace("RADIAL", this->RADIAL); - this->keywords.emplace("RAINFALL", this->RAINFALL); - this->keywords.emplace("RBEDCONT", this->RBEDCONT); - this->keywords.emplace("RCMASTS", this->RCMASTS); - this->keywords.emplace("REACHES", this->REACHES); - this->keywords.emplace("READDATA", this->READDATA); - this->keywords.emplace("REFINE", this->REFINE); - this->keywords.emplace("REGDIMS", this->REGDIMS); - this->keywords.emplace("REGION2REGION_PROBE", this->REGION2REGION_PROBE); - this->keywords.emplace("REGION2REGION_PROBE_E300", this->REGION2REGION_PROBE_E300); - this->keywords.emplace("REGIONS", this->REGIONS); - this->keywords.emplace("REGION_PROBE", this->REGION_PROBE); - this->keywords.emplace("RESIDNUM", this->RESIDNUM); - this->keywords.emplace("RESTART", this->RESTART); - this->keywords.emplace("RESVNUM", this->RESVNUM); - this->keywords.emplace("RHO", this->RHO); - this->keywords.emplace("RIVDEBUG", this->RIVDEBUG); - this->keywords.emplace("RIVERSYS", this->RIVERSYS); - this->keywords.emplace("RIVRDIMS", this->RIVRDIMS); - this->keywords.emplace("RIVRPROP", this->RIVRPROP); - this->keywords.emplace("RIVRXSEC", this->RIVRXSEC); - this->keywords.emplace("RIVSALT", this->RIVSALT); - this->keywords.emplace("RIVTRACE", this->RIVTRACE); - this->keywords.emplace("RKTRMDIR", this->RKTRMDIR); - this->keywords.emplace("ROCK", this->ROCK); - this->keywords.emplace("ROCK2D", this->ROCK2D); - this->keywords.emplace("ROCK2DTR", this->ROCK2DTR); - this->keywords.emplace("ROCKCOMP", this->ROCKCOMP); - this->keywords.emplace("ROCKFRAC", this->ROCKFRAC); - this->keywords.emplace("ROCKNUM", this->ROCKNUM); - this->keywords.emplace("ROCKOPTS", this->ROCKOPTS); - this->keywords.emplace("ROCKPAMA", this->ROCKPAMA); - this->keywords.emplace("ROCKTAB", this->ROCKTAB); - this->keywords.emplace("ROCKTABH", this->ROCKTABH); - this->keywords.emplace("ROCKTABW", this->ROCKTABW); - this->keywords.emplace("ROCKTHSG", this->ROCKTHSG); - this->keywords.emplace("ROCKTSIG", this->ROCKTSIG); - this->keywords.emplace("ROCKV", this->ROCKV); - this->keywords.emplace("ROCKWNOD", this->ROCKWNOD); - this->keywords.emplace("RPTCPL", this->RPTCPL); - this->keywords.emplace("RPTGRID", this->RPTGRID); - this->keywords.emplace("RPTGRIDL", this->RPTGRIDL); - this->keywords.emplace("RPTHMD", this->RPTHMD); - this->keywords.emplace("RPTHMG", this->RPTHMG); - this->keywords.emplace("RPTHMW", this->RPTHMW); - this->keywords.emplace("RPTINIT", this->RPTINIT); - this->keywords.emplace("RPTISOL", this->RPTISOL); - this->keywords.emplace("RPTONLY", this->RPTONLY); - this->keywords.emplace("RPTONLYO", this->RPTONLYO); - this->keywords.emplace("RPTPROPS", this->RPTPROPS); - this->keywords.emplace("RPTREGS", this->RPTREGS); - this->keywords.emplace("RPTRST", this->RPTRST); - this->keywords.emplace("RPTRUNSP", this->RPTRUNSP); - this->keywords.emplace("RPTSCHED", this->RPTSCHED); - this->keywords.emplace("RPTSMRY", this->RPTSMRY); - this->keywords.emplace("RPTSOL", this->RPTSOL); - this->keywords.emplace("RS", this->RS); - this->keywords.emplace("RSCONST", this->RSCONST); - this->keywords.emplace("RSCONSTT", this->RSCONSTT); - this->keywords.emplace("RSGI", this->RSGI); - this->keywords.emplace("RSSPEC", this->RSSPEC); - this->keywords.emplace("RSVD", this->RSVD); - this->keywords.emplace("RTEMP", this->RTEMP); - this->keywords.emplace("RTEMPA", this->RTEMPA); - this->keywords.emplace("RTEMPVD", this->RTEMPVD); - this->keywords.emplace("RUNSPEC", this->RUNSPEC); - this->keywords.emplace("RUNSUM", this->RUNSUM); - this->keywords.emplace("RV", this->RV); - this->keywords.emplace("RVCONST", this->RVCONST); - this->keywords.emplace("RVCONSTT", this->RVCONSTT); - this->keywords.emplace("RVGI", this->RVGI); - this->keywords.emplace("RVVD", this->RVVD); - this->keywords.emplace("RVW", this->RVW); - this->keywords.emplace("RWGSALT", this->RWGSALT); - this->keywords.emplace("SALINITY", this->SALINITY); - this->keywords.emplace("SALT", this->SALT); - this->keywords.emplace("SALTNODE", this->SALTNODE); - this->keywords.emplace("SALTP", this->SALTP); - this->keywords.emplace("SALTPVD", this->SALTPVD); - this->keywords.emplace("SALTREST", this->SALTREST); - this->keywords.emplace("SALTSOL", this->SALTSOL); - this->keywords.emplace("SALTVD", this->SALTVD); - this->keywords.emplace("SAMG", this->SAMG); - this->keywords.emplace("SATNUM", this->SATNUM); - this->keywords.emplace("SATOPTS", this->SATOPTS); - this->keywords.emplace("SAVE", this->SAVE); - this->keywords.emplace("SBIOF", this->SBIOF); - this->keywords.emplace("SCALC", this->SCALC); - this->keywords.emplace("SCALECRS", this->SCALECRS); - this->keywords.emplace("SCALELIM", this->SCALELIM); - this->keywords.emplace("SCDATAB", this->SCDATAB); - this->keywords.emplace("SCDETAB", this->SCDETAB); - this->keywords.emplace("SCDPDIMS", this->SCDPDIMS); - this->keywords.emplace("SCDPTAB", this->SCDPTAB); - this->keywords.emplace("SCDPTRAC", this->SCDPTRAC); - this->keywords.emplace("SCHEDULE", this->SCHEDULE); - this->keywords.emplace("SCVD", this->SCVD); - this->keywords.emplace("SDENSITY", this->SDENSITY); - this->keywords.emplace("SEGMENT_PROBE", this->SEGMENT_PROBE); - this->keywords.emplace("SEPARATE", this->SEPARATE); - this->keywords.emplace("SEPVALS", this->SEPVALS); - this->keywords.emplace("SFOAM", this->SFOAM); - this->keywords.emplace("SGAS", this->SGAS); - this->keywords.emplace("SGCR", this->SGCR); - this->keywords.emplace("SGCWMIS", this->SGCWMIS); - this->keywords.emplace("SGF32D", this->SGF32D); - this->keywords.emplace("SGFN", this->SGFN); - this->keywords.emplace("SGL", this->SGL); - this->keywords.emplace("SGLPC", this->SGLPC); - this->keywords.emplace("SGOF", this->SGOF); - this->keywords.emplace("SGOFLET", this->SGOFLET); - this->keywords.emplace("SGU", this->SGU); - this->keywords.emplace("SGWFN", this->SGWFN); - this->keywords.emplace("SHRATE", this->SHRATE); - this->keywords.emplace("SIGMA", this->SIGMA); - this->keywords.emplace("SIGMAGDV", this->SIGMAGDV); - this->keywords.emplace("SIGMATH", this->SIGMATH); - this->keywords.emplace("SIGMAV", this->SIGMAV); - this->keywords.emplace("SIMULATE", this->SIMULATE); - this->keywords.emplace("SKIP", this->SKIP); - this->keywords.emplace("SKIP100", this->SKIP100); - this->keywords.emplace("SKIP300", this->SKIP300); - this->keywords.emplace("SKIPREST", this->SKIPREST); - this->keywords.emplace("SKPRPOLY", this->SKPRPOLY); - this->keywords.emplace("SKPRWAT", this->SKPRWAT); - this->keywords.emplace("SKRO", this->SKRO); - this->keywords.emplace("SKRORG", this->SKRORG); - this->keywords.emplace("SKRORW", this->SKRORW); - this->keywords.emplace("SKRW", this->SKRW); - this->keywords.emplace("SKRWR", this->SKRWR); - this->keywords.emplace("SLAVES", this->SLAVES); - this->keywords.emplace("SLGOF", this->SLGOF); - this->keywords.emplace("SMICR", this->SMICR); - this->keywords.emplace("SMRYDIMS", this->SMRYDIMS); - this->keywords.emplace("SMULTX", this->SMULTX); - this->keywords.emplace("SMULTY", this->SMULTY); - this->keywords.emplace("SMULTZ", this->SMULTZ); - this->keywords.emplace("SOCRS", this->SOCRS); - this->keywords.emplace("SOF2", this->SOF2); - this->keywords.emplace("SOF3", this->SOF3); - this->keywords.emplace("SOF32D", this->SOF32D); - this->keywords.emplace("SOGCR", this->SOGCR); - this->keywords.emplace("SOIL", this->SOIL); - this->keywords.emplace("SOLUTION", this->SOLUTION); - this->keywords.emplace("SOLVCONC", this->SOLVCONC); - this->keywords.emplace("SOLVDIMS", this->SOLVDIMS); - this->keywords.emplace("SOLVDIRS", this->SOLVDIRS); - this->keywords.emplace("SOLVENT", this->SOLVENT); - this->keywords.emplace("SOLVFRAC", this->SOLVFRAC); - this->keywords.emplace("SOLVNUM", this->SOLVNUM); - this->keywords.emplace("SOMGAS", this->SOMGAS); - this->keywords.emplace("SOMWAT", this->SOMWAT); - this->keywords.emplace("SORWMIS", this->SORWMIS); - this->keywords.emplace("SOWCR", this->SOWCR); - this->keywords.emplace("SOXYG", this->SOXYG); - this->keywords.emplace("SPECGRID", this->SPECGRID); - this->keywords.emplace("SPECHEAT", this->SPECHEAT); - this->keywords.emplace("SPECROCK", this->SPECROCK); - this->keywords.emplace("SPIDER", this->SPIDER); - this->keywords.emplace("SPOLY", this->SPOLY); - this->keywords.emplace("SPOLYMW", this->SPOLYMW); - this->keywords.emplace("SSFN", this->SSFN); - this->keywords.emplace("SSGCR", this->SSGCR); - this->keywords.emplace("SSGL", this->SSGL); - this->keywords.emplace("SSOGCR", this->SSOGCR); - this->keywords.emplace("SSOL", this->SSOL); - this->keywords.emplace("SSOWCR", this->SSOWCR); - this->keywords.emplace("SSWCR", this->SSWCR); - this->keywords.emplace("SSWL", this->SSWL); - this->keywords.emplace("SSWU", this->SSWU); - this->keywords.emplace("START", this->START); - this->keywords.emplace("STCOND", this->STCOND); - this->keywords.emplace("STOG", this->STOG); - this->keywords.emplace("STONE", this->STONE); - this->keywords.emplace("STONE1", this->STONE1); - this->keywords.emplace("STONE1EX", this->STONE1EX); - this->keywords.emplace("STONE2", this->STONE2); - this->keywords.emplace("STOW", this->STOW); - this->keywords.emplace("STWG", this->STWG); - this->keywords.emplace("SUMMARY", this->SUMMARY); - this->keywords.emplace("SUMTHIN", this->SUMTHIN); - this->keywords.emplace("SUREA", this->SUREA); - this->keywords.emplace("SURF", this->SURF); - this->keywords.emplace("SURFACT", this->SURFACT); - this->keywords.emplace("SURFACTW", this->SURFACTW); - this->keywords.emplace("SURFADDW", this->SURFADDW); - this->keywords.emplace("SURFADS", this->SURFADS); - this->keywords.emplace("SURFCAPD", this->SURFCAPD); - this->keywords.emplace("SURFESAL", this->SURFESAL); - this->keywords.emplace("SURFNUM", this->SURFNUM); - this->keywords.emplace("SURFOPTS", this->SURFOPTS); - this->keywords.emplace("SURFROCK", this->SURFROCK); - this->keywords.emplace("SURFST", this->SURFST); - this->keywords.emplace("SURFSTES", this->SURFSTES); - this->keywords.emplace("SURFVISC", this->SURFVISC); - this->keywords.emplace("SURFWNUM", this->SURFWNUM); - this->keywords.emplace("SWAT", this->SWAT); - this->keywords.emplace("SWATINIT", this->SWATINIT); - this->keywords.emplace("SWCR", this->SWCR); - this->keywords.emplace("SWF32D", this->SWF32D); - this->keywords.emplace("SWFN", this->SWFN); - this->keywords.emplace("SWINGFAC", this->SWINGFAC); - this->keywords.emplace("SWL", this->SWL); - this->keywords.emplace("SWLPC", this->SWLPC); - this->keywords.emplace("SWOF", this->SWOF); - this->keywords.emplace("SWOFLET", this->SWOFLET); - this->keywords.emplace("SWU", this->SWU); - this->keywords.emplace("TABDIMS", this->TABDIMS); - this->keywords.emplace("TBLK", this->TBLK); - this->keywords.emplace("TEMP", this->TEMP); - this->keywords.emplace("TEMPI", this->TEMPI); - this->keywords.emplace("TEMPNODE", this->TEMPNODE); - this->keywords.emplace("TEMPTVD", this->TEMPTVD); - this->keywords.emplace("TEMPVD", this->TEMPVD); - this->keywords.emplace("THCGAS", this->THCGAS); - this->keywords.emplace("THCOIL", this->THCOIL); - this->keywords.emplace("THCONR", this->THCONR); - this->keywords.emplace("THCONSF", this->THCONSF); - this->keywords.emplace("THCROCK", this->THCROCK); - this->keywords.emplace("THCWATER", this->THCWATER); - this->keywords.emplace("THERMAL", this->THERMAL); - this->keywords.emplace("THPRES", this->THPRES); - this->keywords.emplace("THPRESFT", this->THPRESFT); - this->keywords.emplace("TIGHTEN", this->TIGHTEN); - this->keywords.emplace("TIGHTENP", this->TIGHTENP); - this->keywords.emplace("TIME", this->TIME); - this->keywords.emplace("TITLE", this->TITLE); - this->keywords.emplace("TLMIXPAR", this->TLMIXPAR); - this->keywords.emplace("TLPMIXPA", this->TLPMIXPA); - this->keywords.emplace("TNUM", this->TNUM); - this->keywords.emplace("TOLCRIT", this->TOLCRIT); - this->keywords.emplace("TOPS", this->TOPS); - this->keywords.emplace("TPAMEPS", this->TPAMEPS); - this->keywords.emplace("TPAMEPSS", this->TPAMEPSS); - this->keywords.emplace("TRACER", this->TRACER); - this->keywords.emplace("TRACERKM", this->TRACERKM); - this->keywords.emplace("TRACERKP", this->TRACERKP); - this->keywords.emplace("TRACERS", this->TRACERS); - this->keywords.emplace("TRACITVD", this->TRACITVD); - this->keywords.emplace("TRACTVD", this->TRACTVD); - this->keywords.emplace("TRADS", this->TRADS); - this->keywords.emplace("TRANGL", this->TRANGL); - this->keywords.emplace("TRANR", this->TRANR); - this->keywords.emplace("TRANTHT", this->TRANTHT); - this->keywords.emplace("TRANX", this->TRANX); - this->keywords.emplace("TRANY", this->TRANY); - this->keywords.emplace("TRANZ", this->TRANZ); - this->keywords.emplace("TRDCY", this->TRDCY); - this->keywords.emplace("TRDIF", this->TRDIF); - this->keywords.emplace("TRDIS", this->TRDIS); - this->keywords.emplace("TREF", this->TREF); - this->keywords.emplace("TREFS", this->TREFS); - this->keywords.emplace("TRKPF", this->TRKPF); - this->keywords.emplace("TRNHD", this->TRNHD); - this->keywords.emplace("TRPLPORO", this->TRPLPORO); - this->keywords.emplace("TRROCK", this->TRROCK); - this->keywords.emplace("TSTEP", this->TSTEP); - this->keywords.emplace("TUNING", this->TUNING); - this->keywords.emplace("TUNINGDP", this->TUNINGDP); - this->keywords.emplace("TUNINGH", this->TUNINGH); - this->keywords.emplace("TUNINGL", this->TUNINGL); - this->keywords.emplace("TUNINGS", this->TUNINGS); - this->keywords.emplace("TVDP", this->TVDP); - this->keywords.emplace("TZONE", this->TZONE); - this->keywords.emplace("UDADIMS", this->UDADIMS); - this->keywords.emplace("UDQ", this->UDQ); - this->keywords.emplace("UDQDIMS", this->UDQDIMS); - this->keywords.emplace("UDQPARAM", this->UDQPARAM); - this->keywords.emplace("UDT", this->UDT); - this->keywords.emplace("UDTDIMS", this->UDTDIMS); - this->keywords.emplace("UNCODHMD", this->UNCODHMD); - this->keywords.emplace("UNIFIN", this->UNIFIN); - this->keywords.emplace("UNIFOUT", this->UNIFOUT); - this->keywords.emplace("UNIFOUTS", this->UNIFOUTS); - this->keywords.emplace("UNIFSAVE", this->UNIFSAVE); - this->keywords.emplace("USECUPL", this->USECUPL); - this->keywords.emplace("USEFLUX", this->USEFLUX); - this->keywords.emplace("USENOFLO", this->USENOFLO); - this->keywords.emplace("VAPOIL", this->VAPOIL); - this->keywords.emplace("VAPPARS", this->VAPPARS); - this->keywords.emplace("VAPWAT", this->VAPWAT); - this->keywords.emplace("VDFLOW", this->VDFLOW); - this->keywords.emplace("VDFLOWR", this->VDFLOWR); - this->keywords.emplace("VE", this->VE); - this->keywords.emplace("VEDEBUG", this->VEDEBUG); - this->keywords.emplace("VEFIN", this->VEFIN); - this->keywords.emplace("VEFRAC", this->VEFRAC); - this->keywords.emplace("VEFRACP", this->VEFRACP); - this->keywords.emplace("VEFRACPV", this->VEFRACPV); - this->keywords.emplace("VEFRACV", this->VEFRACV); - this->keywords.emplace("VFPCHK", this->VFPCHK); - this->keywords.emplace("VFPIDIMS", this->VFPIDIMS); - this->keywords.emplace("VFPINJ", this->VFPINJ); - this->keywords.emplace("VFPPDIMS", this->VFPPDIMS); - this->keywords.emplace("VFPPROD", this->VFPPROD); - this->keywords.emplace("VFPTABL", this->VFPTABL); - this->keywords.emplace("VISAGE", this->VISAGE); - this->keywords.emplace("VISCD", this->VISCD); - this->keywords.emplace("VISCREF", this->VISCREF); - this->keywords.emplace("VISDATES", this->VISDATES); - this->keywords.emplace("VISOPTS", this->VISOPTS); - this->keywords.emplace("WAGHYSTR", this->WAGHYSTR); - this->keywords.emplace("WAITBAL", this->WAITBAL); - this->keywords.emplace("WALKALIN", this->WALKALIN); - this->keywords.emplace("WALQCALC", this->WALQCALC); - this->keywords.emplace("WAPI", this->WAPI); - this->keywords.emplace("WARN", this->WARN); - this->keywords.emplace("WATDENT", this->WATDENT); - this->keywords.emplace("WATER", this->WATER); - this->keywords.emplace("WATJT", this->WATJT); - this->keywords.emplace("WATVISCT", this->WATVISCT); - this->keywords.emplace("WBHGLR", this->WBHGLR); - this->keywords.emplace("WBOREVOL", this->WBOREVOL); - this->keywords.emplace("WCALCVAL", this->WCALCVAL); - this->keywords.emplace("WCONHIST", this->WCONHIST); - this->keywords.emplace("WCONINJ", this->WCONINJ); - this->keywords.emplace("WCONINJE", this->WCONINJE); - this->keywords.emplace("WCONINJH", this->WCONINJH); - this->keywords.emplace("WCONINJP", this->WCONINJP); - this->keywords.emplace("WCONPROD", this->WCONPROD); - this->keywords.emplace("WCUTBACK", this->WCUTBACK); - this->keywords.emplace("WCUTBACT", this->WCUTBACT); - this->keywords.emplace("WCYCLE", this->WCYCLE); - this->keywords.emplace("WDFAC", this->WDFAC); - this->keywords.emplace("WDFACCOR", this->WDFACCOR); - this->keywords.emplace("WDRILPRI", this->WDRILPRI); - this->keywords.emplace("WDRILRES", this->WDRILRES); - this->keywords.emplace("WDRILTIM", this->WDRILTIM); - this->keywords.emplace("WECON", this->WECON); - this->keywords.emplace("WECONINJ", this->WECONINJ); - this->keywords.emplace("WECONT", this->WECONT); - this->keywords.emplace("WEFAC", this->WEFAC); - this->keywords.emplace("WELCNTL", this->WELCNTL); - this->keywords.emplace("WELDEBUG", this->WELDEBUG); - this->keywords.emplace("WELDRAW", this->WELDRAW); - this->keywords.emplace("WELEVNT", this->WELEVNT); - this->keywords.emplace("WELLDIMS", this->WELLDIMS); - this->keywords.emplace("WELL_COMPLETION_PROBE", this->WELL_COMPLETION_PROBE); - this->keywords.emplace("WELL_PROBE", this->WELL_PROBE); - this->keywords.emplace("WELMOVEL", this->WELMOVEL); - this->keywords.emplace("WELOPEN", this->WELOPEN); - this->keywords.emplace("WELOPENL", this->WELOPENL); - this->keywords.emplace("WELPI", this->WELPI); - this->keywords.emplace("WELPRI", this->WELPRI); - this->keywords.emplace("WELSEGS", this->WELSEGS); - this->keywords.emplace("WELSOMIN", this->WELSOMIN); - this->keywords.emplace("WELSPECL", this->WELSPECL); - this->keywords.emplace("WELSPECS", this->WELSPECS); - this->keywords.emplace("WELTARG", this->WELTARG); - this->keywords.emplace("WFOAM", this->WFOAM); - this->keywords.emplace("WFRICSEG", this->WFRICSEG); - this->keywords.emplace("WFRICSGL", this->WFRICSGL); - this->keywords.emplace("WFRICTN", this->WFRICTN); - this->keywords.emplace("WFRICTNL", this->WFRICTNL); - this->keywords.emplace("WGASPROD", this->WGASPROD); - this->keywords.emplace("WGORPEN", this->WGORPEN); - this->keywords.emplace("WGRUPCON", this->WGRUPCON); - this->keywords.emplace("WH2NUM", this->WH2NUM); - this->keywords.emplace("WH3NUM", this->WH3NUM); - this->keywords.emplace("WHEDREFD", this->WHEDREFD); - this->keywords.emplace("WHISTCTL", this->WHISTCTL); - this->keywords.emplace("WHTEMP", this->WHTEMP); - this->keywords.emplace("WINJMULT", this->WINJMULT); - this->keywords.emplace("WINJTEMP", this->WINJTEMP); - this->keywords.emplace("WLIFT", this->WLIFT); - this->keywords.emplace("WLIFTOPT", this->WLIFTOPT); - this->keywords.emplace("WLIMTOL", this->WLIMTOL); - this->keywords.emplace("WLIST", this->WLIST); - this->keywords.emplace("WLISTARG", this->WLISTARG); - this->keywords.emplace("WLISTNAM", this->WLISTNAM); - this->keywords.emplace("WMICP", this->WMICP); - this->keywords.emplace("WNETCTRL", this->WNETCTRL); - this->keywords.emplace("WNETDP", this->WNETDP); - this->keywords.emplace("WORKLIM", this->WORKLIM); - this->keywords.emplace("WORKTHP", this->WORKTHP); - this->keywords.emplace("WPAVE", this->WPAVE); - this->keywords.emplace("WPAVEDEP", this->WPAVEDEP); - this->keywords.emplace("WPIMULT", this->WPIMULT); - this->keywords.emplace("WPIMULTL", this->WPIMULTL); - this->keywords.emplace("WPITAB", this->WPITAB); - this->keywords.emplace("WPLUG", this->WPLUG); - this->keywords.emplace("WPMITAB", this->WPMITAB); - this->keywords.emplace("WPOLYMER", this->WPOLYMER); - this->keywords.emplace("WPOLYRED", this->WPOLYRED); - this->keywords.emplace("WPOTCALC", this->WPOTCALC); - this->keywords.emplace("WREGROUP", this->WREGROUP); - this->keywords.emplace("WRFT", this->WRFT); - this->keywords.emplace("WRFTPLT", this->WRFTPLT); - this->keywords.emplace("WSALT", this->WSALT); - this->keywords.emplace("WSCCLEAN", this->WSCCLEAN); - this->keywords.emplace("WSCCLENL", this->WSCCLENL); - this->keywords.emplace("WSCTAB", this->WSCTAB); - this->keywords.emplace("WSEGAICD", this->WSEGAICD); - this->keywords.emplace("WSEGDFIN", this->WSEGDFIN); - this->keywords.emplace("WSEGDFMD", this->WSEGDFMD); - this->keywords.emplace("WSEGDFPA", this->WSEGDFPA); - this->keywords.emplace("WSEGDIMS", this->WSEGDIMS); - this->keywords.emplace("WSEGEXSS", this->WSEGEXSS); - this->keywords.emplace("WSEGFLIM", this->WSEGFLIM); - this->keywords.emplace("WSEGFMOD", this->WSEGFMOD); - this->keywords.emplace("WSEGINIT", this->WSEGINIT); - this->keywords.emplace("WSEGITER", this->WSEGITER); - this->keywords.emplace("WSEGLABY", this->WSEGLABY); - this->keywords.emplace("WSEGLINK", this->WSEGLINK); - this->keywords.emplace("WSEGMULT", this->WSEGMULT); - this->keywords.emplace("WSEGPROP", this->WSEGPROP); - this->keywords.emplace("WSEGSEP", this->WSEGSEP); - this->keywords.emplace("WSEGSICD", this->WSEGSICD); - this->keywords.emplace("WSEGSOLV", this->WSEGSOLV); - this->keywords.emplace("WSEGTABL", this->WSEGTABL); - this->keywords.emplace("WSEGVALV", this->WSEGVALV); - this->keywords.emplace("WSKPTAB", this->WSKPTAB); - this->keywords.emplace("WSOLVENT", this->WSOLVENT); - this->keywords.emplace("WSURFACT", this->WSURFACT); - this->keywords.emplace("WTADD", this->WTADD); - this->keywords.emplace("WTEMP", this->WTEMP); - this->keywords.emplace("WTEMPQ", this->WTEMPQ); - this->keywords.emplace("WTEST", this->WTEST); - this->keywords.emplace("WTHPMAX", this->WTHPMAX); - this->keywords.emplace("WTMULT", this->WTMULT); - this->keywords.emplace("WTRACER", this->WTRACER); - this->keywords.emplace("WVFPDP", this->WVFPDP); - this->keywords.emplace("WVFPEXP", this->WVFPEXP); - this->keywords.emplace("WWPAVE", this->WWPAVE); - this->keywords.emplace("ZCORN", this->ZCORN); - this->keywords.emplace("ZFACT1", this->ZFACT1); - this->keywords.emplace("ZFACT1S", this->ZFACT1S); - this->keywords.emplace("ZFACTOR", this->ZFACTOR); - this->keywords.emplace("ZFACTORS", this->ZFACTORS); - this->keywords.emplace("ZIPP2OFF", this->ZIPP2OFF); - this->keywords.emplace("ZIPPY2", this->ZIPPY2); - } - const auto kw_iter = this->keywords.find(keyword); - if (kw_iter == this->keywords.end()) - throw std::invalid_argument(fmt::format("No builtin keyword: {}", keyword)); - return kw_iter->second; -} - - const ::Opm::ParserKeyword& getKeyword(const std::string& keyword) const { return this->operator[](keyword); } + const ::Opm::ParserKeyword& operator[](const std::string& keyword) const { + if (this->keywords.empty()) { + emplaceA(); + emplaceB(); + emplaceC(); + emplaceD(); + emplaceE(); + emplaceF(); + emplaceG(); + emplaceH(); + emplaceI(); + emplaceJ(); + emplaceK(); + emplaceL(); + emplaceM(); + emplaceN(); + emplaceO(); + emplaceP(); + emplaceQ(); + emplaceR(); + emplaceS(); + emplaceT(); + emplaceU(); + emplaceV(); + emplaceW(); + emplaceX(); + emplaceY(); + emplaceZ(); + } + const auto kw_iter = this->keywords.find(keyword); + if (kw_iter == this->keywords.end()) + throw std::invalid_argument(fmt::format("No builtin keyword: {}", keyword)); + return kw_iter->second; + } + const ::Opm::ParserKeyword& getKeyword(const std::string& keyword) const { return this->operator[](keyword); } private: - mutable std::unordered_map keywords; + + void emplaceA() const; + + void emplaceB() const; + + void emplaceC() const; + + void emplaceD() const; + + void emplaceE() const; + + void emplaceF() const; + + void emplaceG() const; + + void emplaceH() const; + + void emplaceI() const; + + void emplaceJ() const; + + void emplaceK() const; + + void emplaceL() const; + + void emplaceM() const; + + void emplaceN() const; + + void emplaceO() const; + + void emplaceP() const; + + void emplaceQ() const; + + void emplaceR() const; + + void emplaceS() const; + + void emplaceT() const; + + void emplaceU() const; + + void emplaceV() const; + + void emplaceW() const; + + void emplaceX() const; + + void emplaceY() const; + + void emplaceZ() const; + + mutable std::unordered_map keywords; }; } } diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/C.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/C.hpp index c615d72d88..e2b8070d51 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/C.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/C.hpp @@ -150,7 +150,7 @@ namespace ParserKeywords { class MIN_PORE_VOLUME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 5e-06; }; }; @@ -169,43 +169,43 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_WCUT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_GOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_WGR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WORKOVER_PROCEDURE { @@ -223,13 +223,13 @@ namespace ParserKeywords { class MIN_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -100000000000000000000.000000; }; class MIN_GAS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -100000000000000000000.000000; }; class FOLLOW_ON_WELL { @@ -254,25 +254,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class PROCEDURE { @@ -295,37 +295,37 @@ namespace ParserKeywords { class MAX_TOTAL_TRACER_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_TOTAL_TRACER_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_FREE_TRACER_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_FREE_TRACER_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_SOL_TRACER_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_SOL_TRACER_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; }; @@ -339,6 +339,27 @@ namespace ParserKeywords { + class CNAMES : public ParserKeyword { + public: + CNAMES(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + + class CO2SOL : public ParserKeyword { + public: + CO2SOL(); + static const std::string keywordName; + }; + + + class CO2STOR : public ParserKeyword { public: CO2STOR(); @@ -463,7 +484,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -477,13 +498,13 @@ namespace ParserKeywords { class LEFT_MARGIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class RIGHT_MARGIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 132; }; }; @@ -502,13 +523,13 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K1 { @@ -530,7 +551,7 @@ namespace ParserKeywords { class SAT_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class CONNECTION_TRANSMISSIBILITY_FACTOR { @@ -546,18 +567,19 @@ namespace ParserKeywords { class Kh { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class SKIN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D_FACTOR { public: static const std::string itemName; + static constexpr double defaultValue = 0; }; class DIR { @@ -592,13 +614,13 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K1 { @@ -620,7 +642,7 @@ namespace ParserKeywords { class SAT_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class CONNECTION_TRANSMISSIBILITY_FACTOR { @@ -636,13 +658,13 @@ namespace ParserKeywords { class Kh { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class SKIN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D_FACTOR { @@ -677,43 +699,43 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class UPPER_K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class LOWER_K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class F1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class F2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class FLASH_PVTNUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -732,13 +754,13 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K1 { @@ -754,7 +776,7 @@ namespace ParserKeywords { class SAT_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -773,31 +795,31 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class REL_PERM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -822,25 +844,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class UPPER_K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class LOWER_K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class COMPLETION_NUMBER { @@ -864,25 +886,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class N { @@ -961,25 +983,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SAT_TABLE_NUM { @@ -1028,25 +1050,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SAT_TABLE_NUM { @@ -1148,7 +1170,7 @@ namespace ParserKeywords { class CENTER_DEPTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class THERMAL_LENGTH { @@ -1217,7 +1239,7 @@ namespace ParserKeywords { class CENTER_DEPTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class THERMAL_LENGTH { @@ -1233,6 +1255,86 @@ namespace ParserKeywords { + class COMPTRAJ : public ParserKeyword { + public: + COMPTRAJ(); + static const std::string keywordName; + + class WELL { + public: + static const std::string itemName; + }; + + class BRANCH_NUMBER { + public: + static const std::string itemName; + static constexpr int defaultValue = 1; + }; + + class PERF_TOP { + public: + static const std::string itemName; + }; + + class PERF_BOT { + public: + static const std::string itemName; + }; + + class PERF_REF { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class COMPLETION_NUMBER { + public: + static const std::string itemName; + static constexpr int defaultValue = 1; + }; + + class STATE { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class SAT_TABLE { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class CONNECTION_TRANSMISSIBILITY_FACTOR { + public: + static const std::string itemName; + }; + + class DIAMETER { + public: + static const std::string itemName; + }; + + class Kh { + public: + static const std::string itemName; + static constexpr double defaultValue = -1.000000; + }; + + class SKIN { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class D_FACTOR { + public: + static const std::string itemName; + }; + }; + + + class COMPVE : public ParserKeyword { public: COMPVE(); @@ -1246,25 +1348,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SAT_TABLE_NUM { @@ -1296,7 +1398,7 @@ namespace ParserKeywords { class S_D { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GTOP { @@ -1330,25 +1432,25 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SAT_TABLE_NUM { @@ -1380,7 +1482,7 @@ namespace ParserKeywords { class S_D { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GTOP { @@ -1424,6 +1526,34 @@ namespace ParserKeywords { + class CONNECTION_PROBE_OPM : public ParserKeyword { + public: + CONNECTION_PROBE_OPM(); + static const std::string keywordName; + + class WELL { + public: + static const std::string itemName; + }; + + class I { + public: + static const std::string itemName; + }; + + class J { + public: + static const std::string itemName; + }; + + class K { + public: + static const std::string itemName; + }; + }; + + + class COORD : public ParserKeyword { public: COORD(); @@ -1467,13 +1597,13 @@ namespace ParserKeywords { class R1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class R2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1761,9 +1891,22 @@ namespace ParserKeywords { - class CREFS : public ParserKeyword { + class CREFW : public ParserKeyword { public: - CREFS(); + CREFW(); + static const std::string keywordName; + + class COMPRESSIBILITY { + public: + static const std::string itemName; + }; + }; + + + + class CREFWS : public ParserKeyword { + public: + CREFWS(); static const std::string keywordName; class COMPRESSIBILITY { @@ -1800,31 +1943,31 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_UPPER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_LOWER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class CONNECTION_SKIN_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/D.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/D.hpp index 757be0df92..ccb8147f81 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/D.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/D.hpp @@ -75,6 +75,7 @@ namespace ParserKeywords { class REGION_FAMILY { public: static const std::string itemName; + static const std::string defaultValue; }; class DEPTH { @@ -107,523 +108,523 @@ namespace ParserKeywords { class Item1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item3 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item4 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item5 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item6 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item7 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item8 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item9 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item10 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item11 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item12 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item13 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item14 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item15 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item16 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item17 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item18 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item19 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item20 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item21 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item22 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item23 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item24 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item25 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item26 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item27 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item28 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item29 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item30 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item31 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item32 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item33 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item34 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item35 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item36 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item37 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item38 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item39 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item40 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item41 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item42 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item43 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item44 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item45 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item46 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item47 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item48 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item49 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item50 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item51 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item52 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item53 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item54 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item55 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item56 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item57 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item58 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item59 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item60 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item61 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item62 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item63 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item64 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item65 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item66 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item67 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item68 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item69 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item70 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item71 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item72 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item73 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item74 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item75 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item76 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item77 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item78 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item79 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item80 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item81 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item82 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item83 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item84 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item85 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item86 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class Item87 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -652,13 +653,26 @@ namespace ParserKeywords { class NUM_TIMES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INCREMENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; + }; + }; + + + + class DENAQA : public ParserKeyword { + public: + DENAQA(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; }; }; @@ -672,19 +686,19 @@ namespace ParserKeywords { class OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 600.000000; }; class WATER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 999.014000; }; class GAS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -745,7 +759,43 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; + }; + }; + + + + class DIFFAGAS : public ParserKeyword { + public: + DIFFAGAS(); + static const std::string keywordName; + + class CO2_IN_GAS { + public: + static const std::string itemName; + }; + + class H20_IN_GAS { + public: + static const std::string itemName; + }; + }; + + + + class DIFFAWAT : public ParserKeyword { + public: + DIFFAWAT(); + static const std::string keywordName; + + class CO2_IN_WATER { + public: + static const std::string itemName; + }; + + class H20_IN_WATER { + public: + static const std::string itemName; }; }; @@ -789,13 +839,31 @@ namespace ParserKeywords { class GAS_OIL_CROSS_DIFF_COEFF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class OIL_OIL_CROSS_DIFF_COEFF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; + }; + }; + + + + class DIFFCGAS : public ParserKeyword { + public: + DIFFCGAS(); + static const std::string keywordName; + + class CO2_IN_GAS { + public: + static const std::string itemName; + }; + + class H20_IN_GAS { + public: + static const std::string itemName; }; }; @@ -814,7 +882,7 @@ namespace ParserKeywords { class RE_ADSORB_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class SOL_DIFF_COEFF { @@ -825,6 +893,24 @@ namespace ParserKeywords { + class DIFFCWAT : public ParserKeyword { + public: + DIFFCWAT(); + static const std::string keywordName; + + class CO2_IN_WATER { + public: + static const std::string itemName; + }; + + class H20_IN_WATER { + public: + static const std::string itemName; + }; + }; + + + class DIFFDP : public ParserKeyword { public: DIFFDP(); @@ -841,7 +927,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -855,7 +941,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -869,7 +955,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -883,7 +969,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -897,7 +983,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -911,7 +997,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -1021,19 +1107,19 @@ namespace ParserKeywords { class DSTARG { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.050000; }; class DSMAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class DPMAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 13.790000; }; }; @@ -1055,6 +1141,14 @@ namespace ParserKeywords { + class DISGASW : public ParserKeyword { + public: + DISGASW(); + static const std::string keywordName; + }; + + + class DISPDIMS : public ParserKeyword { public: DISPDIMS(); @@ -1063,19 +1157,32 @@ namespace ParserKeywords { class NUM_DISP_TABLES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_VELOCITY_NODES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class MAX_CONCENTRATION_NODES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; + }; + }; + + + + class DISPERC : public ParserKeyword { + public: + DISPERC(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; }; }; @@ -1128,13 +1235,13 @@ namespace ParserKeywords { class MOD_OIL_WAT_PERM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MOD_OIL_GAS_PERM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SCALE_PERM_FRACTURE { @@ -1206,61 +1313,61 @@ namespace ParserKeywords { class INTERVAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class A { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class B { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class C { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class E { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class F { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class G { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class H { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class LOOK_AHEAD { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class CALCULATION { @@ -1299,6 +1406,19 @@ namespace ParserKeywords { class DRSDT_MAX { public: static const std::string itemName; + static constexpr double defaultValue = 0.040000; + }; + + class PSI { + public: + static const std::string itemName; + static constexpr double defaultValue = 0.340000; + }; + + class OMEGA { + public: + static const std::string itemName; + static constexpr double defaultValue = 3e-09; }; class OPTION { @@ -1499,19 +1619,19 @@ namespace ParserKeywords { class MNUMDR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXDYNF { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXDYNR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1551,7 +1671,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1565,7 +1685,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1579,7 +1699,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/E.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/E.hpp index 5190ff7bcd..c302c5e375 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/E.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/E.hpp @@ -189,28 +189,28 @@ namespace ParserKeywords { EHYSTR(); static const std::string keywordName; - class curvature_caplillary_pressure_hyst { + class curvature_capillary_pressure_hyst { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class relative_perm_hyst { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class curvature_param_killough_wetting { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class mod_param_trapped { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class limiting_hyst_flag { @@ -258,13 +258,13 @@ namespace ParserKeywords { class threshold_saturation { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class FLAG_SOMETHING { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -278,19 +278,19 @@ namespace ParserKeywords { class curvature_caplillary_pressure_hyst { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class curvature_parameter_wetting_phase_hyst { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class mod_param_non_wet_phase_sat { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; }; @@ -390,19 +390,19 @@ namespace ParserKeywords { class NTENDP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NSENDP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class COMB_MODE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -424,7 +424,7 @@ namespace ParserKeywords { class DATA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; }; @@ -438,7 +438,7 @@ namespace ParserKeywords { class DATA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; }; @@ -452,7 +452,7 @@ namespace ParserKeywords { class DATA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; }; @@ -466,7 +466,34 @@ namespace ParserKeywords { class DATA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; + }; + }; + + + + class EOS : public ParserKeyword { + public: + EOS(); + static const std::string keywordName; + + class EQUATION { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + }; + + + + class EOSNUM : public ParserKeyword { + public: + EOSNUM(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; }; }; @@ -480,13 +507,13 @@ namespace ParserKeywords { class TABLE_OUTPUT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class CHECK_DRAIN_HYST { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class IX1 { @@ -566,7 +593,7 @@ namespace ParserKeywords { class TABLE_OUTPUT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class GRID_NAME { @@ -578,7 +605,7 @@ namespace ParserKeywords { class CHECK_DRAIN_HYST { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -592,31 +619,31 @@ namespace ParserKeywords { class NTEQUL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class DEPTH_NODES_P { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2000; }; class DEPTH_NODES_TAB { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class NTTRVD { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NSTRVD { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; }; @@ -745,7 +772,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class REGION_NUMBER { @@ -818,7 +845,7 @@ namespace ParserKeywords { class DATUM_DEPTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class DATUM_PRESSURE { @@ -829,43 +856,43 @@ namespace ParserKeywords { class OWC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PC_OWC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GOC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PC_GOC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class BLACK_OIL_INIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class BLACK_OIL_INIT_WG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class OIP_INIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -5; }; class EQLOPT04 { @@ -877,6 +904,12 @@ namespace ParserKeywords { public: static const std::string itemName; }; + + class BLACK_OIL_INIT_HG { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; }; @@ -923,7 +956,7 @@ namespace ParserKeywords { class STATUS_CODE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1008,7 +1041,7 @@ namespace ParserKeywords { class LEVEL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/F.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/F.hpp index 1e8e20d618..1cd119fa4d 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/F.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/F.hpp @@ -12,7 +12,7 @@ namespace ParserKeywords { class MFSEGS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -74,11 +74,13 @@ namespace ParserKeywords { class TARGET_BHP { public: static const std::string itemName; + static constexpr double defaultValue = 1.013250; }; class LIMIT_BHP { public: static const std::string itemName; + static constexpr double defaultValue = 6895.000000; }; }; @@ -105,6 +107,68 @@ namespace ParserKeywords { + class FIELDSEP : public ParserKeyword { + public: + FIELDSEP(); + static const std::string keywordName; + + class STAGE { + public: + static const std::string itemName; + }; + + class TEMPERATURE { + public: + static const std::string itemName; + static constexpr double defaultValue = 15.560000; + }; + + class PRESSURE { + public: + static const std::string itemName; + static constexpr double defaultValue = 1.013250; + }; + + class LIQ_DESTINATION { + public: + static const std::string itemName; + }; + + class VAP_DESTINATION { + public: + static const std::string itemName; + }; + + class KVALUE { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class TABLE_NUM { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class EOS_NUM { + public: + static const std::string itemName; + }; + + class REF_TEMP { + public: + static const std::string itemName; + }; + + class REF_PRESS { + public: + static const std::string itemName; + }; + }; + + + class FIELD_PROBE : public ParserKeyword { public: FIELD_PROBE(); @@ -113,6 +177,14 @@ namespace ParserKeywords { + class FIELD_PROBE_OPM : public ParserKeyword { + public: + FIELD_PROBE_OPM(); + static const std::string keywordName; + }; + + + class FILEUNIT : public ParserKeyword { public: FILEUNIT(); @@ -173,37 +245,37 @@ namespace ParserKeywords { class STAGE_TEMPERATURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 15.560000; }; class STAGE_PRESSURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.013250; }; class DESTINATION_OUPUT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class DESTINATION_STAGE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class K_VAL_TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class GAS_PLANT_TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SURF_EQ_STATE_NUM { @@ -368,7 +440,7 @@ namespace ParserKeywords { class EXP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -400,19 +472,19 @@ namespace ParserKeywords { class EXPONENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MIN_SURF_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-20; }; class MIN_WAT_SAT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -524,7 +596,7 @@ namespace ParserKeywords { class ADSORPTION_INDEX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class ROCK_DENSITY { @@ -543,7 +615,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -557,13 +629,13 @@ namespace ParserKeywords { class NWFRIC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NWFRIB { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/G.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/G.hpp index a5a55a34ff..50c2762163 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/G.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/G.hpp @@ -41,19 +41,19 @@ namespace ParserKeywords { class REFERENCE_TEMPERATURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 293.150000; }; class EXPANSION_COEFF_LINEAR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class EXPANSION_COEFF_QUADRATIC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -80,31 +80,31 @@ namespace ParserKeywords { class VFP_TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ARTFICIAL_LIFT_QNTY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GAS_CONSUMPTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class COMPRESSION_LVL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class ACTION_SEQ_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -118,73 +118,73 @@ namespace ParserKeywords { class JAN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class FEB { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class APR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class JUN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class JUL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class AUG { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SEP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class OCT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class NOV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class DEC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -299,13 +299,13 @@ namespace ParserKeywords { class PREF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.013200; }; class JOULE_THOMSON_COEFFICIENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -343,7 +343,7 @@ namespace ParserKeywords { class NUM_MONTHS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; class INITIAL_DCQ { @@ -366,25 +366,25 @@ namespace ParserKeywords { class LIMIT_DCQ_RED_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class ANTICIPATED_DCQ_RED_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MAX_ITERATIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 3; }; class DCQ_CONV_TOLERANCE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; }; @@ -416,6 +416,14 @@ namespace ParserKeywords { + class GASWAT : public ParserKeyword { + public: + GASWAT(); + static const std::string keywordName; + }; + + + class GASYEAR : public ParserKeyword { public: GASYEAR(); @@ -446,25 +454,25 @@ namespace ParserKeywords { class LIMIT_DCQ_RED_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class ANTICIPATED_DCQ_RED_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MAX_ITERATIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 3; }; class DCQ_CONV_TOLERANCE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; }; @@ -483,13 +491,13 @@ namespace ParserKeywords { class MIN_ENERGY_PROD_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MIN_CALORIFIC_VAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class FLAG_END_RUN { @@ -538,7 +546,7 @@ namespace ParserKeywords { class RATE_RED_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.900000; }; }; @@ -557,7 +565,7 @@ namespace ParserKeywords { class ENERGY_PROD_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; }; @@ -587,25 +595,21 @@ namespace ParserKeywords { class SURFACE_TARGET { public: static const std::string itemName; - static const UDAValue defaultValue; }; class RESV_TARGET { public: static const std::string itemName; - static const UDAValue defaultValue; }; class REINJ_TARGET { public: static const std::string itemName; - static const UDAValue defaultValue; }; class VOIDAGE_TARGET { public: static const std::string itemName; - static const UDAValue defaultValue; }; class RESPOND_TO_PARENT { @@ -617,7 +621,7 @@ namespace ParserKeywords { class GUIDE_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GUIDE_RATE_DEF { @@ -813,16 +817,19 @@ namespace ParserKeywords { class WATER_EXCEED_PROCEDURE { public: static const std::string itemName; + static const std::string defaultValue; }; class GAS_EXCEED_PROCEDURE { public: static const std::string itemName; + static const std::string defaultValue; }; class LIQUID_EXCEED_PROCEDURE { public: static const std::string itemName; + static const std::string defaultValue; }; class RESERVOIR_FLUID_TARGET { @@ -845,12 +852,12 @@ namespace ParserKeywords { static const std::string itemName; }; - class SURFACE_GAS_BALANCE { + class SURFACE_GAS_FRACTION { public: static const std::string itemName; }; - class SURFACE_WATER_BALANCE { + class SURFACE_WAT_FRACTION { public: static const std::string itemName; }; @@ -952,13 +959,13 @@ namespace ParserKeywords { class TOLERANCE_FRACTION_INJ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class MAX_IT_INJ { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; }; @@ -1035,25 +1042,25 @@ namespace ParserKeywords { class UPPER_RATE_LIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class LOWER_RATE_LIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class UPPER_CONC_LIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class LOWER_CONC_LIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; }; @@ -1141,7 +1148,7 @@ namespace ParserKeywords { class MAX_NUM_GRAD_PARAMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1203,7 +1210,7 @@ namespace ParserKeywords { class MIN_POTENTIAL_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1264,7 +1271,7 @@ namespace ParserKeywords { class MAX_OPEN_WELLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1295,7 +1302,7 @@ namespace ParserKeywords { class MAX_OPEN_WELLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class TRACER { @@ -1306,37 +1313,37 @@ namespace ParserKeywords { class MAX_TOTAL_TRACER_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_TOTAL_TRACER_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_FREE_TRACER_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_FREE_TRACER_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_SOL_TRACER_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; class MAX_SOL_TRACER_CONC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.000000; }; }; @@ -1355,7 +1362,7 @@ namespace ParserKeywords { class EFFICIENCY_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class TRANSFER_EXT_NET { @@ -1469,13 +1476,13 @@ namespace ParserKeywords { class MAX_LIFT_CAPACITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_NUM_WELL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1494,13 +1501,13 @@ namespace ParserKeywords { class MAX_LIFT_GAS_SUPPLY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -100000000000000000000.000000; }; class MAX_TOTAL_GAS_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -100000000000000000000.000000; }; }; @@ -1533,37 +1540,37 @@ namespace ParserKeywords { class MIN_RATE_TRIGGER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_RATE_TRIGGER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class PRESSURE_INCR_SUBTRACT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PRESSURE_INCR_ADD { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MIN_ALLOW_PRESSURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_ALLOW_PRESSURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; }; @@ -1592,7 +1599,7 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1611,7 +1618,7 @@ namespace ParserKeywords { class PROD_RATE_SWITCH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PHASE_TYPE { @@ -1623,19 +1630,19 @@ namespace ParserKeywords { class NEW_VFT_TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 4; }; class NEW_ARTIFICIAL_LIFT_QNTY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class NEW_GAS_CONUMPTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1793,13 +1800,13 @@ namespace ParserKeywords { class WATER_SP_GRAVITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class GAS_SP_GRAVITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.777300; }; }; @@ -1873,7 +1880,7 @@ namespace ParserKeywords { class PRODUCTIVITY_INDEX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class LENGTH_DEAD_GRID_BLOCK { @@ -1884,13 +1891,13 @@ namespace ParserKeywords { class OPTION_CONNECT_REACH { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ADJUSTMENT_REACH { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class REMOVE_CAP_PRESSURE { @@ -1902,19 +1909,19 @@ namespace ParserKeywords { class INFILTR_EQ { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class HYDRAULIC_CONDUCTIVITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class RIVER_BED_THICKNESS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1936,13 +1943,13 @@ namespace ParserKeywords { class GRID { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class EGRID { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -1962,13 +1969,13 @@ namespace ParserKeywords { class NRMULT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NRPINC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -2006,6 +2013,19 @@ namespace ParserKeywords { + class GROUP_PROBE_OPM : public ParserKeyword { + public: + GROUP_PROBE_OPM(); + static const std::string keywordName; + + class GROUPS { + public: + static const std::string itemName; + }; + }; + + + class GRUPMAST : public ParserKeyword { public: GRUPMAST(); @@ -2029,6 +2049,7 @@ namespace ParserKeywords { class LIMITING_FRACTION { public: static const std::string itemName; + static constexpr double defaultValue = 100000000000000000000.000000; }; }; @@ -2052,13 +2073,13 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ALQ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SUB_SEA_MANIFOLD { @@ -2067,13 +2088,13 @@ namespace ParserKeywords { static const std::string defaultValue; }; - class LIFT_GAS_FLOW_THROUGH { + class ADD_GAS_LIFT_GAS { public: static const std::string itemName; static const std::string defaultValue; }; - class ALQ_SURFACE_EQV { + class ALQ_SURFACE_DENSITY { public: static const std::string itemName; static const std::string defaultValue; @@ -2095,13 +2116,13 @@ namespace ParserKeywords { class WORKOVER_RIG_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class DRILLING_RIG_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ADD_OR_REMOVE { @@ -2152,19 +2173,19 @@ namespace ParserKeywords { static const std::string defaultValue; }; - class OIL_INJ_PROD_CONSTRAINTS { + class OIL_INJ_CONSTRAINTS { public: static const std::string itemName; static const std::string defaultValue; }; - class WAT_INJ_PROD_CONSTRAINTS { + class WAT_INJ_CONSTRAINTS { public: static const std::string itemName; static const std::string defaultValue; }; - class GAS_INJ_PROD_CONSTRAINTS { + class GAS_INJ_CONSTRAINTS { public: static const std::string itemName; static const std::string defaultValue; @@ -2191,7 +2212,7 @@ namespace ParserKeywords { class NEW_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 999999999999999949387135297074018866963645011013410073083904.000000; }; }; @@ -2234,19 +2255,19 @@ namespace ParserKeywords { class SURF_INJ_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class RES_INJ_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MEAN_CALORIFIC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -2265,37 +2286,37 @@ namespace ParserKeywords { class OIL_PRODUCTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WATER_PRODUCTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GAS_PRODUCTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class RES_FLUID_VOL_PRODUCTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class LIFT_GAS_SUPPLY_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MEAN_CALORIFIC_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -2319,6 +2340,19 @@ namespace ParserKeywords { + class GSF : public ParserKeyword { + public: + GSF(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + class GSSCPTST : public ParserKeyword { public: GSSCPTST(); @@ -2338,37 +2372,37 @@ namespace ParserKeywords { class TARGET_PROD_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class TARGET_PROD_PERIOD { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_PROD_RATE_FLAG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class CONV_TOLERANCE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAT_IT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 6; }; class SUB_GRP_CONTROL_FLAG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -2530,7 +2564,7 @@ namespace ParserKeywords { class NUM_ADDITIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -2559,7 +2593,7 @@ namespace ParserKeywords { class NUM_MULT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -2591,7 +2625,7 @@ namespace ParserKeywords { class MIN_CALC_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class NOMINATED_PHASE { @@ -2603,37 +2637,37 @@ namespace ParserKeywords { class A { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class B { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class C { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class E { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class F { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class ALLOW_INCREASE { @@ -2645,7 +2679,7 @@ namespace ParserKeywords { class DAMPING_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class USE_FREE_GAS { @@ -2657,7 +2691,7 @@ namespace ParserKeywords { class MIN_GUIDE_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/H.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/H.hpp index 6c86edb015..e575109451 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/H.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/H.hpp @@ -4,6 +4,22 @@ namespace Opm { namespace ParserKeywords { + class H2SOL : public ParserKeyword { + public: + H2SOL(); + static const std::string keywordName; + }; + + + + class H2STORE : public ParserKeyword { + public: + H2STORE(); + static const std::string keywordName; + }; + + + class HALFTRAN : public ParserKeyword { public: HALFTRAN(); @@ -177,55 +193,55 @@ namespace ParserKeywords { class MAX_GRAD_REGIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_SUB_REGIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_GRADS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_FAULTS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_AQUIFER_PARAMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_WELL_PARAMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class UNUSED { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_ROCK_GRAD_PARAMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_WELL_CONN_PARAMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -257,19 +273,19 @@ namespace ParserKeywords { class AQUIFER_PORE_VOL_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class AQUIFER_PORE_PERM_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class AQUIFER_GRID_CONN_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -288,19 +304,19 @@ namespace ParserKeywords { class AQUIFER_PERM_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class AQUIFER_ANGLE_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class AQUIFER_DEPTH_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -319,19 +335,19 @@ namespace ParserKeywords { class AQUIFER_WAT_VOL_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class AQUIFER_PROD_INDEX_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class AQUIFER_DEPTH_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -371,13 +387,13 @@ namespace ParserKeywords { class CTF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class SKIN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -396,13 +412,13 @@ namespace ParserKeywords { class TRANS_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class DIFF_MULT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -455,7 +471,7 @@ namespace ParserKeywords { class CALCULATE_GRADIENTS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -587,6 +603,14 @@ namespace ParserKeywords { + class HWELLS : public ParserKeyword { + public: + HWELLS(); + static const std::string keywordName; + }; + + + class HWKRO : public ParserKeyword { public: HWKRO(); diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/I.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/I.hpp index ad500462cb..4bc0c4da2c 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/I.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/I.hpp @@ -17,7 +17,7 @@ namespace ParserKeywords { class PROCESS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -213,7 +213,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -232,7 +232,7 @@ namespace ParserKeywords { class ION_EXCH_CONST { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/J.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/J.hpp index 8c6560ccbd..d3f90664db 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/J.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/J.hpp @@ -18,25 +18,25 @@ namespace ParserKeywords { class OW_SURFACE_TENSION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class GO_SURFACE_TENSION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class ALPHA_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class BETA_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class DIRECTION { @@ -72,13 +72,13 @@ namespace ParserKeywords { class POROSITY_POWER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class PERMEABILITY_POWER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class PERM_DIRECTION { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/L.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/L.hpp index 752beb6022..b6b650d23a 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/L.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/L.hpp @@ -73,37 +73,37 @@ namespace ParserKeywords { class MAXLGR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAXCLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MCOARS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAMALG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXLALG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class LSTACK { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class INTERP { @@ -115,7 +115,7 @@ namespace ParserKeywords { class NCHCOR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -168,7 +168,7 @@ namespace ParserKeywords { class ACTIVE_WELLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -187,7 +187,7 @@ namespace ParserKeywords { class ACTIVE_WELLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -224,7 +224,7 @@ namespace ParserKeywords { class MIN_INTERVAL_BETWEEN_GAS_LIFT_OPTIMIZATIONS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class OPTIMISE_ALL_ITERATIONS { @@ -530,25 +530,25 @@ namespace ParserKeywords { class FX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 4.000000; }; class FY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 4.000000; }; class FZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 4.000000; }; class FGD { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class OPTION { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/M.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/M.hpp index 0eabf2eabe..94056bed6d 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/M.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/M.hpp @@ -52,19 +52,19 @@ namespace ParserKeywords { class NEWTON_IT_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; class NON_LIN_CONV_ERR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class MATERIAL_BALANCE_ERR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -118,6 +118,14 @@ namespace ParserKeywords { + class MECH : public ParserKeyword { + public: + MECH(); + static const std::string keywordName; + }; + + + class MEMORY : public ParserKeyword { public: MEMORY(); @@ -157,79 +165,79 @@ namespace ParserKeywords { class MESSAGE_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1000000; }; class COMMENT_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1000000; }; class WARNING_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10000; }; class PROBLEM_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 100; }; class ERROR_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 100; }; class BUG_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 100; }; class MESSAGE_STOP_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1000000; }; class COMMENT_STOP_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1000000; }; class WARNING_STOP_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10000; }; class PROBLEM_STOP_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 100; }; class ERROR_STOP_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class BUG_STOP_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class GROUP_PRINT_LIMIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; }; @@ -291,103 +299,103 @@ namespace ParserKeywords { class DENSITY_BIOFILM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 35.000000; }; class DENSITY_CALCITE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 2710.000000; }; class DETACHMENT_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 2.6e-10; }; class CRITICAL_POROSITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class FITTING_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3.000000; }; class HALF_VELOCITY_OXYGEN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 2e-05; }; class HALF_VELOCITY_UREA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 21.300000; }; class MAXIMUM_GROWTH_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 4.17e-05; }; class MAXIMUM_OXYGEN_CONCENTRATION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.040000; }; class MAXIMUM_UREA_CONCENTRATION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 60.000000; }; class MAXIMUM_UREA_UTILIZATION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.016100; }; class MICROBIAL_ATTACHMENT_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 8.51e-07; }; class MICROBIAL_DEATH_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3.18e-07; }; class MINIMUM_PERMEABILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-20; }; class OXYGEN_CONSUMPTION_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class TOLERANCE_BEFORE_CLOGGING { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; class YIELD_GROWTH_COEFFICIENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; }; @@ -401,19 +409,19 @@ namespace ParserKeywords { class CUTOFF_TRANSMISSIBILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class DIFFUSIVITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class CUTOFF_THERMAL_TRANSMISSIBILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -427,7 +435,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 6; }; }; @@ -438,10 +446,10 @@ namespace ParserKeywords { MINPORV(); static const std::string keywordName; - class MIN_PORE_VOL { + class VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -455,21 +463,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class MINPVFIL : public ParserKeyword { - public: - MINPVFIL(); - static const std::string keywordName; - - class VALUE { - public: - static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -483,7 +477,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -558,13 +552,13 @@ namespace ParserKeywords { class NTMISC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NSMISC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class TWOPOINT { @@ -846,7 +840,7 @@ namespace ParserKeywords { class FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class REGION_NUMBER { @@ -1105,6 +1099,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; + static constexpr double defaultValue = 1.000000; }; }; @@ -1115,7 +1110,7 @@ namespace ParserKeywords { MW(); static const std::string keywordName; - class MOLAR_WEIGHT { + class DATA { public: static const std::string itemName; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/N.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/N.hpp index 4a5a33b84a..18bbd82492 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/N.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/N.hpp @@ -12,6 +12,19 @@ namespace ParserKeywords { + class NCOMPS : public ParserKeyword { + public: + NCOMPS(); + static const std::string keywordName; + + class NUM_COMPS { + public: + static const std::string itemName; + }; + }; + + + class NCONSUMP : public ParserKeyword { public: NCONSUMP(); @@ -25,7 +38,7 @@ namespace ParserKeywords { class GAS_CONSUMPTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class REMOVAL_GROUP { @@ -49,7 +62,7 @@ namespace ParserKeywords { class EFF_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -63,43 +76,43 @@ namespace ParserKeywords { class TIME_INTERVAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PRESSURE_CONVERGENCE_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class MAX_ITER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class THP_CONVERGENCE_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class MAX_ITER_THP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class TARGET_BALANCE_ERROR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class MAX_BALANCE_ERROR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class MIN_TIME_STEP { @@ -140,19 +153,19 @@ namespace ParserKeywords { class VFT_TABLE_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ALQ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GAS_CONSUMPTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class EXTRACTION_GROUP { @@ -202,7 +215,20 @@ namespace ParserKeywords { class NBCMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; + }; + }; + + + + class NETWORK_PROBE : public ParserKeyword { + public: + NETWORK_PROBE(); + static const std::string keywordName; + + class NETWORK_NODES { + public: + static const std::string itemName; }; }; @@ -289,7 +315,7 @@ namespace ParserKeywords { class FRACTION_PORE_VOL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class METHOD { @@ -360,67 +386,65 @@ namespace ParserKeywords { class TRAN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class IST1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class IST2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class PRESSURE_TABLE1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class PRESSURE_TABLE2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VE_FACE1 { public: static const std::string itemName; - static const std::string defaultValue; }; class VE_FACE2 { public: static const std::string itemName; - static const std::string defaultValue; }; class DIFFUSIVITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SIM_DEPENDENT3 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class VDFLOW_AREA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class VDFLOW_PERM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -627,7 +651,7 @@ namespace ParserKeywords { class MAX_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 3600; }; }; @@ -641,7 +665,7 @@ namespace ParserKeywords { class LINEAR_SOLVER_SIZE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; }; @@ -668,7 +692,7 @@ namespace ParserKeywords { class num { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -682,7 +706,7 @@ namespace ParserKeywords { class NUM_ITER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; }; @@ -701,13 +725,13 @@ namespace ParserKeywords { class WAX_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000; }; class MAX_FRAC_REMOVAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/O.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/O.hpp index 90b14bb503..97061eef9f 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/O.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/O.hpp @@ -54,19 +54,19 @@ namespace ParserKeywords { class COMPRESSIBILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class EXPANSION_COEFF_LINEAR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class EXPANSION_COEFF_QUADRATIC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -80,19 +80,19 @@ namespace ParserKeywords { class REFERENCE_TEMPERATURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 293.150000; }; class EXPANSION_COEFF_LINEAR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class EXPANSION_COEFF_QUADRATIC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -106,13 +106,13 @@ namespace ParserKeywords { class PREF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.013200; }; class JOULE_THOMSON_COEFFICIENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -226,13 +226,13 @@ namespace ParserKeywords { class PARAM1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PARAM2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -266,13 +266,13 @@ namespace ParserKeywords { class PARAM1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PARAM2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class REGION_NAME { @@ -305,1915 +305,1915 @@ namespace ParserKeywords { class ITEM1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM3 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM4 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM5 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM6 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM7 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM8 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM9 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM10 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM11 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM12 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM13 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM14 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM15 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM16 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM17 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM18 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM19 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM20 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM21 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM22 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM23 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM24 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM25 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM26 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM27 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM28 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM29 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM30 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM31 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM32 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM33 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM34 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM35 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM36 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM37 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM38 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM39 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM40 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM41 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM42 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM43 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM44 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM45 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM46 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM47 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM48 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM49 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM50 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM51 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM52 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM53 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM54 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM55 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM56 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM57 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM58 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM59 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM60 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM61 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM62 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM63 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM64 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM65 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM66 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM67 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM68 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM69 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM70 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM71 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM72 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM73 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM74 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM75 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM76 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM77 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM78 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM79 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM80 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM81 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM82 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM83 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM84 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM85 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM86 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM87 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM88 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM89 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM90 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM91 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM92 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM93 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM94 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM95 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM96 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM97 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM98 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM99 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM100 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM101 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM102 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM103 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM104 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM105 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM106 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM107 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM108 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM109 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM110 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM111 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM112 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM113 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM114 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM115 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM116 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM117 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM118 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM119 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM120 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM121 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM122 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM123 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM124 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM125 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM126 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM127 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM128 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM129 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM130 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM131 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM132 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM133 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM134 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM135 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM136 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM137 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM138 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM139 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM140 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM141 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM142 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM143 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM144 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM145 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM146 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM147 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM148 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM149 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM150 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM151 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM152 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM153 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM154 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM155 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM156 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM157 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM158 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM159 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM160 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM161 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM162 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM163 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM164 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM165 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM166 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM167 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM168 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM169 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM170 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM171 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM172 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM173 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM174 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM175 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM176 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM177 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM178 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM179 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM180 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM181 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM182 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM183 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM184 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM185 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM186 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM187 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM188 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM189 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM190 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM191 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM192 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM193 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM194 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM195 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM196 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM197 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM198 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM199 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM200 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM201 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM202 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM203 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM204 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM205 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM206 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM207 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM208 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM209 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM210 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM211 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM212 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM213 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM214 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM215 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM216 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM217 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM218 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM219 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM220 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM221 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM222 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM223 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM224 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM225 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM226 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM227 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM228 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM229 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM230 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM231 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM232 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM233 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM234 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM235 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM236 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM237 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM238 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM239 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM240 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM241 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM242 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM243 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM244 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM245 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM246 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM247 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM248 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM249 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM250 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM251 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM252 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM253 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM254 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM255 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM256 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM257 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM258 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM259 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM260 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM261 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM262 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM263 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM264 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM265 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM266 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM267 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM268 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM269 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM270 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM271 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM272 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM273 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM274 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM275 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM276 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM277 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM278 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM279 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM280 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM281 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM282 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM283 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM284 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM285 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM286 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM287 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM288 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM289 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM290 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM291 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM292 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM293 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM294 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM295 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM296 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM297 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM298 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM299 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM300 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM301 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM302 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM303 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM304 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM305 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM306 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM307 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM308 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM309 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM310 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM311 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM312 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM313 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM314 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM315 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM316 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM317 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM318 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM319 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -2227,1729 +2227,1729 @@ namespace ParserKeywords { class ITEM1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM3 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM4 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM5 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM6 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM7 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM8 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM9 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM10 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM11 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM12 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM13 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM14 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM15 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM16 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM17 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM18 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM19 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM20 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM21 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM22 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM23 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM24 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM25 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM26 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM27 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM28 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM29 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM30 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM31 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM32 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM33 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM34 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM35 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM36 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM37 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM38 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM39 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM40 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM41 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM42 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM43 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM44 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM45 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM46 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM47 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM48 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM49 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM50 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM51 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM52 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM53 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM54 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM55 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM56 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM57 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM58 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM59 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM60 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM61 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM62 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM63 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM64 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM65 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM66 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM67 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM68 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM69 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM70 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM71 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM72 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM73 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM74 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM75 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM76 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM77 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM78 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM79 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM80 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM81 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM82 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM83 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM84 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM85 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM86 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM87 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM88 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM89 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM90 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM91 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM92 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM93 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM94 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM95 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM96 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM97 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM98 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM99 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM100 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM101 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM102 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM103 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM104 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM105 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM106 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM107 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM108 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM109 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM110 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM111 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM112 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM113 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM114 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM115 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM116 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM117 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM118 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM119 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM120 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM121 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM122 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM123 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM124 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM125 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM126 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM127 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM128 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM129 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM130 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM131 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM132 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM133 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM134 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM135 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM136 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM137 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM138 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM139 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM140 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM141 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM142 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM143 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM144 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM145 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM146 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM147 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM148 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM149 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM150 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM151 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM152 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM153 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM154 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM155 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM156 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM157 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM158 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM159 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM160 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM161 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM162 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM163 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM164 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM165 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM166 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM167 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM168 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM169 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM170 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM171 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM172 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM173 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM174 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM175 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM176 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM177 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM178 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM179 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM180 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM181 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM182 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM183 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM184 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM185 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM186 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM187 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM188 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM189 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM190 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM191 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM192 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM193 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM194 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM195 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM196 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM197 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM198 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM199 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM200 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM201 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM202 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM203 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM204 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM205 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM206 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM207 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM208 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM209 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM210 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM211 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM212 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM213 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM214 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM215 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM216 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM217 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM218 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM219 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM220 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM221 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM222 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM223 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM224 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM225 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM226 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM227 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM228 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM229 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM230 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM231 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM232 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM233 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM234 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM235 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM236 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM237 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM238 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM239 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM240 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM241 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM242 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM243 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM244 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM245 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM246 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM247 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM248 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM249 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM250 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM251 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM252 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM253 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM254 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM255 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM256 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM257 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM258 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM259 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM260 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM261 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM262 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM263 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM264 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM265 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM266 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM267 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM268 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM269 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM270 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM271 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM272 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM273 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM274 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM275 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM276 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM277 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM278 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM279 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM280 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM281 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM282 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM283 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM284 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM285 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM286 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM287 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM288 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/P.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/P.hpp index dbacbdaf79..f65ca133ba 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/P.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/P.hpp @@ -12,7 +12,7 @@ namespace ParserKeywords { class NDMAIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MACHINE_TYPE { @@ -38,43 +38,43 @@ namespace ParserKeywords { class SET_PRINT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SIZE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NUM_BUFFERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class VALUE_MEM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VALUE_COARSE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VALUE_NNC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VALUE_PRT_FILE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class RESERVED { @@ -93,19 +93,19 @@ namespace ParserKeywords { class NPARTT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NKPTMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NPKPMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -155,6 +155,19 @@ namespace ParserKeywords { + class PCFACT : public ParserKeyword { + public: + PCFACT(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + class PCG : public ParserKeyword { public: PCG(); @@ -181,6 +194,19 @@ namespace ParserKeywords { + class PCRIT : public ParserKeyword { + public: + PCRIT(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + class PCW : public ParserKeyword { public: PCW(); @@ -301,19 +327,19 @@ namespace ParserKeywords { class ALPHA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class METHOD { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -327,13 +353,13 @@ namespace ParserKeywords { class NUM_REGIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_PRESSURE_POINTS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -394,19 +420,19 @@ namespace ParserKeywords { class EXPO_0 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class EXPO_1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class EXPO_2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; }; @@ -498,7 +524,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -525,7 +551,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -588,7 +614,7 @@ namespace ParserKeywords { class D_F { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class INCLUDE { @@ -600,13 +626,13 @@ namespace ParserKeywords { class F_L { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class F_U { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.100000; }; class DELTA_WAT_SAT { @@ -622,19 +648,19 @@ namespace ParserKeywords { class DELTA_FRAC_COMP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class MAX_DELTA_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class ADAPTIVE_ORD_CONTROL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class ADAPTIVE_ORD_MIN_SPACING { @@ -653,13 +679,13 @@ namespace ParserKeywords { class NTPIMT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NPPIMT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -686,7 +712,7 @@ namespace ParserKeywords { class THRESHOLD_THICKNESS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class CONTROL_OPTION { @@ -698,7 +724,7 @@ namespace ParserKeywords { class MAX_EMPTY_GAP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class PINCHOUT_OPTION { @@ -745,7 +771,7 @@ namespace ParserKeywords { class THRESHOLD_THICKNESS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class OPTION1 { @@ -757,7 +783,7 @@ namespace ParserKeywords { class MAX_GAP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class OPTION2 { @@ -783,13 +809,13 @@ namespace ParserKeywords { class THRESHOLD_XR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class THRESHOLD_YTHETA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; }; @@ -803,19 +829,19 @@ namespace ParserKeywords { class NTSKWAT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NTSKPOLY { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NTPMWINJ { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -1002,7 +1028,7 @@ namespace ParserKeywords { class MIN_SWAT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -1044,7 +1070,7 @@ namespace ParserKeywords { class AI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MAX_ADSORPTION { @@ -1078,7 +1104,7 @@ namespace ParserKeywords { class AI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MAX_ADSORPTION { @@ -1264,19 +1290,19 @@ namespace ParserKeywords { class MAX_PRESSURE_CHECK { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MIN_PRESSURE_CHECK { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class NUM_NODES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 30; }; }; @@ -1295,6 +1321,19 @@ namespace ParserKeywords { + class POELCOEF : public ParserKeyword { + public: + POELCOEF(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class POLYMER : public ParserKeyword { public: POLYMER(); @@ -1319,7 +1358,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1346,7 +1385,7 @@ namespace ParserKeywords { class MAXIMUM_CAPILLARY_PRESSURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class MODIFY_CONNATE_SATURATION { @@ -1358,6 +1397,19 @@ namespace ParserKeywords { + class PRATIO : public ParserKeyword { + public: + PRATIO(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class PRECSALT : public ParserKeyword { public: PRECSALT(); @@ -1418,97 +1470,97 @@ namespace ParserKeywords { class A1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class B1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class C1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class E1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class F1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class G1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class H1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class A2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class B2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class C2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class E2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class F2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class G2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class H2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1894,25 +1946,25 @@ namespace ParserKeywords { class WATER_VOL_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class WATER_COMPRESSIBILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 4e-05; }; class WATER_VISCOSITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class WATER_VISCOSIBILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1931,7 +1983,7 @@ namespace ParserKeywords { class SALT_CONCENTRATION_REF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class DATA { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitA.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitA.hpp new file mode 100644 index 0000000000..f234958494 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitA.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_A_HH +#define OPM_PARSER_INIT_A_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsA(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitB.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitB.hpp new file mode 100644 index 0000000000..5c7fd4290b --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitB.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_B_HH +#define OPM_PARSER_INIT_B_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsB(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitC.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitC.hpp new file mode 100644 index 0000000000..be6b5aeca7 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitC.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_C_HH +#define OPM_PARSER_INIT_C_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsC(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitD.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitD.hpp new file mode 100644 index 0000000000..78729f38e4 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitD.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_D_HH +#define OPM_PARSER_INIT_D_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsD(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitE.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitE.hpp new file mode 100644 index 0000000000..cf03a19538 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitE.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_E_HH +#define OPM_PARSER_INIT_E_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsE(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitF.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitF.hpp new file mode 100644 index 0000000000..2af6323938 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitF.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_F_HH +#define OPM_PARSER_INIT_F_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsF(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitG.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitG.hpp new file mode 100644 index 0000000000..fcea5645a1 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitG.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_G_HH +#define OPM_PARSER_INIT_G_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsG(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitH.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitH.hpp new file mode 100644 index 0000000000..28c469fee3 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitH.hpp @@ -0,0 +1,12 @@ + + +#ifndef OPM_PARSER_INIT_H_HH +#define OPM_PARSER_INIT_H_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsH(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitI.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitI.hpp new file mode 100644 index 0000000000..77f3a33367 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitI.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_I_HH +#define OPM_PARSER_INIT_I_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsI(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitJ.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitJ.hpp new file mode 100644 index 0000000000..f24732af31 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitJ.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_J_HH +#define OPM_PARSER_INIT_J_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsJ(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitK.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitK.hpp new file mode 100644 index 0000000000..52dc24c5c3 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitK.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_K_HH +#define OPM_PARSER_INIT_K_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsK(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitL.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitL.hpp new file mode 100644 index 0000000000..10522b6fa1 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitL.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_L_HH +#define OPM_PARSER_INIT_L_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsL(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitM.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitM.hpp new file mode 100644 index 0000000000..bdc1a880f5 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitM.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_M_HH +#define OPM_PARSER_INIT_M_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsM(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitN.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitN.hpp new file mode 100644 index 0000000000..c4f2c70d23 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitN.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_N_HH +#define OPM_PARSER_INIT_N_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsN(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitO.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitO.hpp new file mode 100644 index 0000000000..fe5f2592fd --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitO.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_O_HH +#define OPM_PARSER_INIT_O_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsO(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitP.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitP.hpp new file mode 100644 index 0000000000..8045cc6f15 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitP.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_P_HH +#define OPM_PARSER_INIT_P_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsP(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitQ.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitQ.hpp new file mode 100644 index 0000000000..a9692baac8 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitQ.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_Q_HH +#define OPM_PARSER_INIT_Q_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsQ(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitR.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitR.hpp new file mode 100644 index 0000000000..7600876111 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitR.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_R_HH +#define OPM_PARSER_INIT_R_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsR(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitS.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitS.hpp new file mode 100644 index 0000000000..fdc8facdf9 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitS.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_S_HH +#define OPM_PARSER_INIT_S_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsS(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitT.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitT.hpp new file mode 100644 index 0000000000..f460e7bb7a --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitT.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_T_HH +#define OPM_PARSER_INIT_T_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsT(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitU.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitU.hpp new file mode 100644 index 0000000000..b460194ca3 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitU.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_U_HH +#define OPM_PARSER_INIT_U_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsU(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitV.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitV.hpp new file mode 100644 index 0000000000..19d8656da1 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitV.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_V_HH +#define OPM_PARSER_INIT_V_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsV(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitW.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitW.hpp new file mode 100644 index 0000000000..f3f6c64a61 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitW.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_W_HH +#define OPM_PARSER_INIT_W_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsW(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitX.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitX.hpp new file mode 100644 index 0000000000..197f35aee0 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitX.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_X_HH +#define OPM_PARSER_INIT_X_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsX(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitY.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitY.hpp new file mode 100644 index 0000000000..50811228b1 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitY.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_Y_HH +#define OPM_PARSER_INIT_Y_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsY(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitZ.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitZ.hpp new file mode 100644 index 0000000000..0e0305ae81 --- /dev/null +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/ParserInitZ.hpp @@ -0,0 +1,11 @@ + +#ifndef OPM_PARSER_INIT_Z_HH +#define OPM_PARSER_INIT_Z_HH + +namespace Opm { +class Parser; +namespace ParserKeywords { +void addDefaultKeywordsZ(Parser& p); +} +} +#endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/R.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/R.hpp index 5582623ea2..c9b0ea05fa 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/R.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/R.hpp @@ -52,13 +52,13 @@ namespace ParserKeywords { class NWMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class INNER_RADIUS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.152400; }; class OUTER_RADIUS { @@ -69,7 +69,7 @@ namespace ParserKeywords { class MINIMUM_RADIUS_REFINEMENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.524000; }; class PARENT_LGR { @@ -139,7 +139,7 @@ namespace ParserKeywords { class NWMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -320,7 +320,7 @@ namespace ParserKeywords { class PROFILE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class ROUGHNESS { @@ -341,19 +341,19 @@ namespace ParserKeywords { class REACH_LENGTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class NUM_REACHES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class DEPTH_SOMETHING { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -394,61 +394,61 @@ namespace ParserKeywords { class NTFIP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NMFIPR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NRFREG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NTFREG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_ETRACK { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NTCREG { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_OPERNUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_OPERATE_DWORK { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_OPERATE_IWORK { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NPLMIX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -511,6 +511,19 @@ namespace ParserKeywords { + class REGION_PROBE_OPM : public ParserKeyword { + public: + REGION_PROBE_OPM(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class RESIDNUM : public ParserKeyword { public: RESIDNUM(); @@ -575,7 +588,7 @@ namespace ParserKeywords { class data { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -640,79 +653,79 @@ namespace ParserKeywords { class MAX_RIVERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_REACHES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_BRANCHES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_BLOCKS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXTBPR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXDPTB { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class MXTBGR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NMDEPT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXDEPT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class NMMAST { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXMAST { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class NRATTA { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MXRATE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; }; @@ -851,13 +864,13 @@ namespace ParserKeywords { class PREF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.013200; }; class COMPRESSIBILITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -913,7 +926,7 @@ namespace ParserKeywords { class NTROCC { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class WATER_COMPACTION { @@ -930,7 +943,7 @@ namespace ParserKeywords { class CARKZEXP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1012,49 +1025,49 @@ namespace ParserKeywords { class G { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class B { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class E1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class f { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class n { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3.000000; }; class g { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class Bs { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class Es { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1193,37 +1206,37 @@ namespace ParserKeywords { class ITEM1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM3 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM4 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM5 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ITEM6 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1486,7 +1499,7 @@ namespace ParserKeywords { class TEMP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 15.555000; }; }; @@ -1500,7 +1513,7 @@ namespace ParserKeywords { class TEMP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 15.555000; }; }; @@ -1618,11 +1631,29 @@ namespace ParserKeywords { + class RVWVD : public ParserKeyword { + public: + RVWVD(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + class RWGSALT : public ParserKeyword { public: RWGSALT(); static const std::string keywordName; + class GAS_PRESSURE { + public: + static const std::string itemName; + }; + class DATA { public: static const std::string itemName; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/S.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/S.hpp index 3a263a3b91..03bdc7ad19 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/S.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/S.hpp @@ -12,7 +12,7 @@ namespace ParserKeywords { class MOLALITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -31,6 +31,20 @@ namespace ParserKeywords { + class SALTMF : public ParserKeyword { + public: + SALTMF(); + static const std::string keywordName; + + class MOLE_FRACTION { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + }; + + + class SALTNODE : public ParserKeyword { public: SALTNODE(); @@ -215,7 +229,7 @@ namespace ParserKeywords { class SAT_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -229,7 +243,7 @@ namespace ParserKeywords { class SCALE_DATA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -243,7 +257,7 @@ namespace ParserKeywords { class SCALE_DATA { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -257,43 +271,43 @@ namespace ParserKeywords { class NTSCDP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NPSCDP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NTSCDA { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class PSCDA { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class UNUSED1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class UNUSED2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NTSCDE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -354,7 +368,7 @@ namespace ParserKeywords { class SOLVENT_DENSITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -544,103 +558,103 @@ namespace ParserKeywords { class SG_0 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SG_CRITICAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class L_GAS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E_GAS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class T_GAS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class KRT_GAS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class SO_0 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SO_CRITICAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class L_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class T_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class KRT_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class L_PC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E_PC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class T_PC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class PCIR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PCT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -931,7 +945,7 @@ namespace ParserKeywords { class NUM_PE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -971,7 +985,7 @@ namespace ParserKeywords { class DIMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10000; }; }; @@ -1104,6 +1118,14 @@ namespace ParserKeywords { + class SOLID : public ParserKeyword { + public: + SOLID(); + static const std::string keywordName; + }; + + + class SOLUTION : public ParserKeyword { public: SOLUTION(); @@ -1224,6 +1246,51 @@ namespace ParserKeywords { + class SOURCE : public ParserKeyword { + public: + SOURCE(); + static const std::string keywordName; + + class I { + public: + static const std::string itemName; + }; + + class J { + public: + static const std::string itemName; + }; + + class K { + public: + static const std::string itemName; + }; + + class COMPONENT { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class RATE { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class HRATE { + public: + static const std::string itemName; + }; + + class TEMP { + public: + static const std::string itemName; + }; + }; + + + class SOWCR : public ParserKeyword { public: SOWCR(); @@ -1258,25 +1325,25 @@ namespace ParserKeywords { class NX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NY { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NZ { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NUMRES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class COORD_TYPE { @@ -1473,7 +1540,7 @@ namespace ParserKeywords { class DAY { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MONTH { @@ -1485,7 +1552,7 @@ namespace ParserKeywords { class YEAR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1983; }; class TIME { @@ -1505,13 +1572,13 @@ namespace ParserKeywords { class TEMPERATURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 15.560000; }; class PRESSURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.013250; }; }; @@ -1559,7 +1626,7 @@ namespace ParserKeywords { class EXP_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -1591,6 +1658,75 @@ namespace ParserKeywords { + class STREQUIL : public ParserKeyword { + public: + STREQUIL(); + static const std::string keywordName; + + class DATUM_DEPTH { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class DATUM_POSX { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class DATUM_POSY { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + + class STRESSXX { + public: + static const std::string itemName; + }; + + class STRESSXXGRAD { + public: + static const std::string itemName; + }; + + class STRESSYY { + public: + static const std::string itemName; + }; + + class STRESSYYGRAD { + public: + static const std::string itemName; + }; + + class STRESSZZ { + public: + static const std::string itemName; + }; + + class STRESSZZGRAD { + public: + static const std::string itemName; + }; + }; + + + + class STRESSEQUILNUM : public ParserKeyword { + public: + STRESSEQUILNUM(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class STWG : public ParserKeyword { public: STWG(); @@ -1745,13 +1881,13 @@ namespace ParserKeywords { class MIN_SWAT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; class SMOOTHING { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -2077,103 +2213,103 @@ namespace ParserKeywords { class SW_RESIDUAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SW_CRITICAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class L_WATER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E_WATER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class T_WATER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class KRT_WATER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class SO_RESIDUAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SO_CRITICAL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class L_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class T_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class KRT_OIL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class L_PC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class E_PC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class T_PC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class PCIR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PCT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/T.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/T.hpp index 58fd907a18..622bafc3da 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/T.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/T.hpp @@ -12,73 +12,73 @@ namespace ParserKeywords { class NTSFUN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NTPVT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NSSFUN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class NPPVT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class NTFIP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NRPVT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class MAX_RV_NODES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 20; }; class NTENDP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NUM_EOS_RES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NUM_EOS_SURFACE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_FLUX_REGIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class MAX_THERMAL_REGIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NTROCC { @@ -89,13 +89,13 @@ namespace ParserKeywords { class MAX_PRESSURE_MAINTAINANCE_REGIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_KVALUE_TABLES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NTALPHA { @@ -106,19 +106,19 @@ namespace ParserKeywords { class ASPHALTENE_ASPKDAM_MAX_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class ASPHALTENE_ASPREWG_MAX_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class ASPHALTENE_ASPVISO_MAX_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class ITEM20_NOT_USED { @@ -129,25 +129,25 @@ namespace ParserKeywords { class ASPHALTENE_ASPPW2D_MAX_COLUMNS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; class ASPHALTENE_ASPPW2D_MAX_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; class ASPHALTENE_ASPWETF_MAX_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; class NUM_KVALUE_TABLES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class RESERVED { @@ -171,6 +171,19 @@ namespace ParserKeywords { + class TCRIT : public ParserKeyword { + public: + TCRIT(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + class TEMP : public ParserKeyword { public: TEMP(); @@ -239,6 +252,32 @@ namespace ParserKeywords { + class THCO2MIX : public ParserKeyword { + public: + THCO2MIX(); + static const std::string keywordName; + + class MIXING_MODEL_SALT { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class MIXING_MODEL_LIQUID { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class MIXING_MODEL_GAS { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + }; + + + class THCOIL : public ParserKeyword { public: THCOIL(); @@ -304,6 +343,19 @@ namespace ParserKeywords { + class THELCOEF : public ParserKeyword { + public: + THELCOEF(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class THERMAL : public ParserKeyword { public: THERMAL(); @@ -312,6 +364,19 @@ namespace ParserKeywords { + class THERMEXR : public ParserKeyword { + public: + THERMEXR(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + class THPRES : public ParserKeyword { public: THPRES(); @@ -472,7 +537,7 @@ namespace ParserKeywords { class VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; }; @@ -605,25 +670,25 @@ namespace ParserKeywords { class MAX_OIL_TRACERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_WATER_TRACERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_GAS_TRACERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_ENV_TRACERS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NUMERIC_DIFF { @@ -635,13 +700,13 @@ namespace ParserKeywords { class MAX_ITER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; class MIN_ITER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class PASSIVE_NONLINEAR { @@ -663,13 +728,13 @@ namespace ParserKeywords { class TIGHTENING_FACTORS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class NTIGHTFACTORS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -683,7 +748,7 @@ namespace ParserKeywords { class FLUX_LIMITER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class BOTH_TIMESTEP { @@ -832,7 +897,7 @@ namespace ParserKeywords { class HALF_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; }; @@ -846,7 +911,7 @@ namespace ParserKeywords { class HALF_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; }; @@ -983,7 +1048,7 @@ namespace ParserKeywords { class INIT_MODEL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -1010,55 +1075,55 @@ namespace ParserKeywords { class TSINIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class TSMAXZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 365.000000; }; class TSMINZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TSMCHP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.150000; }; class TSFMAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3.000000; }; class TSFMIN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.300000; }; class TSFCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TFDIFF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.250000; }; class THRUPT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class TMAXWC { @@ -1069,61 +1134,61 @@ namespace ParserKeywords { class TRGTTE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TRGCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class TRGMBE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-07; }; class TRGLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; class XXXTTE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 10.000000; }; class XXXCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class XXXMBE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; class XXXLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class XXXWFL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class TRGFIP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.025000; }; class TRGSFT { @@ -1134,67 +1199,67 @@ namespace ParserKeywords { class THIONX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class TRWGHT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NEWTMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; class NEWTMN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class LITMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 25; }; class LITMIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXWSIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 8; }; class MXWPIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 8; }; class DDPLIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class DDSLIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class TRGDPR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class XXXDPR { @@ -1241,31 +1306,31 @@ namespace ParserKeywords { class GRGLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; class GXXLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class GMSLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-20; }; class LGTMIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class LGTMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 25; }; }; @@ -1279,55 +1344,55 @@ namespace ParserKeywords { class TSINIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class TSMAXZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 365.000000; }; class TSMINZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TSMCHP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.150000; }; class TSFMAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3.000000; }; class TSFMIN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.300000; }; class TSFCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TFDIFF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.250000; }; class THRUPT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class TMAXWC { @@ -1338,61 +1403,61 @@ namespace ParserKeywords { class TRGTTE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TRGCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class TRGMBE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-07; }; class TRGLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; class XXXTTE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 10.000000; }; class XXXCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class XXXMBE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; class XXXLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class XXXWFL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class TRGFIP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.025000; }; class TRGSFT { @@ -1403,67 +1468,67 @@ namespace ParserKeywords { class THIONX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class TRWGHT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NEWTMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; class NEWTMN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class LITMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 25; }; class LITMIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXWSIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 8; }; class MXWPIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 8; }; class DDPLIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class DDSLIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class TRGDPR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class XXXDPR { @@ -1487,55 +1552,55 @@ namespace ParserKeywords { class TSINIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class TSMAXZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 365.000000; }; class TSMINZ { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TSMCHP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.150000; }; class TSFMAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3.000000; }; class TSFMIN { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.300000; }; class TSFCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TFDIFF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.250000; }; class THRUPT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class TMAXWC { @@ -1546,61 +1611,61 @@ namespace ParserKeywords { class TRGTTE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class TRGCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class TRGMBE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-07; }; class TRGLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; class XXXTTE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 10.000000; }; class XXXCNV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class XXXMBE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-06; }; class XXXLCV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class XXXWFL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class TRGFIP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.025000; }; class TRGSFT { @@ -1611,67 +1676,67 @@ namespace ParserKeywords { class THIONX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; class TRWGHT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NEWTMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 12; }; class NEWTMN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class LITMAX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 25; }; class LITMIN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MXWSIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 8; }; class MXWPIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 8; }; class DDPLIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class DDSLIM { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class TRGDPR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000000.000000; }; class XXXDPR { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/U.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/U.hpp index 9c4fa846d4..c3ca21c3cc 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/U.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/U.hpp @@ -12,19 +12,19 @@ namespace ParserKeywords { class NUM_UDQ_REPLACE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class IGNORED { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class TOTAL_UDQ_UNIQUE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 100; }; }; @@ -61,61 +61,61 @@ namespace ParserKeywords { class MAX_FUNCTIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 16; }; class MAX_ITEMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 16; }; class MAX_CONNECTIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_FIELDS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_GROUP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_REGION { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_SEGMENT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_WELL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_AQUIFER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_BLOCK { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class RESTART_NEW_SEED { @@ -135,25 +135,25 @@ namespace ParserKeywords { class RANDOM_SEED { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class RANGE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class UNDEFINED_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class CMP_EPSILON { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000100; }; }; @@ -163,6 +163,31 @@ namespace ParserKeywords { public: UDT(); static const std::string keywordName; + + class TABLE_NAME { + public: + static const std::string itemName; + }; + + class DIMENSIONS { + public: + static const std::string itemName; + }; + + class INTERPOLATION_TYPE { + public: + static const std::string itemName; + }; + + class INTERPOLATION_POINTS { + public: + static const std::string itemName; + }; + + class TABLE_VALUES { + public: + static const std::string itemName; + }; }; @@ -175,25 +200,25 @@ namespace ParserKeywords { class MAX_TABLES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_INTERPOLATION_POINTS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_DIMENSIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/V.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/V.hpp index c498e3b4a0..fcc4590c2e 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/V.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/V.hpp @@ -1,592 +1,721 @@ #ifndef PARSER_KEYWORDS_V_HPP #define PARSER_KEYWORDS_V_HPP #include -namespace Opm { -namespace ParserKeywords { +namespace Opm +{ +namespace ParserKeywords +{ - class VAPOIL : public ParserKeyword { - public: - VAPOIL(); - static const std::string keywordName; - }; + class VAPOIL : public ParserKeyword + { + public: + VAPOIL(); + static const std::string keywordName; + }; - class VAPPARS : public ParserKeyword { - public: - VAPPARS(); - static const std::string keywordName; + class VAPPARS : public ParserKeyword + { + public: + VAPPARS(); + static const std::string keywordName; + + class OIL_VAP_PROPENSITY + { + public: + static const std::string itemName; + }; + + class OIL_DENSITY_PROPENSITY + { + public: + static const std::string itemName; + }; + }; - class OIL_VAP_PROPENSITY { - public: - static const std::string itemName; - }; - class OIL_DENSITY_PROPENSITY { - public: - static const std::string itemName; - }; - }; - - - class VAPWAT : public ParserKeyword { - public: - VAPWAT(); - static const std::string keywordName; - }; - - - - class VDFLOW : public ParserKeyword { - public: - VDFLOW(); - static const std::string keywordName; - - class BETA { - public: - static const std::string itemName; - }; - }; - - - - class VDFLOWR : public ParserKeyword { - public: - VDFLOWR(); - static const std::string keywordName; - - class BETA { - public: - static const std::string itemName; - }; - }; - - - - class VE : public ParserKeyword { - public: - VE(); - static const std::string keywordName; - - class MODEL_TYPE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class VEDEBUG : public ParserKeyword { - public: - VEDEBUG(); - static const std::string keywordName; - - class I1 { - public: - static const std::string itemName; - }; - - class I2 { - public: - static const std::string itemName; - }; - - class J1 { - public: - static const std::string itemName; - }; - - class J2 { - public: - static const std::string itemName; - }; - - class K1 { - public: - static const std::string itemName; - }; - - class K2 { - public: - static const std::string itemName; - }; - - class DEBUG_LEVEL { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class LGR { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class VEFIN : public ParserKeyword { - public: - VEFIN(); - static const std::string keywordName; - - class VE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class NVEPT { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class VEFRAC : public ParserKeyword { - public: - VEFRAC(); - static const std::string keywordName; - - class FRAC { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class VEFRACP : public ParserKeyword { - public: - VEFRACP(); - static const std::string keywordName; - - class FRAC { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class VEFRACPV : public ParserKeyword { - public: - VEFRACPV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class VEFRACV : public ParserKeyword { - public: - VEFRACV(); - static const std::string keywordName; - - class data { - public: - static const std::string itemName; - }; - }; - - - - class VFPCHK : public ParserKeyword { - public: - VFPCHK(); - static const std::string keywordName; - - class BHP_LIMIT { - public: - static const std::string itemName; - static const double defaultValue; - }; - }; - - - - class VFPIDIMS : public ParserKeyword { - public: - VFPIDIMS(); - static const std::string keywordName; - - class MAX_FLOW_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_THP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_INJ_VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class VFPINJ : public ParserKeyword { - public: - VFPINJ(); - static const std::string keywordName; - - class TABLE { - public: - static const std::string itemName; - }; - - class DATUM_DEPTH { - public: - static const std::string itemName; - }; - - class RATE_TYPE { - public: - static const std::string itemName; - }; - - class PRESSURE_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class UNITS { - public: - static const std::string itemName; - }; - - class BODY_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FLOW_VALUES { - public: - static const std::string itemName; - }; - - class THP_VALUES { - public: - static const std::string itemName; - }; - - class THP_INDEX { - public: - static const std::string itemName; - }; - - class VALUES { - public: - static const std::string itemName; - }; - }; - - - - class VFPPDIMS : public ParserKeyword { - public: - VFPPDIMS(); - static const std::string keywordName; - - class MAX_FLOW_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_THP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_WCT_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_GCT_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_ALQ_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - - class MAX_PROD_VFP_TABLE { - public: - static const std::string itemName; - static const int defaultValue; - }; - }; - - - - class VFPPROD : public ParserKeyword { - public: - VFPPROD(); - static const std::string keywordName; - - class TABLE { - public: - static const std::string itemName; - }; - - class DATUM_DEPTH { - public: - static const std::string itemName; - }; - - class RATE_TYPE { - public: - static const std::string itemName; - }; - - class WFR { - public: - static const std::string itemName; - }; - - class GFR { - public: - static const std::string itemName; - }; - - class PRESSURE_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class ALQ_DEF { - public: - static const std::string itemName; - }; - - class UNITS { - public: - static const std::string itemName; - }; - - class BODY_DEF { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class FLOW_VALUES { - public: - static const std::string itemName; - }; - - class THP_VALUES { - public: - static const std::string itemName; - }; - - class WFR_VALUES { - public: - static const std::string itemName; - }; - - class GFR_VALUES { - public: - static const std::string itemName; - }; - - class ALQ_VALUES { - public: - static const std::string itemName; - }; - - class THP_INDEX { - public: - static const std::string itemName; - }; - - class WFR_INDEX { - public: - static const std::string itemName; - }; - - class GFR_INDEX { - public: - static const std::string itemName; - }; - - class ALQ_INDEX { - public: - static const std::string itemName; - }; - - class VALUES { - public: - static const std::string itemName; - }; - }; - - - - class VFPTABL : public ParserKeyword { - public: - VFPTABL(); - static const std::string keywordName; - - class METHOD { - public: - static const std::string itemName; - }; - }; - - - - class VISAGE : public ParserKeyword { - public: - VISAGE(); - static const std::string keywordName; - }; - - - - class VISCD : public ParserKeyword { - public: - VISCD(); - static const std::string keywordName; - }; - - - - class VISCREF : public ParserKeyword { - public: - VISCREF(); - static const std::string keywordName; - - class REFERENCE_PRESSURE { - public: - static const std::string itemName; - }; - - class REFERENCE_RS { - public: - static const std::string itemName; - }; - - class API_GRAVITY { - public: - static const std::string itemName; - }; - }; - - - - class VISDATES : public ParserKeyword { - public: - VISDATES(); - static const std::string keywordName; - - class DAY { - public: - static const std::string itemName; - }; - - class MONTH { - public: - static const std::string itemName; - }; - - class YEAR { - public: - static const std::string itemName; - }; - - class TIMESTAMP { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - - class VISOPTS : public ParserKeyword { - public: - VISOPTS(); - static const std::string keywordName; - - class INIT_RUN { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class EXIT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class ACTIVE { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class REL_TOL { - public: - static const std::string itemName; - static const double defaultValue; - }; - - class UNUSED { - public: - static const std::string itemName; - }; - - class RETAIN_RESTART_FREQUENCY { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class RETAIN_RESTART_CONTENT { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - - class msvc_prefix_ERROR { - public: - static const std::string itemName; - static const std::string defaultValue; - }; - }; - - - -} -} + class VAPWAT : public ParserKeyword + { + public: + VAPWAT(); + static const std::string keywordName; + }; + + + + class VCRIT : public ParserKeyword + { + public: + VCRIT(); + static const std::string keywordName; + + class DATA + { + public: + static const std::string itemName; + }; + }; + + + + class VDFLOW : public ParserKeyword + { + public: + VDFLOW(); + static const std::string keywordName; + + class BETA + { + public: + static const std::string itemName; + }; + }; + + + + class VDFLOWR : public ParserKeyword + { + public: + VDFLOWR(); + static const std::string keywordName; + + class BETA + { + public: + static const std::string itemName; + }; + }; + + + + class VE : public ParserKeyword + { + public: + VE(); + static const std::string keywordName; + + class MODEL_TYPE + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + }; + + + + class VEDEBUG : public ParserKeyword + { + public: + VEDEBUG(); + static const std::string keywordName; + + class I1 + { + public: + static const std::string itemName; + }; + + class I2 + { + public: + static const std::string itemName; + }; + + class J1 + { + public: + static const std::string itemName; + }; + + class J2 + { + public: + static const std::string itemName; + }; + + class K1 + { + public: + static const std::string itemName; + }; + + class K2 + { + public: + static const std::string itemName; + }; + + class DEBUG_LEVEL + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class LGR + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + }; + + + + class VEFIN : public ParserKeyword + { + public: + VEFIN(); + static const std::string keywordName; + + class VE + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class NVEPT + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + }; + + + + class VEFRAC : public ParserKeyword + { + public: + VEFRAC(); + static const std::string keywordName; + + class FRAC + { + public: + static const std::string itemName; + static constexpr double defaultValue = 10.000000; + }; + }; + + + + class VEFRACP : public ParserKeyword + { + public: + VEFRACP(); + static const std::string keywordName; + + class FRAC + { + public: + static const std::string itemName; + static constexpr double defaultValue = 1.000000; + }; + }; + + + + class VEFRACPV : public ParserKeyword + { + public: + VEFRACPV(); + static const std::string keywordName; + + class data + { + public: + static const std::string itemName; + }; + }; + + + + class VEFRACV : public ParserKeyword + { + public: + VEFRACV(); + static const std::string keywordName; + + class data + { + public: + static const std::string itemName; + }; + }; + + + + class VFPCHK : public ParserKeyword + { + public: + VFPCHK(); + static const std::string keywordName; + + class BHP_LIMIT + { + public: + static const std::string itemName; + static constexpr double defaultValue = 10000000000.000000; + }; + }; + + + + class VFPIDIMS : public ParserKeyword + { + public: + VFPIDIMS(); + static const std::string keywordName; + + class MAX_FLOW_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_THP_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_INJ_VFP_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + }; + + + + class VFPINJ : public ParserKeyword + { + public: + VFPINJ(); + static const std::string keywordName; + + class TABLE + { + public: + static const std::string itemName; + }; + + class DATUM_DEPTH + { + public: + static const std::string itemName; + }; + + class RATE_TYPE + { + public: + static const std::string itemName; + }; + + class PRESSURE_DEF + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class UNITS + { + public: + static const std::string itemName; + }; + + class BODY_DEF + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class FLOW_VALUES + { + public: + static const std::string itemName; + }; + + class THP_VALUES + { + public: + static const std::string itemName; + }; + + class THP_INDEX + { + public: + static const std::string itemName; + }; + + class VALUES + { + public: + static const std::string itemName; + }; + }; + + + + class VFPPDIMS : public ParserKeyword + { + public: + VFPPDIMS(); + static const std::string keywordName; + + class MAX_FLOW_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_THP_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_WCT_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_GCT_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_ALQ_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + + class MAX_PROD_VFP_TABLE + { + public: + static const std::string itemName; + static constexpr int defaultValue = 0; + }; + }; + + + + class VFPPROD : public ParserKeyword + { + public: + VFPPROD(); + static const std::string keywordName; + + class TABLE + { + public: + static const std::string itemName; + }; + + class DATUM_DEPTH + { + public: + static const std::string itemName; + }; + + class RATE_TYPE + { + public: + static const std::string itemName; + }; + + class WFR + { + public: + static const std::string itemName; + }; + + class GFR + { + public: + static const std::string itemName; + }; + + class PRESSURE_DEF + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class ALQ_DEF + { + public: + static const std::string itemName; + }; + + class UNITS + { + public: + static const std::string itemName; + }; + + class BODY_DEF + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class FLOW_VALUES + { + public: + static const std::string itemName; + }; + + class THP_VALUES + { + public: + static const std::string itemName; + }; + + class WFR_VALUES + { + public: + static const std::string itemName; + }; + + class GFR_VALUES + { + public: + static const std::string itemName; + }; + + class ALQ_VALUES + { + public: + static const std::string itemName; + }; + + class THP_INDEX + { + public: + static const std::string itemName; + }; + + class WFR_INDEX + { + public: + static const std::string itemName; + }; + + class GFR_INDEX + { + public: + static const std::string itemName; + }; + + class ALQ_INDEX + { + public: + static const std::string itemName; + }; + + class VALUES + { + public: + static const std::string itemName; + }; + }; + + + + class VFPTABL : public ParserKeyword + { + public: + VFPTABL(); + static const std::string keywordName; + + class METHOD + { + public: + static const std::string itemName; + }; + }; + + + + class VISAGE : public ParserKeyword + { + public: + VISAGE(); + static const std::string keywordName; + }; + + + + class VISCAQA : public ParserKeyword + { + public: + VISCAQA(); + static const std::string keywordName; + + class DATA + { + public: + static const std::string itemName; + }; + }; + + + + class VISCD : public ParserKeyword + { + public: + VISCD(); + static const std::string keywordName; + }; + + + + class VISCREF : public ParserKeyword + { + public: + VISCREF(); + static const std::string keywordName; + + class REFERENCE_PRESSURE + { + public: + static const std::string itemName; + }; + + class REFERENCE_RS + { + public: + static const std::string itemName; + }; + + class API_GRAVITY + { + public: + static const std::string itemName; + }; + }; + + + + class VISDATES : public ParserKeyword + { + public: + VISDATES(); + static const std::string keywordName; + + class DAY + { + public: + static const std::string itemName; + }; + + class MONTH + { + public: + static const std::string itemName; + }; + + class YEAR + { + public: + static const std::string itemName; + }; + + class TIMESTAMP + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + }; + + + + class VISOPTS : public ParserKeyword + { + public: + VISOPTS(); + static const std::string keywordName; + + class INIT_RUN + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class EXIT + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class ACTIVE + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class REL_TOL + { + public: + static const std::string itemName; + static constexpr double defaultValue = 0.050000; + }; + + class UNUSED + { + public: + static const std::string itemName; + }; + + class RETAIN_RESTART_FREQUENCY + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class RETAIN_RESTART_CONTENT + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class ERROR + { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + }; + + + +} // namespace ParserKeywords +} // namespace Opm #endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/W.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/W.hpp index 13f0b6f960..21d6f2eea3 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/W.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/W.hpp @@ -17,7 +17,7 @@ namespace ParserKeywords { class SECONDARY_DRAINAGE_REDUCTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GAS_MODEL { @@ -41,19 +41,19 @@ namespace ParserKeywords { class IMB_LINEAR_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.100000; }; class THREEPHASE_SAT_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.001000; }; class RES_OIL_MOD_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -144,19 +144,19 @@ namespace ParserKeywords { class REFERENCE_TEMPERATURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 293.150000; }; class EXPANSION_COEFF_LINEAR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.000300; }; class EXPANSION_COEFF_QUADRATIC { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 3e-06; }; }; @@ -178,13 +178,13 @@ namespace ParserKeywords { class PREF { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.013200; }; class JOULE_THOMSON_COEFFICIENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -216,19 +216,19 @@ namespace ParserKeywords { class MAX_GLR_CUTBACK { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class MIN_GLR_CUTBACK_REVERSE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class RATE_CUTBACK_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class PHASE { @@ -240,7 +240,7 @@ namespace ParserKeywords { class MAX_GLR_ELIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class WORKOVER_ACTION { @@ -271,7 +271,7 @@ namespace ParserKeywords { class WELLBORE_VOL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-05; }; class START_BHP { @@ -342,7 +342,7 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ALQ { @@ -366,13 +366,13 @@ namespace ParserKeywords { class WGASRAT_HIS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class NGLRAT_HIS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -436,43 +436,43 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VAPOIL_C { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GAS_STEAM_RATIO { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SURFACE_OIL_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SURFACE_WATER_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SURFACE_GAS_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class OIL_STEAM_RATIO { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -517,31 +517,31 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VAPOIL_C { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SURFACE_OIL_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SURFACE_WATER_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SURFACE_GAS_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class CMODE { @@ -577,7 +577,7 @@ namespace ParserKeywords { class BHP_MAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 6895.000000; }; class THP_MAX { @@ -588,31 +588,31 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VOIDAGE_TARGET_MULTIPLIER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class OIL_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WATER_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GAS_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WELL { @@ -628,7 +628,7 @@ namespace ParserKeywords { class FIPNUM_VALUE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -700,7 +700,7 @@ namespace ParserKeywords { class VFP_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class ALQ { @@ -785,7 +785,7 @@ namespace ParserKeywords { class RATE_CUTBACK { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class PHASE { @@ -796,37 +796,37 @@ namespace ParserKeywords { class PRESSURE_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PRESSURE_LIMIT_REVERSE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WCT_LIMIT_REVERSE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GOR_LIMIT_REVERSE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GLR_LIMIT_REVERSE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WGR_LIMIT_REVERSE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WORKOVER_REMOVE { @@ -851,7 +851,7 @@ namespace ParserKeywords { class RATE_CUTBACK { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class PHASE { @@ -881,25 +881,25 @@ namespace ParserKeywords { class ON_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class OFF_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class START_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_TIMESTEP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class CONTROLLED_TIMESTEP { @@ -924,7 +924,7 @@ namespace ParserKeywords { class DFACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -943,19 +943,19 @@ namespace ParserKeywords { class A { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class B { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class C { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -974,13 +974,13 @@ namespace ParserKeywords { class PRIORITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class DRILLING_UNIT { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1089,7 +1089,7 @@ namespace ParserKeywords { class SECOND_MAX_WATER_CUT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WORKOVER_SECOND_WATER_CUT_LIMIT { @@ -1100,13 +1100,13 @@ namespace ParserKeywords { class MAX_GAS_LIQUID_RATIO { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MIN_LIQUID_PRODCUTION_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MAX_TEMP { @@ -1117,7 +1117,7 @@ namespace ParserKeywords { class MIN_RES_FLUID_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1136,7 +1136,7 @@ namespace ParserKeywords { class MIN_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class QUANTITY { @@ -1191,7 +1191,7 @@ namespace ParserKeywords { class EFFICIENCY_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class EXTENDED_NETWORK_OPT { @@ -1305,85 +1305,108 @@ namespace ParserKeywords { class MAXWELLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAXCONN { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAXGROUPS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_GROUPSIZE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_STAGES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; class MAX_STREAMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class MAX_MIXTURES { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; class MAX_SEPARATORS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 4; }; class MAX_MIXTURE_ITEMS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 3; }; class MAX_COMPLETION_X { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class MAX_WELLIST_PR_WELL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_DYNAMIC_WELLIST { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class MAX_SECONDARY_WELLS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 10; }; class MAX_GPP_ROWS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 201; + }; + }; + + + + class WELLSTRE : public ParserKeyword { + public: + WELLSTRE(); + static const std::string keywordName; + + class STREAM { + public: + static const std::string itemName; + }; + + class XMOLE1 { + public: + static const std::string itemName; + }; + + class XMOLE2 { + public: + static const std::string itemName; }; }; @@ -1420,6 +1443,37 @@ namespace ParserKeywords { + class WELL_PROBE_COMP : public ParserKeyword { + public: + WELL_PROBE_COMP(); + static const std::string keywordName; + + class WELLS { + public: + static const std::string itemName; + }; + + class COMP_NUM { + public: + static const std::string itemName; + }; + }; + + + + class WELL_PROBE_OPM : public ParserKeyword { + public: + WELL_PROBE_OPM(); + static const std::string keywordName; + + class WELLS { + public: + static const std::string itemName; + }; + }; + + + class WELMOVEL : public ParserKeyword { public: WELMOVEL(); @@ -1572,25 +1626,25 @@ namespace ParserKeywords { class PRI1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class SCALING1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class PRI2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class SCALING2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -1606,21 +1660,21 @@ namespace ParserKeywords { static const std::string itemName; }; - class DEPTH { + class TOP_DEPTH { public: static const std::string itemName; }; - class LENGTH { + class TOP_LENGTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class WELLBORE_VOLUME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-05; }; class INFO_TYPE { @@ -1643,13 +1697,13 @@ namespace ParserKeywords { class TOP_X { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class TOP_Y { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class SEGMENT1 { @@ -1672,12 +1726,12 @@ namespace ParserKeywords { static const std::string itemName; }; - class SEGMENT_LENGTH { + class LENGTH { public: static const std::string itemName; }; - class DEPTH_CHANGE { + class DEPTH { public: static const std::string itemName; }; @@ -1705,13 +1759,13 @@ namespace ParserKeywords { class LENGTH_X { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class LENGTH_Y { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -1773,7 +1827,7 @@ namespace ParserKeywords { class D_RADIUS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class INFLOW_EQ { @@ -1797,7 +1851,7 @@ namespace ParserKeywords { class P_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class DENSITY_CALC { @@ -1809,7 +1863,7 @@ namespace ParserKeywords { class FIP_REGION { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class FRONTSIM1 { @@ -1831,7 +1885,7 @@ namespace ParserKeywords { class POLYMER_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1855,11 +1909,13 @@ namespace ParserKeywords { class HEAD_I { public: static const std::string itemName; + static constexpr int defaultValue = 0; }; class HEAD_J { public: static const std::string itemName; + static constexpr int defaultValue = 0; }; class REF_DEPTH { @@ -1875,7 +1931,7 @@ namespace ParserKeywords { class D_RADIUS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class INFLOW_EQ { @@ -1899,7 +1955,7 @@ namespace ParserKeywords { class P_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class DENSITY_CALC { @@ -1911,7 +1967,7 @@ namespace ParserKeywords { class FIP_REGION { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class FRONTSIM1 { @@ -1933,7 +1989,7 @@ namespace ParserKeywords { class POLYMER_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -1962,6 +2018,45 @@ namespace ParserKeywords { + class WELTRAJ : public ParserKeyword { + public: + WELTRAJ(); + static const std::string keywordName; + + class WELL { + public: + static const std::string itemName; + }; + + class BRANCH_NUMBER { + public: + static const std::string itemName; + static constexpr int defaultValue = 1; + }; + + class X { + public: + static const std::string itemName; + }; + + class Y { + public: + static const std::string itemName; + }; + + class TVD { + public: + static const std::string itemName; + }; + + class MD { + public: + static const std::string itemName; + }; + }; + + + class WFOAM : public ParserKeyword { public: WFOAM(); @@ -2003,7 +2098,7 @@ namespace ParserKeywords { class FLOW_SCALING { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -2032,7 +2127,7 @@ namespace ParserKeywords { class FLOW_SCALING { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -2061,7 +2156,7 @@ namespace ParserKeywords { class FLOW_SCALING { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -2090,7 +2185,7 @@ namespace ParserKeywords { class FLOW_SCALING { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -2166,7 +2261,7 @@ namespace ParserKeywords { class GUIDE_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class PHASE { @@ -2177,7 +2272,7 @@ namespace ParserKeywords { class SCALING_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -2270,6 +2365,154 @@ namespace ParserKeywords { + class WINJCLN : public ParserKeyword { + public: + WINJCLN(); + static const std::string keywordName; + + class WELL_NAME { + public: + static const std::string itemName; + }; + + class FRAC_REMOVE { + public: + static const std::string itemName; + static constexpr double defaultValue = 1.000000; + }; + + class I { + public: + static const std::string itemName; + static constexpr int defaultValue = -1; + }; + + class J { + public: + static const std::string itemName; + static constexpr int defaultValue = -1; + }; + + class K { + public: + static const std::string itemName; + static constexpr int defaultValue = -1; + }; + }; + + + + class WINJDAM : public ParserKeyword { + public: + WINJDAM(); + static const std::string keywordName; + + class WELL_NAME { + public: + static const std::string itemName; + }; + + class GEOMETRY { + public: + static const std::string itemName; + }; + + class FILTER_CAKE_PERM { + public: + static const std::string itemName; + }; + + class FILTER_CAKE_PORO { + public: + static const std::string itemName; + static constexpr double defaultValue = 0.300000; + }; + + class FILTER_CAKE_RADIUS { + public: + static const std::string itemName; + }; + + class FILTER_CAKE_AREA { + public: + static const std::string itemName; + }; + + class I { + public: + static const std::string itemName; + static constexpr int defaultValue = -1; + }; + + class J { + public: + static const std::string itemName; + static constexpr int defaultValue = -1; + }; + + class K { + public: + static const std::string itemName; + static constexpr int defaultValue = -1; + }; + }; + + + + class WINJFCNC : public ParserKeyword { + public: + WINJFCNC(); + static const std::string keywordName; + + class WELL { + public: + static const std::string itemName; + }; + + class VOL_CONCENTRATION { + public: + static const std::string itemName; + static const UDAValue defaultValue; + }; + }; + + + + class WINJGAS : public ParserKeyword { + public: + WINJGAS(); + static const std::string keywordName; + + class WELL { + public: + static const std::string itemName; + }; + + class FLUID { + public: + static const std::string itemName; + static const std::string defaultValue; + }; + + class STREAM { + public: + static const std::string itemName; + }; + + class MAKEUPGAS { + public: + static const std::string itemName; + }; + + class STAGE { + public: + static const std::string itemName; + static constexpr double defaultValue = 0; + }; + }; + + + class WINJMULT : public ParserKeyword { public: WINJMULT(); @@ -2288,7 +2531,7 @@ namespace ParserKeywords { class MULTIPLIER_GRADIENT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class MODE { @@ -2300,19 +2543,19 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; }; @@ -2331,25 +2574,25 @@ namespace ParserKeywords { class STEAM_QUALITY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class TEMPERATURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 15.560000; }; class PRESSURE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class ENTHALPY { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -2441,19 +2684,19 @@ namespace ParserKeywords { class WEIGHT_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class MIN_LIFT_GAS_RATE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class DELTA_GAS_RATE_WEIGHT_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class ALLOCATE_EXTRA_LIFT_GAS { @@ -2602,7 +2845,7 @@ namespace ParserKeywords { class DP { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -2648,13 +2891,13 @@ namespace ParserKeywords { class F1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class F2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class DEPTH_CORRECTION { @@ -2703,7 +2946,7 @@ namespace ParserKeywords { class WELLPI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class I { @@ -2747,7 +2990,7 @@ namespace ParserKeywords { class WELLPI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class GRID { @@ -2797,7 +3040,7 @@ namespace ParserKeywords { class PI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -2896,7 +3139,7 @@ namespace ParserKeywords { class POLYMER_VISCOSITY_RED { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -2946,7 +3189,7 @@ namespace ParserKeywords { class UPPER_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 100000000000000000000.000000; }; class GROUP_LOWER { @@ -2957,7 +3200,7 @@ namespace ParserKeywords { class LOWER_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -3038,37 +3281,37 @@ namespace ParserKeywords { class SCALE_MULTIPLIER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class C1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class C2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; }; @@ -3087,7 +3330,7 @@ namespace ParserKeywords { class SCALE_MULTIPLIER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class LGR { @@ -3098,31 +3341,31 @@ namespace ParserKeywords { class I { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class J { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class K { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class C1 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class C2 { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; }; @@ -3141,13 +3384,13 @@ namespace ParserKeywords { class SCALE_DEPOSITION_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class SCALE_DAMAGE_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class UNUSED { @@ -3158,7 +3401,7 @@ namespace ParserKeywords { class SCALE_DISSOLUTION_TABLE { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -3192,43 +3435,43 @@ namespace ParserKeywords { class LENGTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 12.000000; }; class DENSITY_CALI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000.250000; }; class VISCOSITY_CALI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.450000; }; class CRITICAL_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class WIDTH_TRANS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.050000; }; class MAX_VISC_RATIO { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 5.000000; }; class METHOD_SCALING_FACTOR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class MAX_ABS_RATE { @@ -3255,37 +3498,37 @@ namespace ParserKeywords { class OIL_FLOW_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class WATER_FLOW_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class GAS_FLOW_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class OIL_VISC_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class WATER_VISC_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class GAS_VISC_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -3338,7 +3581,7 @@ namespace ParserKeywords { class GAS_LIQUID_VD_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class A1 { @@ -3354,7 +3597,7 @@ namespace ParserKeywords { class C0_A { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.200000; }; class C0_B { @@ -3365,13 +3608,13 @@ namespace ParserKeywords { class FV { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class OIL_WATER_VD_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class A { @@ -3405,25 +3648,25 @@ namespace ParserKeywords { class NSWLMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class NSEGMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NLBRMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; class NCRDMX { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; }; @@ -3458,13 +3701,13 @@ namespace ParserKeywords { class R { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class PEXT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -3661,25 +3904,25 @@ namespace ParserKeywords { class MAX_WELL_ITERATIONS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 40; }; class MAX_TIMES_REDUCED { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 5; }; class REDUCTION_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.300000; }; class INCREASING_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 2.000000; }; }; @@ -3713,55 +3956,55 @@ namespace ParserKeywords { class CHANNELS { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class A { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 6e-05; }; class L1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.186300; }; class L2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.283200; }; class D { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.006316; }; class R { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-05; }; class GAMMA_INLET { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.350000; }; class GAMMA_OUTLET { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class GAMMA_LAB { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class STATUS { @@ -3819,37 +4062,37 @@ namespace ParserKeywords { class A { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class B { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class C { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class D { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class E { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class GOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -3942,13 +4185,13 @@ namespace ParserKeywords { class EMAX { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; class HOLDUP_FRACTION { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.010000; }; }; @@ -3982,43 +4225,43 @@ namespace ParserKeywords { class LENGTH { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 12.000000; }; class DENSITY_CALI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1000.250000; }; class VISCOSITY_CALI { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.450000; }; class CRITICAL_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class WIDTH_TRANS { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.050000; }; class MAX_VISC_RATIO { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 5.000000; }; class METHOD_SCALING_FACTOR { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = -1; }; class MAX_ABS_RATE { @@ -4049,43 +4292,43 @@ namespace ParserKeywords { class MAX_LINEAR_ITER { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 30; }; class CONVERGENCE_TARGET { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-10; }; class PC_FILL { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 2; }; class DROP_TOL { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class P_LIMIT { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1e-08; }; class LOOP_THRESHOLD { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; class LOOP_MULTIPLIER { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = -1.000000; }; }; @@ -4114,7 +4357,7 @@ namespace ParserKeywords { class VFP { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class VFP_COMPONENTS { @@ -4137,7 +4380,7 @@ namespace ParserKeywords { class ALQ_VALUE { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; class STATUS { @@ -4208,6 +4451,19 @@ namespace ParserKeywords { + class WSF : public ParserKeyword { + public: + WSF(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + class WSKPTAB : public ParserKeyword { public: WSKPTAB(); @@ -4290,7 +4546,7 @@ namespace ParserKeywords { class NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -4356,13 +4612,13 @@ namespace ParserKeywords { class TEST_NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 0; }; class START_TIME { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0; }; }; @@ -4425,7 +4681,7 @@ namespace ParserKeywords { class NUM { public: static const std::string itemName; - static const int defaultValue; + static constexpr int defaultValue = 1; }; }; @@ -4482,7 +4738,7 @@ namespace ParserKeywords { class LOSS_SCALING_FACTOR { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 1.000000; }; }; @@ -4538,13 +4794,13 @@ namespace ParserKeywords { class F1 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class F2 { public: static const std::string itemName; - static const double defaultValue; + static constexpr double defaultValue = 0.500000; }; class DEPTH_CORRECTION { diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/X.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/X.hpp index 9b476432d2..e3a3cd551b 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/X.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/X.hpp @@ -4,6 +4,19 @@ namespace Opm { namespace ParserKeywords { + class XMF : public ParserKeyword { + public: + XMF(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + } } #endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Y.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Y.hpp index 1163bddd0f..05a61be446 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Y.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Y.hpp @@ -4,6 +4,32 @@ namespace Opm { namespace ParserKeywords { + class YMF : public ParserKeyword { + public: + YMF(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + + class YMODULE : public ParserKeyword { + public: + YMODULE(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + } } #endif diff --git a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Z.hpp b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Z.hpp index f38f1e7e2a..ece5f22496 100644 --- a/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Z.hpp +++ b/ThirdParty/custom-opm-common/generated-opm-common/include/opm/input/eclipse/Parser/ParserKeywords/Z.hpp @@ -90,6 +90,32 @@ namespace ParserKeywords { + class ZMF : public ParserKeyword { + public: + ZMF(); + static const std::string keywordName; + + class data { + public: + static const std::string itemName; + }; + }; + + + + class ZMFVD : public ParserKeyword { + public: + ZMFVD(); + static const std::string keywordName; + + class DATA { + public: + static const std::string itemName; + }; + }; + + + } } #endif diff --git a/ThirdParty/custom-opm-common/opm-common b/ThirdParty/custom-opm-common/opm-common index 6a867bab89..ff1a494179 160000 --- a/ThirdParty/custom-opm-common/opm-common +++ b/ThirdParty/custom-opm-common/opm-common @@ -1 +1 @@ -Subproject commit 6a867bab89a119b9bab729195cdc8209ab57112f +Subproject commit ff1a4941791762be47a1ad1cd924bab8c3610b6e diff --git a/ThirdParty/fmtlib/LICENSE.rst b/ThirdParty/fmtlib/LICENSE.rst deleted file mode 100644 index f0ec3db4d2..0000000000 --- a/ThirdParty/fmtlib/LICENSE.rst +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 - present, Victor Zverovich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- Optional exception to the license --- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into a machine-executable object form of such -source code, you may redistribute such embedded portions in such object form -without including the above copyright and permission notices. diff --git a/ThirdParty/fmtlib/README.opm b/ThirdParty/fmtlib/README.opm deleted file mode 100644 index ee971f32c9..0000000000 --- a/ThirdParty/fmtlib/README.opm +++ /dev/null @@ -1,12 +0,0 @@ -The include/ directory is a copy of the include directory from version 7.0.3 of -the fmtlib distribution. The fmtlib can be found at https://github.com/fmtlib/fmt - -The fmtlib code embedded here should be compiled in header only mode, to ensure -that the symbol FMT_HEADER_ONLY must be defined before the the fmt/format.h -header is included: - - #define FMT_HEADER_ONLY - #include - - .... - auto msg = fmt::format("Hello {}", "world"); \ No newline at end of file diff --git a/ThirdParty/fmtlib/include/fmt/chrono.h b/ThirdParty/fmtlib/include/fmt/chrono.h deleted file mode 100644 index e70b8053a6..0000000000 --- a/ThirdParty/fmtlib/include/fmt/chrono.h +++ /dev/null @@ -1,1123 +0,0 @@ -// Formatting library for C++ - chrono support -// -// Copyright (c) 2012 - present, Victor Zverovich -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_CHRONO_H_ -#define FMT_CHRONO_H_ - -#include -#include -#include -#include - -#include "format.h" -#include "locale.h" - -FMT_BEGIN_NAMESPACE - -// Enable safe chrono durations, unless explicitly disabled. -#ifndef FMT_SAFE_DURATION_CAST -# define FMT_SAFE_DURATION_CAST 1 -#endif -#if FMT_SAFE_DURATION_CAST - -// For conversion between std::chrono::durations without undefined -// behaviour or erroneous results. -// This is a stripped down version of duration_cast, for inclusion in fmt. -// See https://github.com/pauldreik/safe_duration_cast -// -// Copyright Paul Dreik 2019 -namespace safe_duration_cast { - -template ::value && - std::numeric_limits::is_signed == - std::numeric_limits::is_signed)> -FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { - ec = 0; - using F = std::numeric_limits; - using T = std::numeric_limits; - static_assert(F::is_integer, "From must be integral"); - static_assert(T::is_integer, "To must be integral"); - - // A and B are both signed, or both unsigned. - if (F::digits <= T::digits) { - // From fits in To without any problem. - } else { - // From does not always fit in To, resort to a dynamic check. - if (from < (T::min)() || from > (T::max)()) { - // outside range. - ec = 1; - return {}; - } - } - return static_cast(from); -} - -/** - * converts From to To, without loss. If the dynamic value of from - * can't be converted to To without loss, ec is set. - */ -template ::value && - std::numeric_limits::is_signed != - std::numeric_limits::is_signed)> -FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { - ec = 0; - using F = std::numeric_limits; - using T = std::numeric_limits; - static_assert(F::is_integer, "From must be integral"); - static_assert(T::is_integer, "To must be integral"); - - if (F::is_signed && !T::is_signed) { - // From may be negative, not allowed! - if (fmt::detail::is_negative(from)) { - ec = 1; - return {}; - } - - // From is positive. Can it always fit in To? - if (F::digits <= T::digits) { - // yes, From always fits in To. - } else { - // from may not fit in To, we have to do a dynamic check - if (from > static_cast((T::max)())) { - ec = 1; - return {}; - } - } - } - - if (!F::is_signed && T::is_signed) { - // can from be held in To? - if (F::digits < T::digits) { - // yes, From always fits in To. - } else { - // from may not fit in To, we have to do a dynamic check - if (from > static_cast((T::max)())) { - // outside range. - ec = 1; - return {}; - } - } - } - - // reaching here means all is ok for lossless conversion. - return static_cast(from); - -} // function - -template ::value)> -FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) { - ec = 0; - return from; -} // function - -// clang-format off -/** - * converts From to To if possible, otherwise ec is set. - * - * input | output - * ---------------------------------|--------------- - * NaN | NaN - * Inf | Inf - * normal, fits in output | converted (possibly lossy) - * normal, does not fit in output | ec is set - * subnormal | best effort - * -Inf | -Inf - */ -// clang-format on -template ::value)> -FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) { - ec = 0; - using T = std::numeric_limits; - static_assert(std::is_floating_point::value, "From must be floating"); - static_assert(std::is_floating_point::value, "To must be floating"); - - // catch the only happy case - if (std::isfinite(from)) { - if (from >= T::lowest() && from <= (T::max)()) { - return static_cast(from); - } - // not within range. - ec = 1; - return {}; - } - - // nan and inf will be preserved - return static_cast(from); -} // function - -template ::value)> -FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) { - ec = 0; - static_assert(std::is_floating_point::value, "From must be floating"); - return from; -} - -/** - * safe duration cast between integral durations - */ -template ::value), - FMT_ENABLE_IF(std::is_integral::value)> -To safe_duration_cast(std::chrono::duration from, - int& ec) { - using From = std::chrono::duration; - ec = 0; - // the basic idea is that we need to convert from count() in the from type - // to count() in the To type, by multiplying it with this: - struct Factor - : std::ratio_divide {}; - - static_assert(Factor::num > 0, "num must be positive"); - static_assert(Factor::den > 0, "den must be positive"); - - // the conversion is like this: multiply from.count() with Factor::num - // /Factor::den and convert it to To::rep, all this without - // overflow/underflow. let's start by finding a suitable type that can hold - // both To, From and Factor::num - using IntermediateRep = - typename std::common_type::type; - - // safe conversion to IntermediateRep - IntermediateRep count = - lossless_integral_conversion(from.count(), ec); - if (ec) { - return {}; - } - // multiply with Factor::num without overflow or underflow - if (Factor::num != 1) { - const auto max1 = detail::max_value() / Factor::num; - if (count > max1) { - ec = 1; - return {}; - } - const auto min1 = - (std::numeric_limits::min)() / Factor::num; - if (count < min1) { - ec = 1; - return {}; - } - count *= Factor::num; - } - - // this can't go wrong, right? den>0 is checked earlier. - if (Factor::den != 1) { - count /= Factor::den; - } - // convert to the to type, safely - using ToRep = typename To::rep; - const ToRep tocount = lossless_integral_conversion(count, ec); - if (ec) { - return {}; - } - return To{tocount}; -} - -/** - * safe duration_cast between floating point durations - */ -template ::value), - FMT_ENABLE_IF(std::is_floating_point::value)> -To safe_duration_cast(std::chrono::duration from, - int& ec) { - using From = std::chrono::duration; - ec = 0; - if (std::isnan(from.count())) { - // nan in, gives nan out. easy. - return To{std::numeric_limits::quiet_NaN()}; - } - // maybe we should also check if from is denormal, and decide what to do about - // it. - - // +-inf should be preserved. - if (std::isinf(from.count())) { - return To{from.count()}; - } - - // the basic idea is that we need to convert from count() in the from type - // to count() in the To type, by multiplying it with this: - struct Factor - : std::ratio_divide {}; - - static_assert(Factor::num > 0, "num must be positive"); - static_assert(Factor::den > 0, "den must be positive"); - - // the conversion is like this: multiply from.count() with Factor::num - // /Factor::den and convert it to To::rep, all this without - // overflow/underflow. let's start by finding a suitable type that can hold - // both To, From and Factor::num - using IntermediateRep = - typename std::common_type::type; - - // force conversion of From::rep -> IntermediateRep to be safe, - // even if it will never happen be narrowing in this context. - IntermediateRep count = - safe_float_conversion(from.count(), ec); - if (ec) { - return {}; - } - - // multiply with Factor::num without overflow or underflow - if (Factor::num != 1) { - constexpr auto max1 = detail::max_value() / - static_cast(Factor::num); - if (count > max1) { - ec = 1; - return {}; - } - constexpr auto min1 = std::numeric_limits::lowest() / - static_cast(Factor::num); - if (count < min1) { - ec = 1; - return {}; - } - count *= static_cast(Factor::num); - } - - // this can't go wrong, right? den>0 is checked earlier. - if (Factor::den != 1) { - using common_t = typename std::common_type::type; - count /= static_cast(Factor::den); - } - - // convert to the to type, safely - using ToRep = typename To::rep; - - const ToRep tocount = safe_float_conversion(count, ec); - if (ec) { - return {}; - } - return To{tocount}; -} -} // namespace safe_duration_cast -#endif - -// Prevents expansion of a preceding token as a function-style macro. -// Usage: f FMT_NOMACRO() -#define FMT_NOMACRO - -namespace detail { -inline null<> localtime_r FMT_NOMACRO(...) { return null<>(); } -inline null<> localtime_s(...) { return null<>(); } -inline null<> gmtime_r(...) { return null<>(); } -inline null<> gmtime_s(...) { return null<>(); } -} // namespace detail - -// Thread-safe replacement for std::localtime -inline std::tm localtime(std::time_t time) { - struct dispatcher { - std::time_t time_; - std::tm tm_; - - dispatcher(std::time_t t) : time_(t) {} - - bool run() { - using namespace fmt::detail; - return handle(localtime_r(&time_, &tm_)); - } - - bool handle(std::tm* tm) { return tm != nullptr; } - - bool handle(detail::null<>) { - using namespace fmt::detail; - return fallback(localtime_s(&tm_, &time_)); - } - - bool fallback(int res) { return res == 0; } - -#if !FMT_MSC_VER - bool fallback(detail::null<>) { - using namespace fmt::detail; - std::tm* tm = std::localtime(&time_); - if (tm) tm_ = *tm; - return tm != nullptr; - } -#endif - }; - dispatcher lt(time); - // Too big time values may be unsupported. - if (!lt.run()) FMT_THROW(format_error("time_t value out of range")); - return lt.tm_; -} - -// Thread-safe replacement for std::gmtime -inline std::tm gmtime(std::time_t time) { - struct dispatcher { - std::time_t time_; - std::tm tm_; - - dispatcher(std::time_t t) : time_(t) {} - - bool run() { - using namespace fmt::detail; - return handle(gmtime_r(&time_, &tm_)); - } - - bool handle(std::tm* tm) { return tm != nullptr; } - - bool handle(detail::null<>) { - using namespace fmt::detail; - return fallback(gmtime_s(&tm_, &time_)); - } - - bool fallback(int res) { return res == 0; } - -#if !FMT_MSC_VER - bool fallback(detail::null<>) { - std::tm* tm = std::gmtime(&time_); - if (tm) tm_ = *tm; - return tm != nullptr; - } -#endif - }; - dispatcher gt(time); - // Too big time values may be unsupported. - if (!gt.run()) FMT_THROW(format_error("time_t value out of range")); - return gt.tm_; -} - -namespace detail { -inline size_t strftime(char* str, size_t count, const char* format, - const std::tm* time) { - return std::strftime(str, count, format, time); -} - -inline size_t strftime(wchar_t* str, size_t count, const wchar_t* format, - const std::tm* time) { - return std::wcsftime(str, count, format, time); -} -} // namespace detail - -template struct formatter { - template - auto parse(ParseContext& ctx) -> decltype(ctx.begin()) { - auto it = ctx.begin(); - if (it != ctx.end() && *it == ':') ++it; - auto end = it; - while (end != ctx.end() && *end != '}') ++end; - tm_format.reserve(detail::to_unsigned(end - it + 1)); - tm_format.append(it, end); - tm_format.push_back('\0'); - return end; - } - - template - auto format(const std::tm& tm, FormatContext& ctx) -> decltype(ctx.out()) { - basic_memory_buffer buf; - size_t start = buf.size(); - for (;;) { - size_t size = buf.capacity() - start; - size_t count = detail::strftime(&buf[start], size, &tm_format[0], &tm); - if (count != 0) { - buf.resize(start + count); - break; - } - if (size >= tm_format.size() * 256) { - // If the buffer is 256 times larger than the format string, assume - // that `strftime` gives an empty result. There doesn't seem to be a - // better way to distinguish the two cases: - // https://github.com/fmtlib/fmt/issues/367 - break; - } - const size_t MIN_GROWTH = 10; - buf.reserve(buf.capacity() + (size > MIN_GROWTH ? size : MIN_GROWTH)); - } - return std::copy(buf.begin(), buf.end(), ctx.out()); - } - - basic_memory_buffer tm_format; -}; - -namespace detail { -template FMT_CONSTEXPR const char* get_units() { - return nullptr; -} -template <> FMT_CONSTEXPR const char* get_units() { return "as"; } -template <> FMT_CONSTEXPR const char* get_units() { return "fs"; } -template <> FMT_CONSTEXPR const char* get_units() { return "ps"; } -template <> FMT_CONSTEXPR const char* get_units() { return "ns"; } -template <> FMT_CONSTEXPR const char* get_units() { return "µs"; } -template <> FMT_CONSTEXPR const char* get_units() { return "ms"; } -template <> FMT_CONSTEXPR const char* get_units() { return "cs"; } -template <> FMT_CONSTEXPR const char* get_units() { return "ds"; } -template <> FMT_CONSTEXPR const char* get_units>() { return "s"; } -template <> FMT_CONSTEXPR const char* get_units() { return "das"; } -template <> FMT_CONSTEXPR const char* get_units() { return "hs"; } -template <> FMT_CONSTEXPR const char* get_units() { return "ks"; } -template <> FMT_CONSTEXPR const char* get_units() { return "Ms"; } -template <> FMT_CONSTEXPR const char* get_units() { return "Gs"; } -template <> FMT_CONSTEXPR const char* get_units() { return "Ts"; } -template <> FMT_CONSTEXPR const char* get_units() { return "Ps"; } -template <> FMT_CONSTEXPR const char* get_units() { return "Es"; } -template <> FMT_CONSTEXPR const char* get_units>() { - return "m"; -} -template <> FMT_CONSTEXPR const char* get_units>() { - return "h"; -} - -enum class numeric_system { - standard, - // Alternative numeric system, e.g. �二 instead of 12 in ja_JP locale. - alternative -}; - -// Parses a put_time-like format string and invokes handler actions. -template -FMT_CONSTEXPR const Char* parse_chrono_format(const Char* begin, - const Char* end, - Handler&& handler) { - auto ptr = begin; - while (ptr != end) { - auto c = *ptr; - if (c == '}') break; - if (c != '%') { - ++ptr; - continue; - } - if (begin != ptr) handler.on_text(begin, ptr); - ++ptr; // consume '%' - if (ptr == end) FMT_THROW(format_error("invalid format")); - c = *ptr++; - switch (c) { - case '%': - handler.on_text(ptr - 1, ptr); - break; - case 'n': { - const Char newline[] = {'\n'}; - handler.on_text(newline, newline + 1); - break; - } - case 't': { - const Char tab[] = {'\t'}; - handler.on_text(tab, tab + 1); - break; - } - // Day of the week: - case 'a': - handler.on_abbr_weekday(); - break; - case 'A': - handler.on_full_weekday(); - break; - case 'w': - handler.on_dec0_weekday(numeric_system::standard); - break; - case 'u': - handler.on_dec1_weekday(numeric_system::standard); - break; - // Month: - case 'b': - handler.on_abbr_month(); - break; - case 'B': - handler.on_full_month(); - break; - // Hour, minute, second: - case 'H': - handler.on_24_hour(numeric_system::standard); - break; - case 'I': - handler.on_12_hour(numeric_system::standard); - break; - case 'M': - handler.on_minute(numeric_system::standard); - break; - case 'S': - handler.on_second(numeric_system::standard); - break; - // Other: - case 'c': - handler.on_datetime(numeric_system::standard); - break; - case 'x': - handler.on_loc_date(numeric_system::standard); - break; - case 'X': - handler.on_loc_time(numeric_system::standard); - break; - case 'D': - handler.on_us_date(); - break; - case 'F': - handler.on_iso_date(); - break; - case 'r': - handler.on_12_hour_time(); - break; - case 'R': - handler.on_24_hour_time(); - break; - case 'T': - handler.on_iso_time(); - break; - case 'p': - handler.on_am_pm(); - break; - case 'Q': - handler.on_duration_value(); - break; - case 'q': - handler.on_duration_unit(); - break; - case 'z': - handler.on_utc_offset(); - break; - case 'Z': - handler.on_tz_name(); - break; - // Alternative representation: - case 'E': { - if (ptr == end) FMT_THROW(format_error("invalid format")); - c = *ptr++; - switch (c) { - case 'c': - handler.on_datetime(numeric_system::alternative); - break; - case 'x': - handler.on_loc_date(numeric_system::alternative); - break; - case 'X': - handler.on_loc_time(numeric_system::alternative); - break; - default: - FMT_THROW(format_error("invalid format")); - } - break; - } - case 'O': - if (ptr == end) FMT_THROW(format_error("invalid format")); - c = *ptr++; - switch (c) { - case 'w': - handler.on_dec0_weekday(numeric_system::alternative); - break; - case 'u': - handler.on_dec1_weekday(numeric_system::alternative); - break; - case 'H': - handler.on_24_hour(numeric_system::alternative); - break; - case 'I': - handler.on_12_hour(numeric_system::alternative); - break; - case 'M': - handler.on_minute(numeric_system::alternative); - break; - case 'S': - handler.on_second(numeric_system::alternative); - break; - default: - FMT_THROW(format_error("invalid format")); - } - break; - default: - FMT_THROW(format_error("invalid format")); - } - begin = ptr; - } - if (begin != ptr) handler.on_text(begin, ptr); - return ptr; -} - -struct chrono_format_checker { - FMT_NORETURN void report_no_date() { FMT_THROW(format_error("no date")); } - - template void on_text(const Char*, const Char*) {} - FMT_NORETURN void on_abbr_weekday() { report_no_date(); } - FMT_NORETURN void on_full_weekday() { report_no_date(); } - FMT_NORETURN void on_dec0_weekday(numeric_system) { report_no_date(); } - FMT_NORETURN void on_dec1_weekday(numeric_system) { report_no_date(); } - FMT_NORETURN void on_abbr_month() { report_no_date(); } - FMT_NORETURN void on_full_month() { report_no_date(); } - void on_24_hour(numeric_system) {} - void on_12_hour(numeric_system) {} - void on_minute(numeric_system) {} - void on_second(numeric_system) {} - FMT_NORETURN void on_datetime(numeric_system) { report_no_date(); } - FMT_NORETURN void on_loc_date(numeric_system) { report_no_date(); } - FMT_NORETURN void on_loc_time(numeric_system) { report_no_date(); } - FMT_NORETURN void on_us_date() { report_no_date(); } - FMT_NORETURN void on_iso_date() { report_no_date(); } - void on_12_hour_time() {} - void on_24_hour_time() {} - void on_iso_time() {} - void on_am_pm() {} - void on_duration_value() {} - void on_duration_unit() {} - FMT_NORETURN void on_utc_offset() { report_no_date(); } - FMT_NORETURN void on_tz_name() { report_no_date(); } -}; - -template ::value)> -inline bool isnan(T) { - return false; -} -template ::value)> -inline bool isnan(T value) { - return std::isnan(value); -} - -template ::value)> -inline bool isfinite(T) { - return true; -} -template ::value)> -inline bool isfinite(T value) { - return std::isfinite(value); -} - -// Converts value to int and checks that it's in the range [0, upper). -template ::value)> -inline int to_nonnegative_int(T value, int upper) { - FMT_ASSERT(value >= 0 && value <= upper, "invalid value"); - (void)upper; - return static_cast(value); -} -template ::value)> -inline int to_nonnegative_int(T value, int upper) { - FMT_ASSERT( - std::isnan(value) || (value >= 0 && value <= static_cast(upper)), - "invalid value"); - (void)upper; - return static_cast(value); -} - -template ::value)> -inline T mod(T x, int y) { - return x % static_cast(y); -} -template ::value)> -inline T mod(T x, int y) { - return std::fmod(x, static_cast(y)); -} - -// If T is an integral type, maps T to its unsigned counterpart, otherwise -// leaves it unchanged (unlike std::make_unsigned). -template ::value> -struct make_unsigned_or_unchanged { - using type = T; -}; - -template struct make_unsigned_or_unchanged { - using type = typename std::make_unsigned::type; -}; - -#if FMT_SAFE_DURATION_CAST -// throwing version of safe_duration_cast -template -To fmt_safe_duration_cast(std::chrono::duration from) { - int ec; - To to = safe_duration_cast::safe_duration_cast(from, ec); - if (ec) FMT_THROW(format_error("cannot format duration")); - return to; -} -#endif - -template ::value)> -inline std::chrono::duration get_milliseconds( - std::chrono::duration d) { - // this may overflow and/or the result may not fit in the - // target type. -#if FMT_SAFE_DURATION_CAST - using CommonSecondsType = - typename std::common_type::type; - const auto d_as_common = fmt_safe_duration_cast(d); - const auto d_as_whole_seconds = - fmt_safe_duration_cast(d_as_common); - // this conversion should be nonproblematic - const auto diff = d_as_common - d_as_whole_seconds; - const auto ms = - fmt_safe_duration_cast>(diff); - return ms; -#else - auto s = std::chrono::duration_cast(d); - return std::chrono::duration_cast(d - s); -#endif -} - -template ::value)> -inline std::chrono::duration get_milliseconds( - std::chrono::duration d) { - using common_type = typename std::common_type::type; - auto ms = mod(d.count() * static_cast(Period::num) / - static_cast(Period::den) * 1000, - 1000); - return std::chrono::duration(static_cast(ms)); -} - -template -OutputIt format_duration_value(OutputIt out, Rep val, int precision) { - const Char pr_f[] = {'{', ':', '.', '{', '}', 'f', '}', 0}; - if (precision >= 0) return format_to(out, pr_f, val, precision); - const Char fp_f[] = {'{', ':', 'g', '}', 0}; - const Char format[] = {'{', '}', 0}; - return format_to(out, std::is_floating_point::value ? fp_f : format, - val); -} -template -OutputIt copy_unit(string_view unit, OutputIt out, Char) { - return std::copy(unit.begin(), unit.end(), out); -} - -template -OutputIt copy_unit(string_view unit, OutputIt out, wchar_t) { - // This works when wchar_t is UTF-32 because units only contain characters - // that have the same representation in UTF-16 and UTF-32. - utf8_to_utf16 u(unit); - return std::copy(u.c_str(), u.c_str() + u.size(), out); -} - -template -OutputIt format_duration_unit(OutputIt out) { - if (const char* unit = get_units()) - return copy_unit(string_view(unit), out, Char()); - const Char num_f[] = {'[', '{', '}', ']', 's', 0}; - if (const_check(Period::den == 1)) return format_to(out, num_f, Period::num); - const Char num_def_f[] = {'[', '{', '}', '/', '{', '}', ']', 's', 0}; - return format_to(out, num_def_f, Period::num, Period::den); -} - -template -struct chrono_formatter { - FormatContext& context; - OutputIt out; - int precision; - // rep is unsigned to avoid overflow. - using rep = - conditional_t::value && sizeof(Rep) < sizeof(int), - unsigned, typename make_unsigned_or_unchanged::type>; - rep val; - using seconds = std::chrono::duration; - seconds s; - using milliseconds = std::chrono::duration; - bool negative; - - using char_type = typename FormatContext::char_type; - - explicit chrono_formatter(FormatContext& ctx, OutputIt o, - std::chrono::duration d) - : context(ctx), - out(o), - val(static_cast(d.count())), - negative(false) { - if (d.count() < 0) { - val = 0 - val; - negative = true; - } - - // this may overflow and/or the result may not fit in the - // target type. -#if FMT_SAFE_DURATION_CAST - // might need checked conversion (rep!=Rep) - auto tmpval = std::chrono::duration(val); - s = fmt_safe_duration_cast(tmpval); -#else - s = std::chrono::duration_cast( - std::chrono::duration(val)); -#endif - } - - // returns true if nan or inf, writes to out. - bool handle_nan_inf() { - if (isfinite(val)) { - return false; - } - if (isnan(val)) { - write_nan(); - return true; - } - // must be +-inf - if (val > 0) { - write_pinf(); - } else { - write_ninf(); - } - return true; - } - - Rep hour() const { return static_cast(mod((s.count() / 3600), 24)); } - - Rep hour12() const { - Rep hour = static_cast(mod((s.count() / 3600), 12)); - return hour <= 0 ? 12 : hour; - } - - Rep minute() const { return static_cast(mod((s.count() / 60), 60)); } - Rep second() const { return static_cast(mod(s.count(), 60)); } - - std::tm time() const { - auto time = std::tm(); - time.tm_hour = to_nonnegative_int(hour(), 24); - time.tm_min = to_nonnegative_int(minute(), 60); - time.tm_sec = to_nonnegative_int(second(), 60); - return time; - } - - void write_sign() { - if (negative) { - *out++ = '-'; - negative = false; - } - } - - void write(Rep value, int width) { - write_sign(); - if (isnan(value)) return write_nan(); - uint32_or_64_or_128_t n = - to_unsigned(to_nonnegative_int(value, max_value())); - int num_digits = detail::count_digits(n); - if (width > num_digits) out = std::fill_n(out, width - num_digits, '0'); - out = format_decimal(out, n, num_digits).end; - } - - void write_nan() { std::copy_n("nan", 3, out); } - void write_pinf() { std::copy_n("inf", 3, out); } - void write_ninf() { std::copy_n("-inf", 4, out); } - - void format_localized(const tm& time, char format, char modifier = 0) { - if (isnan(val)) return write_nan(); - auto locale = context.locale().template get(); - auto& facet = std::use_facet>(locale); - std::basic_ostringstream os; - os.imbue(locale); - facet.put(os, os, ' ', &time, format, modifier); - auto str = os.str(); - std::copy(str.begin(), str.end(), out); - } - - void on_text(const char_type* begin, const char_type* end) { - std::copy(begin, end, out); - } - - // These are not implemented because durations don't have date information. - void on_abbr_weekday() {} - void on_full_weekday() {} - void on_dec0_weekday(numeric_system) {} - void on_dec1_weekday(numeric_system) {} - void on_abbr_month() {} - void on_full_month() {} - void on_datetime(numeric_system) {} - void on_loc_date(numeric_system) {} - void on_loc_time(numeric_system) {} - void on_us_date() {} - void on_iso_date() {} - void on_utc_offset() {} - void on_tz_name() {} - - void on_24_hour(numeric_system ns) { - if (handle_nan_inf()) return; - - if (ns == numeric_system::standard) return write(hour(), 2); - auto time = tm(); - time.tm_hour = to_nonnegative_int(hour(), 24); - format_localized(time, 'H', 'O'); - } - - void on_12_hour(numeric_system ns) { - if (handle_nan_inf()) return; - - if (ns == numeric_system::standard) return write(hour12(), 2); - auto time = tm(); - time.tm_hour = to_nonnegative_int(hour12(), 12); - format_localized(time, 'I', 'O'); - } - - void on_minute(numeric_system ns) { - if (handle_nan_inf()) return; - - if (ns == numeric_system::standard) return write(minute(), 2); - auto time = tm(); - time.tm_min = to_nonnegative_int(minute(), 60); - format_localized(time, 'M', 'O'); - } - - void on_second(numeric_system ns) { - if (handle_nan_inf()) return; - - if (ns == numeric_system::standard) { - write(second(), 2); -#if FMT_SAFE_DURATION_CAST - // convert rep->Rep - using duration_rep = std::chrono::duration; - using duration_Rep = std::chrono::duration; - auto tmpval = fmt_safe_duration_cast(duration_rep{val}); -#else - auto tmpval = std::chrono::duration(val); -#endif - auto ms = get_milliseconds(tmpval); - if (ms != std::chrono::milliseconds(0)) { - *out++ = '.'; - write(ms.count(), 3); - } - return; - } - auto time = tm(); - time.tm_sec = to_nonnegative_int(second(), 60); - format_localized(time, 'S', 'O'); - } - - void on_12_hour_time() { - if (handle_nan_inf()) return; - format_localized(time(), 'r'); - } - - void on_24_hour_time() { - if (handle_nan_inf()) { - *out++ = ':'; - handle_nan_inf(); - return; - } - - write(hour(), 2); - *out++ = ':'; - write(minute(), 2); - } - - void on_iso_time() { - on_24_hour_time(); - *out++ = ':'; - if (handle_nan_inf()) return; - write(second(), 2); - } - - void on_am_pm() { - if (handle_nan_inf()) return; - format_localized(time(), 'p'); - } - - void on_duration_value() { - if (handle_nan_inf()) return; - write_sign(); - out = format_duration_value(out, val, precision); - } - - void on_duration_unit() { - out = format_duration_unit(out); - } -}; -} // namespace detail - -template -struct formatter, Char> { - private: - basic_format_specs specs; - int precision; - using arg_ref_type = detail::arg_ref; - arg_ref_type width_ref; - arg_ref_type precision_ref; - mutable basic_string_view format_str; - using duration = std::chrono::duration; - - struct spec_handler { - formatter& f; - basic_format_parse_context& context; - basic_string_view format_str; - - template FMT_CONSTEXPR arg_ref_type make_arg_ref(Id arg_id) { - context.check_arg_id(arg_id); - return arg_ref_type(arg_id); - } - - FMT_CONSTEXPR arg_ref_type make_arg_ref(basic_string_view arg_id) { - context.check_arg_id(arg_id); - return arg_ref_type(arg_id); - } - - FMT_CONSTEXPR arg_ref_type make_arg_ref(detail::auto_id) { - return arg_ref_type(context.next_arg_id()); - } - - void on_error(const char* msg) { FMT_THROW(format_error(msg)); } - void on_fill(basic_string_view fill) { f.specs.fill = fill; } - void on_align(align_t align) { f.specs.align = align; } - void on_width(int width) { f.specs.width = width; } - void on_precision(int _precision) { f.precision = _precision; } - void end_precision() {} - - template void on_dynamic_width(Id arg_id) { - f.width_ref = make_arg_ref(arg_id); - } - - template void on_dynamic_precision(Id arg_id) { - f.precision_ref = make_arg_ref(arg_id); - } - }; - - using iterator = typename basic_format_parse_context::iterator; - struct parse_range { - iterator begin; - iterator end; - }; - - FMT_CONSTEXPR parse_range do_parse(basic_format_parse_context& ctx) { - auto begin = ctx.begin(), end = ctx.end(); - if (begin == end || *begin == '}') return {begin, begin}; - spec_handler handler{*this, ctx, format_str}; - begin = detail::parse_align(begin, end, handler); - if (begin == end) return {begin, begin}; - begin = detail::parse_width(begin, end, handler); - if (begin == end) return {begin, begin}; - if (*begin == '.') { - if (std::is_floating_point::value) - begin = detail::parse_precision(begin, end, handler); - else - handler.on_error("precision not allowed for this argument type"); - } - end = parse_chrono_format(begin, end, detail::chrono_format_checker()); - return {begin, end}; - } - - public: - formatter() : precision(-1) {} - - FMT_CONSTEXPR auto parse(basic_format_parse_context& ctx) - -> decltype(ctx.begin()) { - auto range = do_parse(ctx); - format_str = basic_string_view( - &*range.begin, detail::to_unsigned(range.end - range.begin)); - return range.end; - } - - template - auto format(const duration& d, FormatContext& ctx) -> decltype(ctx.out()) { - auto begin = format_str.begin(), end = format_str.end(); - // As a possible future optimization, we could avoid extra copying if width - // is not specified. - basic_memory_buffer buf; - auto out = std::back_inserter(buf); - detail::handle_dynamic_spec(specs.width, width_ref, - ctx); - detail::handle_dynamic_spec(precision, - precision_ref, ctx); - if (begin == end || *begin == '}') { - out = detail::format_duration_value(out, d.count(), precision); - detail::format_duration_unit(out); - } else { - detail::chrono_formatter f( - ctx, out, d); - f.precision = precision; - parse_chrono_format(begin, end, f); - } - return detail::write( - ctx.out(), basic_string_view(buf.data(), buf.size()), specs); - } -}; - -FMT_END_NAMESPACE - -#endif // FMT_CHRONO_H_ diff --git a/ThirdParty/fmtlib/include/fmt/color.h b/ThirdParty/fmtlib/include/fmt/color.h deleted file mode 100644 index b65f892afc..0000000000 --- a/ThirdParty/fmtlib/include/fmt/color.h +++ /dev/null @@ -1,566 +0,0 @@ -// Formatting library for C++ - color support -// -// Copyright (c) 2018 - present, Victor Zverovich and fmt contributors -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_COLOR_H_ -#define FMT_COLOR_H_ - -#include "format.h" - -FMT_BEGIN_NAMESPACE - -enum class color : uint32_t { - alice_blue = 0xF0F8FF, // rgb(240,248,255) - antique_white = 0xFAEBD7, // rgb(250,235,215) - aqua = 0x00FFFF, // rgb(0,255,255) - aquamarine = 0x7FFFD4, // rgb(127,255,212) - azure = 0xF0FFFF, // rgb(240,255,255) - beige = 0xF5F5DC, // rgb(245,245,220) - bisque = 0xFFE4C4, // rgb(255,228,196) - black = 0x000000, // rgb(0,0,0) - blanched_almond = 0xFFEBCD, // rgb(255,235,205) - blue = 0x0000FF, // rgb(0,0,255) - blue_violet = 0x8A2BE2, // rgb(138,43,226) - brown = 0xA52A2A, // rgb(165,42,42) - burly_wood = 0xDEB887, // rgb(222,184,135) - cadet_blue = 0x5F9EA0, // rgb(95,158,160) - chartreuse = 0x7FFF00, // rgb(127,255,0) - chocolate = 0xD2691E, // rgb(210,105,30) - coral = 0xFF7F50, // rgb(255,127,80) - cornflower_blue = 0x6495ED, // rgb(100,149,237) - cornsilk = 0xFFF8DC, // rgb(255,248,220) - crimson = 0xDC143C, // rgb(220,20,60) - cyan = 0x00FFFF, // rgb(0,255,255) - dark_blue = 0x00008B, // rgb(0,0,139) - dark_cyan = 0x008B8B, // rgb(0,139,139) - dark_golden_rod = 0xB8860B, // rgb(184,134,11) - dark_gray = 0xA9A9A9, // rgb(169,169,169) - dark_green = 0x006400, // rgb(0,100,0) - dark_khaki = 0xBDB76B, // rgb(189,183,107) - dark_magenta = 0x8B008B, // rgb(139,0,139) - dark_olive_green = 0x556B2F, // rgb(85,107,47) - dark_orange = 0xFF8C00, // rgb(255,140,0) - dark_orchid = 0x9932CC, // rgb(153,50,204) - dark_red = 0x8B0000, // rgb(139,0,0) - dark_salmon = 0xE9967A, // rgb(233,150,122) - dark_sea_green = 0x8FBC8F, // rgb(143,188,143) - dark_slate_blue = 0x483D8B, // rgb(72,61,139) - dark_slate_gray = 0x2F4F4F, // rgb(47,79,79) - dark_turquoise = 0x00CED1, // rgb(0,206,209) - dark_violet = 0x9400D3, // rgb(148,0,211) - deep_pink = 0xFF1493, // rgb(255,20,147) - deep_sky_blue = 0x00BFFF, // rgb(0,191,255) - dim_gray = 0x696969, // rgb(105,105,105) - dodger_blue = 0x1E90FF, // rgb(30,144,255) - fire_brick = 0xB22222, // rgb(178,34,34) - floral_white = 0xFFFAF0, // rgb(255,250,240) - forest_green = 0x228B22, // rgb(34,139,34) - fuchsia = 0xFF00FF, // rgb(255,0,255) - gainsboro = 0xDCDCDC, // rgb(220,220,220) - ghost_white = 0xF8F8FF, // rgb(248,248,255) - gold = 0xFFD700, // rgb(255,215,0) - golden_rod = 0xDAA520, // rgb(218,165,32) - gray = 0x808080, // rgb(128,128,128) - green = 0x008000, // rgb(0,128,0) - green_yellow = 0xADFF2F, // rgb(173,255,47) - honey_dew = 0xF0FFF0, // rgb(240,255,240) - hot_pink = 0xFF69B4, // rgb(255,105,180) - indian_red = 0xCD5C5C, // rgb(205,92,92) - indigo = 0x4B0082, // rgb(75,0,130) - ivory = 0xFFFFF0, // rgb(255,255,240) - khaki = 0xF0E68C, // rgb(240,230,140) - lavender = 0xE6E6FA, // rgb(230,230,250) - lavender_blush = 0xFFF0F5, // rgb(255,240,245) - lawn_green = 0x7CFC00, // rgb(124,252,0) - lemon_chiffon = 0xFFFACD, // rgb(255,250,205) - light_blue = 0xADD8E6, // rgb(173,216,230) - light_coral = 0xF08080, // rgb(240,128,128) - light_cyan = 0xE0FFFF, // rgb(224,255,255) - light_golden_rod_yellow = 0xFAFAD2, // rgb(250,250,210) - light_gray = 0xD3D3D3, // rgb(211,211,211) - light_green = 0x90EE90, // rgb(144,238,144) - light_pink = 0xFFB6C1, // rgb(255,182,193) - light_salmon = 0xFFA07A, // rgb(255,160,122) - light_sea_green = 0x20B2AA, // rgb(32,178,170) - light_sky_blue = 0x87CEFA, // rgb(135,206,250) - light_slate_gray = 0x778899, // rgb(119,136,153) - light_steel_blue = 0xB0C4DE, // rgb(176,196,222) - light_yellow = 0xFFFFE0, // rgb(255,255,224) - lime = 0x00FF00, // rgb(0,255,0) - lime_green = 0x32CD32, // rgb(50,205,50) - linen = 0xFAF0E6, // rgb(250,240,230) - magenta = 0xFF00FF, // rgb(255,0,255) - maroon = 0x800000, // rgb(128,0,0) - medium_aquamarine = 0x66CDAA, // rgb(102,205,170) - medium_blue = 0x0000CD, // rgb(0,0,205) - medium_orchid = 0xBA55D3, // rgb(186,85,211) - medium_purple = 0x9370DB, // rgb(147,112,219) - medium_sea_green = 0x3CB371, // rgb(60,179,113) - medium_slate_blue = 0x7B68EE, // rgb(123,104,238) - medium_spring_green = 0x00FA9A, // rgb(0,250,154) - medium_turquoise = 0x48D1CC, // rgb(72,209,204) - medium_violet_red = 0xC71585, // rgb(199,21,133) - midnight_blue = 0x191970, // rgb(25,25,112) - mint_cream = 0xF5FFFA, // rgb(245,255,250) - misty_rose = 0xFFE4E1, // rgb(255,228,225) - moccasin = 0xFFE4B5, // rgb(255,228,181) - navajo_white = 0xFFDEAD, // rgb(255,222,173) - navy = 0x000080, // rgb(0,0,128) - old_lace = 0xFDF5E6, // rgb(253,245,230) - olive = 0x808000, // rgb(128,128,0) - olive_drab = 0x6B8E23, // rgb(107,142,35) - orange = 0xFFA500, // rgb(255,165,0) - orange_red = 0xFF4500, // rgb(255,69,0) - orchid = 0xDA70D6, // rgb(218,112,214) - pale_golden_rod = 0xEEE8AA, // rgb(238,232,170) - pale_green = 0x98FB98, // rgb(152,251,152) - pale_turquoise = 0xAFEEEE, // rgb(175,238,238) - pale_violet_red = 0xDB7093, // rgb(219,112,147) - papaya_whip = 0xFFEFD5, // rgb(255,239,213) - peach_puff = 0xFFDAB9, // rgb(255,218,185) - peru = 0xCD853F, // rgb(205,133,63) - pink = 0xFFC0CB, // rgb(255,192,203) - plum = 0xDDA0DD, // rgb(221,160,221) - powder_blue = 0xB0E0E6, // rgb(176,224,230) - purple = 0x800080, // rgb(128,0,128) - rebecca_purple = 0x663399, // rgb(102,51,153) - red = 0xFF0000, // rgb(255,0,0) - rosy_brown = 0xBC8F8F, // rgb(188,143,143) - royal_blue = 0x4169E1, // rgb(65,105,225) - saddle_brown = 0x8B4513, // rgb(139,69,19) - salmon = 0xFA8072, // rgb(250,128,114) - sandy_brown = 0xF4A460, // rgb(244,164,96) - sea_green = 0x2E8B57, // rgb(46,139,87) - sea_shell = 0xFFF5EE, // rgb(255,245,238) - sienna = 0xA0522D, // rgb(160,82,45) - silver = 0xC0C0C0, // rgb(192,192,192) - sky_blue = 0x87CEEB, // rgb(135,206,235) - slate_blue = 0x6A5ACD, // rgb(106,90,205) - slate_gray = 0x708090, // rgb(112,128,144) - snow = 0xFFFAFA, // rgb(255,250,250) - spring_green = 0x00FF7F, // rgb(0,255,127) - steel_blue = 0x4682B4, // rgb(70,130,180) - tan = 0xD2B48C, // rgb(210,180,140) - teal = 0x008080, // rgb(0,128,128) - thistle = 0xD8BFD8, // rgb(216,191,216) - tomato = 0xFF6347, // rgb(255,99,71) - turquoise = 0x40E0D0, // rgb(64,224,208) - violet = 0xEE82EE, // rgb(238,130,238) - wheat = 0xF5DEB3, // rgb(245,222,179) - white = 0xFFFFFF, // rgb(255,255,255) - white_smoke = 0xF5F5F5, // rgb(245,245,245) - yellow = 0xFFFF00, // rgb(255,255,0) - yellow_green = 0x9ACD32 // rgb(154,205,50) -}; // enum class color - -enum class terminal_color : uint8_t { - black = 30, - red, - green, - yellow, - blue, - magenta, - cyan, - white, - bright_black = 90, - bright_red, - bright_green, - bright_yellow, - bright_blue, - bright_magenta, - bright_cyan, - bright_white -}; - -enum class emphasis : uint8_t { - bold = 1, - italic = 1 << 1, - underline = 1 << 2, - strikethrough = 1 << 3 -}; - -// rgb is a struct for red, green and blue colors. -// Using the name "rgb" makes some editors show the color in a tooltip. -struct rgb { - FMT_CONSTEXPR rgb() : r(0), g(0), b(0) {} - FMT_CONSTEXPR rgb(uint8_t r_, uint8_t g_, uint8_t b_) : r(r_), g(g_), b(b_) {} - FMT_CONSTEXPR rgb(uint32_t hex) - : r((hex >> 16) & 0xFF), g((hex >> 8) & 0xFF), b(hex & 0xFF) {} - FMT_CONSTEXPR rgb(color hex) - : r((uint32_t(hex) >> 16) & 0xFF), - g((uint32_t(hex) >> 8) & 0xFF), - b(uint32_t(hex) & 0xFF) {} - uint8_t r; - uint8_t g; - uint8_t b; -}; - -namespace detail { - -// color is a struct of either a rgb color or a terminal color. -struct color_type { - FMT_CONSTEXPR color_type() FMT_NOEXCEPT : is_rgb(), value{} {} - FMT_CONSTEXPR color_type(color rgb_color) FMT_NOEXCEPT : is_rgb(true), - value{} { - value.rgb_color = static_cast(rgb_color); - } - FMT_CONSTEXPR color_type(rgb rgb_color) FMT_NOEXCEPT : is_rgb(true), value{} { - value.rgb_color = (static_cast(rgb_color.r) << 16) | - (static_cast(rgb_color.g) << 8) | rgb_color.b; - } - FMT_CONSTEXPR color_type(terminal_color term_color) FMT_NOEXCEPT : is_rgb(), - value{} { - value.term_color = static_cast(term_color); - } - bool is_rgb; - union color_union { - uint8_t term_color; - uint32_t rgb_color; - } value; -}; -} // namespace detail - -// Experimental text formatting support. -class text_style { - public: - FMT_CONSTEXPR text_style(emphasis em = emphasis()) FMT_NOEXCEPT - : set_foreground_color(), - set_background_color(), - ems(em) {} - - FMT_CONSTEXPR text_style& operator|=(const text_style& rhs) { - if (!set_foreground_color) { - set_foreground_color = rhs.set_foreground_color; - foreground_color = rhs.foreground_color; - } else if (rhs.set_foreground_color) { - if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb) - FMT_THROW(format_error("can't OR a terminal color")); - foreground_color.value.rgb_color |= rhs.foreground_color.value.rgb_color; - } - - if (!set_background_color) { - set_background_color = rhs.set_background_color; - background_color = rhs.background_color; - } else if (rhs.set_background_color) { - if (!background_color.is_rgb || !rhs.background_color.is_rgb) - FMT_THROW(format_error("can't OR a terminal color")); - background_color.value.rgb_color |= rhs.background_color.value.rgb_color; - } - - ems = static_cast(static_cast(ems) | - static_cast(rhs.ems)); - return *this; - } - - friend FMT_CONSTEXPR text_style operator|(text_style lhs, - const text_style& rhs) { - return lhs |= rhs; - } - - FMT_CONSTEXPR text_style& operator&=(const text_style& rhs) { - if (!set_foreground_color) { - set_foreground_color = rhs.set_foreground_color; - foreground_color = rhs.foreground_color; - } else if (rhs.set_foreground_color) { - if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb) - FMT_THROW(format_error("can't AND a terminal color")); - foreground_color.value.rgb_color &= rhs.foreground_color.value.rgb_color; - } - - if (!set_background_color) { - set_background_color = rhs.set_background_color; - background_color = rhs.background_color; - } else if (rhs.set_background_color) { - if (!background_color.is_rgb || !rhs.background_color.is_rgb) - FMT_THROW(format_error("can't AND a terminal color")); - background_color.value.rgb_color &= rhs.background_color.value.rgb_color; - } - - ems = static_cast(static_cast(ems) & - static_cast(rhs.ems)); - return *this; - } - - friend FMT_CONSTEXPR text_style operator&(text_style lhs, - const text_style& rhs) { - return lhs &= rhs; - } - - FMT_CONSTEXPR bool has_foreground() const FMT_NOEXCEPT { - return set_foreground_color; - } - FMT_CONSTEXPR bool has_background() const FMT_NOEXCEPT { - return set_background_color; - } - FMT_CONSTEXPR bool has_emphasis() const FMT_NOEXCEPT { - return static_cast(ems) != 0; - } - FMT_CONSTEXPR detail::color_type get_foreground() const FMT_NOEXCEPT { - FMT_ASSERT(has_foreground(), "no foreground specified for this style"); - return foreground_color; - } - FMT_CONSTEXPR detail::color_type get_background() const FMT_NOEXCEPT { - FMT_ASSERT(has_background(), "no background specified for this style"); - return background_color; - } - FMT_CONSTEXPR emphasis get_emphasis() const FMT_NOEXCEPT { - FMT_ASSERT(has_emphasis(), "no emphasis specified for this style"); - return ems; - } - - private: - FMT_CONSTEXPR text_style(bool is_foreground, - detail::color_type text_color) FMT_NOEXCEPT - : set_foreground_color(), - set_background_color(), - ems() { - if (is_foreground) { - foreground_color = text_color; - set_foreground_color = true; - } else { - background_color = text_color; - set_background_color = true; - } - } - - friend FMT_CONSTEXPR_DECL text_style fg(detail::color_type foreground) - FMT_NOEXCEPT; - friend FMT_CONSTEXPR_DECL text_style bg(detail::color_type background) - FMT_NOEXCEPT; - - detail::color_type foreground_color; - detail::color_type background_color; - bool set_foreground_color; - bool set_background_color; - emphasis ems; -}; - -FMT_CONSTEXPR text_style fg(detail::color_type foreground) FMT_NOEXCEPT { - return text_style(/*is_foreground=*/true, foreground); -} - -FMT_CONSTEXPR text_style bg(detail::color_type background) FMT_NOEXCEPT { - return text_style(/*is_foreground=*/false, background); -} - -FMT_CONSTEXPR text_style operator|(emphasis lhs, emphasis rhs) FMT_NOEXCEPT { - return text_style(lhs) | rhs; -} - -namespace detail { - -template struct ansi_color_escape { - FMT_CONSTEXPR ansi_color_escape(detail::color_type text_color, - const char* esc) FMT_NOEXCEPT { - // If we have a terminal color, we need to output another escape code - // sequence. - if (!text_color.is_rgb) { - bool is_background = esc == detail::data::background_color; - uint32_t value = text_color.value.term_color; - // Background ASCII codes are the same as the foreground ones but with - // 10 more. - if (is_background) value += 10u; - - size_t index = 0; - buffer[index++] = static_cast('\x1b'); - buffer[index++] = static_cast('['); - - if (value >= 100u) { - buffer[index++] = static_cast('1'); - value %= 100u; - } - buffer[index++] = static_cast('0' + value / 10u); - buffer[index++] = static_cast('0' + value % 10u); - - buffer[index++] = static_cast('m'); - buffer[index++] = static_cast('\0'); - return; - } - - for (int i = 0; i < 7; i++) { - buffer[i] = static_cast(esc[i]); - } - rgb color(text_color.value.rgb_color); - to_esc(color.r, buffer + 7, ';'); - to_esc(color.g, buffer + 11, ';'); - to_esc(color.b, buffer + 15, 'm'); - buffer[19] = static_cast(0); - } - FMT_CONSTEXPR ansi_color_escape(emphasis em) FMT_NOEXCEPT { - uint8_t em_codes[4] = {}; - uint8_t em_bits = static_cast(em); - if (em_bits & static_cast(emphasis::bold)) em_codes[0] = 1; - if (em_bits & static_cast(emphasis::italic)) em_codes[1] = 3; - if (em_bits & static_cast(emphasis::underline)) em_codes[2] = 4; - if (em_bits & static_cast(emphasis::strikethrough)) - em_codes[3] = 9; - - size_t index = 0; - for (int i = 0; i < 4; ++i) { - if (!em_codes[i]) continue; - buffer[index++] = static_cast('\x1b'); - buffer[index++] = static_cast('['); - buffer[index++] = static_cast('0' + em_codes[i]); - buffer[index++] = static_cast('m'); - } - buffer[index++] = static_cast(0); - } - FMT_CONSTEXPR operator const Char*() const FMT_NOEXCEPT { return buffer; } - - FMT_CONSTEXPR const Char* begin() const FMT_NOEXCEPT { return buffer; } - FMT_CONSTEXPR const Char* end() const FMT_NOEXCEPT { - return buffer + std::char_traits::length(buffer); - } - - private: - Char buffer[7u + 3u * 4u + 1u]; - - static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out, - char delimiter) FMT_NOEXCEPT { - out[0] = static_cast('0' + c / 100); - out[1] = static_cast('0' + c / 10 % 10); - out[2] = static_cast('0' + c % 10); - out[3] = static_cast(delimiter); - } -}; - -template -FMT_CONSTEXPR ansi_color_escape make_foreground_color( - detail::color_type foreground) FMT_NOEXCEPT { - return ansi_color_escape(foreground, detail::data::foreground_color); -} - -template -FMT_CONSTEXPR ansi_color_escape make_background_color( - detail::color_type background) FMT_NOEXCEPT { - return ansi_color_escape(background, detail::data::background_color); -} - -template -FMT_CONSTEXPR ansi_color_escape make_emphasis(emphasis em) FMT_NOEXCEPT { - return ansi_color_escape(em); -} - -template -inline void fputs(const Char* chars, FILE* stream) FMT_NOEXCEPT { - std::fputs(chars, stream); -} - -template <> -inline void fputs(const wchar_t* chars, FILE* stream) FMT_NOEXCEPT { - std::fputws(chars, stream); -} - -template inline void reset_color(FILE* stream) FMT_NOEXCEPT { - fputs(detail::data::reset_color, stream); -} - -template <> inline void reset_color(FILE* stream) FMT_NOEXCEPT { - fputs(detail::data::wreset_color, stream); -} - -template -inline void reset_color(basic_memory_buffer& buffer) FMT_NOEXCEPT { - const char* begin = data::reset_color; - const char* end = begin + sizeof(data::reset_color) - 1; - buffer.append(begin, end); -} - -template -void vformat_to(basic_memory_buffer& buf, const text_style& ts, - basic_string_view format_str, - basic_format_args> args) { - bool has_style = false; - if (ts.has_emphasis()) { - has_style = true; - auto emphasis = detail::make_emphasis(ts.get_emphasis()); - buf.append(emphasis.begin(), emphasis.end()); - } - if (ts.has_foreground()) { - has_style = true; - auto foreground = detail::make_foreground_color(ts.get_foreground()); - buf.append(foreground.begin(), foreground.end()); - } - if (ts.has_background()) { - has_style = true; - auto background = detail::make_background_color(ts.get_background()); - buf.append(background.begin(), background.end()); - } - detail::vformat_to(buf, format_str, args); - if (has_style) detail::reset_color(buf); -} -} // namespace detail - -template > -void vprint(std::FILE* f, const text_style& ts, const S& format, - basic_format_args> args) { - basic_memory_buffer buf; - detail::vformat_to(buf, ts, to_string_view(format), args); - buf.push_back(Char(0)); - detail::fputs(buf.data(), f); -} - -/** - Formats a string and prints it to the specified file stream using ANSI - escape sequences to specify text formatting. - Example: - fmt::print(fmt::emphasis::bold | fg(fmt::color::red), - "Elapsed time: {0:.2f} seconds", 1.23); - */ -template ::value)> -void print(std::FILE* f, const text_style& ts, const S& format_str, - const Args&... args) { - detail::check_format_string(format_str); - using context = buffer_context>; - format_arg_store as{args...}; - vprint(f, ts, format_str, basic_format_args(as)); -} - -/** - Formats a string and prints it to stdout using ANSI escape sequences to - specify text formatting. - Example: - fmt::print(fmt::emphasis::bold | fg(fmt::color::red), - "Elapsed time: {0:.2f} seconds", 1.23); - */ -template ::value)> -void print(const text_style& ts, const S& format_str, const Args&... args) { - return print(stdout, ts, format_str, args...); -} - -template > -inline std::basic_string vformat( - const text_style& ts, const S& format_str, - basic_format_args>> args) { - basic_memory_buffer buf; - detail::vformat_to(buf, ts, to_string_view(format_str), args); - return fmt::to_string(buf); -} - -/** - \rst - Formats arguments and returns the result as a string using ANSI - escape sequences to specify text formatting. - - **Example**:: - - #include - std::string message = fmt::format(fmt::emphasis::bold | fg(fmt::color::red), - "The answer is {}", 42); - \endrst -*/ -template > -inline std::basic_string format(const text_style& ts, const S& format_str, - const Args&... args) { - return vformat(ts, to_string_view(format_str), - detail::make_args_checked(format_str, args...)); -} - -FMT_END_NAMESPACE - -#endif // FMT_COLOR_H_ diff --git a/ThirdParty/fmtlib/include/fmt/compile.h b/ThirdParty/fmtlib/include/fmt/compile.h deleted file mode 100644 index d7e6449ebb..0000000000 --- a/ThirdParty/fmtlib/include/fmt/compile.h +++ /dev/null @@ -1,665 +0,0 @@ -// Formatting library for C++ - experimental format string compilation -// -// Copyright (c) 2012 - present, Victor Zverovich and fmt contributors -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_COMPILE_H_ -#define FMT_COMPILE_H_ - -#include - -#include "format.h" - -FMT_BEGIN_NAMESPACE -namespace detail { - -// A compile-time string which is compiled into fast formatting code. -class compiled_string {}; - -template -struct is_compiled_string : std::is_base_of {}; - -/** - \rst - Converts a string literal *s* into a format string that will be parsed at - compile time and converted into efficient formatting code. Requires C++17 - ``constexpr if`` compiler support. - - **Example**:: - - // Converts 42 into std::string using the most efficient method and no - // runtime format string processing. - std::string s = fmt::format(FMT_COMPILE("{}"), 42); - \endrst - */ -#define FMT_COMPILE(s) FMT_STRING_IMPL(s, fmt::detail::compiled_string) - -template -const T& first(const T& value, const Tail&...) { - return value; -} - -// Part of a compiled format string. It can be either literal text or a -// replacement field. -template struct format_part { - enum class kind { arg_index, arg_name, text, replacement }; - - struct replacement { - arg_ref arg_id; - dynamic_format_specs specs; - }; - - kind part_kind; - union value { - int arg_index; - basic_string_view str; - replacement repl; - - FMT_CONSTEXPR value(int index = 0) : arg_index(index) {} - FMT_CONSTEXPR value(basic_string_view s) : str(s) {} - FMT_CONSTEXPR value(replacement r) : repl(r) {} - } val; - // Position past the end of the argument id. - const Char* arg_id_end = nullptr; - - FMT_CONSTEXPR format_part(kind k = kind::arg_index, value v = {}) - : part_kind(k), val(v) {} - - static FMT_CONSTEXPR format_part make_arg_index(int index) { - return format_part(kind::arg_index, index); - } - static FMT_CONSTEXPR format_part make_arg_name(basic_string_view name) { - return format_part(kind::arg_name, name); - } - static FMT_CONSTEXPR format_part make_text(basic_string_view text) { - return format_part(kind::text, text); - } - static FMT_CONSTEXPR format_part make_replacement(replacement repl) { - return format_part(kind::replacement, repl); - } -}; - -template struct part_counter { - unsigned num_parts = 0; - - FMT_CONSTEXPR void on_text(const Char* begin, const Char* end) { - if (begin != end) ++num_parts; - } - - FMT_CONSTEXPR int on_arg_id() { return ++num_parts, 0; } - FMT_CONSTEXPR int on_arg_id(int) { return ++num_parts, 0; } - FMT_CONSTEXPR int on_arg_id(basic_string_view) { - return ++num_parts, 0; - } - - FMT_CONSTEXPR void on_replacement_field(int, const Char*) {} - - FMT_CONSTEXPR const Char* on_format_specs(int, const Char* begin, - const Char* end) { - // Find the matching brace. - unsigned brace_counter = 0; - for (; begin != end; ++begin) { - if (*begin == '{') { - ++brace_counter; - } else if (*begin == '}') { - if (brace_counter == 0u) break; - --brace_counter; - } - } - return begin; - } - - FMT_CONSTEXPR void on_error(const char*) {} -}; - -// Counts the number of parts in a format string. -template -FMT_CONSTEXPR unsigned count_parts(basic_string_view format_str) { - part_counter counter; - parse_format_string(format_str, counter); - return counter.num_parts; -} - -template -class format_string_compiler : public error_handler { - private: - using part = format_part; - - PartHandler handler_; - part part_; - basic_string_view format_str_; - basic_format_parse_context parse_context_; - - public: - FMT_CONSTEXPR format_string_compiler(basic_string_view format_str, - PartHandler handler) - : handler_(handler), - format_str_(format_str), - parse_context_(format_str) {} - - FMT_CONSTEXPR void on_text(const Char* begin, const Char* end) { - if (begin != end) - handler_(part::make_text({begin, to_unsigned(end - begin)})); - } - - FMT_CONSTEXPR int on_arg_id() { - part_ = part::make_arg_index(parse_context_.next_arg_id()); - return 0; - } - - FMT_CONSTEXPR int on_arg_id(int id) { - parse_context_.check_arg_id(id); - part_ = part::make_arg_index(id); - return 0; - } - - FMT_CONSTEXPR int on_arg_id(basic_string_view id) { - part_ = part::make_arg_name(id); - return 0; - } - - FMT_CONSTEXPR void on_replacement_field(int, const Char* ptr) { - part_.arg_id_end = ptr; - handler_(part_); - } - - FMT_CONSTEXPR const Char* on_format_specs(int, const Char* begin, - const Char* end) { - auto repl = typename part::replacement(); - dynamic_specs_handler> handler( - repl.specs, parse_context_); - auto it = parse_format_specs(begin, end, handler); - if (*it != '}') on_error("missing '}' in format string"); - repl.arg_id = part_.part_kind == part::kind::arg_index - ? arg_ref(part_.val.arg_index) - : arg_ref(part_.val.str); - auto part = part::make_replacement(repl); - part.arg_id_end = begin; - handler_(part); - return it; - } -}; - -// Compiles a format string and invokes handler(part) for each parsed part. -template -FMT_CONSTEXPR void compile_format_string(basic_string_view format_str, - PartHandler handler) { - parse_format_string( - format_str, - format_string_compiler(format_str, handler)); -} - -template -void format_arg( - basic_format_parse_context& parse_ctx, - Context& ctx, Id arg_id) { - ctx.advance_to(visit_format_arg( - arg_formatter(ctx, &parse_ctx), - ctx.arg(arg_id))); -} - -// vformat_to is defined in a subnamespace to prevent ADL. -namespace cf { -template -auto vformat_to(OutputIt out, CompiledFormat& cf, - basic_format_args args) -> typename Context::iterator { - using char_type = typename Context::char_type; - basic_format_parse_context parse_ctx( - to_string_view(cf.format_str_)); - Context ctx(out, args); - - const auto& parts = cf.parts(); - for (auto part_it = std::begin(parts); part_it != std::end(parts); - ++part_it) { - const auto& part = *part_it; - const auto& value = part.val; - - using format_part_t = format_part; - switch (part.part_kind) { - case format_part_t::kind::text: { - const auto text = value.str; - auto output = ctx.out(); - auto&& it = reserve(output, text.size()); - it = std::copy_n(text.begin(), text.size(), it); - ctx.advance_to(output); - break; - } - - case format_part_t::kind::arg_index: - advance_to(parse_ctx, part.arg_id_end); - detail::format_arg(parse_ctx, ctx, value.arg_index); - break; - - case format_part_t::kind::arg_name: - advance_to(parse_ctx, part.arg_id_end); - detail::format_arg(parse_ctx, ctx, value.str); - break; - - case format_part_t::kind::replacement: { - const auto& arg_id_value = value.repl.arg_id.val; - const auto arg = value.repl.arg_id.kind == arg_id_kind::index - ? ctx.arg(arg_id_value.index) - : ctx.arg(arg_id_value.name); - - auto specs = value.repl.specs; - - handle_dynamic_spec(specs.width, specs.width_ref, ctx); - handle_dynamic_spec(specs.precision, - specs.precision_ref, ctx); - - error_handler h; - numeric_specs_checker checker(h, arg.type()); - if (specs.align == align::numeric) checker.require_numeric_argument(); - if (specs.sign != sign::none) checker.check_sign(); - if (specs.alt) checker.require_numeric_argument(); - if (specs.precision >= 0) checker.check_precision(); - - advance_to(parse_ctx, part.arg_id_end); - ctx.advance_to( - visit_format_arg(arg_formatter( - ctx, nullptr, &specs), - arg)); - break; - } - } - } - return ctx.out(); -} -} // namespace cf - -struct basic_compiled_format {}; - -template -struct compiled_format_base : basic_compiled_format { - using char_type = char_t; - using parts_container = std::vector>; - - parts_container compiled_parts; - - explicit compiled_format_base(basic_string_view format_str) { - compile_format_string(format_str, - [this](const format_part& part) { - compiled_parts.push_back(part); - }); - } - - const parts_container& parts() const { return compiled_parts; } -}; - -template struct format_part_array { - format_part data[N] = {}; - FMT_CONSTEXPR format_part_array() = default; -}; - -template -FMT_CONSTEXPR format_part_array compile_to_parts( - basic_string_view format_str) { - format_part_array parts; - unsigned counter = 0; - // This is not a lambda for compatibility with older compilers. - struct { - format_part* parts; - unsigned* counter; - FMT_CONSTEXPR void operator()(const format_part& part) { - parts[(*counter)++] = part; - } - } collector{parts.data, &counter}; - compile_format_string(format_str, collector); - if (counter < N) { - parts.data[counter] = - format_part::make_text(basic_string_view()); - } - return parts; -} - -template constexpr const T& constexpr_max(const T& a, const T& b) { - return (a < b) ? b : a; -} - -template -struct compiled_format_base::value>> - : basic_compiled_format { - using char_type = char_t; - - FMT_CONSTEXPR explicit compiled_format_base(basic_string_view) {} - -// Workaround for old compilers. Format string compilation will not be -// performed there anyway. -#if FMT_USE_CONSTEXPR - static FMT_CONSTEXPR_DECL const unsigned num_format_parts = - constexpr_max(count_parts(to_string_view(S())), 1u); -#else - static const unsigned num_format_parts = 1; -#endif - - using parts_container = format_part[num_format_parts]; - - const parts_container& parts() const { - static FMT_CONSTEXPR_DECL const auto compiled_parts = - compile_to_parts( - detail::to_string_view(S())); - return compiled_parts.data; - } -}; - -template -class compiled_format : private compiled_format_base { - public: - using typename compiled_format_base::char_type; - - private: - basic_string_view format_str_; - - template - friend auto cf::vformat_to(OutputIt out, CompiledFormat& cf, - basic_format_args args) -> - typename Context::iterator; - - public: - compiled_format() = delete; - explicit constexpr compiled_format(basic_string_view format_str) - : compiled_format_base(format_str), format_str_(format_str) {} -}; - -#ifdef __cpp_if_constexpr -template struct type_list {}; - -// Returns a reference to the argument at index N from [first, rest...]. -template -constexpr const auto& get(const T& first, const Args&... rest) { - static_assert(N < 1 + sizeof...(Args), "index is out of bounds"); - if constexpr (N == 0) - return first; - else - return get(rest...); -} - -template struct get_type_impl; - -template struct get_type_impl> { - using type = remove_cvref_t(std::declval()...))>; -}; - -template -using get_type = typename get_type_impl::type; - -template struct is_compiled_format : std::false_type {}; - -template struct text { - basic_string_view data; - using char_type = Char; - - template - OutputIt format(OutputIt out, const Args&...) const { - return write(out, data); - } -}; - -template -struct is_compiled_format> : std::true_type {}; - -template -constexpr text make_text(basic_string_view s, size_t pos, - size_t size) { - return {{&s[pos], size}}; -} - -// A replacement field that refers to argument N. -template struct field { - using char_type = Char; - - template - OutputIt format(OutputIt out, const Args&... args) const { - // This ensures that the argument type is convertile to `const T&`. - const T& arg = get(args...); - return write(out, arg); - } -}; - -template -struct is_compiled_format> : std::true_type {}; - -// A replacement field that refers to argument N and has format specifiers. -template struct spec_field { - using char_type = Char; - mutable formatter fmt; - - template - OutputIt format(OutputIt out, const Args&... args) const { - // This ensures that the argument type is convertile to `const T&`. - const T& arg = get(args...); - basic_format_context ctx(out, {}); - return fmt.format(arg, ctx); - } -}; - -template -struct is_compiled_format> : std::true_type {}; - -template struct concat { - L lhs; - R rhs; - using char_type = typename L::char_type; - - template - OutputIt format(OutputIt out, const Args&... args) const { - out = lhs.format(out, args...); - return rhs.format(out, args...); - } -}; - -template -struct is_compiled_format> : std::true_type {}; - -template -constexpr concat make_concat(L lhs, R rhs) { - return {lhs, rhs}; -} - -struct unknown_format {}; - -template -constexpr size_t parse_text(basic_string_view str, size_t pos) { - for (size_t size = str.size(); pos != size; ++pos) { - if (str[pos] == '{' || str[pos] == '}') break; - } - return pos; -} - -template -constexpr auto compile_format_string(S format_str); - -template -constexpr auto parse_tail(T head, S format_str) { - if constexpr (POS != - basic_string_view(format_str).size()) { - constexpr auto tail = compile_format_string(format_str); - if constexpr (std::is_same, - unknown_format>()) - return tail; - else - return make_concat(head, tail); - } else { - return head; - } -} - -template struct parse_specs_result { - formatter fmt; - size_t end; -}; - -template -constexpr parse_specs_result parse_specs(basic_string_view str, - size_t pos) { - str.remove_prefix(pos); - auto ctx = basic_format_parse_context(str); - auto f = formatter(); - auto end = f.parse(ctx); - return {f, pos + (end - str.data()) + 1}; -} - -// Compiles a non-empty format string and returns the compiled representation -// or unknown_format() on unrecognized input. -template -constexpr auto compile_format_string(S format_str) { - using char_type = typename S::char_type; - constexpr basic_string_view str = format_str; - if constexpr (str[POS] == '{') { - if (POS + 1 == str.size()) - throw format_error("unmatched '{' in format string"); - if constexpr (str[POS + 1] == '{') { - return parse_tail(make_text(str, POS, 1), format_str); - } else if constexpr (str[POS + 1] == '}') { - using type = get_type; - return parse_tail(field(), - format_str); - } else if constexpr (str[POS + 1] == ':') { - using type = get_type; - constexpr auto result = parse_specs(str, POS + 2); - return parse_tail( - spec_field{result.fmt}, format_str); - } else { - return unknown_format(); - } - } else if constexpr (str[POS] == '}') { - if (POS + 1 == str.size()) - throw format_error("unmatched '}' in format string"); - return parse_tail(make_text(str, POS, 1), format_str); - } else { - constexpr auto end = parse_text(str, POS + 1); - return parse_tail(make_text(str, POS, end - POS), - format_str); - } -} - -template ::value || - detail::is_compiled_string::value)> -constexpr auto compile(S format_str) { - constexpr basic_string_view str = format_str; - if constexpr (str.size() == 0) { - return detail::make_text(str, 0, 0); - } else { - constexpr auto result = - detail::compile_format_string, 0, 0>( - format_str); - if constexpr (std::is_same, - detail::unknown_format>()) { - return detail::compiled_format(to_string_view(format_str)); - } else { - return result; - } - } -} -#else -template ::value)> -constexpr auto compile(S format_str) -> detail::compiled_format { - return detail::compiled_format(to_string_view(format_str)); -} -#endif // __cpp_if_constexpr - -// Compiles the format string which must be a string literal. -template -auto compile(const Char (&format_str)[N]) - -> detail::compiled_format { - return detail::compiled_format( - basic_string_view(format_str, N - 1)); -} -} // namespace detail - -// DEPRECATED! use FMT_COMPILE instead. -template -FMT_DEPRECATED auto compile(const Args&... args) - -> decltype(detail::compile(args...)) { - return detail::compile(args...); -} - -#if FMT_USE_CONSTEXPR -# ifdef __cpp_if_constexpr - -template ::value)> -FMT_INLINE std::basic_string format(const CompiledFormat& cf, - const Args&... args) { - basic_memory_buffer buffer; - detail::buffer& base = buffer; - cf.format(std::back_inserter(base), args...); - return to_string(buffer); -} - -template ::value)> -OutputIt format_to(OutputIt out, const CompiledFormat& cf, - const Args&... args) { - return cf.format(out, args...); -} -# endif // __cpp_if_constexpr -#endif // FMT_USE_CONSTEXPR - -template ::value)> -std::basic_string format(const CompiledFormat& cf, const Args&... args) { - basic_memory_buffer buffer; - using context = buffer_context; - detail::buffer& base = buffer; - detail::cf::vformat_to(std::back_inserter(base), cf, - make_format_args(args...)); - return to_string(buffer); -} - -template ::value)> -FMT_INLINE std::basic_string format(const S&, - Args&&... args) { - constexpr basic_string_view str = S(); - if (str.size() == 2 && str[0] == '{' && str[1] == '}') - return fmt::to_string(detail::first(args...)); - constexpr auto compiled = detail::compile(S()); - return format(compiled, std::forward(args)...); -} - -template ::value)> -OutputIt format_to(OutputIt out, const CompiledFormat& cf, - const Args&... args) { - using char_type = typename CompiledFormat::char_type; - using context = format_context_t; - return detail::cf::vformat_to(out, cf, - make_format_args(args...)); -} - -template ::value)> -OutputIt format_to(OutputIt out, const S&, const Args&... args) { - constexpr auto compiled = detail::compile(S()); - return format_to(out, compiled, args...); -} - -template < - typename OutputIt, typename CompiledFormat, typename... Args, - FMT_ENABLE_IF(detail::is_output_iterator::value&& std::is_base_of< - detail::basic_compiled_format, CompiledFormat>::value)> -format_to_n_result format_to_n(OutputIt out, size_t n, - const CompiledFormat& cf, - const Args&... args) { - auto it = - format_to(detail::truncating_iterator(out, n), cf, args...); - return {it.base(), it.count()}; -} - -template -size_t formatted_size(const CompiledFormat& cf, const Args&... args) { - return format_to(detail::counting_iterator(), cf, args...).count(); -} - -FMT_END_NAMESPACE - -#endif // FMT_COMPILE_H_ diff --git a/ThirdParty/fmtlib/include/fmt/core.h b/ThirdParty/fmtlib/include/fmt/core.h deleted file mode 100644 index 37799a3a0c..0000000000 --- a/ThirdParty/fmtlib/include/fmt/core.h +++ /dev/null @@ -1,1882 +0,0 @@ -// Formatting library for C++ - the core API -// -// Copyright (c) 2012 - present, Victor Zverovich -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_CORE_H_ -#define FMT_CORE_H_ - -#include // std::FILE -#include -#include -#include -#include -#include -#include -#include - -// The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 70003 - -#ifdef __clang__ -# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) -#else -# define FMT_CLANG_VERSION 0 -#endif - -#if defined(__GNUC__) && !defined(__clang__) -# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -#else -# define FMT_GCC_VERSION 0 -#endif - -#if defined(__INTEL_COMPILER) -# define FMT_ICC_VERSION __INTEL_COMPILER -#else -# define FMT_ICC_VERSION 0 -#endif - -#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define FMT_HAS_GXX_CXX11 FMT_GCC_VERSION -#else -# define FMT_HAS_GXX_CXX11 0 -#endif - -#ifdef __NVCC__ -# define FMT_NVCC __NVCC__ -#else -# define FMT_NVCC 0 -#endif - -#ifdef _MSC_VER -# define FMT_MSC_VER _MSC_VER -# define FMT_SUPPRESS_MSC_WARNING(n) __pragma(warning(suppress : n)) -#else -# define FMT_MSC_VER 0 -# define FMT_SUPPRESS_MSC_WARNING(n) -#endif -#ifdef __has_feature -# define FMT_HAS_FEATURE(x) __has_feature(x) -#else -# define FMT_HAS_FEATURE(x) 0 -#endif - -#if defined(__has_include) && !defined(__INTELLISENSE__) && \ - !(FMT_ICC_VERSION && FMT_ICC_VERSION < 1600) -# define FMT_HAS_INCLUDE(x) __has_include(x) -#else -# define FMT_HAS_INCLUDE(x) 0 -#endif - -#ifdef __has_cpp_attribute -# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -# define FMT_HAS_CPP_ATTRIBUTE(x) 0 -#endif - -#define FMT_HAS_CPP14_ATTRIBUTE(attribute) \ - (__cplusplus >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute)) - -#define FMT_HAS_CPP17_ATTRIBUTE(attribute) \ - (__cplusplus >= 201703L && FMT_HAS_CPP_ATTRIBUTE(attribute)) - -// Check if relaxed C++14 constexpr is supported. -// GCC doesn't allow throw in constexpr until version 6 (bug 67371). -#ifndef FMT_USE_CONSTEXPR -# define FMT_USE_CONSTEXPR \ - (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VER >= 1910 || \ - (FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L)) && \ - !FMT_NVCC && !FMT_ICC_VERSION -#endif -#if FMT_USE_CONSTEXPR -# define FMT_CONSTEXPR constexpr -# define FMT_CONSTEXPR_DECL constexpr -#else -# define FMT_CONSTEXPR inline -# define FMT_CONSTEXPR_DECL -#endif - -#ifndef FMT_OVERRIDE -# if FMT_HAS_FEATURE(cxx_override) || \ - (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900 -# define FMT_OVERRIDE override -# else -# define FMT_OVERRIDE -# endif -#endif - -// Check if exceptions are disabled. -#ifndef FMT_EXCEPTIONS -# if (defined(__GNUC__) && !defined(__EXCEPTIONS)) || \ - FMT_MSC_VER && !_HAS_EXCEPTIONS -# define FMT_EXCEPTIONS 0 -# else -# define FMT_EXCEPTIONS 1 -# endif -#endif - -// Define FMT_USE_NOEXCEPT to make fmt use noexcept (C++11 feature). -#ifndef FMT_USE_NOEXCEPT -# define FMT_USE_NOEXCEPT 0 -#endif - -#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ - (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900 -# define FMT_DETECTED_NOEXCEPT noexcept -# define FMT_HAS_CXX11_NOEXCEPT 1 -#else -# define FMT_DETECTED_NOEXCEPT throw() -# define FMT_HAS_CXX11_NOEXCEPT 0 -#endif - -#ifndef FMT_NOEXCEPT -# if FMT_EXCEPTIONS || FMT_HAS_CXX11_NOEXCEPT -# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT -# else -# define FMT_NOEXCEPT -# endif -#endif - -// [[noreturn]] is disabled on MSVC and NVCC because of bogus unreachable code -// warnings. -#if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn) && !FMT_MSC_VER && \ - !FMT_NVCC -# define FMT_NORETURN [[noreturn]] -#else -# define FMT_NORETURN -#endif - -#ifndef FMT_DEPRECATED -# if FMT_HAS_CPP14_ATTRIBUTE(deprecated) || FMT_MSC_VER >= 1900 -# define FMT_DEPRECATED [[deprecated]] -# else -# if defined(__GNUC__) || defined(__clang__) -# define FMT_DEPRECATED __attribute__((deprecated)) -# elif FMT_MSC_VER -# define FMT_DEPRECATED __declspec(deprecated) -# else -# define FMT_DEPRECATED /* deprecated */ -# endif -# endif -#endif - -// Workaround broken [[deprecated]] in the Intel, PGI and NVCC compilers. -#if FMT_ICC_VERSION || defined(__PGI) || FMT_NVCC -# define FMT_DEPRECATED_ALIAS -#else -# define FMT_DEPRECATED_ALIAS FMT_DEPRECATED -#endif - -#ifndef FMT_INLINE -# if FMT_GCC_VERSION || FMT_CLANG_VERSION -# define FMT_INLINE inline __attribute__((always_inline)) -# else -# define FMT_INLINE inline -# endif -#endif - -#ifndef FMT_BEGIN_NAMESPACE -# if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_GCC_VERSION >= 404 || \ - FMT_MSC_VER >= 1900 -# define FMT_INLINE_NAMESPACE inline namespace -# define FMT_END_NAMESPACE \ - } \ - } -# else -# define FMT_INLINE_NAMESPACE namespace -# define FMT_END_NAMESPACE \ - } \ - using namespace v7; \ - } -# endif -# define FMT_BEGIN_NAMESPACE \ - namespace fmt { \ - FMT_INLINE_NAMESPACE v7 { -#endif - -#if !defined(FMT_HEADER_ONLY) && defined(_WIN32) -# define FMT_CLASS_API FMT_SUPPRESS_MSC_WARNING(4275) -# ifdef FMT_EXPORT -# define FMT_API __declspec(dllexport) -# define FMT_EXTERN_TEMPLATE_API FMT_API -# define FMT_EXPORTED -# elif defined(FMT_SHARED) -# define FMT_API __declspec(dllimport) -# define FMT_EXTERN_TEMPLATE_API FMT_API -# endif -#else -# define FMT_CLASS_API -#endif -#ifndef FMT_API -# define FMT_API -#endif -#ifndef FMT_EXTERN_TEMPLATE_API -# define FMT_EXTERN_TEMPLATE_API -#endif -#ifndef FMT_INSTANTIATION_DEF_API -# define FMT_INSTANTIATION_DEF_API FMT_API -#endif - -#ifndef FMT_HEADER_ONLY -# define FMT_EXTERN extern -#else -# define FMT_EXTERN -#endif - -// libc++ supports string_view in pre-c++17. -#if (FMT_HAS_INCLUDE() && \ - (__cplusplus > 201402L || defined(_LIBCPP_VERSION))) || \ - (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910) -# include -# define FMT_USE_STRING_VIEW -#elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L -# include -# define FMT_USE_EXPERIMENTAL_STRING_VIEW -#endif - -#ifndef FMT_UNICODE -# define FMT_UNICODE !FMT_MSC_VER -#endif -#if FMT_UNICODE && FMT_MSC_VER -# pragma execution_character_set("utf-8") -#endif - -FMT_BEGIN_NAMESPACE - -// Implementations of enable_if_t and other metafunctions for older systems. -template -using enable_if_t = typename std::enable_if::type; -template -using conditional_t = typename std::conditional::type; -template using bool_constant = std::integral_constant; -template -using remove_reference_t = typename std::remove_reference::type; -template -using remove_const_t = typename std::remove_const::type; -template -using remove_cvref_t = typename std::remove_cv>::type; -template struct type_identity { using type = T; }; -template using type_identity_t = typename type_identity::type; - -struct monostate {}; - -// An enable_if helper to be used in template parameters which results in much -// shorter symbols: https://godbolt.org/z/sWw4vP. Extra parentheses are needed -// to workaround a bug in MSVC 2019 (see #1140 and #1186). -#define FMT_ENABLE_IF(...) enable_if_t<(__VA_ARGS__), int> = 0 - -namespace detail { - -// A helper function to suppress bogus "conditional expression is constant" -// warnings. -template constexpr T const_check(T value) { return value; } - -FMT_NORETURN FMT_API void assert_fail(const char* file, int line, - const char* message); - -#ifndef FMT_ASSERT -# ifdef NDEBUG -// FMT_ASSERT is not empty to avoid -Werror=empty-body. -# define FMT_ASSERT(condition, message) ((void)0) -# else -# define FMT_ASSERT(condition, message) \ - ((condition) /* void() fails with -Winvalid-constexpr on clang 4.0.1 */ \ - ? (void)0 \ - : ::fmt::detail::assert_fail(__FILE__, __LINE__, (message))) -# endif -#endif - -#if defined(FMT_USE_STRING_VIEW) -template using std_string_view = std::basic_string_view; -#elif defined(FMT_USE_EXPERIMENTAL_STRING_VIEW) -template -using std_string_view = std::experimental::basic_string_view; -#else -template struct std_string_view {}; -#endif - -#ifdef FMT_USE_INT128 -// Do nothing. -#elif defined(__SIZEOF_INT128__) && !FMT_NVCC && !(FMT_CLANG_VERSION && FMT_MSC_VER) -# define FMT_USE_INT128 1 -using int128_t = __int128_t; -using uint128_t = __uint128_t; -#else -# define FMT_USE_INT128 0 -#endif -#if !FMT_USE_INT128 -struct int128_t {}; -struct uint128_t {}; -#endif - -// Casts a nonnegative integer to unsigned. -template -FMT_CONSTEXPR typename std::make_unsigned::type to_unsigned(Int value) { - FMT_ASSERT(value >= 0, "negative value"); - return static_cast::type>(value); -} - -FMT_SUPPRESS_MSC_WARNING(4566) constexpr unsigned char micro[] = "\u00B5"; - -template constexpr bool is_unicode() { - return FMT_UNICODE || sizeof(Char) != 1 || - (sizeof(micro) == 3 && micro[0] == 0xC2 && micro[1] == 0xB5); -} - -#ifdef __cpp_char8_t -using char8_type = char8_t; -#else -enum char8_type : unsigned char {}; -#endif -} // namespace detail - -#ifdef FMT_USE_INTERNAL -namespace internal = detail; // DEPRECATED -#endif - -/** - An implementation of ``std::basic_string_view`` for pre-C++17. It provides a - subset of the API. ``fmt::basic_string_view`` is used for format strings even - if ``std::string_view`` is available to prevent issues when a library is - compiled with a different ``-std`` option than the client code (which is not - recommended). - */ -template class basic_string_view { - private: - const Char* data_; - size_t size_; - - public: - using value_type = Char; - using iterator = const Char*; - - constexpr basic_string_view() FMT_NOEXCEPT : data_(nullptr), size_(0) {} - - /** Constructs a string reference object from a C string and a size. */ - constexpr basic_string_view(const Char* s, size_t count) FMT_NOEXCEPT - : data_(s), - size_(count) {} - - /** - \rst - Constructs a string reference object from a C string computing - the size with ``std::char_traits::length``. - \endrst - */ -#if __cplusplus >= 201703L // C++17's char_traits::length() is constexpr. - FMT_CONSTEXPR -#endif - basic_string_view(const Char* s) - : data_(s), size_(std::char_traits::length(s)) {} - - /** Constructs a string reference from a ``std::basic_string`` object. */ - template - FMT_CONSTEXPR basic_string_view( - const std::basic_string& s) FMT_NOEXCEPT - : data_(s.data()), - size_(s.size()) {} - - template >::value)> - FMT_CONSTEXPR basic_string_view(S s) FMT_NOEXCEPT : data_(s.data()), - size_(s.size()) {} - - /** Returns a pointer to the string data. */ - constexpr const Char* data() const { return data_; } - - /** Returns the string size. */ - constexpr size_t size() const { return size_; } - - constexpr iterator begin() const { return data_; } - constexpr iterator end() const { return data_ + size_; } - - constexpr const Char& operator[](size_t pos) const { return data_[pos]; } - - FMT_CONSTEXPR void remove_prefix(size_t n) { - data_ += n; - size_ -= n; - } - - // Lexicographically compare this string reference to other. - int compare(basic_string_view other) const { - size_t str_size = size_ < other.size_ ? size_ : other.size_; - int result = std::char_traits::compare(data_, other.data_, str_size); - if (result == 0) - result = size_ == other.size_ ? 0 : (size_ < other.size_ ? -1 : 1); - return result; - } - - friend bool operator==(basic_string_view lhs, basic_string_view rhs) { - return lhs.compare(rhs) == 0; - } - friend bool operator!=(basic_string_view lhs, basic_string_view rhs) { - return lhs.compare(rhs) != 0; - } - friend bool operator<(basic_string_view lhs, basic_string_view rhs) { - return lhs.compare(rhs) < 0; - } - friend bool operator<=(basic_string_view lhs, basic_string_view rhs) { - return lhs.compare(rhs) <= 0; - } - friend bool operator>(basic_string_view lhs, basic_string_view rhs) { - return lhs.compare(rhs) > 0; - } - friend bool operator>=(basic_string_view lhs, basic_string_view rhs) { - return lhs.compare(rhs) >= 0; - } -}; - -using string_view = basic_string_view; -using wstring_view = basic_string_view; - -/** Specifies if ``T`` is a character type. Can be specialized by users. */ -template struct is_char : std::false_type {}; -template <> struct is_char : std::true_type {}; -template <> struct is_char : std::true_type {}; -template <> struct is_char : std::true_type {}; -template <> struct is_char : std::true_type {}; -template <> struct is_char : std::true_type {}; - -/** - \rst - Returns a string view of `s`. In order to add custom string type support to - {fmt} provide an overload of `to_string_view` for it in the same namespace as - the type for the argument-dependent lookup to work. - - **Example**:: - - namespace my_ns { - inline string_view to_string_view(const my_string& s) { - return {s.data(), s.length()}; - } - } - std::string message = fmt::format(my_string("The answer is {}"), 42); - \endrst - */ -template ::value)> -inline basic_string_view to_string_view(const Char* s) { - return s; -} - -template -inline basic_string_view to_string_view( - const std::basic_string& s) { - return s; -} - -template -inline basic_string_view to_string_view(basic_string_view s) { - return s; -} - -template >::value)> -inline basic_string_view to_string_view(detail::std_string_view s) { - return s; -} - -// A base class for compile-time strings. It is defined in the fmt namespace to -// make formatting functions visible via ADL, e.g. format(FMT_STRING("{}"), 42). -struct compile_string {}; - -template -struct is_compile_string : std::is_base_of {}; - -template ::value)> -constexpr basic_string_view to_string_view(const S& s) { - return s; -} - -namespace detail { -void to_string_view(...); -using fmt::v7::to_string_view; - -// Specifies whether S is a string type convertible to fmt::basic_string_view. -// It should be a constexpr function but MSVC 2017 fails to compile it in -// enable_if and MSVC 2015 fails to compile it as an alias template. -template -struct is_string : std::is_class()))> { -}; - -template struct char_t_impl {}; -template struct char_t_impl::value>> { - using result = decltype(to_string_view(std::declval())); - using type = typename result::value_type; -}; - -struct error_handler { - constexpr error_handler() = default; - constexpr error_handler(const error_handler&) = default; - - // This function is intentionally not constexpr to give a compile-time error. - FMT_NORETURN FMT_API void on_error(const char* message); -}; -} // namespace detail - -/** String's character type. */ -template using char_t = typename detail::char_t_impl::type; - -/** - \rst - Parsing context consisting of a format string range being parsed and an - argument counter for automatic indexing. - - You can use one of the following type aliases for common character types: - - +-----------------------+-------------------------------------+ - | Type | Definition | - +=======================+=====================================+ - | format_parse_context | basic_format_parse_context | - +-----------------------+-------------------------------------+ - | wformat_parse_context | basic_format_parse_context | - +-----------------------+-------------------------------------+ - \endrst - */ -template -class basic_format_parse_context : private ErrorHandler { - private: - basic_string_view format_str_; - int next_arg_id_; - - public: - using char_type = Char; - using iterator = typename basic_string_view::iterator; - - explicit constexpr basic_format_parse_context( - basic_string_view format_str, ErrorHandler eh = {}) - : ErrorHandler(eh), format_str_(format_str), next_arg_id_(0) {} - - /** - Returns an iterator to the beginning of the format string range being - parsed. - */ - constexpr iterator begin() const FMT_NOEXCEPT { return format_str_.begin(); } - - /** - Returns an iterator past the end of the format string range being parsed. - */ - constexpr iterator end() const FMT_NOEXCEPT { return format_str_.end(); } - - /** Advances the begin iterator to ``it``. */ - FMT_CONSTEXPR void advance_to(iterator it) { - format_str_.remove_prefix(detail::to_unsigned(it - begin())); - } - - /** - Reports an error if using the manual argument indexing; otherwise returns - the next argument index and switches to the automatic indexing. - */ - FMT_CONSTEXPR int next_arg_id() { - // Don't check if the argument id is valid to avoid overhead and because it - // will be checked during formatting anyway. - if (next_arg_id_ >= 0) return next_arg_id_++; - on_error("cannot switch from manual to automatic argument indexing"); - return 0; - } - - /** - Reports an error if using the automatic argument indexing; otherwise - switches to the manual indexing. - */ - FMT_CONSTEXPR void check_arg_id(int) { - if (next_arg_id_ > 0) - on_error("cannot switch from automatic to manual argument indexing"); - else - next_arg_id_ = -1; - } - - FMT_CONSTEXPR void check_arg_id(basic_string_view) {} - - FMT_CONSTEXPR void on_error(const char* message) { - ErrorHandler::on_error(message); - } - - constexpr ErrorHandler error_handler() const { return *this; } -}; - -using format_parse_context = basic_format_parse_context; -using wformat_parse_context = basic_format_parse_context; - -template class basic_format_arg; -template class basic_format_args; -template class dynamic_format_arg_store; - -// A formatter for objects of type T. -template -struct formatter { - // A deleted default constructor indicates a disabled formatter. - formatter() = delete; -}; - -// Specifies if T has an enabled formatter specialization. A type can be -// formattable even if it doesn't have a formatter e.g. via a conversion. -template -using has_formatter = - std::is_constructible>; - -namespace detail { - -/** - \rst - A contiguous memory buffer with an optional growing ability. It is an internal - class and shouldn't be used directly, only via `~fmt::basic_memory_buffer`. - \endrst - */ -template class buffer { - private: - T* ptr_; - size_t size_; - size_t capacity_; - - protected: - // Don't initialize ptr_ since it is not accessed to save a few cycles. - FMT_SUPPRESS_MSC_WARNING(26495) - buffer(size_t sz) FMT_NOEXCEPT : size_(sz), capacity_(sz) {} - - buffer(T* p = nullptr, size_t sz = 0, size_t cap = 0) FMT_NOEXCEPT - : ptr_(p), - size_(sz), - capacity_(cap) {} - - /** Sets the buffer data and capacity. */ - void set(T* buf_data, size_t buf_capacity) FMT_NOEXCEPT { - ptr_ = buf_data; - capacity_ = buf_capacity; - } - - /** Increases the buffer capacity to hold at least *capacity* elements. */ - virtual void grow(size_t capacity) = 0; - - public: - using value_type = T; - using const_reference = const T&; - - buffer(const buffer&) = delete; - void operator=(const buffer&) = delete; - virtual ~buffer() = default; - - T* begin() FMT_NOEXCEPT { return ptr_; } - T* end() FMT_NOEXCEPT { return ptr_ + size_; } - - const T* begin() const FMT_NOEXCEPT { return ptr_; } - const T* end() const FMT_NOEXCEPT { return ptr_ + size_; } - - /** Returns the size of this buffer. */ - size_t size() const FMT_NOEXCEPT { return size_; } - - /** Returns the capacity of this buffer. */ - size_t capacity() const FMT_NOEXCEPT { return capacity_; } - - /** Returns a pointer to the buffer data. */ - T* data() FMT_NOEXCEPT { return ptr_; } - - /** Returns a pointer to the buffer data. */ - const T* data() const FMT_NOEXCEPT { return ptr_; } - - /** - Resizes the buffer. If T is a POD type new elements may not be initialized. - */ - void resize(size_t new_size) { - reserve(new_size); - size_ = new_size; - } - - /** Clears this buffer. */ - void clear() { size_ = 0; } - - /** Reserves space to store at least *capacity* elements. */ - void reserve(size_t new_capacity) { - if (new_capacity > capacity_) grow(new_capacity); - } - - void push_back(const T& value) { - reserve(size_ + 1); - ptr_[size_++] = value; - } - - /** Appends data to the end of the buffer. */ - template void append(const U* begin, const U* end); - - template T& operator[](I index) { return ptr_[index]; } - template const T& operator[](I index) const { - return ptr_[index]; - } -}; - -// A container-backed buffer. -template -class container_buffer : public buffer { - private: - Container& container_; - - protected: - void grow(size_t capacity) FMT_OVERRIDE { - container_.resize(capacity); - this->set(&container_[0], capacity); - } - - public: - explicit container_buffer(Container& c) - : buffer(c.size()), container_(c) {} -}; - -// Extracts a reference to the container from back_insert_iterator. -template -inline Container& get_container(std::back_insert_iterator it) { - using bi_iterator = std::back_insert_iterator; - struct accessor : bi_iterator { - accessor(bi_iterator iter) : bi_iterator(iter) {} - using bi_iterator::container; - }; - return *accessor(it).container; -} - -template -struct fallback_formatter { - fallback_formatter() = delete; -}; - -// Specifies if T has an enabled fallback_formatter specialization. -template -using has_fallback_formatter = - std::is_constructible>; - -struct view {}; - -template struct named_arg : view { - const Char* name; - const T& value; - named_arg(const Char* n, const T& v) : name(n), value(v) {} -}; - -template struct named_arg_info { - const Char* name; - int id; -}; - -template -struct arg_data { - // args_[0].named_args points to named_args_ to avoid bloating format_args. - T args_[1 + (NUM_ARGS != 0 ? NUM_ARGS : 1)]; - named_arg_info named_args_[NUM_NAMED_ARGS]; - - template - arg_data(const U&... init) : args_{T(named_args_, NUM_NAMED_ARGS), init...} {} - arg_data(const arg_data& other) = delete; - const T* args() const { return args_ + 1; } - named_arg_info* named_args() { return named_args_; } -}; - -template -struct arg_data { - T args_[NUM_ARGS != 0 ? NUM_ARGS : 1]; - - template - FMT_INLINE arg_data(const U&... init) : args_{init...} {} - FMT_INLINE const T* args() const { return args_; } - FMT_INLINE std::nullptr_t named_args() { return nullptr; } -}; - -template -inline void init_named_args(named_arg_info*, int, int) {} - -template -void init_named_args(named_arg_info* named_args, int arg_count, - int named_arg_count, const T&, const Tail&... args) { - init_named_args(named_args, arg_count + 1, named_arg_count, args...); -} - -template -void init_named_args(named_arg_info* named_args, int arg_count, - int named_arg_count, const named_arg& arg, - const Tail&... args) { - named_args[named_arg_count++] = {arg.name, arg_count}; - init_named_args(named_args, arg_count + 1, named_arg_count, args...); -} - -template -FMT_INLINE void init_named_args(std::nullptr_t, int, int, const Args&...) {} - -template struct is_named_arg : std::false_type {}; - -template -struct is_named_arg> : std::true_type {}; - -template constexpr size_t count() { return B ? 1 : 0; } -template constexpr size_t count() { - return (B1 ? 1 : 0) + count(); -} - -template constexpr size_t count_named_args() { - return count::value...>(); -} - -enum class type { - none_type, - // Integer types should go first, - int_type, - uint_type, - long_long_type, - ulong_long_type, - int128_type, - uint128_type, - bool_type, - char_type, - last_integer_type = char_type, - // followed by floating-point types. - float_type, - double_type, - long_double_type, - last_numeric_type = long_double_type, - cstring_type, - string_type, - pointer_type, - custom_type -}; - -// Maps core type T to the corresponding type enum constant. -template -struct type_constant : std::integral_constant {}; - -#define FMT_TYPE_CONSTANT(Type, constant) \ - template \ - struct type_constant \ - : std::integral_constant {} - -FMT_TYPE_CONSTANT(int, int_type); -FMT_TYPE_CONSTANT(unsigned, uint_type); -FMT_TYPE_CONSTANT(long long, long_long_type); -FMT_TYPE_CONSTANT(unsigned long long, ulong_long_type); -FMT_TYPE_CONSTANT(int128_t, int128_type); -FMT_TYPE_CONSTANT(uint128_t, uint128_type); -FMT_TYPE_CONSTANT(bool, bool_type); -FMT_TYPE_CONSTANT(Char, char_type); -FMT_TYPE_CONSTANT(float, float_type); -FMT_TYPE_CONSTANT(double, double_type); -FMT_TYPE_CONSTANT(long double, long_double_type); -FMT_TYPE_CONSTANT(const Char*, cstring_type); -FMT_TYPE_CONSTANT(basic_string_view, string_type); -FMT_TYPE_CONSTANT(const void*, pointer_type); - -constexpr bool is_integral_type(type t) { - return t > type::none_type && t <= type::last_integer_type; -} - -constexpr bool is_arithmetic_type(type t) { - return t > type::none_type && t <= type::last_numeric_type; -} - -template struct string_value { - const Char* data; - size_t size; -}; - -template struct named_arg_value { - const named_arg_info* data; - size_t size; -}; - -template struct custom_value { - using parse_context = typename Context::parse_context_type; - const void* value; - void (*format)(const void* arg, parse_context& parse_ctx, Context& ctx); -}; - -// A formatting argument value. -template class value { - public: - using char_type = typename Context::char_type; - - union { - int int_value; - unsigned uint_value; - long long long_long_value; - unsigned long long ulong_long_value; - int128_t int128_value; - uint128_t uint128_value; - bool bool_value; - char_type char_value; - float float_value; - double double_value; - long double long_double_value; - const void* pointer; - string_value string; - custom_value custom; - named_arg_value named_args; - }; - - constexpr FMT_INLINE value(int val = 0) : int_value(val) {} - constexpr FMT_INLINE value(unsigned val) : uint_value(val) {} - FMT_INLINE value(long long val) : long_long_value(val) {} - FMT_INLINE value(unsigned long long val) : ulong_long_value(val) {} - FMT_INLINE value(int128_t val) : int128_value(val) {} - FMT_INLINE value(uint128_t val) : uint128_value(val) {} - FMT_INLINE value(float val) : float_value(val) {} - FMT_INLINE value(double val) : double_value(val) {} - FMT_INLINE value(long double val) : long_double_value(val) {} - FMT_INLINE value(bool val) : bool_value(val) {} - FMT_INLINE value(char_type val) : char_value(val) {} - FMT_INLINE value(const char_type* val) { string.data = val; } - FMT_INLINE value(basic_string_view val) { - string.data = val.data(); - string.size = val.size(); - } - FMT_INLINE value(const void* val) : pointer(val) {} - FMT_INLINE value(const named_arg_info* args, size_t size) - : named_args{args, size} {} - - template FMT_INLINE value(const T& val) { - custom.value = &val; - // Get the formatter type through the context to allow different contexts - // have different extension points, e.g. `formatter` for `format` and - // `printf_formatter` for `printf`. - custom.format = format_custom_arg< - T, conditional_t::value, - typename Context::template formatter_type, - fallback_formatter>>; - } - - private: - // Formats an argument of a custom type, such as a user-defined class. - template - static void format_custom_arg(const void* arg, - typename Context::parse_context_type& parse_ctx, - Context& ctx) { - Formatter f; - parse_ctx.advance_to(f.parse(parse_ctx)); - ctx.advance_to(f.format(*static_cast(arg), ctx)); - } -}; - -template -FMT_CONSTEXPR basic_format_arg make_arg(const T& value); - -// To minimize the number of types we need to deal with, long is translated -// either to int or to long long depending on its size. -enum { long_short = sizeof(long) == sizeof(int) }; -using long_type = conditional_t; -using ulong_type = conditional_t; - -// Maps formatting arguments to core types. -template struct arg_mapper { - using char_type = typename Context::char_type; - - FMT_CONSTEXPR int map(signed char val) { return val; } - FMT_CONSTEXPR unsigned map(unsigned char val) { return val; } - FMT_CONSTEXPR int map(short val) { return val; } - FMT_CONSTEXPR unsigned map(unsigned short val) { return val; } - FMT_CONSTEXPR int map(int val) { return val; } - FMT_CONSTEXPR unsigned map(unsigned val) { return val; } - FMT_CONSTEXPR long_type map(long val) { return val; } - FMT_CONSTEXPR ulong_type map(unsigned long val) { return val; } - FMT_CONSTEXPR long long map(long long val) { return val; } - FMT_CONSTEXPR unsigned long long map(unsigned long long val) { return val; } - FMT_CONSTEXPR int128_t map(int128_t val) { return val; } - FMT_CONSTEXPR uint128_t map(uint128_t val) { return val; } - FMT_CONSTEXPR bool map(bool val) { return val; } - - template ::value)> - FMT_CONSTEXPR char_type map(T val) { - static_assert( - std::is_same::value || std::is_same::value, - "mixing character types is disallowed"); - return val; - } - - FMT_CONSTEXPR float map(float val) { return val; } - FMT_CONSTEXPR double map(double val) { return val; } - FMT_CONSTEXPR long double map(long double val) { return val; } - - FMT_CONSTEXPR const char_type* map(char_type* val) { return val; } - FMT_CONSTEXPR const char_type* map(const char_type* val) { return val; } - template ::value)> - FMT_CONSTEXPR basic_string_view map(const T& val) { - static_assert(std::is_same>::value, - "mixing character types is disallowed"); - return to_string_view(val); - } - template , T>::value && - !is_string::value && !has_formatter::value && - !has_fallback_formatter::value)> - FMT_CONSTEXPR basic_string_view map(const T& val) { - return basic_string_view(val); - } - template < - typename T, - FMT_ENABLE_IF( - std::is_constructible, T>::value && - !std::is_constructible, T>::value && - !is_string::value && !has_formatter::value && - !has_fallback_formatter::value)> - FMT_CONSTEXPR basic_string_view map(const T& val) { - return std_string_view(val); - } - FMT_CONSTEXPR const char* map(const signed char* val) { - static_assert(std::is_same::value, "invalid string type"); - return reinterpret_cast(val); - } - FMT_CONSTEXPR const char* map(const unsigned char* val) { - static_assert(std::is_same::value, "invalid string type"); - return reinterpret_cast(val); - } - FMT_CONSTEXPR const char* map(signed char* val) { - const auto* const_val = val; - return map(const_val); - } - FMT_CONSTEXPR const char* map(unsigned char* val) { - const auto* const_val = val; - return map(const_val); - } - - FMT_CONSTEXPR const void* map(void* val) { return val; } - FMT_CONSTEXPR const void* map(const void* val) { return val; } - FMT_CONSTEXPR const void* map(std::nullptr_t val) { return val; } - template FMT_CONSTEXPR int map(const T*) { - // Formatting of arbitrary pointers is disallowed. If you want to output - // a pointer cast it to "void *" or "const void *". In particular, this - // forbids formatting of "[const] volatile char *" which is printed as bool - // by iostreams. - static_assert(!sizeof(T), "formatting of non-void pointers is disallowed"); - return 0; - } - - template ::value && - !has_formatter::value && - !has_fallback_formatter::value)> - FMT_CONSTEXPR auto map(const T& val) - -> decltype(std::declval().map( - static_cast::type>(val))) { - return map(static_cast::type>(val)); - } - template ::value && !is_char::value && - (has_formatter::value || - has_fallback_formatter::value))> - FMT_CONSTEXPR const T& map(const T& val) { - return val; - } - - template - FMT_CONSTEXPR auto map(const named_arg& val) - -> decltype(std::declval().map(val.value)) { - return map(val.value); - } - - int map(...) { - constexpr bool formattable = sizeof(Context) == 0; - static_assert( - formattable, - "Cannot format argument. To make type T formattable provide a " - "formatter specialization: " - "https://fmt.dev/latest/api.html#formatting-user-defined-types"); - return 0; - } -}; - -// A type constant after applying arg_mapper. -template -using mapped_type_constant = - type_constant().map(std::declval())), - typename Context::char_type>; - -enum { packed_arg_bits = 4 }; -// Maximum number of arguments with packed types. -enum { max_packed_args = 62 / packed_arg_bits }; -enum : unsigned long long { is_unpacked_bit = 1ULL << 63 }; -enum : unsigned long long { has_named_args_bit = 1ULL << 62 }; -} // namespace detail - -// A formatting argument. It is a trivially copyable/constructible type to -// allow storage in basic_memory_buffer. -template class basic_format_arg { - private: - detail::value value_; - detail::type type_; - - template - friend FMT_CONSTEXPR basic_format_arg detail::make_arg( - const T& value); - - template - friend FMT_CONSTEXPR auto visit_format_arg(Visitor&& vis, - const basic_format_arg& arg) - -> decltype(vis(0)); - - friend class basic_format_args; - friend class dynamic_format_arg_store; - - using char_type = typename Context::char_type; - - template - friend struct detail::arg_data; - - basic_format_arg(const detail::named_arg_info* args, size_t size) - : value_(args, size) {} - - public: - class handle { - public: - explicit handle(detail::custom_value custom) : custom_(custom) {} - - void format(typename Context::parse_context_type& parse_ctx, - Context& ctx) const { - custom_.format(custom_.value, parse_ctx, ctx); - } - - private: - detail::custom_value custom_; - }; - - constexpr basic_format_arg() : type_(detail::type::none_type) {} - - constexpr explicit operator bool() const FMT_NOEXCEPT { - return type_ != detail::type::none_type; - } - - detail::type type() const { return type_; } - - bool is_integral() const { return detail::is_integral_type(type_); } - bool is_arithmetic() const { return detail::is_arithmetic_type(type_); } -}; - -/** - \rst - Visits an argument dispatching to the appropriate visit method based on - the argument type. For example, if the argument type is ``double`` then - ``vis(value)`` will be called with the value of type ``double``. - \endrst - */ -template -FMT_CONSTEXPR_DECL FMT_INLINE auto visit_format_arg( - Visitor&& vis, const basic_format_arg& arg) -> decltype(vis(0)) { - using char_type = typename Context::char_type; - switch (arg.type_) { - case detail::type::none_type: - break; - case detail::type::int_type: - return vis(arg.value_.int_value); - case detail::type::uint_type: - return vis(arg.value_.uint_value); - case detail::type::long_long_type: - return vis(arg.value_.long_long_value); - case detail::type::ulong_long_type: - return vis(arg.value_.ulong_long_value); -#if FMT_USE_INT128 - case detail::type::int128_type: - return vis(arg.value_.int128_value); - case detail::type::uint128_type: - return vis(arg.value_.uint128_value); -#else - case detail::type::int128_type: - case detail::type::uint128_type: - break; -#endif - case detail::type::bool_type: - return vis(arg.value_.bool_value); - case detail::type::char_type: - return vis(arg.value_.char_value); - case detail::type::float_type: - return vis(arg.value_.float_value); - case detail::type::double_type: - return vis(arg.value_.double_value); - case detail::type::long_double_type: - return vis(arg.value_.long_double_value); - case detail::type::cstring_type: - return vis(arg.value_.string.data); - case detail::type::string_type: - return vis(basic_string_view(arg.value_.string.data, - arg.value_.string.size)); - case detail::type::pointer_type: - return vis(arg.value_.pointer); - case detail::type::custom_type: - return vis(typename basic_format_arg::handle(arg.value_.custom)); - } - return vis(monostate()); -} - -// Checks whether T is a container with contiguous storage. -template struct is_contiguous : std::false_type {}; -template -struct is_contiguous> : std::true_type {}; -template -struct is_contiguous> : std::true_type {}; - -namespace detail { - -template -struct is_back_insert_iterator : std::false_type {}; -template -struct is_back_insert_iterator> - : std::true_type {}; - -template -struct is_contiguous_back_insert_iterator : std::false_type {}; -template -struct is_contiguous_back_insert_iterator> - : is_contiguous {}; - -// A type-erased reference to an std::locale to avoid heavy include. -class locale_ref { - private: - const void* locale_; // A type-erased pointer to std::locale. - - public: - locale_ref() : locale_(nullptr) {} - template explicit locale_ref(const Locale& loc); - - explicit operator bool() const FMT_NOEXCEPT { return locale_ != nullptr; } - - template Locale get() const; -}; - -template constexpr unsigned long long encode_types() { return 0; } - -template -constexpr unsigned long long encode_types() { - return static_cast(mapped_type_constant::value) | - (encode_types() << packed_arg_bits); -} - -template -FMT_CONSTEXPR basic_format_arg make_arg(const T& value) { - basic_format_arg arg; - arg.type_ = mapped_type_constant::value; - arg.value_ = arg_mapper().map(value); - return arg; -} - -// The type template parameter is there to avoid an ODR violation when using -// a fallback formatter in one translation unit and an implicit conversion in -// another (not recommended). -template -inline value make_arg(const T& val) { - return arg_mapper().map(val); -} - -template -inline basic_format_arg make_arg(const T& value) { - return make_arg(value); -} - -template struct is_reference_wrapper : std::false_type {}; -template -struct is_reference_wrapper> : std::true_type {}; - -template const T& unwrap(const T& v) { return v; } -template const T& unwrap(const std::reference_wrapper& v) { - return static_cast(v); -} - -class dynamic_arg_list { - // Workaround for clang's -Wweak-vtables. Unlike for regular classes, for - // templates it doesn't complain about inability to deduce single translation - // unit for placing vtable. So storage_node_base is made a fake template. - template struct node { - virtual ~node() = default; - std::unique_ptr> next; - }; - - template struct typed_node : node<> { - T value; - - template - FMT_CONSTEXPR typed_node(const Arg& arg) : value(arg) {} - - template - FMT_CONSTEXPR typed_node(const basic_string_view& arg) - : value(arg.data(), arg.size()) {} - }; - - std::unique_ptr> head_; - - public: - template const T& push(const Arg& arg) { - auto new_node = std::unique_ptr>(new typed_node(arg)); - auto& value = new_node->value; - new_node->next = std::move(head_); - head_ = std::move(new_node); - return value; - } -}; -} // namespace detail - -// Formatting context. -template class basic_format_context { - public: - /** The character type for the output. */ - using char_type = Char; - - private: - OutputIt out_; - basic_format_args args_; - detail::locale_ref loc_; - - public: - using iterator = OutputIt; - using format_arg = basic_format_arg; - using parse_context_type = basic_format_parse_context; - template using formatter_type = formatter; - - basic_format_context(const basic_format_context&) = delete; - void operator=(const basic_format_context&) = delete; - /** - Constructs a ``basic_format_context`` object. References to the arguments are - stored in the object so make sure they have appropriate lifetimes. - */ - basic_format_context(OutputIt out, - basic_format_args ctx_args, - detail::locale_ref loc = detail::locale_ref()) - : out_(out), args_(ctx_args), loc_(loc) {} - - format_arg arg(int id) const { return args_.get(id); } - format_arg arg(basic_string_view name) { return args_.get(name); } - int arg_id(basic_string_view name) { return args_.get_id(name); } - const basic_format_args& args() const { return args_; } - - detail::error_handler error_handler() { return {}; } - void on_error(const char* message) { error_handler().on_error(message); } - - // Returns an iterator to the beginning of the output range. - iterator out() { return out_; } - - // Advances the begin iterator to ``it``. - void advance_to(iterator it) { - if (!detail::is_back_insert_iterator()) out_ = it; - } - - detail::locale_ref locale() { return loc_; } -}; - -template -using buffer_context = - basic_format_context>, Char>; -using format_context = buffer_context; -using wformat_context = buffer_context; - -// Workaround a bug in gcc: https://stackoverflow.com/q/62767544/471164. -#define FMT_BUFFER_CONTEXT(Char) \ - basic_format_context>, Char> - -/** - \rst - An array of references to arguments. It can be implicitly converted into - `~fmt::basic_format_args` for passing into type-erased formatting functions - such as `~fmt::vformat`. - \endrst - */ -template -class format_arg_store -#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 - // Workaround a GCC template argument substitution bug. - : public basic_format_args -#endif -{ - private: - static const size_t num_args = sizeof...(Args); - static const size_t num_named_args = detail::count_named_args(); - static const bool is_packed = num_args <= detail::max_packed_args; - - using value_type = conditional_t, - basic_format_arg>; - - detail::arg_data - data_; - - friend class basic_format_args; - - static constexpr unsigned long long desc = - (is_packed ? detail::encode_types() - : detail::is_unpacked_bit | num_args) | - (num_named_args != 0 - ? static_cast(detail::has_named_args_bit) - : 0); - - public: - format_arg_store(const Args&... args) - : -#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 - basic_format_args(*this), -#endif - data_{detail::make_arg< - is_packed, Context, - detail::mapped_type_constant::value>(args)...} { - detail::init_named_args(data_.named_args(), 0, 0, args...); - } -}; - -/** - \rst - Constructs an `~fmt::format_arg_store` object that contains references to - arguments and can be implicitly converted to `~fmt::format_args`. `Context` - can be omitted in which case it defaults to `~fmt::context`. - See `~fmt::arg` for lifetime considerations. - \endrst - */ -template -inline format_arg_store make_format_args( - const Args&... args) { - return {args...}; -} - -/** - \rst - Returns a named argument to be used in a formatting function. It should only - be used in a call to a formatting function. - - **Example**:: - - fmt::print("Elapsed time: {s:.2f} seconds", fmt::arg("s", 1.23)); - \endrst - */ -template -inline detail::named_arg arg(const Char* name, const T& arg) { - static_assert(!detail::is_named_arg(), "nested named arguments"); - return {name, arg}; -} - -/** - \rst - A dynamic version of `fmt::format_arg_store`. - It's equipped with a storage to potentially temporary objects which lifetimes - could be shorter than the format arguments object. - - It can be implicitly converted into `~fmt::basic_format_args` for passing - into type-erased formatting functions such as `~fmt::vformat`. - \endrst - */ -template -class dynamic_format_arg_store -#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409 - // Workaround a GCC template argument substitution bug. - : public basic_format_args -#endif -{ - private: - using char_type = typename Context::char_type; - - template struct need_copy { - static constexpr detail::type mapped_type = - detail::mapped_type_constant::value; - - enum { - value = !(detail::is_reference_wrapper::value || - std::is_same>::value || - std::is_same>::value || - (mapped_type != detail::type::cstring_type && - mapped_type != detail::type::string_type && - mapped_type != detail::type::custom_type)) - }; - }; - - template - using stored_type = conditional_t::value, - std::basic_string, T>; - - // Storage of basic_format_arg must be contiguous. - std::vector> data_; - std::vector> named_info_; - - // Storage of arguments not fitting into basic_format_arg must grow - // without relocation because items in data_ refer to it. - detail::dynamic_arg_list dynamic_args_; - - friend class basic_format_args; - - unsigned long long get_types() const { - return detail::is_unpacked_bit | data_.size() | - (named_info_.empty() - ? 0ULL - : static_cast(detail::has_named_args_bit)); - } - - const basic_format_arg* data() const { - return named_info_.empty() ? data_.data() : data_.data() + 1; - } - - template void emplace_arg(const T& arg) { - data_.emplace_back(detail::make_arg(arg)); - } - - template - void emplace_arg(const detail::named_arg& arg) { - if (named_info_.empty()) { - constexpr const detail::named_arg_info* zero_ptr{nullptr}; - data_.insert(data_.begin(), {zero_ptr, 0}); - } - data_.emplace_back(detail::make_arg(detail::unwrap(arg.value))); - auto pop_one = [](std::vector>* data) { - data->pop_back(); - }; - std::unique_ptr>, decltype(pop_one)> - guard{&data_, pop_one}; - named_info_.push_back({arg.name, static_cast(data_.size() - 2u)}); - data_[0].value_.named_args = {named_info_.data(), named_info_.size()}; - guard.release(); - } - - public: - /** - \rst - Adds an argument into the dynamic store for later passing to a formatting - function. - - Note that custom types and string types (but not string views) are copied - into the store dynamically allocating memory if necessary. - - **Example**:: - - fmt::dynamic_format_arg_store store; - store.push_back(42); - store.push_back("abc"); - store.push_back(1.5f); - std::string result = fmt::vformat("{} and {} and {}", store); - \endrst - */ - template void push_back(const T& arg) { - if (detail::const_check(need_copy::value)) - emplace_arg(dynamic_args_.push>(arg)); - else - emplace_arg(detail::unwrap(arg)); - } - - /** - \rst - Adds a reference to the argument into the dynamic store for later passing to - a formatting function. Supports named arguments wrapped in - ``std::reference_wrapper`` via ``std::ref()``/``std::cref()``. - - **Example**:: - - fmt::dynamic_format_arg_store store; - char str[] = "1234567890"; - store.push_back(std::cref(str)); - int a1_val{42}; - auto a1 = fmt::arg("a1_", a1_val); - store.push_back(std::cref(a1)); - - // Changing str affects the output but only for string and custom types. - str[0] = 'X'; - - std::string result = fmt::vformat("{} and {a1_}"); - assert(result == "X234567890 and 42"); - \endrst - */ - template void push_back(std::reference_wrapper arg) { - static_assert( - detail::is_named_arg::type>::value || - need_copy::value, - "objects of built-in types and string views are always copied"); - emplace_arg(arg.get()); - } - - /** - Adds named argument into the dynamic store for later passing to a formatting - function. ``std::reference_wrapper`` is supported to avoid copying of the - argument. - */ - template - void push_back(const detail::named_arg& arg) { - const char_type* arg_name = - dynamic_args_.push>(arg.name).c_str(); - if (detail::const_check(need_copy::value)) { - emplace_arg( - fmt::arg(arg_name, dynamic_args_.push>(arg.value))); - } else { - emplace_arg(fmt::arg(arg_name, arg.value)); - } - } - - /** Erase all elements from the store */ - void clear() { - data_.clear(); - named_info_.clear(); - dynamic_args_ = detail::dynamic_arg_list(); - } - - /** - \rst - Reserves space to store at least *new_cap* arguments including - *new_cap_named* named arguments. - \endrst - */ - void reserve(size_t new_cap, size_t new_cap_named) { - FMT_ASSERT(new_cap >= new_cap_named, - "Set of arguments includes set of named arguments"); - data_.reserve(new_cap); - named_info_.reserve(new_cap_named); - } -}; - -/** - \rst - A view of a collection of formatting arguments. To avoid lifetime issues it - should only be used as a parameter type in type-erased functions such as - ``vformat``:: - - void vlog(string_view format_str, format_args args); // OK - format_args args = make_format_args(42); // Error: dangling reference - \endrst - */ -template class basic_format_args { - public: - using size_type = int; - using format_arg = basic_format_arg; - - private: - // A descriptor that contains information about formatting arguments. - // If the number of arguments is less or equal to max_packed_args then - // argument types are passed in the descriptor. This reduces binary code size - // per formatting function call. - unsigned long long desc_; - union { - // If is_packed() returns true then argument values are stored in values_; - // otherwise they are stored in args_. This is done to improve cache - // locality and reduce compiled code size since storing larger objects - // may require more code (at least on x86-64) even if the same amount of - // data is actually copied to stack. It saves ~10% on the bloat test. - const detail::value* values_; - const format_arg* args_; - }; - - bool is_packed() const { return (desc_ & detail::is_unpacked_bit) == 0; } - bool has_named_args() const { - return (desc_ & detail::has_named_args_bit) != 0; - } - - detail::type type(int index) const { - int shift = index * detail::packed_arg_bits; - unsigned int mask = (1 << detail::packed_arg_bits) - 1; - return static_cast((desc_ >> shift) & mask); - } - - basic_format_args(unsigned long long desc, - const detail::value* values) - : desc_(desc), values_(values) {} - basic_format_args(unsigned long long desc, const format_arg* args) - : desc_(desc), args_(args) {} - - public: - basic_format_args() : desc_(0) {} - - /** - \rst - Constructs a `basic_format_args` object from `~fmt::format_arg_store`. - \endrst - */ - template - FMT_INLINE basic_format_args(const format_arg_store& store) - : basic_format_args(store.desc, store.data_.args()) {} - - /** - \rst - Constructs a `basic_format_args` object from - `~fmt::dynamic_format_arg_store`. - \endrst - */ - FMT_INLINE basic_format_args(const dynamic_format_arg_store& store) - : basic_format_args(store.get_types(), store.data()) {} - - /** - \rst - Constructs a `basic_format_args` object from a dynamic set of arguments. - \endrst - */ - basic_format_args(const format_arg* args, int count) - : basic_format_args(detail::is_unpacked_bit | detail::to_unsigned(count), - args) {} - - /** Returns the argument with the specified id. */ - format_arg get(int id) const { - format_arg arg; - if (!is_packed()) { - if (id < max_size()) arg = args_[id]; - return arg; - } - if (id >= detail::max_packed_args) return arg; - arg.type_ = type(id); - if (arg.type_ == detail::type::none_type) return arg; - arg.value_ = values_[id]; - return arg; - } - - template format_arg get(basic_string_view name) const { - int id = get_id(name); - return id >= 0 ? get(id) : format_arg(); - } - - template int get_id(basic_string_view name) const { - if (!has_named_args()) return -1; - const auto& named_args = - (is_packed() ? values_[-1] : args_[-1].value_).named_args; - for (size_t i = 0; i < named_args.size; ++i) { - if (named_args.data[i].name == name) return named_args.data[i].id; - } - return -1; - } - - int max_size() const { - unsigned long long max_packed = detail::max_packed_args; - return static_cast(is_packed() ? max_packed - : desc_ & ~detail::is_unpacked_bit); - } -}; - -/** An alias to ``basic_format_args``. */ -// It is a separate type rather than an alias to make symbols readable. -struct format_args : basic_format_args { - template - FMT_INLINE format_args(const Args&... args) : basic_format_args(args...) {} -}; -struct wformat_args : basic_format_args { - using basic_format_args::basic_format_args; -}; - -namespace detail { - -// Reports a compile-time error if S is not a valid format string. -template ::value)> -FMT_INLINE void check_format_string(const S&) { -#ifdef FMT_ENFORCE_COMPILE_STRING - static_assert(is_compile_string::value, - "FMT_ENFORCE_COMPILE_STRING requires all format strings to use " - "FMT_STRING."); -#endif -} -template ::value)> -void check_format_string(S); - -template > -inline format_arg_store, remove_reference_t...> -make_args_checked(const S& format_str, - const remove_reference_t&... args) { - static_assert(count<(std::is_base_of>::value && - std::is_reference::value)...>() == 0, - "passing views as lvalues is disallowed"); - check_format_string(format_str); - return {args...}; -} - -template ::value)> -std::basic_string vformat( - basic_string_view format_str, - basic_format_args>> args); - -FMT_API std::string vformat(string_view format_str, format_args args); - -template -typename FMT_BUFFER_CONTEXT(Char)::iterator vformat_to( - buffer& buf, basic_string_view format_str, - basic_format_args)> args); - -template ::value)> -inline void vprint_mojibake(std::FILE*, basic_string_view, const Args&) {} - -FMT_API void vprint_mojibake(std::FILE*, string_view, format_args); -#ifndef _WIN32 -inline void vprint_mojibake(std::FILE*, string_view, format_args) {} -#endif -} // namespace detail - -/** Formats a string and writes the output to ``out``. */ -// GCC 8 and earlier cannot handle std::back_insert_iterator with -// vformat_to(...) overload, so SFINAE on iterator type instead. -template < - typename OutputIt, typename S, typename Char = char_t, - FMT_ENABLE_IF(detail::is_contiguous_back_insert_iterator::value)> -OutputIt vformat_to( - OutputIt out, const S& format_str, - basic_format_args>> args) { - auto& c = detail::get_container(out); - detail::container_buffer> buf(c); - detail::vformat_to(buf, to_string_view(format_str), args); - return out; -} - -template ::value&& detail::is_string::value)> -inline std::back_insert_iterator format_to( - std::back_insert_iterator out, const S& format_str, - Args&&... args) { - return vformat_to(out, to_string_view(format_str), - detail::make_args_checked(format_str, args...)); -} - -template > -FMT_INLINE std::basic_string vformat( - const S& format_str, - basic_format_args>> args) { - return detail::vformat(to_string_view(format_str), args); -} - -/** - \rst - Formats arguments and returns the result as a string. - - **Example**:: - - #include - std::string message = fmt::format("The answer is {}", 42); - \endrst -*/ -// Pass char_t as a default template parameter instead of using -// std::basic_string> to reduce the symbol size. -template > -FMT_INLINE std::basic_string format(const S& format_str, Args&&... args) { - const auto& vargs = detail::make_args_checked(format_str, args...); - return detail::vformat(to_string_view(format_str), vargs); -} - -FMT_API void vprint(string_view, format_args); -FMT_API void vprint(std::FILE*, string_view, format_args); - -/** - \rst - Formats ``args`` according to specifications in ``format_str`` and writes the - output to the file ``f``. Strings are assumed to be Unicode-encoded unless the - ``FMT_UNICODE`` macro is set to 0. - - **Example**:: - - fmt::print(stderr, "Don't {}!", "panic"); - \endrst - */ -template > -inline void print(std::FILE* f, const S& format_str, Args&&... args) { - const auto& vargs = detail::make_args_checked(format_str, args...); - return detail::is_unicode() - ? vprint(f, to_string_view(format_str), vargs) - : detail::vprint_mojibake(f, to_string_view(format_str), vargs); -} - -/** - \rst - Formats ``args`` according to specifications in ``format_str`` and writes - the output to ``stdout``. Strings are assumed to be Unicode-encoded unless - the ``FMT_UNICODE`` macro is set to 0. - - **Example**:: - - fmt::print("Elapsed time: {0:.2f} seconds", 1.23); - \endrst - */ -template > -inline void print(const S& format_str, Args&&... args) { - const auto& vargs = detail::make_args_checked(format_str, args...); - return detail::is_unicode() - ? vprint(to_string_view(format_str), vargs) - : detail::vprint_mojibake(stdout, to_string_view(format_str), - vargs); -} -FMT_END_NAMESPACE - -#endif // FMT_CORE_H_ diff --git a/ThirdParty/fmtlib/include/fmt/format-inl.h b/ThirdParty/fmtlib/include/fmt/format-inl.h deleted file mode 100644 index d8c9c8a5ee..0000000000 --- a/ThirdParty/fmtlib/include/fmt/format-inl.h +++ /dev/null @@ -1,1453 +0,0 @@ -// Formatting library for C++ - implementation -// -// Copyright (c) 2012 - 2016, Victor Zverovich -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_FORMAT_INL_H_ -#define FMT_FORMAT_INL_H_ - -#include -#include -#include -#include -#include -#include // for std::memmove -#include -#include - -#include "format.h" -#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) -# include -#endif - -#ifdef _WIN32 -# if !defined(NOMINMAX) && !defined(WIN32_LEAN_AND_MEAN) -# define NOMINMAX -# define WIN32_LEAN_AND_MEAN -# include -# undef WIN32_LEAN_AND_MEAN -# undef NOMINMAX -# else -# include -# endif -# include -#endif - -#ifdef _MSC_VER -# pragma warning(push) -# pragma warning(disable : 4702) // unreachable code -#endif - -// Dummy implementations of strerror_r and strerror_s called if corresponding -// system functions are not available. -inline fmt::detail::null<> strerror_r(int, char*, ...) { return {}; } -inline fmt::detail::null<> strerror_s(char*, size_t, ...) { return {}; } - -FMT_BEGIN_NAMESPACE -namespace detail { - -FMT_FUNC void assert_fail(const char* file, int line, const char* message) { - // Use unchecked std::fprintf to avoid triggering another assertion when - // writing to stderr fails - std::fprintf(stderr, "%s:%d: assertion failed: %s", file, line, message); - // Chosen instead of std::abort to satisfy Clang in CUDA mode during device - // code pass. - std::terminate(); -} - -#ifndef _MSC_VER -# define FMT_SNPRINTF snprintf -#else // _MSC_VER -inline int fmt_snprintf(char* buffer, size_t size, const char* format, ...) { - va_list args; - va_start(args, format); - int result = vsnprintf_s(buffer, size, _TRUNCATE, format, args); - va_end(args); - return result; -} -# define FMT_SNPRINTF fmt_snprintf -#endif // _MSC_VER - -// A portable thread-safe version of strerror. -// Sets buffer to point to a string describing the error code. -// This can be either a pointer to a string stored in buffer, -// or a pointer to some static immutable string. -// Returns one of the following values: -// 0 - success -// ERANGE - buffer is not large enough to store the error message -// other - failure -// Buffer should be at least of size 1. -FMT_FUNC int safe_strerror(int error_code, char*& buffer, - size_t buffer_size) FMT_NOEXCEPT { - FMT_ASSERT(buffer != nullptr && buffer_size != 0, "invalid buffer"); - - class dispatcher { - private: - int error_code_; - char*& buffer_; - size_t buffer_size_; - - // A noop assignment operator to avoid bogus warnings. - void operator=(const dispatcher&) {} - - // Handle the result of XSI-compliant version of strerror_r. - int handle(int result) { - // glibc versions before 2.13 return result in errno. - return result == -1 ? errno : result; - } - - // Handle the result of GNU-specific version of strerror_r. - FMT_MAYBE_UNUSED - int handle(char* message) { - // If the buffer is full then the message is probably truncated. - if (message == buffer_ && strlen(buffer_) == buffer_size_ - 1) - return ERANGE; - buffer_ = message; - return 0; - } - - // Handle the case when strerror_r is not available. - FMT_MAYBE_UNUSED - int handle(detail::null<>) { - return fallback(strerror_s(buffer_, buffer_size_, error_code_)); - } - - // Fallback to strerror_s when strerror_r is not available. - FMT_MAYBE_UNUSED - int fallback(int result) { - // If the buffer is full then the message is probably truncated. - return result == 0 && strlen(buffer_) == buffer_size_ - 1 ? ERANGE - : result; - } - -#if !FMT_MSC_VER - // Fallback to strerror if strerror_r and strerror_s are not available. - int fallback(detail::null<>) { - errno = 0; - buffer_ = strerror(error_code_); - return errno; - } -#endif - - public: - dispatcher(int err_code, char*& buf, size_t buf_size) - : error_code_(err_code), buffer_(buf), buffer_size_(buf_size) {} - - int run() { return handle(strerror_r(error_code_, buffer_, buffer_size_)); } - }; - return dispatcher(error_code, buffer, buffer_size).run(); -} - -FMT_FUNC void format_error_code(detail::buffer& out, int error_code, - string_view message) FMT_NOEXCEPT { - // Report error code making sure that the output fits into - // inline_buffer_size to avoid dynamic memory allocation and potential - // bad_alloc. - out.resize(0); - static const char SEP[] = ": "; - static const char ERROR_STR[] = "error "; - // Subtract 2 to account for terminating null characters in SEP and ERROR_STR. - size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2; - auto abs_value = static_cast>(error_code); - if (detail::is_negative(error_code)) { - abs_value = 0 - abs_value; - ++error_code_size; - } - error_code_size += detail::to_unsigned(detail::count_digits(abs_value)); - auto it = std::back_inserter(out); - if (message.size() <= inline_buffer_size - error_code_size) - format_to(it, "{}{}", message, SEP); - format_to(it, "{}{}", ERROR_STR, error_code); - assert(out.size() <= inline_buffer_size); -} - -FMT_FUNC void report_error(format_func func, int error_code, - string_view message) FMT_NOEXCEPT { - memory_buffer full_message; - func(full_message, error_code, message); - // Don't use fwrite_fully because the latter may throw. - (void)std::fwrite(full_message.data(), full_message.size(), 1, stderr); - std::fputc('\n', stderr); -} - -// A wrapper around fwrite that throws on error. -FMT_FUNC void fwrite_fully(const void* ptr, size_t size, size_t count, - FILE* stream) { - size_t written = std::fwrite(ptr, size, count, stream); - if (written < count) FMT_THROW(system_error(errno, "cannot write to file")); -} -} // namespace detail - -#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) -namespace detail { - -template -locale_ref::locale_ref(const Locale& loc) : locale_(&loc) { - static_assert(std::is_same::value, ""); -} - -template Locale locale_ref::get() const { - static_assert(std::is_same::value, ""); - return locale_ ? *static_cast(locale_) : std::locale(); -} - -template FMT_FUNC std::string grouping_impl(locale_ref loc) { - return std::use_facet>(loc.get()).grouping(); -} -template FMT_FUNC Char thousands_sep_impl(locale_ref loc) { - return std::use_facet>(loc.get()) - .thousands_sep(); -} -template FMT_FUNC Char decimal_point_impl(locale_ref loc) { - return std::use_facet>(loc.get()) - .decimal_point(); -} -} // namespace detail -#else -template -FMT_FUNC std::string detail::grouping_impl(locale_ref) { - return "\03"; -} -template FMT_FUNC Char detail::thousands_sep_impl(locale_ref) { - return FMT_STATIC_THOUSANDS_SEPARATOR; -} -template FMT_FUNC Char detail::decimal_point_impl(locale_ref) { - return '.'; -} -#endif - -FMT_API FMT_FUNC format_error::~format_error() FMT_NOEXCEPT = default; -FMT_API FMT_FUNC system_error::~system_error() FMT_NOEXCEPT = default; - -FMT_FUNC void system_error::init(int err_code, string_view format_str, - format_args args) { - error_code_ = err_code; - memory_buffer buffer; - format_system_error(buffer, err_code, vformat(format_str, args)); - std::runtime_error& base = *this; - base = std::runtime_error(to_string(buffer)); -} - -namespace detail { - -template <> FMT_FUNC int count_digits<4>(detail::fallback_uintptr n) { - // fallback_uintptr is always stored in little endian. - int i = static_cast(sizeof(void*)) - 1; - while (i > 0 && n.value[i] == 0) --i; - auto char_digits = std::numeric_limits::digits / 4; - return i >= 0 ? i * char_digits + count_digits<4, unsigned>(n.value[i]) : 1; -} - -template -const typename basic_data::digit_pair basic_data::digits[] = { - {'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'}, - {'0', '5'}, {'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'}, - {'1', '0'}, {'1', '1'}, {'1', '2'}, {'1', '3'}, {'1', '4'}, - {'1', '5'}, {'1', '6'}, {'1', '7'}, {'1', '8'}, {'1', '9'}, - {'2', '0'}, {'2', '1'}, {'2', '2'}, {'2', '3'}, {'2', '4'}, - {'2', '5'}, {'2', '6'}, {'2', '7'}, {'2', '8'}, {'2', '9'}, - {'3', '0'}, {'3', '1'}, {'3', '2'}, {'3', '3'}, {'3', '4'}, - {'3', '5'}, {'3', '6'}, {'3', '7'}, {'3', '8'}, {'3', '9'}, - {'4', '0'}, {'4', '1'}, {'4', '2'}, {'4', '3'}, {'4', '4'}, - {'4', '5'}, {'4', '6'}, {'4', '7'}, {'4', '8'}, {'4', '9'}, - {'5', '0'}, {'5', '1'}, {'5', '2'}, {'5', '3'}, {'5', '4'}, - {'5', '5'}, {'5', '6'}, {'5', '7'}, {'5', '8'}, {'5', '9'}, - {'6', '0'}, {'6', '1'}, {'6', '2'}, {'6', '3'}, {'6', '4'}, - {'6', '5'}, {'6', '6'}, {'6', '7'}, {'6', '8'}, {'6', '9'}, - {'7', '0'}, {'7', '1'}, {'7', '2'}, {'7', '3'}, {'7', '4'}, - {'7', '5'}, {'7', '6'}, {'7', '7'}, {'7', '8'}, {'7', '9'}, - {'8', '0'}, {'8', '1'}, {'8', '2'}, {'8', '3'}, {'8', '4'}, - {'8', '5'}, {'8', '6'}, {'8', '7'}, {'8', '8'}, {'8', '9'}, - {'9', '0'}, {'9', '1'}, {'9', '2'}, {'9', '3'}, {'9', '4'}, - {'9', '5'}, {'9', '6'}, {'9', '7'}, {'9', '8'}, {'9', '9'}}; - -template -const char basic_data::hex_digits[] = "0123456789abcdef"; - -#define FMT_POWERS_OF_10(factor) \ - factor * 10, (factor)*100, (factor)*1000, (factor)*10000, (factor)*100000, \ - (factor)*1000000, (factor)*10000000, (factor)*100000000, \ - (factor)*1000000000 - -template -const uint64_t basic_data::powers_of_10_64[] = { - 1, FMT_POWERS_OF_10(1), FMT_POWERS_OF_10(1000000000ULL), - 10000000000000000000ULL}; - -template -const uint32_t basic_data::zero_or_powers_of_10_32[] = {0, - FMT_POWERS_OF_10(1)}; - -template -const uint64_t basic_data::zero_or_powers_of_10_64[] = { - 0, FMT_POWERS_OF_10(1), FMT_POWERS_OF_10(1000000000ULL), - 10000000000000000000ULL}; - -// Normalized 64-bit significands of pow(10, k), for k = -348, -340, ..., 340. -// These are generated by support/compute-powers.py. -template -const uint64_t basic_data::pow10_significands[] = { - 0xfa8fd5a0081c0288, 0xbaaee17fa23ebf76, 0x8b16fb203055ac76, - 0xcf42894a5dce35ea, 0x9a6bb0aa55653b2d, 0xe61acf033d1a45df, - 0xab70fe17c79ac6ca, 0xff77b1fcbebcdc4f, 0xbe5691ef416bd60c, - 0x8dd01fad907ffc3c, 0xd3515c2831559a83, 0x9d71ac8fada6c9b5, - 0xea9c227723ee8bcb, 0xaecc49914078536d, 0x823c12795db6ce57, - 0xc21094364dfb5637, 0x9096ea6f3848984f, 0xd77485cb25823ac7, - 0xa086cfcd97bf97f4, 0xef340a98172aace5, 0xb23867fb2a35b28e, - 0x84c8d4dfd2c63f3b, 0xc5dd44271ad3cdba, 0x936b9fcebb25c996, - 0xdbac6c247d62a584, 0xa3ab66580d5fdaf6, 0xf3e2f893dec3f126, - 0xb5b5ada8aaff80b8, 0x87625f056c7c4a8b, 0xc9bcff6034c13053, - 0x964e858c91ba2655, 0xdff9772470297ebd, 0xa6dfbd9fb8e5b88f, - 0xf8a95fcf88747d94, 0xb94470938fa89bcf, 0x8a08f0f8bf0f156b, - 0xcdb02555653131b6, 0x993fe2c6d07b7fac, 0xe45c10c42a2b3b06, - 0xaa242499697392d3, 0xfd87b5f28300ca0e, 0xbce5086492111aeb, - 0x8cbccc096f5088cc, 0xd1b71758e219652c, 0x9c40000000000000, - 0xe8d4a51000000000, 0xad78ebc5ac620000, 0x813f3978f8940984, - 0xc097ce7bc90715b3, 0x8f7e32ce7bea5c70, 0xd5d238a4abe98068, - 0x9f4f2726179a2245, 0xed63a231d4c4fb27, 0xb0de65388cc8ada8, - 0x83c7088e1aab65db, 0xc45d1df942711d9a, 0x924d692ca61be758, - 0xda01ee641a708dea, 0xa26da3999aef774a, 0xf209787bb47d6b85, - 0xb454e4a179dd1877, 0x865b86925b9bc5c2, 0xc83553c5c8965d3d, - 0x952ab45cfa97a0b3, 0xde469fbd99a05fe3, 0xa59bc234db398c25, - 0xf6c69a72a3989f5c, 0xb7dcbf5354e9bece, 0x88fcf317f22241e2, - 0xcc20ce9bd35c78a5, 0x98165af37b2153df, 0xe2a0b5dc971f303a, - 0xa8d9d1535ce3b396, 0xfb9b7cd9a4a7443c, 0xbb764c4ca7a44410, - 0x8bab8eefb6409c1a, 0xd01fef10a657842c, 0x9b10a4e5e9913129, - 0xe7109bfba19c0c9d, 0xac2820d9623bf429, 0x80444b5e7aa7cf85, - 0xbf21e44003acdd2d, 0x8e679c2f5e44ff8f, 0xd433179d9c8cb841, - 0x9e19db92b4e31ba9, 0xeb96bf6ebadf77d9, 0xaf87023b9bf0ee6b, -}; - -// Binary exponents of pow(10, k), for k = -348, -340, ..., 340, corresponding -// to significands above. -template -const int16_t basic_data::pow10_exponents[] = { - -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954, - -927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661, - -635, -608, -582, -555, -529, -502, -475, -449, -422, -396, -369, - -343, -316, -289, -263, -236, -210, -183, -157, -130, -103, -77, - -50, -24, 3, 30, 56, 83, 109, 136, 162, 189, 216, - 242, 269, 295, 322, 348, 375, 402, 428, 455, 481, 508, - 534, 561, 588, 614, 641, 667, 694, 720, 747, 774, 800, - 827, 853, 880, 907, 933, 960, 986, 1013, 1039, 1066}; - -template -const char basic_data::foreground_color[] = "\x1b[38;2;"; -template -const char basic_data::background_color[] = "\x1b[48;2;"; -template const char basic_data::reset_color[] = "\x1b[0m"; -template const wchar_t basic_data::wreset_color[] = L"\x1b[0m"; -template const char basic_data::signs[] = {0, '-', '+', ' '}; -template -const char basic_data::left_padding_shifts[] = {31, 31, 0, 1, 0}; -template -const char basic_data::right_padding_shifts[] = {0, 31, 0, 1, 0}; - -template struct bits { - static FMT_CONSTEXPR_DECL const int value = - static_cast(sizeof(T) * std::numeric_limits::digits); -}; - -class fp; -template fp normalize(fp value); - -// Lower (upper) boundary is a value half way between a floating-point value -// and its predecessor (successor). Boundaries have the same exponent as the -// value so only significands are stored. -struct boundaries { - uint64_t lower; - uint64_t upper; -}; - -// A handmade floating-point number f * pow(2, e). -class fp { - private: - using significand_type = uint64_t; - - public: - significand_type f; - int e; - - // All sizes are in bits. - // Subtract 1 to account for an implicit most significant bit in the - // normalized form. - static FMT_CONSTEXPR_DECL const int double_significand_size = - std::numeric_limits::digits - 1; - static FMT_CONSTEXPR_DECL const uint64_t implicit_bit = - 1ULL << double_significand_size; - static FMT_CONSTEXPR_DECL const int significand_size = - bits::value; - - fp() : f(0), e(0) {} - fp(uint64_t f_val, int e_val) : f(f_val), e(e_val) {} - - // Constructs fp from an IEEE754 double. It is a template to prevent compile - // errors on platforms where double is not IEEE754. - template explicit fp(Double d) { assign(d); } - - // Assigns d to this and return true iff predecessor is closer than successor. - template - bool assign(Double d) { - // Assume double is in the format [sign][exponent][significand]. - using limits = std::numeric_limits; - const int exponent_size = - bits::value - double_significand_size - 1; // -1 for sign - const uint64_t significand_mask = implicit_bit - 1; - const uint64_t exponent_mask = (~0ULL >> 1) & ~significand_mask; - const int exponent_bias = (1 << exponent_size) - limits::max_exponent - 1; - auto u = bit_cast(d); - f = u & significand_mask; - int biased_e = - static_cast((u & exponent_mask) >> double_significand_size); - // Predecessor is closer if d is a normalized power of 2 (f == 0) other than - // the smallest normalized number (biased_e > 1). - bool is_predecessor_closer = f == 0 && biased_e > 1; - if (biased_e != 0) - f += implicit_bit; - else - biased_e = 1; // Subnormals use biased exponent 1 (min exponent). - e = biased_e - exponent_bias - double_significand_size; - return is_predecessor_closer; - } - - template - bool assign(Double) { - *this = fp(); - return false; - } - - // Assigns d to this together with computing lower and upper boundaries, - // where a boundary is a value half way between the number and its predecessor - // (lower) or successor (upper). The upper boundary is normalized and lower - // has the same exponent but may be not normalized. - template boundaries assign_with_boundaries(Double d) { - bool is_lower_closer = assign(d); - fp lower = - is_lower_closer ? fp((f << 2) - 1, e - 2) : fp((f << 1) - 1, e - 1); - // 1 in normalize accounts for the exponent shift above. - fp upper = normalize<1>(fp((f << 1) + 1, e - 1)); - lower.f <<= lower.e - upper.e; - return boundaries{lower.f, upper.f}; - } - - template boundaries assign_float_with_boundaries(Double d) { - assign(d); - constexpr int min_normal_e = std::numeric_limits::min_exponent - - std::numeric_limits::digits; - significand_type half_ulp = 1 << (std::numeric_limits::digits - - std::numeric_limits::digits - 1); - if (min_normal_e > e) half_ulp <<= min_normal_e - e; - fp upper = normalize<0>(fp(f + half_ulp, e)); - fp lower = fp( - f - (half_ulp >> ((f == implicit_bit && e > min_normal_e) ? 1 : 0)), e); - lower.f <<= lower.e - upper.e; - return boundaries{lower.f, upper.f}; - } -}; - -// Normalizes the value converted from double and multiplied by (1 << SHIFT). -template fp normalize(fp value) { - // Handle subnormals. - const auto shifted_implicit_bit = fp::implicit_bit << SHIFT; - while ((value.f & shifted_implicit_bit) == 0) { - value.f <<= 1; - --value.e; - } - // Subtract 1 to account for hidden bit. - const auto offset = - fp::significand_size - fp::double_significand_size - SHIFT - 1; - value.f <<= offset; - value.e -= offset; - return value; -} - -inline bool operator==(fp x, fp y) { return x.f == y.f && x.e == y.e; } - -// Computes lhs * rhs / pow(2, 64) rounded to nearest with half-up tie breaking. -inline uint64_t multiply(uint64_t lhs, uint64_t rhs) { -#if FMT_USE_INT128 - auto product = static_cast<__uint128_t>(lhs) * rhs; - auto f = static_cast(product >> 64); - return (static_cast(product) & (1ULL << 63)) != 0 ? f + 1 : f; -#else - // Multiply 32-bit parts of significands. - uint64_t mask = (1ULL << 32) - 1; - uint64_t a = lhs >> 32, b = lhs & mask; - uint64_t c = rhs >> 32, d = rhs & mask; - uint64_t ac = a * c, bc = b * c, ad = a * d, bd = b * d; - // Compute mid 64-bit of result and round. - uint64_t mid = (bd >> 32) + (ad & mask) + (bc & mask) + (1U << 31); - return ac + (ad >> 32) + (bc >> 32) + (mid >> 32); -#endif -} - -inline fp operator*(fp x, fp y) { return {multiply(x.f, y.f), x.e + y.e + 64}; } - -// Returns a cached power of 10 `c_k = c_k.f * pow(2, c_k.e)` such that its -// (binary) exponent satisfies `min_exponent <= c_k.e <= min_exponent + 28`. -inline fp get_cached_power(int min_exponent, int& pow10_exponent) { - const int64_t one_over_log2_10 = 0x4d104d42; // round(pow(2, 32) / log2(10)) - int index = static_cast( - ((min_exponent + fp::significand_size - 1) * one_over_log2_10 + - ((int64_t(1) << 32) - 1)) // ceil - >> 32 // arithmetic shift - ); - // Decimal exponent of the first (smallest) cached power of 10. - const int first_dec_exp = -348; - // Difference between 2 consecutive decimal exponents in cached powers of 10. - const int dec_exp_step = 8; - index = (index - first_dec_exp - 1) / dec_exp_step + 1; - pow10_exponent = first_dec_exp + index * dec_exp_step; - return {data::pow10_significands[index], data::pow10_exponents[index]}; -} - -// A simple accumulator to hold the sums of terms in bigint::square if uint128_t -// is not available. -struct accumulator { - uint64_t lower; - uint64_t upper; - - accumulator() : lower(0), upper(0) {} - explicit operator uint32_t() const { return static_cast(lower); } - - void operator+=(uint64_t n) { - lower += n; - if (lower < n) ++upper; - } - void operator>>=(int shift) { - assert(shift == 32); - (void)shift; - lower = (upper << 32) | (lower >> 32); - upper >>= 32; - } -}; - -class bigint { - private: - // A bigint is stored as an array of bigits (big digits), with bigit at index - // 0 being the least significant one. - using bigit = uint32_t; - using double_bigit = uint64_t; - enum { bigits_capacity = 32 }; - basic_memory_buffer bigits_; - int exp_; - - bigit operator[](int index) const { return bigits_[to_unsigned(index)]; } - bigit& operator[](int index) { return bigits_[to_unsigned(index)]; } - - static FMT_CONSTEXPR_DECL const int bigit_bits = bits::value; - - friend struct formatter; - - void subtract_bigits(int index, bigit other, bigit& borrow) { - auto result = static_cast((*this)[index]) - other - borrow; - (*this)[index] = static_cast(result); - borrow = static_cast(result >> (bigit_bits * 2 - 1)); - } - - void remove_leading_zeros() { - int num_bigits = static_cast(bigits_.size()) - 1; - while (num_bigits > 0 && (*this)[num_bigits] == 0) --num_bigits; - bigits_.resize(to_unsigned(num_bigits + 1)); - } - - // Computes *this -= other assuming aligned bigints and *this >= other. - void subtract_aligned(const bigint& other) { - FMT_ASSERT(other.exp_ >= exp_, "unaligned bigints"); - FMT_ASSERT(compare(*this, other) >= 0, ""); - bigit borrow = 0; - int i = other.exp_ - exp_; - for (size_t j = 0, n = other.bigits_.size(); j != n; ++i, ++j) { - subtract_bigits(i, other.bigits_[j], borrow); - } - while (borrow > 0) subtract_bigits(i, 0, borrow); - remove_leading_zeros(); - } - - void multiply(uint32_t value) { - const double_bigit wide_value = value; - bigit carry = 0; - for (size_t i = 0, n = bigits_.size(); i < n; ++i) { - double_bigit result = bigits_[i] * wide_value + carry; - bigits_[i] = static_cast(result); - carry = static_cast(result >> bigit_bits); - } - if (carry != 0) bigits_.push_back(carry); - } - - void multiply(uint64_t value) { - const bigit mask = ~bigit(0); - const double_bigit lower = value & mask; - const double_bigit upper = value >> bigit_bits; - double_bigit carry = 0; - for (size_t i = 0, n = bigits_.size(); i < n; ++i) { - double_bigit result = bigits_[i] * lower + (carry & mask); - carry = - bigits_[i] * upper + (result >> bigit_bits) + (carry >> bigit_bits); - bigits_[i] = static_cast(result); - } - while (carry != 0) { - bigits_.push_back(carry & mask); - carry >>= bigit_bits; - } - } - - public: - bigint() : exp_(0) {} - explicit bigint(uint64_t n) { assign(n); } - ~bigint() { assert(bigits_.capacity() <= bigits_capacity); } - - bigint(const bigint&) = delete; - void operator=(const bigint&) = delete; - - void assign(const bigint& other) { - auto size = other.bigits_.size(); - bigits_.resize(size); - auto data = other.bigits_.data(); - std::copy(data, data + size, make_checked(bigits_.data(), size)); - exp_ = other.exp_; - } - - void assign(uint64_t n) { - size_t num_bigits = 0; - do { - bigits_[num_bigits++] = n & ~bigit(0); - n >>= bigit_bits; - } while (n != 0); - bigits_.resize(num_bigits); - exp_ = 0; - } - - int num_bigits() const { return static_cast(bigits_.size()) + exp_; } - - FMT_NOINLINE bigint& operator<<=(int shift) { - assert(shift >= 0); - exp_ += shift / bigit_bits; - shift %= bigit_bits; - if (shift == 0) return *this; - bigit carry = 0; - for (size_t i = 0, n = bigits_.size(); i < n; ++i) { - bigit c = bigits_[i] >> (bigit_bits - shift); - bigits_[i] = (bigits_[i] << shift) + carry; - carry = c; - } - if (carry != 0) bigits_.push_back(carry); - return *this; - } - - template bigint& operator*=(Int value) { - FMT_ASSERT(value > 0, ""); - multiply(uint32_or_64_or_128_t(value)); - return *this; - } - - friend int compare(const bigint& lhs, const bigint& rhs) { - int num_lhs_bigits = lhs.num_bigits(), num_rhs_bigits = rhs.num_bigits(); - if (num_lhs_bigits != num_rhs_bigits) - return num_lhs_bigits > num_rhs_bigits ? 1 : -1; - int i = static_cast(lhs.bigits_.size()) - 1; - int j = static_cast(rhs.bigits_.size()) - 1; - int end = i - j; - if (end < 0) end = 0; - for (; i >= end; --i, --j) { - bigit lhs_bigit = lhs[i], rhs_bigit = rhs[j]; - if (lhs_bigit != rhs_bigit) return lhs_bigit > rhs_bigit ? 1 : -1; - } - if (i != j) return i > j ? 1 : -1; - return 0; - } - - // Returns compare(lhs1 + lhs2, rhs). - friend int add_compare(const bigint& lhs1, const bigint& lhs2, - const bigint& rhs) { - int max_lhs_bigits = (std::max)(lhs1.num_bigits(), lhs2.num_bigits()); - int num_rhs_bigits = rhs.num_bigits(); - if (max_lhs_bigits + 1 < num_rhs_bigits) return -1; - if (max_lhs_bigits > num_rhs_bigits) return 1; - auto get_bigit = [](const bigint& n, int i) -> bigit { - return i >= n.exp_ && i < n.num_bigits() ? n[i - n.exp_] : 0; - }; - double_bigit borrow = 0; - int min_exp = (std::min)((std::min)(lhs1.exp_, lhs2.exp_), rhs.exp_); - for (int i = num_rhs_bigits - 1; i >= min_exp; --i) { - double_bigit sum = - static_cast(get_bigit(lhs1, i)) + get_bigit(lhs2, i); - bigit rhs_bigit = get_bigit(rhs, i); - if (sum > rhs_bigit + borrow) return 1; - borrow = rhs_bigit + borrow - sum; - if (borrow > 1) return -1; - borrow <<= bigit_bits; - } - return borrow != 0 ? -1 : 0; - } - - // Assigns pow(10, exp) to this bigint. - void assign_pow10(int exp) { - assert(exp >= 0); - if (exp == 0) return assign(1); - // Find the top bit. - int bitmask = 1; - while (exp >= bitmask) bitmask <<= 1; - bitmask >>= 1; - // pow(10, exp) = pow(5, exp) * pow(2, exp). First compute pow(5, exp) by - // repeated squaring and multiplication. - assign(5); - bitmask >>= 1; - while (bitmask != 0) { - square(); - if ((exp & bitmask) != 0) *this *= 5; - bitmask >>= 1; - } - *this <<= exp; // Multiply by pow(2, exp) by shifting. - } - - void square() { - basic_memory_buffer n(std::move(bigits_)); - int num_bigits = static_cast(bigits_.size()); - int num_result_bigits = 2 * num_bigits; - bigits_.resize(to_unsigned(num_result_bigits)); - using accumulator_t = conditional_t; - auto sum = accumulator_t(); - for (int bigit_index = 0; bigit_index < num_bigits; ++bigit_index) { - // Compute bigit at position bigit_index of the result by adding - // cross-product terms n[i] * n[j] such that i + j == bigit_index. - for (int i = 0, j = bigit_index; j >= 0; ++i, --j) { - // Most terms are multiplied twice which can be optimized in the future. - sum += static_cast(n[i]) * n[j]; - } - (*this)[bigit_index] = static_cast(sum); - sum >>= bits::value; // Compute the carry. - } - // Do the same for the top half. - for (int bigit_index = num_bigits; bigit_index < num_result_bigits; - ++bigit_index) { - for (int j = num_bigits - 1, i = bigit_index - j; i < num_bigits;) - sum += static_cast(n[i++]) * n[j--]; - (*this)[bigit_index] = static_cast(sum); - sum >>= bits::value; - } - --num_result_bigits; - remove_leading_zeros(); - exp_ *= 2; - } - - // Divides this bignum by divisor, assigning the remainder to this and - // returning the quotient. - int divmod_assign(const bigint& divisor) { - FMT_ASSERT(this != &divisor, ""); - if (compare(*this, divisor) < 0) return 0; - int num_bigits = static_cast(bigits_.size()); - FMT_ASSERT(divisor.bigits_[divisor.bigits_.size() - 1u] != 0, ""); - int exp_difference = exp_ - divisor.exp_; - if (exp_difference > 0) { - // Align bigints by adding trailing zeros to simplify subtraction. - bigits_.resize(to_unsigned(num_bigits + exp_difference)); - for (int i = num_bigits - 1, j = i + exp_difference; i >= 0; --i, --j) - bigits_[j] = bigits_[i]; - std::uninitialized_fill_n(bigits_.data(), exp_difference, 0); - exp_ -= exp_difference; - } - int quotient = 0; - do { - subtract_aligned(divisor); - ++quotient; - } while (compare(*this, divisor) >= 0); - return quotient; - } -}; - -enum class round_direction { unknown, up, down }; - -// Given the divisor (normally a power of 10), the remainder = v % divisor for -// some number v and the error, returns whether v should be rounded up, down, or -// whether the rounding direction can't be determined due to error. -// error should be less than divisor / 2. -inline round_direction get_round_direction(uint64_t divisor, uint64_t remainder, - uint64_t error) { - FMT_ASSERT(remainder < divisor, ""); // divisor - remainder won't overflow. - FMT_ASSERT(error < divisor, ""); // divisor - error won't overflow. - FMT_ASSERT(error < divisor - error, ""); // error * 2 won't overflow. - // Round down if (remainder + error) * 2 <= divisor. - if (remainder <= divisor - remainder && error * 2 <= divisor - remainder * 2) - return round_direction::down; - // Round up if (remainder - error) * 2 >= divisor. - if (remainder >= error && - remainder - error >= divisor - (remainder - error)) { - return round_direction::up; - } - return round_direction::unknown; -} - -namespace digits { -enum result { - more, // Generate more digits. - done, // Done generating digits. - error // Digit generation cancelled due to an error. -}; -} - -// A version of count_digits optimized for grisu_gen_digits. -inline int grisu_count_digits(uint32_t n) { - if (n < 10) return 1; - if (n < 100) return 2; - if (n < 1000) return 3; - if (n < 10000) return 4; - if (n < 100000) return 5; - if (n < 1000000) return 6; - if (n < 10000000) return 7; - if (n < 100000000) return 8; - if (n < 1000000000) return 9; - return 10; -} - -// Generates output using the Grisu digit-gen algorithm. -// error: the size of the region (lower, upper) outside of which numbers -// definitely do not round to value (Delta in Grisu3). -template -FMT_ALWAYS_INLINE digits::result grisu_gen_digits(fp value, uint64_t error, - int& exp, Handler& handler) { - const fp one(1ULL << -value.e, value.e); - // The integral part of scaled value (p1 in Grisu) = value / one. It cannot be - // zero because it contains a product of two 64-bit numbers with MSB set (due - // to normalization) - 1, shifted right by at most 60 bits. - auto integral = static_cast(value.f >> -one.e); - FMT_ASSERT(integral != 0, ""); - FMT_ASSERT(integral == value.f >> -one.e, ""); - // The fractional part of scaled value (p2 in Grisu) c = value % one. - uint64_t fractional = value.f & (one.f - 1); - exp = grisu_count_digits(integral); // kappa in Grisu. - // Divide by 10 to prevent overflow. - auto result = handler.on_start(data::powers_of_10_64[exp - 1] << -one.e, - value.f / 10, error * 10, exp); - if (result != digits::more) return result; - // Generate digits for the integral part. This can produce up to 10 digits. - do { - uint32_t digit = 0; - auto divmod_integral = [&](uint32_t divisor) { - digit = integral / divisor; - integral %= divisor; - }; - // This optimization by Milo Yip reduces the number of integer divisions by - // one per iteration. - switch (exp) { - case 10: - divmod_integral(1000000000); - break; - case 9: - divmod_integral(100000000); - break; - case 8: - divmod_integral(10000000); - break; - case 7: - divmod_integral(1000000); - break; - case 6: - divmod_integral(100000); - break; - case 5: - divmod_integral(10000); - break; - case 4: - divmod_integral(1000); - break; - case 3: - divmod_integral(100); - break; - case 2: - divmod_integral(10); - break; - case 1: - digit = integral; - integral = 0; - break; - default: - FMT_ASSERT(false, "invalid number of digits"); - } - --exp; - uint64_t remainder = - (static_cast(integral) << -one.e) + fractional; - result = handler.on_digit(static_cast('0' + digit), - data::powers_of_10_64[exp] << -one.e, remainder, - error, exp, true); - if (result != digits::more) return result; - } while (exp > 0); - // Generate digits for the fractional part. - for (;;) { - fractional *= 10; - error *= 10; - char digit = - static_cast('0' + static_cast(fractional >> -one.e)); - fractional &= one.f - 1; - --exp; - result = handler.on_digit(digit, one.f, fractional, error, exp, false); - if (result != digits::more) return result; - } -} - -// The fixed precision digit handler. -struct fixed_handler { - char* buf; - int size; - int precision; - int exp10; - bool fixed; - - digits::result on_start(uint64_t divisor, uint64_t remainder, uint64_t error, - int& exp) { - // Non-fixed formats require at least one digit and no precision adjustment. - if (!fixed) return digits::more; - // Adjust fixed precision by exponent because it is relative to decimal - // point. - precision += exp + exp10; - // Check if precision is satisfied just by leading zeros, e.g. - // format("{:.2f}", 0.001) gives "0.00" without generating any digits. - if (precision > 0) return digits::more; - if (precision < 0) return digits::done; - auto dir = get_round_direction(divisor, remainder, error); - if (dir == round_direction::unknown) return digits::error; - buf[size++] = dir == round_direction::up ? '1' : '0'; - return digits::done; - } - - digits::result on_digit(char digit, uint64_t divisor, uint64_t remainder, - uint64_t error, int, bool integral) { - FMT_ASSERT(remainder < divisor, ""); - buf[size++] = digit; - if (size < precision) return digits::more; - if (!integral) { - // Check if error * 2 < divisor with overflow prevention. - // The check is not needed for the integral part because error = 1 - // and divisor > (1 << 32) there. - if (error >= divisor || error >= divisor - error) return digits::error; - } else { - FMT_ASSERT(error == 1 && divisor > 2, ""); - } - auto dir = get_round_direction(divisor, remainder, error); - if (dir != round_direction::up) - return dir == round_direction::down ? digits::done : digits::error; - ++buf[size - 1]; - for (int i = size - 1; i > 0 && buf[i] > '9'; --i) { - buf[i] = '0'; - ++buf[i - 1]; - } - if (buf[0] > '9') { - buf[0] = '1'; - buf[size++] = '0'; - } - return digits::done; - } -}; - -// The shortest representation digit handler. -struct grisu_shortest_handler { - char* buf; - int size; - // Distance between scaled value and upper bound (wp_W in Grisu3). - uint64_t diff; - - digits::result on_start(uint64_t, uint64_t, uint64_t, int&) { - return digits::more; - } - - // Decrement the generated number approaching value from above. - void round(uint64_t d, uint64_t divisor, uint64_t& remainder, - uint64_t error) { - while ( - remainder < d && error - remainder >= divisor && - (remainder + divisor < d || d - remainder >= remainder + divisor - d)) { - --buf[size - 1]; - remainder += divisor; - } - } - - // Implements Grisu's round_weed. - digits::result on_digit(char digit, uint64_t divisor, uint64_t remainder, - uint64_t error, int exp, bool integral) { - buf[size++] = digit; - if (remainder >= error) return digits::more; - uint64_t unit = integral ? 1 : data::powers_of_10_64[-exp]; - uint64_t up = (diff - 1) * unit; // wp_Wup - round(up, divisor, remainder, error); - uint64_t down = (diff + 1) * unit; // wp_Wdown - if (remainder < down && error - remainder >= divisor && - (remainder + divisor < down || - down - remainder > remainder + divisor - down)) { - return digits::error; - } - return 2 * unit <= remainder && remainder <= error - 4 * unit - ? digits::done - : digits::error; - } -}; - -// Formats value using a variation of the Fixed-Precision Positive -// Floating-Point Printout ((FPP)^2) algorithm by Steele & White: -// https://fmt.dev/p372-steele.pdf. -template -void fallback_format(Double d, buffer& buf, int& exp10) { - bigint numerator; // 2 * R in (FPP)^2. - bigint denominator; // 2 * S in (FPP)^2. - // lower and upper are differences between value and corresponding boundaries. - bigint lower; // (M^- in (FPP)^2). - bigint upper_store; // upper's value if different from lower. - bigint* upper = nullptr; // (M^+ in (FPP)^2). - fp value; - // Shift numerator and denominator by an extra bit or two (if lower boundary - // is closer) to make lower and upper integers. This eliminates multiplication - // by 2 during later computations. - // TODO: handle float - int shift = value.assign(d) ? 2 : 1; - uint64_t significand = value.f << shift; - if (value.e >= 0) { - numerator.assign(significand); - numerator <<= value.e; - lower.assign(1); - lower <<= value.e; - if (shift != 1) { - upper_store.assign(1); - upper_store <<= value.e + 1; - upper = &upper_store; - } - denominator.assign_pow10(exp10); - denominator <<= 1; - } else if (exp10 < 0) { - numerator.assign_pow10(-exp10); - lower.assign(numerator); - if (shift != 1) { - upper_store.assign(numerator); - upper_store <<= 1; - upper = &upper_store; - } - numerator *= significand; - denominator.assign(1); - denominator <<= shift - value.e; - } else { - numerator.assign(significand); - denominator.assign_pow10(exp10); - denominator <<= shift - value.e; - lower.assign(1); - if (shift != 1) { - upper_store.assign(1ULL << 1); - upper = &upper_store; - } - } - if (!upper) upper = &lower; - // Invariant: value == (numerator / denominator) * pow(10, exp10). - bool even = (value.f & 1) == 0; - int num_digits = 0; - char* data = buf.data(); - for (;;) { - int digit = numerator.divmod_assign(denominator); - bool low = compare(numerator, lower) - even < 0; // numerator <[=] lower. - // numerator + upper >[=] pow10: - bool high = add_compare(numerator, *upper, denominator) + even > 0; - data[num_digits++] = static_cast('0' + digit); - if (low || high) { - if (!low) { - ++data[num_digits - 1]; - } else if (high) { - int result = add_compare(numerator, numerator, denominator); - // Round half to even. - if (result > 0 || (result == 0 && (digit % 2) != 0)) - ++data[num_digits - 1]; - } - buf.resize(to_unsigned(num_digits)); - exp10 -= num_digits - 1; - return; - } - numerator *= 10; - lower *= 10; - if (upper != &lower) *upper *= 10; - } -} - -// Formats value using the Grisu algorithm -// (https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf) -// if T is a IEEE754 binary32 or binary64 and snprintf otherwise. -template -int format_float(T value, int precision, float_specs specs, buffer& buf) { - static_assert(!std::is_same::value, ""); - FMT_ASSERT(value >= 0, "value is negative"); - - const bool fixed = specs.format == float_format::fixed; - if (value <= 0) { // <= instead of == to silence a warning. - if (precision <= 0 || !fixed) { - buf.push_back('0'); - return 0; - } - buf.resize(to_unsigned(precision)); - std::uninitialized_fill_n(buf.data(), precision, '0'); - return -precision; - } - - if (!specs.use_grisu) return snprintf_float(value, precision, specs, buf); - - int exp = 0; - const int min_exp = -60; // alpha in Grisu. - int cached_exp10 = 0; // K in Grisu. - if (precision < 0) { - fp fp_value; - auto boundaries = specs.binary32 - ? fp_value.assign_float_with_boundaries(value) - : fp_value.assign_with_boundaries(value); - fp_value = normalize(fp_value); - // Find a cached power of 10 such that multiplying value by it will bring - // the exponent in the range [min_exp, -32]. - const fp cached_pow = get_cached_power( - min_exp - (fp_value.e + fp::significand_size), cached_exp10); - // Multiply value and boundaries by the cached power of 10. - fp_value = fp_value * cached_pow; - boundaries.lower = multiply(boundaries.lower, cached_pow.f); - boundaries.upper = multiply(boundaries.upper, cached_pow.f); - assert(min_exp <= fp_value.e && fp_value.e <= -32); - --boundaries.lower; // \tilde{M}^- - 1 ulp -> M^-_{\downarrow}. - ++boundaries.upper; // \tilde{M}^+ + 1 ulp -> M^+_{\uparrow}. - // Numbers outside of (lower, upper) definitely do not round to value. - grisu_shortest_handler handler{buf.data(), 0, - boundaries.upper - fp_value.f}; - auto result = - grisu_gen_digits(fp(boundaries.upper, fp_value.e), - boundaries.upper - boundaries.lower, exp, handler); - if (result == digits::error) { - exp += handler.size - cached_exp10 - 1; - fallback_format(value, buf, exp); - return exp; - } - buf.resize(to_unsigned(handler.size)); - } else { - if (precision > 17) return snprintf_float(value, precision, specs, buf); - fp normalized = normalize(fp(value)); - const auto cached_pow = get_cached_power( - min_exp - (normalized.e + fp::significand_size), cached_exp10); - normalized = normalized * cached_pow; - fixed_handler handler{buf.data(), 0, precision, -cached_exp10, fixed}; - if (grisu_gen_digits(normalized, 1, exp, handler) == digits::error) - return snprintf_float(value, precision, specs, buf); - int num_digits = handler.size; - if (!fixed) { - // Remove trailing zeros. - while (num_digits > 0 && buf[num_digits - 1] == '0') { - --num_digits; - ++exp; - } - } - buf.resize(to_unsigned(num_digits)); - } - return exp - cached_exp10; -} - -template -int snprintf_float(T value, int precision, float_specs specs, - buffer& buf) { - // Buffer capacity must be non-zero, otherwise MSVC's vsnprintf_s will fail. - FMT_ASSERT(buf.capacity() > buf.size(), "empty buffer"); - static_assert(!std::is_same::value, ""); - - // Subtract 1 to account for the difference in precision since we use %e for - // both general and exponent format. - if (specs.format == float_format::general || - specs.format == float_format::exp) - precision = (precision >= 0 ? precision : 6) - 1; - - // Build the format string. - enum { max_format_size = 7 }; // The longest format is "%#.*Le". - char format[max_format_size]; - char* format_ptr = format; - *format_ptr++ = '%'; - if (specs.showpoint && specs.format == float_format::hex) *format_ptr++ = '#'; - if (precision >= 0) { - *format_ptr++ = '.'; - *format_ptr++ = '*'; - } - if (std::is_same()) *format_ptr++ = 'L'; - *format_ptr++ = specs.format != float_format::hex - ? (specs.format == float_format::fixed ? 'f' : 'e') - : (specs.upper ? 'A' : 'a'); - *format_ptr = '\0'; - - // Format using snprintf. - auto offset = buf.size(); - for (;;) { - auto begin = buf.data() + offset; - auto capacity = buf.capacity() - offset; -#ifdef FMT_FUZZ - if (precision > 100000) - throw std::runtime_error( - "fuzz mode - avoid large allocation inside snprintf"); -#endif - // Suppress the warning about a nonliteral format string. - // Cannot use auto because of a bug in MinGW (#1532). - int (*snprintf_ptr)(char*, size_t, const char*, ...) = FMT_SNPRINTF; - int result = precision >= 0 - ? snprintf_ptr(begin, capacity, format, precision, value) - : snprintf_ptr(begin, capacity, format, value); - if (result < 0) { - buf.reserve(buf.capacity() + 1); // The buffer will grow exponentially. - continue; - } - auto size = to_unsigned(result); - // Size equal to capacity means that the last character was truncated. - if (size >= capacity) { - buf.reserve(size + offset + 1); // Add 1 for the terminating '\0'. - continue; - } - auto is_digit = [](char c) { return c >= '0' && c <= '9'; }; - if (specs.format == float_format::fixed) { - if (precision == 0) { - buf.resize(size); - return 0; - } - // Find and remove the decimal point. - auto end = begin + size, p = end; - do { - --p; - } while (is_digit(*p)); - int fraction_size = static_cast(end - p - 1); - std::memmove(p, p + 1, to_unsigned(fraction_size)); - buf.resize(size - 1); - return -fraction_size; - } - if (specs.format == float_format::hex) { - buf.resize(size + offset); - return 0; - } - // Find and parse the exponent. - auto end = begin + size, exp_pos = end; - do { - --exp_pos; - } while (*exp_pos != 'e'); - char sign = exp_pos[1]; - assert(sign == '+' || sign == '-'); - int exp = 0; - auto p = exp_pos + 2; // Skip 'e' and sign. - do { - assert(is_digit(*p)); - exp = exp * 10 + (*p++ - '0'); - } while (p != end); - if (sign == '-') exp = -exp; - int fraction_size = 0; - if (exp_pos != begin + 1) { - // Remove trailing zeros. - auto fraction_end = exp_pos - 1; - while (*fraction_end == '0') --fraction_end; - // Move the fractional part left to get rid of the decimal point. - fraction_size = static_cast(fraction_end - begin - 1); - std::memmove(begin + 1, begin + 2, to_unsigned(fraction_size)); - } - buf.resize(to_unsigned(fraction_size) + offset + 1); - return exp - fraction_size; - } -} - -// A public domain branchless UTF-8 decoder by Christopher Wellons: -// https://github.com/skeeto/branchless-utf8 -/* Decode the next character, c, from buf, reporting errors in e. - * - * Since this is a branchless decoder, four bytes will be read from the - * buffer regardless of the actual length of the next character. This - * means the buffer _must_ have at least three bytes of zero padding - * following the end of the data stream. - * - * Errors are reported in e, which will be non-zero if the parsed - * character was somehow invalid: invalid byte sequence, non-canonical - * encoding, or a surrogate half. - * - * The function returns a pointer to the next character. When an error - * occurs, this pointer will be a guess that depends on the particular - * error, but it will always advance at least one byte. - */ -FMT_FUNC const char* utf8_decode(const char* buf, uint32_t* c, int* e) { - static const char lengths[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 2, 2, 3, 3, 4, 0}; - static const int masks[] = {0x00, 0x7f, 0x1f, 0x0f, 0x07}; - static const uint32_t mins[] = {4194304, 0, 128, 2048, 65536}; - static const int shiftc[] = {0, 18, 12, 6, 0}; - static const int shifte[] = {0, 6, 4, 2, 0}; - - auto s = reinterpret_cast(buf); - int len = lengths[s[0] >> 3]; - - // Compute the pointer to the next character early so that the next - // iteration can start working on the next character. Neither Clang - // nor GCC figure out this reordering on their own. - const char* next = buf + len + !len; - - // Assume a four-byte character and load four bytes. Unused bits are - // shifted out. - *c = uint32_t(s[0] & masks[len]) << 18; - *c |= uint32_t(s[1] & 0x3f) << 12; - *c |= uint32_t(s[2] & 0x3f) << 6; - *c |= uint32_t(s[3] & 0x3f) << 0; - *c >>= shiftc[len]; - - // Accumulate the various error conditions. - *e = (*c < mins[len]) << 6; // non-canonical encoding - *e |= ((*c >> 11) == 0x1b) << 7; // surrogate half? - *e |= (*c > 0x10FFFF) << 8; // out of range? - *e |= (s[1] & 0xc0) >> 2; - *e |= (s[2] & 0xc0) >> 4; - *e |= (s[3]) >> 6; - *e ^= 0x2a; // top two bits of each tail byte correct? - *e >>= shifte[len]; - - return next; -} -} // namespace detail - -template <> struct formatter { - format_parse_context::iterator parse(format_parse_context& ctx) { - return ctx.begin(); - } - - format_context::iterator format(const detail::bigint& n, - format_context& ctx) { - auto out = ctx.out(); - bool first = true; - for (auto i = n.bigits_.size(); i > 0; --i) { - auto value = n.bigits_[i - 1u]; - if (first) { - out = format_to(out, "{:x}", value); - first = false; - continue; - } - out = format_to(out, "{:08x}", value); - } - if (n.exp_ > 0) - out = format_to(out, "p{}", n.exp_ * detail::bigint::bigit_bits); - return out; - } -}; - -FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { - auto transcode = [this](const char* p) { - auto cp = uint32_t(); - auto error = 0; - p = utf8_decode(p, &cp, &error); - if (error != 0) FMT_THROW(std::runtime_error("invalid utf8")); - if (cp <= 0xFFFF) { - buffer_.push_back(static_cast(cp)); - } else { - cp -= 0x10000; - buffer_.push_back(static_cast(0xD800 + (cp >> 10))); - buffer_.push_back(static_cast(0xDC00 + (cp & 0x3FF))); - } - return p; - }; - auto p = s.data(); - const size_t block_size = 4; // utf8_decode always reads blocks of 4 chars. - if (s.size() >= block_size) { - for (auto end = p + s.size() - block_size + 1; p < end;) p = transcode(p); - } - if (auto num_chars_left = s.data() + s.size() - p) { - char buf[2 * block_size - 1] = {}; - memcpy(buf, p, to_unsigned(num_chars_left)); - p = buf; - do { - p = transcode(p); - } while (p - buf < num_chars_left); - } - buffer_.push_back(0); -} - -FMT_FUNC void format_system_error(detail::buffer& out, int error_code, - string_view message) FMT_NOEXCEPT { - FMT_TRY { - memory_buffer buf; - buf.resize(inline_buffer_size); - for (;;) { - char* system_message = &buf[0]; - int result = - detail::safe_strerror(error_code, system_message, buf.size()); - if (result == 0) { - format_to(std::back_inserter(out), "{}: {}", message, system_message); - return; - } - if (result != ERANGE) - break; // Can't get error message, report error code instead. - buf.resize(buf.size() * 2); - } - } - FMT_CATCH(...) {} - format_error_code(out, error_code, message); -} - -FMT_FUNC void detail::error_handler::on_error(const char* message) { - FMT_THROW(format_error(message)); -} - -FMT_FUNC void report_system_error(int error_code, - fmt::string_view message) FMT_NOEXCEPT { - report_error(format_system_error, error_code, message); -} - -struct stringifier { - template FMT_INLINE std::string operator()(T value) const { - return to_string(value); - } - std::string operator()(basic_format_arg::handle h) const { - memory_buffer buf; - detail::buffer& base = buf; - format_parse_context parse_ctx({}); - format_context format_ctx(std::back_inserter(base), {}, {}); - h.format(parse_ctx, format_ctx); - return to_string(buf); - } -}; - -FMT_FUNC std::string detail::vformat(string_view format_str, format_args args) { - if (format_str.size() == 2 && equal2(format_str.data(), "{}")) { - auto arg = args.get(0); - if (!arg) error_handler().on_error("argument not found"); - return visit_format_arg(stringifier(), arg); - } - memory_buffer buffer; - detail::vformat_to(buffer, format_str, args); - return to_string(buffer); -} - -FMT_FUNC void vprint(std::FILE* f, string_view format_str, format_args args) { - memory_buffer buffer; - detail::vformat_to(buffer, format_str, - basic_format_args>(args)); -#ifdef _WIN32 - auto fd = _fileno(f); - if (_isatty(fd)) { - detail::utf8_to_utf16 u16(string_view(buffer.data(), buffer.size())); - auto written = DWORD(); - if (!WriteConsoleW(reinterpret_cast(_get_osfhandle(fd)), - u16.c_str(), static_cast(u16.size()), &written, - nullptr)) { - FMT_THROW(format_error("failed to write to console")); - } - return; - } -#endif - detail::fwrite_fully(buffer.data(), 1, buffer.size(), f); -} - -#ifdef _WIN32 -// Print assuming legacy (non-Unicode) encoding. -FMT_FUNC void detail::vprint_mojibake(std::FILE* f, string_view format_str, - format_args args) { - memory_buffer buffer; - detail::vformat_to(buffer, format_str, - basic_format_args>(args)); - fwrite_fully(buffer.data(), 1, buffer.size(), f); -} -#endif - -FMT_FUNC void vprint(string_view format_str, format_args args) { - vprint(stdout, format_str, args); -} - -FMT_END_NAMESPACE - -#ifdef _MSC_VER -# pragma warning(pop) -#endif - -#endif // FMT_FORMAT_INL_H_ diff --git a/ThirdParty/fmtlib/include/fmt/format.h b/ThirdParty/fmtlib/include/fmt/format.h deleted file mode 100644 index 17509b7b45..0000000000 --- a/ThirdParty/fmtlib/include/fmt/format.h +++ /dev/null @@ -1,3729 +0,0 @@ -/* - Formatting library for C++ - - Copyright (c) 2012 - present, Victor Zverovich - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --- Optional exception to the license --- - - As an exception, if, as a result of your compiling your source code, portions - of this Software are embedded into a machine-executable object form of such - source code, you may redistribute such embedded portions in such object form - without including the above copyright and permission notices. - */ - -#ifndef FMT_FORMAT_H_ -#define FMT_FORMAT_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include "core.h" - -#ifdef __INTEL_COMPILER -# define FMT_ICC_VERSION __INTEL_COMPILER -#elif defined(__ICL) -# define FMT_ICC_VERSION __ICL -#else -# define FMT_ICC_VERSION 0 -#endif - -#ifdef __NVCC__ -# define FMT_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__) -#else -# define FMT_CUDA_VERSION 0 -#endif - -#ifdef __has_builtin -# define FMT_HAS_BUILTIN(x) __has_builtin(x) -#else -# define FMT_HAS_BUILTIN(x) 0 -#endif - -#if FMT_GCC_VERSION || FMT_CLANG_VERSION -# define FMT_NOINLINE __attribute__((noinline)) -#else -# define FMT_NOINLINE -#endif - -#if __cplusplus == 201103L || __cplusplus == 201402L -# if defined(__clang__) -# define FMT_FALLTHROUGH [[clang::fallthrough]] -# elif FMT_GCC_VERSION >= 700 && !defined(__PGI) && \ - (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 520) -# define FMT_FALLTHROUGH [[gnu::fallthrough]] -# else -# define FMT_FALLTHROUGH -# endif -#elif FMT_HAS_CPP17_ATTRIBUTE(fallthrough) || \ - (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) -# define FMT_FALLTHROUGH [[fallthrough]] -#else -# define FMT_FALLTHROUGH -#endif - -#ifndef FMT_MAYBE_UNUSED -# if FMT_HAS_CPP17_ATTRIBUTE(maybe_unused) -# define FMT_MAYBE_UNUSED [[maybe_unused]] -# else -# define FMT_MAYBE_UNUSED -# endif -#endif - -#ifndef FMT_THROW -# if FMT_EXCEPTIONS -# if FMT_MSC_VER || FMT_NVCC -FMT_BEGIN_NAMESPACE -namespace detail { -template inline void do_throw(const Exception& x) { - // Silence unreachable code warnings in MSVC and NVCC because these - // are nearly impossible to fix in a generic code. - volatile bool b = true; - if (b) throw x; -} -} // namespace detail -FMT_END_NAMESPACE -# define FMT_THROW(x) detail::do_throw(x) -# else -# define FMT_THROW(x) throw x -# endif -# else -# define FMT_THROW(x) \ - do { \ - static_cast(sizeof(x)); \ - FMT_ASSERT(false, ""); \ - } while (false) -# endif -#endif - -#if FMT_EXCEPTIONS -# define FMT_TRY try -# define FMT_CATCH(x) catch (x) -#else -# define FMT_TRY if (true) -# define FMT_CATCH(x) if (false) -#endif - -#ifndef FMT_USE_USER_DEFINED_LITERALS -// EDG based compilers (Intel, NVIDIA, Elbrus, etc), GCC and MSVC support UDLs. -# if (FMT_HAS_FEATURE(cxx_user_literals) || FMT_GCC_VERSION >= 407 || \ - FMT_MSC_VER >= 1900) && \ - (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= /* UDL feature */ 480) -# define FMT_USE_USER_DEFINED_LITERALS 1 -# else -# define FMT_USE_USER_DEFINED_LITERALS 0 -# endif -#endif - -#ifndef FMT_USE_UDL_TEMPLATE -// EDG frontend based compilers (icc, nvcc, etc) and GCC < 6.4 do not properly -// support UDL templates and GCC >= 9 warns about them. -# if FMT_USE_USER_DEFINED_LITERALS && \ - (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 501) && \ - ((FMT_GCC_VERSION >= 604 && __cplusplus >= 201402L) || \ - FMT_CLANG_VERSION >= 304) -# define FMT_USE_UDL_TEMPLATE 1 -# else -# define FMT_USE_UDL_TEMPLATE 0 -# endif -#endif - -#ifndef FMT_USE_FLOAT -# define FMT_USE_FLOAT 1 -#endif - -#ifndef FMT_USE_DOUBLE -# define FMT_USE_DOUBLE 1 -#endif - -#ifndef FMT_USE_LONG_DOUBLE -# define FMT_USE_LONG_DOUBLE 1 -#endif - -// __builtin_clz is broken in clang with Microsoft CodeGen: -// https://github.com/fmtlib/fmt/issues/519 -#if (FMT_GCC_VERSION || FMT_HAS_BUILTIN(__builtin_clz)) && !FMT_MSC_VER -# define FMT_BUILTIN_CLZ(n) __builtin_clz(n) -#endif -#if (FMT_GCC_VERSION || FMT_HAS_BUILTIN(__builtin_clzll)) && !FMT_MSC_VER -# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) -#endif - -// Some compilers masquerade as both MSVC and GCC-likes or otherwise support -// __builtin_clz and __builtin_clzll, so only define FMT_BUILTIN_CLZ using the -// MSVC intrinsics if the clz and clzll builtins are not available. -#if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) && !defined(_MANAGED) -# include // _BitScanReverse, _BitScanReverse64 - -FMT_BEGIN_NAMESPACE -namespace detail { -// Avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning. -# ifndef __clang__ -# pragma intrinsic(_BitScanReverse) -# endif -inline uint32_t clz(uint32_t x) { - unsigned long r = 0; - _BitScanReverse(&r, x); - - FMT_ASSERT(x != 0, ""); - // Static analysis complains about using uninitialized data - // "r", but the only way that can happen is if "x" is 0, - // which the callers guarantee to not happen. - FMT_SUPPRESS_MSC_WARNING(6102) - return 31 - r; -} -# define FMT_BUILTIN_CLZ(n) detail::clz(n) - -# if defined(_WIN64) && !defined(__clang__) -# pragma intrinsic(_BitScanReverse64) -# endif - -inline uint32_t clzll(uint64_t x) { - unsigned long r = 0; -# ifdef _WIN64 - _BitScanReverse64(&r, x); -# else - // Scan the high 32 bits. - if (_BitScanReverse(&r, static_cast(x >> 32))) return 63 - (r + 32); - - // Scan the low 32 bits. - _BitScanReverse(&r, static_cast(x)); -# endif - - FMT_ASSERT(x != 0, ""); - // Static analysis complains about using uninitialized data - // "r", but the only way that can happen is if "x" is 0, - // which the callers guarantee to not happen. - FMT_SUPPRESS_MSC_WARNING(6102) - return 63 - r; -} -# define FMT_BUILTIN_CLZLL(n) detail::clzll(n) -} // namespace detail -FMT_END_NAMESPACE -#endif - -// Enable the deprecated numeric alignment. -#ifndef FMT_DEPRECATED_NUMERIC_ALIGN -# define FMT_DEPRECATED_NUMERIC_ALIGN 0 -#endif - -FMT_BEGIN_NAMESPACE -namespace detail { - -// An equivalent of `*reinterpret_cast(&source)` that doesn't have -// undefined behavior (e.g. due to type aliasing). -// Example: uint64_t d = bit_cast(2.718); -template -inline Dest bit_cast(const Source& source) { - static_assert(sizeof(Dest) == sizeof(Source), "size mismatch"); - Dest dest; - std::memcpy(&dest, &source, sizeof(dest)); - return dest; -} - -inline bool is_big_endian() { - const auto u = 1u; - struct bytes { - char data[sizeof(u)]; - }; - return bit_cast(u).data[0] == 0; -} - -// A fallback implementation of uintptr_t for systems that lack it. -struct fallback_uintptr { - unsigned char value[sizeof(void*)]; - - fallback_uintptr() = default; - explicit fallback_uintptr(const void* p) { - *this = bit_cast(p); - if (is_big_endian()) { - for (size_t i = 0, j = sizeof(void*) - 1; i < j; ++i, --j) - std::swap(value[i], value[j]); - } - } -}; -#ifdef UINTPTR_MAX -using uintptr_t = ::uintptr_t; -inline uintptr_t to_uintptr(const void* p) { return bit_cast(p); } -#else -using uintptr_t = fallback_uintptr; -inline fallback_uintptr to_uintptr(const void* p) { - return fallback_uintptr(p); -} -#endif - -// Returns the largest possible value for type T. Same as -// std::numeric_limits::max() but shorter and not affected by the max macro. -template constexpr T max_value() { - return (std::numeric_limits::max)(); -} -template constexpr int num_bits() { - return std::numeric_limits::digits; -} -// std::numeric_limits::digits may return 0 for 128-bit ints. -template <> constexpr int num_bits() { return 128; } -template <> constexpr int num_bits() { return 128; } -template <> constexpr int num_bits() { - return static_cast(sizeof(void*) * - std::numeric_limits::digits); -} - -FMT_INLINE void assume(bool condition) { - (void)condition; -#if FMT_HAS_BUILTIN(__builtin_assume) - __builtin_assume(condition); -#endif -} - -// A workaround for gcc 4.8 to make void_t work in a SFINAE context. -template struct void_t_impl { using type = void; }; - -template -using void_t = typename detail::void_t_impl::type; - -// An approximation of iterator_t for pre-C++20 systems. -template -using iterator_t = decltype(std::begin(std::declval())); -template using sentinel_t = decltype(std::end(std::declval())); - -// Detect the iterator category of *any* given type in a SFINAE-friendly way. -// Unfortunately, older implementations of std::iterator_traits are not safe -// for use in a SFINAE-context. -template -struct iterator_category : std::false_type {}; - -template struct iterator_category { - using type = std::random_access_iterator_tag; -}; - -template -struct iterator_category> { - using type = typename It::iterator_category; -}; - -// Detect if *any* given type models the OutputIterator concept. -template class is_output_iterator { - // Check for mutability because all iterator categories derived from - // std::input_iterator_tag *may* also meet the requirements of an - // OutputIterator, thereby falling into the category of 'mutable iterators' - // [iterator.requirements.general] clause 4. The compiler reveals this - // property only at the point of *actually dereferencing* the iterator! - template - static decltype(*(std::declval())) test(std::input_iterator_tag); - template static char& test(std::output_iterator_tag); - template static const char& test(...); - - using type = decltype(test(typename iterator_category::type{})); - - public: - enum { value = !std::is_const>::value }; -}; - -// A workaround for std::string not having mutable data() until C++17. -template inline Char* get_data(std::basic_string& s) { - return &s[0]; -} -template -inline typename Container::value_type* get_data(Container& c) { - return c.data(); -} - -#if defined(_SECURE_SCL) && _SECURE_SCL -// Make a checked iterator to avoid MSVC warnings. -template using checked_ptr = stdext::checked_array_iterator; -template checked_ptr make_checked(T* p, size_t size) { - return {p, size}; -} -#else -template using checked_ptr = T*; -template inline T* make_checked(T* p, size_t) { return p; } -#endif - -template ::value)> -#if FMT_CLANG_VERSION -__attribute__((no_sanitize("undefined"))) -#endif -inline checked_ptr -reserve(std::back_insert_iterator it, size_t n) { - Container& c = get_container(it); - size_t size = c.size(); - c.resize(size + n); - return make_checked(get_data(c) + size, n); -} - -template inline Iterator& reserve(Iterator& it, size_t) { - return it; -} - -template ::value)> -inline std::back_insert_iterator base_iterator( - std::back_insert_iterator& it, - checked_ptr) { - return it; -} - -template -inline Iterator base_iterator(Iterator, Iterator it) { - return it; -} - -// An output iterator that counts the number of objects written to it and -// discards them. -class counting_iterator { - private: - size_t count_; - - public: - using iterator_category = std::output_iterator_tag; - using difference_type = std::ptrdiff_t; - using pointer = void; - using reference = void; - using _Unchecked_type = counting_iterator; // Mark iterator as checked. - - struct value_type { - template void operator=(const T&) {} - }; - - counting_iterator() : count_(0) {} - - size_t count() const { return count_; } - - counting_iterator& operator++() { - ++count_; - return *this; - } - - counting_iterator operator++(int) { - auto it = *this; - ++*this; - return it; - } - - value_type operator*() const { return {}; } -}; - -template class truncating_iterator_base { - protected: - OutputIt out_; - size_t limit_; - size_t count_; - - truncating_iterator_base(OutputIt out, size_t limit) - : out_(out), limit_(limit), count_(0) {} - - public: - using iterator_category = std::output_iterator_tag; - using value_type = typename std::iterator_traits::value_type; - using difference_type = void; - using pointer = void; - using reference = void; - using _Unchecked_type = - truncating_iterator_base; // Mark iterator as checked. - - OutputIt base() const { return out_; } - size_t count() const { return count_; } -}; - -// An output iterator that truncates the output and counts the number of objects -// written to it. -template ::value_type>::type> -class truncating_iterator; - -template -class truncating_iterator - : public truncating_iterator_base { - mutable typename truncating_iterator_base::value_type blackhole_; - - public: - using value_type = typename truncating_iterator_base::value_type; - - truncating_iterator(OutputIt out, size_t limit) - : truncating_iterator_base(out, limit) {} - - truncating_iterator& operator++() { - if (this->count_++ < this->limit_) ++this->out_; - return *this; - } - - truncating_iterator operator++(int) { - auto it = *this; - ++*this; - return it; - } - - value_type& operator*() const { - return this->count_ < this->limit_ ? *this->out_ : blackhole_; - } -}; - -template -class truncating_iterator - : public truncating_iterator_base { - public: - truncating_iterator(OutputIt out, size_t limit) - : truncating_iterator_base(out, limit) {} - - template truncating_iterator& operator=(T val) { - if (this->count_++ < this->limit_) *this->out_++ = val; - return *this; - } - - truncating_iterator& operator++() { return *this; } - truncating_iterator& operator++(int) { return *this; } - truncating_iterator& operator*() { return *this; } -}; - -template -inline size_t count_code_points(basic_string_view s) { - return s.size(); -} - -// Counts the number of code points in a UTF-8 string. -inline size_t count_code_points(basic_string_view s) { - const char* data = s.data(); - size_t num_code_points = 0; - for (size_t i = 0, size = s.size(); i != size; ++i) { - if ((data[i] & 0xc0) != 0x80) ++num_code_points; - } - return num_code_points; -} - -inline size_t count_code_points(basic_string_view s) { - return count_code_points(basic_string_view( - reinterpret_cast(s.data()), s.size())); -} - -template -inline size_t code_point_index(basic_string_view s, size_t n) { - size_t size = s.size(); - return n < size ? n : size; -} - -// Calculates the index of the nth code point in a UTF-8 string. -inline size_t code_point_index(basic_string_view s, size_t n) { - const char8_type* data = s.data(); - size_t num_code_points = 0; - for (size_t i = 0, size = s.size(); i != size; ++i) { - if ((data[i] & 0xc0) != 0x80 && ++num_code_points > n) { - return i; - } - } - return s.size(); -} - -template -using needs_conversion = bool_constant< - std::is_same::value_type, - char>::value && - std::is_same::value>; - -template ::value)> -OutputIt copy_str(InputIt begin, InputIt end, OutputIt it) { - return std::copy(begin, end, it); -} - -template ::value)> -OutputIt copy_str(InputIt begin, InputIt end, OutputIt it) { - return std::transform(begin, end, it, - [](char c) { return static_cast(c); }); -} - -#ifndef FMT_USE_GRISU -# define FMT_USE_GRISU 1 -#endif - -template constexpr bool use_grisu() { - return FMT_USE_GRISU && std::numeric_limits::is_iec559 && - sizeof(T) <= sizeof(double); -} - -template -template -void buffer::append(const U* begin, const U* end) { - size_t new_size = size_ + to_unsigned(end - begin); - reserve(new_size); - std::uninitialized_copy(begin, end, - make_checked(ptr_ + size_, capacity_ - size_)); - size_ = new_size; -} -} // namespace detail - -// The number of characters to store in the basic_memory_buffer object itself -// to avoid dynamic memory allocation. -enum { inline_buffer_size = 500 }; - -/** - \rst - A dynamically growing memory buffer for trivially copyable/constructible types - with the first ``SIZE`` elements stored in the object itself. - - You can use one of the following type aliases for common character types: - - +----------------+------------------------------+ - | Type | Definition | - +================+==============================+ - | memory_buffer | basic_memory_buffer | - +----------------+------------------------------+ - | wmemory_buffer | basic_memory_buffer | - +----------------+------------------------------+ - - **Example**:: - - fmt::memory_buffer out; - format_to(out, "The answer is {}.", 42); - - This will append the following output to the ``out`` object: - - .. code-block:: none - - The answer is 42. - - The output can be converted to an ``std::string`` with ``to_string(out)``. - \endrst - */ -template > -class basic_memory_buffer : public detail::buffer { - private: - T store_[SIZE]; - - // Don't inherit from Allocator avoid generating type_info for it. - Allocator alloc_; - - // Deallocate memory allocated by the buffer. - void deallocate() { - T* data = this->data(); - if (data != store_) alloc_.deallocate(data, this->capacity()); - } - - protected: - void grow(size_t size) FMT_OVERRIDE; - - public: - using value_type = T; - using const_reference = const T&; - - explicit basic_memory_buffer(const Allocator& alloc = Allocator()) - : alloc_(alloc) { - this->set(store_, SIZE); - } - ~basic_memory_buffer() FMT_OVERRIDE { deallocate(); } - - private: - // Move data from other to this buffer. - void move(basic_memory_buffer& other) { - alloc_ = std::move(other.alloc_); - T* data = other.data(); - size_t size = other.size(), capacity = other.capacity(); - if (data == other.store_) { - this->set(store_, capacity); - std::uninitialized_copy(other.store_, other.store_ + size, - detail::make_checked(store_, capacity)); - } else { - this->set(data, capacity); - // Set pointer to the inline array so that delete is not called - // when deallocating. - other.set(other.store_, 0); - } - this->resize(size); - } - - public: - /** - \rst - Constructs a :class:`fmt::basic_memory_buffer` object moving the content - of the other object to it. - \endrst - */ - basic_memory_buffer(basic_memory_buffer&& other) FMT_NOEXCEPT { move(other); } - - /** - \rst - Moves the content of the other ``basic_memory_buffer`` object to this one. - \endrst - */ - basic_memory_buffer& operator=(basic_memory_buffer&& other) FMT_NOEXCEPT { - FMT_ASSERT(this != &other, ""); - deallocate(); - move(other); - return *this; - } - - // Returns a copy of the allocator associated with this buffer. - Allocator get_allocator() const { return alloc_; } -}; - -template -void basic_memory_buffer::grow(size_t size) { -#ifdef FMT_FUZZ - if (size > 5000) throw std::runtime_error("fuzz mode - won't grow that much"); -#endif - size_t old_capacity = this->capacity(); - size_t new_capacity = old_capacity + old_capacity / 2; - if (size > new_capacity) new_capacity = size; - T* old_data = this->data(); - T* new_data = - std::allocator_traits::allocate(alloc_, new_capacity); - // The following code doesn't throw, so the raw pointer above doesn't leak. - std::uninitialized_copy(old_data, old_data + this->size(), - detail::make_checked(new_data, new_capacity)); - this->set(new_data, new_capacity); - // deallocate must not throw according to the standard, but even if it does, - // the buffer already uses the new storage and will deallocate it in - // destructor. - if (old_data != store_) alloc_.deallocate(old_data, old_capacity); -} - -using memory_buffer = basic_memory_buffer; -using wmemory_buffer = basic_memory_buffer; - -template -struct is_contiguous> : std::true_type { -}; - -/** A formatting error such as invalid format string. */ -FMT_CLASS_API -class FMT_API format_error : public std::runtime_error { - public: - explicit format_error(const char* message) : std::runtime_error(message) {} - explicit format_error(const std::string& message) - : std::runtime_error(message) {} - format_error(const format_error&) = default; - format_error& operator=(const format_error&) = default; - format_error(format_error&&) = default; - format_error& operator=(format_error&&) = default; - ~format_error() FMT_NOEXCEPT FMT_OVERRIDE; -}; - -namespace detail { - -template -using is_signed = - std::integral_constant::is_signed || - std::is_same::value>; - -// Returns true if value is negative, false otherwise. -// Same as `value < 0` but doesn't produce warnings if T is an unsigned type. -template ::value)> -FMT_CONSTEXPR bool is_negative(T value) { - return value < 0; -} -template ::value)> -FMT_CONSTEXPR bool is_negative(T) { - return false; -} - -template ::value)> -FMT_CONSTEXPR bool is_supported_floating_point(T) { - return (std::is_same::value && FMT_USE_FLOAT) || - (std::is_same::value && FMT_USE_DOUBLE) || - (std::is_same::value && FMT_USE_LONG_DOUBLE); -} - -// Smallest of uint32_t, uint64_t, uint128_t that is large enough to -// represent all values of T. -template -using uint32_or_64_or_128_t = - conditional_t() <= 32, uint32_t, - conditional_t() <= 64, uint64_t, uint128_t>>; - -// Static data is placed in this class template for the header-only config. -template struct FMT_EXTERN_TEMPLATE_API basic_data { - static const uint64_t powers_of_10_64[]; - static const uint32_t zero_or_powers_of_10_32[]; - static const uint64_t zero_or_powers_of_10_64[]; - static const uint64_t pow10_significands[]; - static const int16_t pow10_exponents[]; - // GCC generates slightly better code for pairs than chars. - using digit_pair = char[2]; - static const digit_pair digits[]; - static const char hex_digits[]; - static const char foreground_color[]; - static const char background_color[]; - static const char reset_color[5]; - static const wchar_t wreset_color[5]; - static const char signs[]; - static const char left_padding_shifts[5]; - static const char right_padding_shifts[5]; -}; - -#ifndef FMT_EXPORTED -FMT_EXTERN template struct basic_data; -#endif - -// This is a struct rather than an alias to avoid shadowing warnings in gcc. -struct data : basic_data<> {}; - -#ifdef FMT_BUILTIN_CLZLL -// Returns the number of decimal digits in n. Leading zeros are not counted -// except for n == 0 in which case count_digits returns 1. -inline int count_digits(uint64_t n) { - // Based on http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10 - // and the benchmark https://github.com/localvoid/cxx-benchmark-count-digits. - int t = (64 - FMT_BUILTIN_CLZLL(n | 1)) * 1233 >> 12; - return t - (n < data::zero_or_powers_of_10_64[t]) + 1; -} -#else -// Fallback version of count_digits used when __builtin_clz is not available. -inline int count_digits(uint64_t n) { - int count = 1; - for (;;) { - // Integer division is slow so do it for a group of four digits instead - // of for every digit. The idea comes from the talk by Alexandrescu - // "Three Optimization Tips for C++". See speed-test for a comparison. - if (n < 10) return count; - if (n < 100) return count + 1; - if (n < 1000) return count + 2; - if (n < 10000) return count + 3; - n /= 10000u; - count += 4; - } -} -#endif - -#if FMT_USE_INT128 -inline int count_digits(uint128_t n) { - int count = 1; - for (;;) { - // Integer division is slow so do it for a group of four digits instead - // of for every digit. The idea comes from the talk by Alexandrescu - // "Three Optimization Tips for C++". See speed-test for a comparison. - if (n < 10) return count; - if (n < 100) return count + 1; - if (n < 1000) return count + 2; - if (n < 10000) return count + 3; - n /= 10000U; - count += 4; - } -} -#endif - -// Counts the number of digits in n. BITS = log2(radix). -template inline int count_digits(UInt n) { - int num_digits = 0; - do { - ++num_digits; - } while ((n >>= BITS) != 0); - return num_digits; -} - -template <> int count_digits<4>(detail::fallback_uintptr n); - -#if FMT_GCC_VERSION || FMT_CLANG_VERSION -# define FMT_ALWAYS_INLINE inline __attribute__((always_inline)) -#else -# define FMT_ALWAYS_INLINE -#endif - -#ifdef FMT_BUILTIN_CLZ -// Optional version of count_digits for better performance on 32-bit platforms. -inline int count_digits(uint32_t n) { - int t = (32 - FMT_BUILTIN_CLZ(n | 1)) * 1233 >> 12; - return t - (n < data::zero_or_powers_of_10_32[t]) + 1; -} -#endif - -template constexpr int digits10() FMT_NOEXCEPT { - return std::numeric_limits::digits10; -} -template <> constexpr int digits10() FMT_NOEXCEPT { return 38; } -template <> constexpr int digits10() FMT_NOEXCEPT { return 38; } - -template FMT_API std::string grouping_impl(locale_ref loc); -template inline std::string grouping(locale_ref loc) { - return grouping_impl(loc); -} -template <> inline std::string grouping(locale_ref loc) { - return grouping_impl(loc); -} - -template FMT_API Char thousands_sep_impl(locale_ref loc); -template inline Char thousands_sep(locale_ref loc) { - return Char(thousands_sep_impl(loc)); -} -template <> inline wchar_t thousands_sep(locale_ref loc) { - return thousands_sep_impl(loc); -} - -template FMT_API Char decimal_point_impl(locale_ref loc); -template inline Char decimal_point(locale_ref loc) { - return Char(decimal_point_impl(loc)); -} -template <> inline wchar_t decimal_point(locale_ref loc) { - return decimal_point_impl(loc); -} - -// Compares two characters for equality. -template bool equal2(const Char* lhs, const char* rhs) { - return lhs[0] == rhs[0] && lhs[1] == rhs[1]; -} -inline bool equal2(const char* lhs, const char* rhs) { - return memcmp(lhs, rhs, 2) == 0; -} - -// Copies two characters from src to dst. -template void copy2(Char* dst, const char* src) { - *dst++ = static_cast(*src++); - *dst = static_cast(*src); -} -inline void copy2(char* dst, const char* src) { memcpy(dst, src, 2); } - -template struct format_decimal_result { - Iterator begin; - Iterator end; -}; - -// Formats a decimal unsigned integer value writing into out pointing to a -// buffer of specified size. The caller must ensure that the buffer is large -// enough. -template -inline format_decimal_result format_decimal(Char* out, UInt value, - int size) { - FMT_ASSERT(size >= count_digits(value), "invalid digit count"); - out += size; - Char* end = out; - while (value >= 100) { - // Integer division is slow so do it for a group of two digits instead - // of for every digit. The idea comes from the talk by Alexandrescu - // "Three Optimization Tips for C++". See speed-test for a comparison. - out -= 2; - copy2(out, data::digits[value % 100]); - value /= 100; - } - if (value < 10) { - *--out = static_cast('0' + value); - return {out, end}; - } - out -= 2; - copy2(out, data::digits[value]); - return {out, end}; -} - -template >::value)> -inline format_decimal_result format_decimal(Iterator out, UInt value, - int num_digits) { - // Buffer should be large enough to hold all digits (<= digits10 + 1). - enum { max_size = digits10() + 1 }; - Char buffer[2 * max_size]; - auto end = format_decimal(buffer, value, num_digits).end; - return {out, detail::copy_str(buffer, end, out)}; -} - -template -inline Char* format_uint(Char* buffer, UInt value, int num_digits, - bool upper = false) { - buffer += num_digits; - Char* end = buffer; - do { - const char* digits = upper ? "0123456789ABCDEF" : data::hex_digits; - unsigned digit = (value & ((1 << BASE_BITS) - 1)); - *--buffer = static_cast(BASE_BITS < 4 ? static_cast('0' + digit) - : digits[digit]); - } while ((value >>= BASE_BITS) != 0); - return end; -} - -template -Char* format_uint(Char* buffer, detail::fallback_uintptr n, int num_digits, - bool = false) { - auto char_digits = std::numeric_limits::digits / 4; - int start = (num_digits + char_digits - 1) / char_digits - 1; - if (int start_digits = num_digits % char_digits) { - unsigned value = n.value[start--]; - buffer = format_uint(buffer, value, start_digits); - } - for (; start >= 0; --start) { - unsigned value = n.value[start]; - buffer += char_digits; - auto p = buffer; - for (int i = 0; i < char_digits; ++i) { - unsigned digit = (value & ((1 << BASE_BITS) - 1)); - *--p = static_cast(data::hex_digits[digit]); - value >>= BASE_BITS; - } - } - return buffer; -} - -template -inline It format_uint(It out, UInt value, int num_digits, bool upper = false) { - // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). - char buffer[num_bits() / BASE_BITS + 1]; - format_uint(buffer, value, num_digits, upper); - return detail::copy_str(buffer, buffer + num_digits, out); -} - -// A converter from UTF-8 to UTF-16. -class utf8_to_utf16 { - private: - wmemory_buffer buffer_; - - public: - FMT_API explicit utf8_to_utf16(string_view s); - operator wstring_view() const { return {&buffer_[0], size()}; } - size_t size() const { return buffer_.size() - 1; } - const wchar_t* c_str() const { return &buffer_[0]; } - std::wstring str() const { return {&buffer_[0], size()}; } -}; - -template struct null {}; - -// Workaround an array initialization issue in gcc 4.8. -template struct fill_t { - private: - enum { max_size = 4 }; - Char data_[max_size]; - unsigned char size_; - - public: - FMT_CONSTEXPR void operator=(basic_string_view s) { - auto size = s.size(); - if (size > max_size) { - FMT_THROW(format_error("invalid fill")); - return; - } - for (size_t i = 0; i < size; ++i) data_[i] = s[i]; - size_ = static_cast(size); - } - - size_t size() const { return size_; } - const Char* data() const { return data_; } - - FMT_CONSTEXPR Char& operator[](size_t index) { return data_[index]; } - FMT_CONSTEXPR const Char& operator[](size_t index) const { - return data_[index]; - } - - static FMT_CONSTEXPR fill_t make() { - auto fill = fill_t(); - fill[0] = Char(' '); - fill.size_ = 1; - return fill; - } -}; -} // namespace detail - -// We cannot use enum classes as bit fields because of a gcc bug -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414. -namespace align { -enum type { none, left, right, center, numeric }; -} -using align_t = align::type; - -namespace sign { -enum type { none, minus, plus, space }; -} -using sign_t = sign::type; - -// Format specifiers for built-in and string types. -template struct basic_format_specs { - int width; - int precision; - char type; - align_t align : 4; - sign_t sign : 3; - bool alt : 1; // Alternate form ('#'). - detail::fill_t fill; - - constexpr basic_format_specs() - : width(0), - precision(-1), - type(0), - align(align::none), - sign(sign::none), - alt(false), - fill(detail::fill_t::make()) {} -}; - -using format_specs = basic_format_specs; - -namespace detail { - -// A floating-point presentation format. -enum class float_format : unsigned char { - general, // General: exponent notation or fixed point based on magnitude. - exp, // Exponent notation with the default precision of 6, e.g. 1.2e-3. - fixed, // Fixed point with the default precision of 6, e.g. 0.0012. - hex -}; - -struct float_specs { - int precision; - float_format format : 8; - sign_t sign : 8; - bool upper : 1; - bool locale : 1; - bool binary32 : 1; - bool use_grisu : 1; - bool showpoint : 1; -}; - -// Writes the exponent exp in the form "[+-]d{2,3}" to buffer. -template It write_exponent(int exp, It it) { - FMT_ASSERT(-10000 < exp && exp < 10000, "exponent out of range"); - if (exp < 0) { - *it++ = static_cast('-'); - exp = -exp; - } else { - *it++ = static_cast('+'); - } - if (exp >= 100) { - const char* top = data::digits[exp / 100]; - if (exp >= 1000) *it++ = static_cast(top[0]); - *it++ = static_cast(top[1]); - exp %= 100; - } - const char* d = data::digits[exp]; - *it++ = static_cast(d[0]); - *it++ = static_cast(d[1]); - return it; -} - -template class float_writer { - private: - // The number is given as v = digits_ * pow(10, exp_). - const char* digits_; - int num_digits_; - int exp_; - size_t size_; - float_specs specs_; - Char decimal_point_; - - template It prettify(It it) const { - // pow(10, full_exp - 1) <= v <= pow(10, full_exp). - int full_exp = num_digits_ + exp_; - if (specs_.format == float_format::exp) { - // Insert a decimal point after the first digit and add an exponent. - *it++ = static_cast(*digits_); - int num_zeros = specs_.precision - num_digits_; - if (num_digits_ > 1 || specs_.showpoint) *it++ = decimal_point_; - it = copy_str(digits_ + 1, digits_ + num_digits_, it); - if (num_zeros > 0 && specs_.showpoint) - it = std::fill_n(it, num_zeros, static_cast('0')); - *it++ = static_cast(specs_.upper ? 'E' : 'e'); - return write_exponent(full_exp - 1, it); - } - if (num_digits_ <= full_exp) { - // 1234e7 -> 12340000000[.0+] - it = copy_str(digits_, digits_ + num_digits_, it); - it = std::fill_n(it, full_exp - num_digits_, static_cast('0')); - if (specs_.showpoint || specs_.precision < 0) { - *it++ = decimal_point_; - int num_zeros = specs_.precision - full_exp; - if (num_zeros <= 0) { - if (specs_.format != float_format::fixed) - *it++ = static_cast('0'); - return it; - } -#ifdef FMT_FUZZ - if (num_zeros > 5000) - throw std::runtime_error("fuzz mode - avoiding excessive cpu use"); -#endif - it = std::fill_n(it, num_zeros, static_cast('0')); - } - } else if (full_exp > 0) { - // 1234e-2 -> 12.34[0+] - it = copy_str(digits_, digits_ + full_exp, it); - if (!specs_.showpoint) { - // Remove trailing zeros. - int num_digits = num_digits_; - while (num_digits > full_exp && digits_[num_digits - 1] == '0') - --num_digits; - if (num_digits != full_exp) *it++ = decimal_point_; - return copy_str(digits_ + full_exp, digits_ + num_digits, it); - } - *it++ = decimal_point_; - it = copy_str(digits_ + full_exp, digits_ + num_digits_, it); - if (specs_.precision > num_digits_) { - // Add trailing zeros. - int num_zeros = specs_.precision - num_digits_; - it = std::fill_n(it, num_zeros, static_cast('0')); - } - } else { - // 1234e-6 -> 0.001234 - *it++ = static_cast('0'); - int num_zeros = -full_exp; - int num_digits = num_digits_; - if (num_digits == 0 && specs_.precision >= 0 && - specs_.precision < num_zeros) { - num_zeros = specs_.precision; - } - // Remove trailing zeros. - if (!specs_.showpoint) - while (num_digits > 0 && digits_[num_digits - 1] == '0') --num_digits; - if (num_zeros != 0 || num_digits != 0 || specs_.showpoint) { - *it++ = decimal_point_; - it = std::fill_n(it, num_zeros, static_cast('0')); - it = copy_str(digits_, digits_ + num_digits, it); - } - } - return it; - } - - public: - float_writer(const char* digits, int num_digits, int exp, float_specs specs, - Char decimal_point) - : digits_(digits), - num_digits_(num_digits), - exp_(exp), - specs_(specs), - decimal_point_(decimal_point) { - int full_exp = num_digits + exp - 1; - int precision = specs.precision > 0 ? specs.precision : 16; - if (specs_.format == float_format::general && - !(full_exp >= -4 && full_exp < precision)) { - specs_.format = float_format::exp; - } - size_ = prettify(counting_iterator()).count(); - size_ += specs.sign ? 1 : 0; - } - - size_t size() const { return size_; } - - template It operator()(It it) const { - if (specs_.sign) *it++ = static_cast(data::signs[specs_.sign]); - return prettify(it); - } -}; - -template -int format_float(T value, int precision, float_specs specs, buffer& buf); - -// Formats a floating-point number with snprintf. -template -int snprintf_float(T value, int precision, float_specs specs, - buffer& buf); - -template T promote_float(T value) { return value; } -inline double promote_float(float value) { return static_cast(value); } - -template -FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) { - switch (spec) { - case 0: - case 'd': - handler.on_dec(); - break; - case 'x': - case 'X': - handler.on_hex(); - break; - case 'b': - case 'B': - handler.on_bin(); - break; - case 'o': - handler.on_oct(); - break; -#ifdef FMT_DEPRECATED_N_SPECIFIER - case 'n': -#endif - case 'L': - handler.on_num(); - break; - case 'c': - handler.on_chr(); - break; - default: - handler.on_error(); - } -} - -template -FMT_CONSTEXPR float_specs parse_float_type_spec( - const basic_format_specs& specs, ErrorHandler&& eh = {}) { - auto result = float_specs(); - result.showpoint = specs.alt; - switch (specs.type) { - case 0: - result.format = float_format::general; - result.showpoint |= specs.precision > 0; - break; - case 'G': - result.upper = true; - FMT_FALLTHROUGH; - case 'g': - result.format = float_format::general; - break; - case 'E': - result.upper = true; - FMT_FALLTHROUGH; - case 'e': - result.format = float_format::exp; - result.showpoint |= specs.precision != 0; - break; - case 'F': - result.upper = true; - FMT_FALLTHROUGH; - case 'f': - result.format = float_format::fixed; - result.showpoint |= specs.precision != 0; - break; - case 'A': - result.upper = true; - FMT_FALLTHROUGH; - case 'a': - result.format = float_format::hex; - break; -#ifdef FMT_DEPRECATED_N_SPECIFIER - case 'n': -#endif - case 'L': - result.locale = true; - break; - default: - eh.on_error("invalid type specifier"); - break; - } - return result; -} - -template -FMT_CONSTEXPR void handle_char_specs(const basic_format_specs* specs, - Handler&& handler) { - if (!specs) return handler.on_char(); - if (specs->type && specs->type != 'c') return handler.on_int(); - if (specs->align == align::numeric || specs->sign != sign::none || specs->alt) - handler.on_error("invalid format specifier for char"); - handler.on_char(); -} - -template -FMT_CONSTEXPR void handle_cstring_type_spec(Char spec, Handler&& handler) { - if (spec == 0 || spec == 's') - handler.on_string(); - else if (spec == 'p') - handler.on_pointer(); - else - handler.on_error("invalid type specifier"); -} - -template -FMT_CONSTEXPR void check_string_type_spec(Char spec, ErrorHandler&& eh) { - if (spec != 0 && spec != 's') eh.on_error("invalid type specifier"); -} - -template -FMT_CONSTEXPR void check_pointer_type_spec(Char spec, ErrorHandler&& eh) { - if (spec != 0 && spec != 'p') eh.on_error("invalid type specifier"); -} - -template class int_type_checker : private ErrorHandler { - public: - FMT_CONSTEXPR explicit int_type_checker(ErrorHandler eh) : ErrorHandler(eh) {} - - FMT_CONSTEXPR void on_dec() {} - FMT_CONSTEXPR void on_hex() {} - FMT_CONSTEXPR void on_bin() {} - FMT_CONSTEXPR void on_oct() {} - FMT_CONSTEXPR void on_num() {} - FMT_CONSTEXPR void on_chr() {} - - FMT_CONSTEXPR void on_error() { - ErrorHandler::on_error("invalid type specifier"); - } -}; - -template -class char_specs_checker : public ErrorHandler { - private: - char type_; - - public: - FMT_CONSTEXPR char_specs_checker(char type, ErrorHandler eh) - : ErrorHandler(eh), type_(type) {} - - FMT_CONSTEXPR void on_int() { - handle_int_type_spec(type_, int_type_checker(*this)); - } - FMT_CONSTEXPR void on_char() {} -}; - -template -class cstring_type_checker : public ErrorHandler { - public: - FMT_CONSTEXPR explicit cstring_type_checker(ErrorHandler eh) - : ErrorHandler(eh) {} - - FMT_CONSTEXPR void on_string() {} - FMT_CONSTEXPR void on_pointer() {} -}; - -template -FMT_NOINLINE OutputIt fill(OutputIt it, size_t n, const fill_t& fill) { - auto fill_size = fill.size(); - if (fill_size == 1) return std::fill_n(it, n, fill[0]); - for (size_t i = 0; i < n; ++i) it = std::copy_n(fill.data(), fill_size, it); - return it; -} - -// Writes the output of f, padded according to format specifications in specs. -// size: output size in code units. -// width: output display width in (terminal) column positions. -template -inline OutputIt write_padded(OutputIt out, - const basic_format_specs& specs, size_t size, - size_t width, const F& f) { - static_assert(align == align::left || align == align::right, ""); - unsigned spec_width = to_unsigned(specs.width); - size_t padding = spec_width > width ? spec_width - width : 0; - auto* shifts = align == align::left ? data::left_padding_shifts - : data::right_padding_shifts; - size_t left_padding = padding >> shifts[specs.align]; - auto it = reserve(out, size + padding * specs.fill.size()); - it = fill(it, left_padding, specs.fill); - it = f(it); - it = fill(it, padding - left_padding, specs.fill); - return base_iterator(out, it); -} - -template -inline OutputIt write_padded(OutputIt out, - const basic_format_specs& specs, size_t size, - const F& f) { - return write_padded(out, specs, size, size, f); -} - -template -OutputIt write_bytes(OutputIt out, string_view bytes, - const basic_format_specs& specs) { - using iterator = remove_reference_t; - return write_padded(out, specs, bytes.size(), [bytes](iterator it) { - const char* data = bytes.data(); - return copy_str(data, data + bytes.size(), it); - }); -} - -// Data for write_int that doesn't depend on output iterator type. It is used to -// avoid template code bloat. -template struct write_int_data { - size_t size; - size_t padding; - - write_int_data(int num_digits, string_view prefix, - const basic_format_specs& specs) - : size(prefix.size() + to_unsigned(num_digits)), padding(0) { - if (specs.align == align::numeric) { - auto width = to_unsigned(specs.width); - if (width > size) { - padding = width - size; - size = width; - } - } else if (specs.precision > num_digits) { - size = prefix.size() + to_unsigned(specs.precision); - padding = to_unsigned(specs.precision - num_digits); - } - } -}; - -// Writes an integer in the format -// -// where are written by f(it). -template -OutputIt write_int(OutputIt out, int num_digits, string_view prefix, - const basic_format_specs& specs, F f) { - auto data = write_int_data(num_digits, prefix, specs); - using iterator = remove_reference_t; - return write_padded(out, specs, data.size, [=](iterator it) { - if (prefix.size() != 0) - it = copy_str(prefix.begin(), prefix.end(), it); - it = std::fill_n(it, data.padding, static_cast('0')); - return f(it); - }); -} - -template -OutputIt write(OutputIt out, basic_string_view s, - const basic_format_specs& specs) { - auto data = s.data(); - auto size = s.size(); - if (specs.precision >= 0 && to_unsigned(specs.precision) < size) - size = code_point_index(s, to_unsigned(specs.precision)); - auto width = specs.width != 0 - ? count_code_points(basic_string_view(data, size)) - : 0; - using iterator = remove_reference_t; - return write_padded(out, specs, size, width, [=](iterator it) { - return copy_str(data, data + size, it); - }); -} - -// The handle_int_type_spec handler that writes an integer. -template struct int_writer { - OutputIt out; - locale_ref locale; - const basic_format_specs& specs; - UInt abs_value; - char prefix[4]; - unsigned prefix_size; - - using iterator = - remove_reference_t(), 0))>; - - string_view get_prefix() const { return string_view(prefix, prefix_size); } - - template - int_writer(OutputIt output, locale_ref loc, Int value, - const basic_format_specs& s) - : out(output), - locale(loc), - specs(s), - abs_value(static_cast(value)), - prefix_size(0) { - static_assert(std::is_same, UInt>::value, ""); - if (is_negative(value)) { - prefix[0] = '-'; - ++prefix_size; - abs_value = 0 - abs_value; - } else if (specs.sign != sign::none && specs.sign != sign::minus) { - prefix[0] = specs.sign == sign::plus ? '+' : ' '; - ++prefix_size; - } - } - - void on_dec() { - auto num_digits = count_digits(abs_value); - out = write_int( - out, num_digits, get_prefix(), specs, [this, num_digits](iterator it) { - return format_decimal(it, abs_value, num_digits).end; - }); - } - - void on_hex() { - if (specs.alt) { - prefix[prefix_size++] = '0'; - prefix[prefix_size++] = specs.type; - } - int num_digits = count_digits<4>(abs_value); - out = write_int(out, num_digits, get_prefix(), specs, - [this, num_digits](iterator it) { - return format_uint<4, Char>(it, abs_value, num_digits, - specs.type != 'x'); - }); - } - - void on_bin() { - if (specs.alt) { - prefix[prefix_size++] = '0'; - prefix[prefix_size++] = static_cast(specs.type); - } - int num_digits = count_digits<1>(abs_value); - out = write_int(out, num_digits, get_prefix(), specs, - [this, num_digits](iterator it) { - return format_uint<1, Char>(it, abs_value, num_digits); - }); - } - - void on_oct() { - int num_digits = count_digits<3>(abs_value); - if (specs.alt && specs.precision <= num_digits && abs_value != 0) { - // Octal prefix '0' is counted as a digit, so only add it if precision - // is not greater than the number of digits. - prefix[prefix_size++] = '0'; - } - out = write_int(out, num_digits, get_prefix(), specs, - [this, num_digits](iterator it) { - return format_uint<3, Char>(it, abs_value, num_digits); - }); - } - - enum { sep_size = 1 }; - - void on_num() { - std::string groups = grouping(locale); - if (groups.empty()) return on_dec(); - auto sep = thousands_sep(locale); - if (!sep) return on_dec(); - int num_digits = count_digits(abs_value); - int size = num_digits, n = num_digits; - std::string::const_iterator group = groups.cbegin(); - while (group != groups.cend() && n > *group && *group > 0 && - *group != max_value()) { - size += sep_size; - n -= *group; - ++group; - } - if (group == groups.cend()) size += sep_size * ((n - 1) / groups.back()); - char digits[40]; - format_decimal(digits, abs_value, num_digits); - basic_memory_buffer buffer; - size += prefix_size; - buffer.resize(size); - basic_string_view s(&sep, sep_size); - // Index of a decimal digit with the least significant digit having index 0. - int digit_index = 0; - group = groups.cbegin(); - auto p = buffer.data() + size; - for (int i = num_digits - 1; i >= 0; --i) { - *--p = static_cast(digits[i]); - if (*group <= 0 || ++digit_index % *group != 0 || - *group == max_value()) - continue; - if (group + 1 != groups.cend()) { - digit_index = 0; - ++group; - } - p -= s.size(); - std::uninitialized_copy(s.data(), s.data() + s.size(), - make_checked(p, s.size())); - } - if (prefix_size != 0) p[-1] = static_cast('-'); - using iterator = remove_reference_t; - auto data = buffer.data(); - out = write_padded(out, specs, size, size, [=](iterator it) { - return copy_str(data, data + size, it); - }); - } - - void on_chr() { *out++ = static_cast(abs_value); } - - FMT_NORETURN void on_error() { - FMT_THROW(format_error("invalid type specifier")); - } -}; - -template -OutputIt write_nonfinite(OutputIt out, bool isinf, - const basic_format_specs& specs, - const float_specs& fspecs) { - auto str = - isinf ? (fspecs.upper ? "INF" : "inf") : (fspecs.upper ? "NAN" : "nan"); - constexpr size_t str_size = 3; - auto sign = fspecs.sign; - auto size = str_size + (sign ? 1 : 0); - using iterator = remove_reference_t; - return write_padded(out, specs, size, [=](iterator it) { - if (sign) *it++ = static_cast(data::signs[sign]); - return copy_str(str, str + str_size, it); - }); -} - -template ::value)> -OutputIt write(OutputIt out, T value, basic_format_specs specs, - locale_ref loc = {}) { - if (const_check(!is_supported_floating_point(value))) return out; - float_specs fspecs = parse_float_type_spec(specs); - fspecs.sign = specs.sign; - if (std::signbit(value)) { // value < 0 is false for NaN so use signbit. - fspecs.sign = sign::minus; - value = -value; - } else if (fspecs.sign == sign::minus) { - fspecs.sign = sign::none; - } - - if (!std::isfinite(value)) - return write_nonfinite(out, std::isinf(value), specs, fspecs); - - if (specs.align == align::numeric && fspecs.sign) { - auto it = reserve(out, 1); - *it++ = static_cast(data::signs[fspecs.sign]); - out = base_iterator(out, it); - fspecs.sign = sign::none; - if (specs.width != 0) --specs.width; - } - - memory_buffer buffer; - if (fspecs.format == float_format::hex) { - if (fspecs.sign) buffer.push_back(data::signs[fspecs.sign]); - snprintf_float(promote_float(value), specs.precision, fspecs, buffer); - return write_bytes(out, {buffer.data(), buffer.size()}, specs); - } - int precision = specs.precision >= 0 || !specs.type ? specs.precision : 6; - if (fspecs.format == float_format::exp) { - if (precision == max_value()) - FMT_THROW(format_error("number is too big")); - else - ++precision; - } - if (const_check(std::is_same())) fspecs.binary32 = true; - fspecs.use_grisu = use_grisu(); - int exp = format_float(promote_float(value), precision, fspecs, buffer); - fspecs.precision = precision; - Char point = - fspecs.locale ? decimal_point(loc) : static_cast('.'); - float_writer w(buffer.data(), static_cast(buffer.size()), exp, - fspecs, point); - return write_padded(out, specs, w.size(), w); -} - -template ::value)> -OutputIt write(OutputIt out, T value) { - if (const_check(!is_supported_floating_point(value))) return out; - auto fspecs = float_specs(); - if (std::signbit(value)) { // value < 0 is false for NaN so use signbit. - fspecs.sign = sign::minus; - value = -value; - } - - auto specs = basic_format_specs(); - if (!std::isfinite(value)) - return write_nonfinite(out, std::isinf(value), specs, fspecs); - - memory_buffer buffer; - int precision = -1; - if (const_check(std::is_same())) fspecs.binary32 = true; - fspecs.use_grisu = use_grisu(); - int exp = format_float(promote_float(value), precision, fspecs, buffer); - fspecs.precision = precision; - float_writer w(buffer.data(), static_cast(buffer.size()), exp, - fspecs, static_cast('.')); - return base_iterator(out, w(reserve(out, w.size()))); -} - -template -OutputIt write_char(OutputIt out, Char value, - const basic_format_specs& specs) { - using iterator = remove_reference_t; - return write_padded(out, specs, 1, [=](iterator it) { - *it++ = value; - return it; - }); -} - -template -OutputIt write_ptr(OutputIt out, UIntPtr value, - const basic_format_specs* specs) { - int num_digits = count_digits<4>(value); - auto size = to_unsigned(num_digits) + size_t(2); - using iterator = remove_reference_t; - auto write = [=](iterator it) { - *it++ = static_cast('0'); - *it++ = static_cast('x'); - return format_uint<4, Char>(it, value, num_digits); - }; - return specs ? write_padded(out, *specs, size, write) - : base_iterator(out, write(reserve(out, size))); -} - -template struct is_integral : std::is_integral {}; -template <> struct is_integral : std::true_type {}; -template <> struct is_integral : std::true_type {}; - -template -OutputIt write(OutputIt out, monostate) { - FMT_ASSERT(false, ""); - return out; -} - -template ::value)> -OutputIt write(OutputIt out, string_view value) { - auto it = reserve(out, value.size()); - it = copy_str(value.begin(), value.end(), it); - return base_iterator(out, it); -} - -template -OutputIt write(OutputIt out, basic_string_view value) { - auto it = reserve(out, value.size()); - it = std::copy(value.begin(), value.end(), it); - return base_iterator(out, it); -} - -template ::value && - !std::is_same::value && - !std::is_same::value)> -OutputIt write(OutputIt out, T value) { - auto abs_value = static_cast>(value); - bool negative = is_negative(value); - // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. - if (negative) abs_value = ~abs_value + 1; - int num_digits = count_digits(abs_value); - auto it = reserve(out, (negative ? 1 : 0) + static_cast(num_digits)); - if (negative) *it++ = static_cast('-'); - it = format_decimal(it, abs_value, num_digits).end; - return base_iterator(out, it); -} - -template -OutputIt write(OutputIt out, bool value) { - return write(out, string_view(value ? "true" : "false")); -} - -template -OutputIt write(OutputIt out, Char value) { - auto it = reserve(out, 1); - *it++ = value; - return base_iterator(out, it); -} - -template -OutputIt write(OutputIt out, const Char* value) { - if (!value) { - FMT_THROW(format_error("string pointer is null")); - } else { - auto length = std::char_traits::length(value); - out = write(out, basic_string_view(value, length)); - } - return out; -} - -template -OutputIt write(OutputIt out, const void* value) { - return write_ptr(out, to_uintptr(value), nullptr); -} - -template -auto write(OutputIt out, const T& value) -> typename std::enable_if< - mapped_type_constant>::value == - type::custom_type, - OutputIt>::type { - basic_format_context ctx(out, {}, {}); - return formatter().format(value, ctx); -} - -// An argument visitor that formats the argument and writes it via the output -// iterator. It's a class and not a generic lambda for compatibility with C++11. -template struct default_arg_formatter { - using context = basic_format_context; - - OutputIt out; - basic_format_args args; - locale_ref loc; - - template OutputIt operator()(T value) { - return write(out, value); - } - - OutputIt operator()(typename basic_format_arg::handle handle) { - basic_format_parse_context parse_ctx({}); - basic_format_context format_ctx(out, args, loc); - handle.format(parse_ctx, format_ctx); - return format_ctx.out(); - } -}; - -template -class arg_formatter_base { - public: - using iterator = OutputIt; - using char_type = Char; - using format_specs = basic_format_specs; - - private: - iterator out_; - locale_ref locale_; - format_specs* specs_; - - // Attempts to reserve space for n extra characters in the output range. - // Returns a pointer to the reserved range or a reference to out_. - auto reserve(size_t n) -> decltype(detail::reserve(out_, n)) { - return detail::reserve(out_, n); - } - - using reserve_iterator = remove_reference_t(), 0))>; - - template void write_int(T value, const format_specs& spec) { - using uint_type = uint32_or_64_or_128_t; - int_writer w(out_, locale_, value, spec); - handle_int_type_spec(spec.type, w); - out_ = w.out; - } - - void write(char value) { - auto&& it = reserve(1); - *it++ = value; - } - - template ::value)> - void write(Ch value) { - out_ = detail::write(out_, value); - } - - void write(string_view value) { - auto&& it = reserve(value.size()); - it = copy_str(value.begin(), value.end(), it); - } - void write(wstring_view value) { - static_assert(std::is_same::value, ""); - auto&& it = reserve(value.size()); - it = std::copy(value.begin(), value.end(), it); - } - - template - void write(const Ch* s, size_t size, const format_specs& specs) { - auto width = specs.width != 0 - ? count_code_points(basic_string_view(s, size)) - : 0; - out_ = write_padded(out_, specs, size, width, [=](reserve_iterator it) { - return copy_str(s, s + size, it); - }); - } - - template - void write(basic_string_view s, const format_specs& specs = {}) { - out_ = detail::write(out_, s, specs); - } - - void write_pointer(const void* p) { - out_ = write_ptr(out_, to_uintptr(p), specs_); - } - - struct char_spec_handler : ErrorHandler { - arg_formatter_base& formatter; - Char value; - - char_spec_handler(arg_formatter_base& f, Char val) - : formatter(f), value(val) {} - - void on_int() { - // char is only formatted as int if there are specs. - formatter.write_int(static_cast(value), *formatter.specs_); - } - void on_char() { - if (formatter.specs_) - formatter.out_ = write_char(formatter.out_, value, *formatter.specs_); - else - formatter.write(value); - } - }; - - struct cstring_spec_handler : error_handler { - arg_formatter_base& formatter; - const Char* value; - - cstring_spec_handler(arg_formatter_base& f, const Char* val) - : formatter(f), value(val) {} - - void on_string() { formatter.write(value); } - void on_pointer() { formatter.write_pointer(value); } - }; - - protected: - iterator out() { return out_; } - format_specs* specs() { return specs_; } - - void write(bool value) { - if (specs_) - write(string_view(value ? "true" : "false"), *specs_); - else - out_ = detail::write(out_, value); - } - - void write(const Char* value) { - if (!value) { - FMT_THROW(format_error("string pointer is null")); - } else { - auto length = std::char_traits::length(value); - basic_string_view sv(value, length); - specs_ ? write(sv, *specs_) : write(sv); - } - } - - public: - arg_formatter_base(OutputIt out, format_specs* s, locale_ref loc) - : out_(out), locale_(loc), specs_(s) {} - - iterator operator()(monostate) { - FMT_ASSERT(false, "invalid argument type"); - return out_; - } - - template ::value)> - FMT_INLINE iterator operator()(T value) { - if (specs_) - write_int(value, *specs_); - else - out_ = detail::write(out_, value); - return out_; - } - - iterator operator()(Char value) { - handle_char_specs(specs_, - char_spec_handler(*this, static_cast(value))); - return out_; - } - - iterator operator()(bool value) { - if (specs_ && specs_->type) return (*this)(value ? 1 : 0); - write(value != 0); - return out_; - } - - template ::value)> - iterator operator()(T value) { - auto specs = specs_ ? *specs_ : format_specs(); - if (const_check(is_supported_floating_point(value))) - out_ = detail::write(out_, value, specs, locale_); - else - FMT_ASSERT(false, "unsupported float argument type"); - return out_; - } - - iterator operator()(const Char* value) { - if (!specs_) return write(value), out_; - handle_cstring_type_spec(specs_->type, cstring_spec_handler(*this, value)); - return out_; - } - - iterator operator()(basic_string_view value) { - if (specs_) { - check_string_type_spec(specs_->type, error_handler()); - write(value, *specs_); - } else { - write(value); - } - return out_; - } - - iterator operator()(const void* value) { - if (specs_) check_pointer_type_spec(specs_->type, error_handler()); - write_pointer(value); - return out_; - } -}; - -template FMT_CONSTEXPR bool is_name_start(Char c) { - return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c; -} - -// Parses the range [begin, end) as an unsigned integer. This function assumes -// that the range is non-empty and the first character is a digit. -template -FMT_CONSTEXPR int parse_nonnegative_int(const Char*& begin, const Char* end, - ErrorHandler&& eh) { - FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', ""); - unsigned value = 0; - // Convert to unsigned to prevent a warning. - constexpr unsigned max_int = max_value(); - unsigned big = max_int / 10; - do { - // Check for overflow. - if (value > big) { - value = max_int + 1; - break; - } - value = value * 10 + unsigned(*begin - '0'); - ++begin; - } while (begin != end && '0' <= *begin && *begin <= '9'); - if (value > max_int) eh.on_error("number is too big"); - return static_cast(value); -} - -template class custom_formatter { - private: - using char_type = typename Context::char_type; - - basic_format_parse_context& parse_ctx_; - Context& ctx_; - - public: - explicit custom_formatter(basic_format_parse_context& parse_ctx, - Context& ctx) - : parse_ctx_(parse_ctx), ctx_(ctx) {} - - bool operator()(typename basic_format_arg::handle h) const { - h.format(parse_ctx_, ctx_); - return true; - } - - template bool operator()(T) const { return false; } -}; - -template -using is_integer = - bool_constant::value && !std::is_same::value && - !std::is_same::value && - !std::is_same::value>; - -template class width_checker { - public: - explicit FMT_CONSTEXPR width_checker(ErrorHandler& eh) : handler_(eh) {} - - template ::value)> - FMT_CONSTEXPR unsigned long long operator()(T value) { - if (is_negative(value)) handler_.on_error("negative width"); - return static_cast(value); - } - - template ::value)> - FMT_CONSTEXPR unsigned long long operator()(T) { - handler_.on_error("width is not integer"); - return 0; - } - - private: - ErrorHandler& handler_; -}; - -template class precision_checker { - public: - explicit FMT_CONSTEXPR precision_checker(ErrorHandler& eh) : handler_(eh) {} - - template ::value)> - FMT_CONSTEXPR unsigned long long operator()(T value) { - if (is_negative(value)) handler_.on_error("negative precision"); - return static_cast(value); - } - - template ::value)> - FMT_CONSTEXPR unsigned long long operator()(T) { - handler_.on_error("precision is not integer"); - return 0; - } - - private: - ErrorHandler& handler_; -}; - -// A format specifier handler that sets fields in basic_format_specs. -template class specs_setter { - public: - explicit FMT_CONSTEXPR specs_setter(basic_format_specs& specs) - : specs_(specs) {} - - FMT_CONSTEXPR specs_setter(const specs_setter& other) - : specs_(other.specs_) {} - - FMT_CONSTEXPR void on_align(align_t align) { specs_.align = align; } - FMT_CONSTEXPR void on_fill(basic_string_view fill) { - specs_.fill = fill; - } - FMT_CONSTEXPR void on_plus() { specs_.sign = sign::plus; } - FMT_CONSTEXPR void on_minus() { specs_.sign = sign::minus; } - FMT_CONSTEXPR void on_space() { specs_.sign = sign::space; } - FMT_CONSTEXPR void on_hash() { specs_.alt = true; } - - FMT_CONSTEXPR void on_zero() { - specs_.align = align::numeric; - specs_.fill[0] = Char('0'); - } - - FMT_CONSTEXPR void on_width(int width) { specs_.width = width; } - FMT_CONSTEXPR void on_precision(int precision) { - specs_.precision = precision; - } - FMT_CONSTEXPR void end_precision() {} - - FMT_CONSTEXPR void on_type(Char type) { - specs_.type = static_cast(type); - } - - protected: - basic_format_specs& specs_; -}; - -template class numeric_specs_checker { - public: - FMT_CONSTEXPR numeric_specs_checker(ErrorHandler& eh, detail::type arg_type) - : error_handler_(eh), arg_type_(arg_type) {} - - FMT_CONSTEXPR void require_numeric_argument() { - if (!is_arithmetic_type(arg_type_)) - error_handler_.on_error("format specifier requires numeric argument"); - } - - FMT_CONSTEXPR void check_sign() { - require_numeric_argument(); - if (is_integral_type(arg_type_) && arg_type_ != type::int_type && - arg_type_ != type::long_long_type && arg_type_ != type::char_type) { - error_handler_.on_error("format specifier requires signed argument"); - } - } - - FMT_CONSTEXPR void check_precision() { - if (is_integral_type(arg_type_) || arg_type_ == type::pointer_type) - error_handler_.on_error("precision not allowed for this argument type"); - } - - private: - ErrorHandler& error_handler_; - detail::type arg_type_; -}; - -// A format specifier handler that checks if specifiers are consistent with the -// argument type. -template class specs_checker : public Handler { - private: - numeric_specs_checker checker_; - - // Suppress an MSVC warning about using this in initializer list. - FMT_CONSTEXPR Handler& error_handler() { return *this; } - - public: - FMT_CONSTEXPR specs_checker(const Handler& handler, detail::type arg_type) - : Handler(handler), checker_(error_handler(), arg_type) {} - - FMT_CONSTEXPR specs_checker(const specs_checker& other) - : Handler(other), checker_(error_handler(), other.arg_type_) {} - - FMT_CONSTEXPR void on_align(align_t align) { - if (align == align::numeric) checker_.require_numeric_argument(); - Handler::on_align(align); - } - - FMT_CONSTEXPR void on_plus() { - checker_.check_sign(); - Handler::on_plus(); - } - - FMT_CONSTEXPR void on_minus() { - checker_.check_sign(); - Handler::on_minus(); - } - - FMT_CONSTEXPR void on_space() { - checker_.check_sign(); - Handler::on_space(); - } - - FMT_CONSTEXPR void on_hash() { - checker_.require_numeric_argument(); - Handler::on_hash(); - } - - FMT_CONSTEXPR void on_zero() { - checker_.require_numeric_argument(); - Handler::on_zero(); - } - - FMT_CONSTEXPR void end_precision() { checker_.check_precision(); } -}; - -template