Commit Graph
41 Commits
Author SHA1 Message Date
Magne Sjaastad bf5d6e7465 * #14319 Compute all pending ensemble contour maps in one sweep over realizations
* #14319 Compute all pending ensemble contour maps in one sweep over realizations

* #14319 Initialize result definition and open primary case before building contour map grid

* Contour Map: Compute histogram from map projection values to show correct sample count in overlay info

* #14319 Add comments describing the realization sweep and grid caching

Document why the realization loop is the outer loop, when a realization case is
closed again after processing, and that the contour map grid doubles as the
"statistics computed" flag in ensureResultsComputed().
2026-08-05 14:34:38 +02:00
Magne Sjaastad 1aa95936fc #14362 Allow arbitrary Z-scale factor
Make the Z-scale combo boxes in the toolbar and property editor editable, so any positive scale value can be entered as text. Invalid input is rejected and the previous value is restored.

Add keyboard shortcuts Ctrl+Shift+Up and Ctrl+Shift+Down to step the Z-scale of the active view through the predefined scale values.
2026-08-04 12:50:34 +02:00
Magne Sjaastad 4c39ce3e6c #14404 Guard against whitespace in AppEnum serialization text and fix affected enums 2026-07-30 08:41:27 +02:00
Jon Jenssen d2d7c6ac61 First non-MDI version. Still some missing links and features. 2026-06-17 13:55:32 +02:00
Magne Sjaastad ed96d155fc #14007 Contour Map: rebuild projection when cached case data is stale
Reloading a grid file frees and recreates RigEclipseCaseData. The contour map projection caches raw pointers into the case data and previously only refreshed them when reset explicitly via RimReloadCaseTools::updateAll3dViews(). Callers of RimEclipseCase::reloadEclipseGridFile() that bypass updateAll3dViews(), such as RimOpmFlowJob::onCompleted(), left the projection holding dangling pointers that crashed in generateResults/hasResultEntry on the next redraw. The projection now detects that its cached RigEclipseCaseData no longer matches the current case and rebuilds itself before the stale pointers are dereferenced.
2026-06-10 12:33:45 +02:00
Magne Sjaastad 85f5848bde #14112 Contour map: guard remaining legend config dereferences
Guard the remaining unguarded legendConfig() uses so a null legend config
cannot crash: both updateLegend() implementations (eclipse and statistics
projections) now capture the pointer and return early when null, and the
statistics view tree ordering skips a null legend config.
2026-06-04 16:06:50 +02:00
Magne Sjaastad ea719c41b3 #14112 Contour map: guard null legend config in defineUiOrdering
Selecting a contour map projection in the tree could crash when the
associated legend config was null. RimContourMapProjection::defineUiOrdering
called legendConfig()->uiOrdering() unguarded. Because PdmUiObjectHandle::uiOrdering
is non-virtual, the call entered with a null this and then crashed on the
virtual defineUiOrdering dispatch.

Guard the legendConfig() dereference, matching the existing null checks
elsewhere in the file. Apply the same guard to RimEclipseCellColors::defineUiOrdering.
2026-06-04 16:06:50 +02:00
Magne Sjaastad 071d6cc19e #14050 CMake: Remove dead variable definitions and references
* CMake: Remove dead CODE_HEADER_FILES variable
* CMake: Remove dead COMMAND_CODE_HEADER_FILES and COMMAND_MOC_SOURCE_FILES
* CMake: Remove dead MOC_SOURCE_FILES and FORM_FILES_CPP references
* CMake: Remove dead HEADER_FILES reference
* CMake: Delete unused CustomPCH.cmake superseded by target_precompile_headers
2026-05-26 13:10:20 +02:00
Kristian Bendiksen 2fa7520b3a Refactor: forward-declare element type in collection headers
Move the element-type include from each migrated collection header into
its .cpp, leaving only a forward declaration in the header. Follows the
pattern from 9e4d79159 for RimJobCollection, made possible by the
constructor-time PdmObject base check.
2026-05-11 13:42:13 +02:00
Kristian Bendiksen 5e880ffc26 Refactor: migrate fourteen more collections to caf::PdmObjectCollection<T>
Migrated to the templated base, preserving each collection's existing XML
field keyword for project-file backward compatibility:

- RimEnsembleFractureStatisticsCollection
- RimEclipseInputPropertyCollection
- RimPlotDataFilterCollection
- RimGeoMechContourMapViewCollection
- RimIntersectionResultsDefinitionCollection
- RimCustomObjectiveFunctionCollection
- RimStimPlanModelTemplateCollection
- RimEnsembleWellLogsCollection
- RimEclipseContourMapViewCollection
- RimSeismicViewCollection
- RimGridInfoCollection
- RimEclipseStatisticsCaseCollection
- RimWellIASettingsCollection
- RimVfpDataCollection

External callers that accessed the old public/named array fields directly
(RimEclipseInputPropertyCollection::inputProperties,
RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from
the base. RimCustomObjectiveFunction.h replaced its include of the
collection header with a forward declaration to break the new include
cycle introduced by the migration.
2026-05-11 13:42:13 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Kristian Bendiksen 605662062c #13924 ContourMap: Use early returns in append-to-model guards
Address review feedback: replace the long conjunction guards added in the
previous commit with early-return statements for readability. Hoist the
legendConfig pointer into a local so the body reuses it instead of calling
legendConfig() repeatedly.
2026-04-29 14:20:38 +02:00
Kristian Bendiksen 32374b1cb6 #13924 ContourMap: Guard against null mapGrid/legendConfig in append-to-model
Mirror the nullptr guards added to RimContourMapProjection::generateGeometryIfNecessary
(commit fdc8608a29) in the three sibling RimEclipseContourMapView and
RimGeoMechContourMapView "append ... to model" methods, which were still
unconditionally dereferencing mapGrid() and legendConfig()->scalarMapper().
2026-04-29 14:20:38 +02:00
Magne Sjaastad b14e873fac StatisticsContourMap: Refactor computeStatistics and move helpers to anonymous namespace
Split computeStatistics() into computeStatisticsSharedGrid() and
computeStatisticsIndividualGrids(), and move findKLayersForFormations
and extractCaseResults to an anonymous namespace as free functions.
2026-03-19 15:10:43 +01:00
Magne Sjaastad 831751a903 ContourMapProjection: Replace references with naked pointers
Replace reference members and constructor parameters with raw pointers in
RigContourMapProjection and subclasses. Remove cvf::ref usage in
RigEclipseContourMapProjection. Add updateRealizationData() to allow
swapping active cell info and result data per realization without
rebuilding the grid mapping.
2026-03-19 15:10:43 +01:00
Magne Sjaastad 4b43fcf0a7 Revert ContourMap texture-based rendering changes
Reverts:
- ContourMap: Smooth texture edges with weighted alpha blending (2dc7123d8)
- ContourMap: Increase texture resolution with bilinear interpolation (2e1e99602)
- ContourMap: Add texture-based rendering as default rendering mode (87ef7a01b)
2026-03-12 17:31:56 +01:00
Magne Sjaastad 87ef7a01b9 ContourMap: Add texture-based rendering as default rendering mode
Extract and clean up prototype from contour-map-01 branch:
- RivContourMapProjectionPartMgr: add appendProjectionAsTexturedQuad(),
  createSingleTexturedQuadPart(), createXYPlaneQuadGeoWithTexCoords(),
  and createTexture() — renders the map as a single GPU-textured quad
  with transparency (alpha=0) for undefined/infinity cells
- RimContourMapProjection: add m_showTextureImage (default true) and
  m_showTrianglesWithColor (default false) PDM fields; guard triangle
  mesh generation when showTrianglesWithColor() is false
- RimEclipseContourMapView, RimGeoMechContourMapView: branch
  appendContourMapProjectionToModel() to use texture or triangle path
  based on the new flags; Statistics view inherits Eclipse path

Prototype dead code (debug file save, SurfaceEffectGenerator fallback,
redundant createImage()) not carried forward.
2026-03-12 14:40:26 +01:00
Magne Sjaastad 61a69bacc4 Use cafPdmUiButton instead of bool in PdmField
* Adopts dynamic PDM buttons with lambda callbacks

Refactors PDM push buttons from boolean fields to use the `addNewButton` API with direct lambda callbacks.

This change enforces a new coding guideline to extract complex or multi-line lambdas to dedicated `on*Clicked()` methods, improving code readability and maintainability.

- Replaces `PdmField` button fields with `PdmUiOrdering::addNewButton` calls.
- Extracts multi-line/control-flow lambdas into named methods in `RimFlowCharacteristicsPlot`, `RimGeoMechCase`, and `RimStatisticsContourMap`.
- Removes obsolete `defineEditorAttribute` overrides and `fieldChangedByUi` logic for these buttons.
- Updates `RimWellPathFracture` to utilize base class-provided button creation.
- Adds new lambda line-count guideline to the coding style documentation.
- Includes minor build fixes, such as adding `cafPdmUiButton.h` and correcting tooltip API usage.
2026-03-03 08:54:45 +01:00
Magne Sjaastad 8fdaa83f15 RimReservoirGridEnsembleBase: Make optional methods non-pure virtual with default implementations
mainGrid(), unionOfActiveCells(), computeUnionOfActiveCells(), and statisticsCaseCollection() default to null/no-op. Remove redundant overrides from RimEclipseCaseEnsemble.
2026-03-03 07:35:48 +01:00
Magne Sjaastad d52f595c41 Refactor: Rename RiaStatisticsTools to RigStatisticsTools
Replaced all references to RiaStatisticsTools with RigStatisticsTools across the codebase, including header includes, static method calls, and test files. Updated CMake configuration to remove RiaStatisticsTools and add RigStatisticsTools. Renamed and updated related unit tests. No changes to logic or algorithms; this is a namespace and organizational refactor for consistency. Also added ApplicationLibCode include directories as PRIVATE to relevant targets.
2026-02-18 09:22:39 +01:00
Magne Sjaastad cfd634e206 Updates PDM UI label positioning
Updates the way UI label positions are set for PDM fields.
2026-01-08 21:44:58 +01:00
Jon Jenssen fdc8608a29 Add more nullptr guards 2025-11-06 07:05:51 +01:00
Magne Sjaastad 37041ad0a6 clang-19-tidy and clang-19-format fixes 2025-05-19 14:31:30 +02:00
Magne Sjaastad fc79395ddd #12472 Fix flaky calculation of contour map top value 2025-05-09 08:22:55 +02:00
magnesj 77c2d624fc Fixes by clang-tidy 2025-04-19 08:26:02 +02:00
Magne Sjaastad e4811fabae Rename objects to "Map Projection"
This will make the Help on these objects search for "Map Projection" instead of the class name.
2025-04-07 09:25:46 +02:00
jonjenssen 876e460954 Fixes #12346 2025-04-05 15:22:33 +02:00
Magne Sjaastad 3715667e30 #12327 Small adjustments
* Remove unused volume sum
* Hide more log messages by default
* Allow stepping on top level plot
* Fix update of main plot title
2025-03-31 19:24:04 +02:00
Kristian Bendiksen 55bd7a6fdd Refactor: Move RigFloodSettings to reuse outside of contour map setting. 2025-03-31 14:20:43 +02:00
jonjenssen 02a521d23f Update GUI and calculations for ensemble stat contour map 2025-03-26 13:35:58 +01:00
jonjenssen 41af091511 Change contourmap default name and menu entry
Look for formation names in multiple locations
Skip realizations with missing formation names, if used
2025-03-24 07:53:27 +01:00
Jon Jenssen 9796767dc7 Always use opm_common to skip inactive cells in grid ensemble stats 2025-03-14 07:43:33 +01:00
Magne Sjaastad f4c31e0b28 Create multiple polygons from a contour map
* Fix overwrite of value thresholds
* Fix performance issue with filtered values
* Add "Delete All Polygons" from the polygon collection
* Add area threshold where user can specify area cutoff
2025-02-24 10:06:06 +01:00
Magne Sjaastad bf5791105b #12166 Statistics Contour Map: Static results do not work 2025-02-17 18:26:11 +01:00
jonjenssen 588ab0dc69 Support missing timesteps in statistics ensemble cases (#12155)
* Support missing timesteps in statistics ensemble cases
* Adjust resolution values
2025-02-11 17:20:55 +01:00
Magne Sjaastad d76f67f3fb Use subset of enums
Use setEnumSubset instead of calculateValueOptions
2025-02-10 17:22:25 +01:00
jonjenssen 11131721f5 Fix include statement 2025-02-07 08:39:52 +01:00
jonjenssen 8567841b87 Add support for mobile oil/gas/hc columns (#12129)
* Add support for calculating mobile oil/gas/hc columns in contour maps
2025-02-07 07:24:54 +01:00
jonjenssen 10afd3a7cd Reorganize contourmap files in project 2025-02-03 15:06:29 +01:00
jonjenssen 08c207e556 Use resolution enum in contourmaps (#12113)
* Use resolution enum in contourmaps
2025-01-31 14:43:34 +01:00
jonjenssen 15428304be Change how sampling resolution is specified in statistics contourmap ui 2025-01-16 12:55:05 +01:00