- Return std::expected from RimSurfaceCollection::importSurfacesFromFiles
with a message naming the files that could not be imported
- Return specific errors from ImportSurface and NewSurface scripting
methods instead of nullptr
- Import before deleting the surface to overwrite, so a failed overwrite
keeps the existing surface
- Catch surfio exceptions in RifSurfio to avoid a crash on corrupt files
- Include the method name in the generic "no result" gRPC error
- Add Python tests for import_surface error handling
RiaEnsembleNameTools::groupFilesByEnsembleName had no branch for
EnsembleGroupingMode::NONE, so it silently returned an empty map and
no ensemble was created for this grouping mode. Add handling that
groups all input files into a single ensemble.
Also surface warning dialogs instead of silently doing nothing when
no ensemble/grid ensemble could be created from the selected files,
in RicImportGridAndSummaryEnsembleFeature and
RicCreateGridCaseEnsemblesFromFilesFeature.
Migrate all assert macros in ApplicationLibCode to CAF_ASSERT and remove every
use of cvfAssert.h.
CVF_ASSERT is replaced one to one. CVF_TIGHT_ASSERT is also replaced by
CAF_ASSERT, which is semantically exact: CVF_ENABLE_TIGHT_ASSERTS is 1 only
under _DEBUG, and that is what CAF_ASSERT now does. The two CVF_FAIL_MSG sites
become CAF_ASSERT( false && "message" ), preserving the message with the idiom
already used elsewhere in the code base.
Counts before and after: CVF_ASSERT 1044 to 0, CVF_TIGHT_ASSERT 66 to 0,
CVF_FAIL_MSG 2 to 0, cvfAssert.h references 154 to 0.
Include handling: files that included cvfAssert.h directly now include
cafAssert.h instead, includes left dead by the migration are removed, and files
that were relying on cvfAssert.h transitively get an explicit cafAssert.h. Files
that reach cafAssert.h through another caf header are left unchanged; a missing
include here is a compile error, not a silently disabled assert.
ResultStatisticsCache links only LibCore and therefore had no path to
cafAssert.h. Add the cafPdmCore directory as a private include path rather than
linking the library, since cafAssert.h is header only.
Note that this stops these asserts from firing in Release and RelWithDebInfo,
where CVF_ASSERT was previously active.
When a new Fault Distance defaults to all faults, the ResInsight-generated
undefined grid faults were ticked by default. Add RimFaultInView::isGeneratedFault
and filter these faults out of the default selection in both the UI feature and
the Python command. An explicit fault selection is still honored.
Replace the transient Data Analytics tree label with a real
RimDataAnalyticsCollection object that owns the case-level fault distance
collection and the well target mappings. The folder shows its analytics
objects flattened and exposes a right-click menu to create a new Fault
Distance and a new Well Target Mapping.
Migrate case-level well target mappings from older project files into the
new collection via initAfterRead; fault distance is unreleased and needs
no migration. The case accessors faultDistanceCollection() and
addWellTargetMapping() now forward to the new object, and the creation
features resolve a selected Data Analytics folder.
Carries the "Fault Distance" rename through to the C++ class names, file
names, PDM/scriptable keywords and the Python API (add_fault_distance,
class FaultDistance). The RicNewFaultDistanceResultFeature command class
keeps its name.
The case-level Data Filters node (RimDataFilterCollection) was always shown under
RimEclipseCase, cluttering the tree when empty. Gate it in
RimEclipseCase::defineUiTreeOrdering on a new shouldBeVisibleInTree() check, and
refresh the owner case from onItemsChanged/onChildDeleted so the node appears and
disappears as the collection crosses the empty boundary.
Because a hidden node cannot be right-clicked to create the first filter, add a
RimEclipseCase::appendMenuItems override that exposes the filter-creation
commands as a Filters submenu on the case node. A shared
RicCellFilterFeatureTools::selectedDataFilterCollection() resolves a selected
RimEclipseCase to its data filter collection, so the cell, property and combined
filter create features target the case-level collection.
The view filter nodes were unified under a read-only RimFilterInViewCollection
facade, and the source collections are now tree-hidden. As a result, the
existing collection->updateConnectedEditors() calls no longer refresh the tree:
the filters are shown under the facade, which only refreshes when a source emits
filtersChanged/wrappersChanged.
Several property-filter mutations changed the child array without emitting that
signal (insertAt/push_back/erase do not auto-fire onChildAdded/onChildDeleted),
so newly created or removed filters did not appear under the Filters node:
property filter insert, new combined filter, add linked filter, undo of a
property-filter creation, and Show Contributing Wells.
Emit the change signal from these paths (via the existing onChildAdded hook, or
filtersChanged on removal) so the single facade handler refreshes the tree. The
cell-filter, paste, property-add and data-filter paths already emit the signal
and are unchanged.
Reparent RimFaultDistanceResultCollection so it is owned directly by
RimEclipseView instead of RimFaultInViewCollection, and show it as a
top-level node next to the Faults node in the project tree.
RimFaultDistanceResult::calculateValueOptions now reaches the fault list
through the view (the fault collection is a sibling rather than an
ancestor after the move). RicNewFaultDistanceResultFeature resolves the
view from the selection and takes both the distance collection and the
all-faults fallback from it.
The scriptable API moves with the collection: add_fault_distance_result
is now exposed on RimEclipseView (view.add_fault_distance_result(...))
via the new RimcEclipseView, replacing RimcFaultInViewCollection.
The existing FAULTDIST result always considered every fault in the main
grid. Users with many faults need to compute distance fields against a
named subset, so this adds a Fault Distance Results collection under
each view's Faults node. Each entry holds a multiselect of faults and a
name (FAULTDIST1, FAULTDIST2, ...) and publishes the result into the
Generated cell-result category.
The per-cell BVH-based distance loop was extracted from
RigFaultDistanceResultCalculator into a reusable utility that accepts
the subset of faults to include; the original all-faults entry point
delegates to the same utility and keeps the static-native FAULTDIST
behavior unchanged.
* Agent docs: Recommend cmake --build over ninja when sharing build/ with Visual Studio
* Disable Create Well Target Mapping for grid ensembles with individual grids
* Move RimSummaryCaseMainCollection context menu items into appendMenuItems override
* Reorganize import menus: split per-window, group submenus, rename actions, add Import/Export icons
* Show icons on "New Statistics Case" and "New Grid Case Group" menu actions
* Rename grid/summary import submenus to "More" and use the import icon
* 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
Combined filters used to always show whatever literal string the user
passed in (or the default "Combined Filter"). For programmatic creation
without a name, that string never reflected the children, leaving the
case-level "Data Filters" tree row stale when child bounds changed.
Add an m_autoDeriveName flag (default true) to RimCombinedFilter. When
on, the display name is recomputed on every relevant change — addFilter,
removeFilter, onChildAdded, onChildFilterChanged, and combineMode
toggle — by joining children's name() with " AND " / " OR ". The flag
flips to false the first time the user renames the filter via the UI
property panel or via Python (combined.user_description = "..."),
preserving any explicitly typed name verbatim from then on.
Two child-creation paths needed an extra triggerFilterChanged() so the
combined parent recomputes after the child's final name is set:
addPropertyFilterToCombinedFilter (setDefaults updates name without a
signal) and RimcCombinedFilter_addRangeFilter (Rimc applies user
params after addNewFilter).
The Rimc factory passes setAutoDeriveName(false) only when a name is
supplied. The Python example demonstrates both modes side by side, and
test_combined_filter.py adds three cases: named filter preserves its
name, auto-derived filter tracks bound mutations, and Python rename
locks the auto-derived filter.
Expose the case-level RimDataFilterCollection (introduced for
case-shared cell filters) to Python so scripts can build combined
filters with property-filter and IJK-range children without going
through a view.
Scriptable surface:
- RimEclipseCase.m_dataFilterCollection -> case.data_filter_collection()
- RimDataFilterCollection (object + Filters child array) -> filters()
- RimEclipsePropertyFilter (object + m_lowerBound + m_upperBound) ->
pf.lower_bound, pf.upper_bound
- RimCellRangeFilter (object + start_index_{i,j,k}, cell_count_{i,j,k})
New CAF object methods under ProjectDataModelCommands/:
- RimcDataFilterCollection: add_combined_filter(name, combine_mode)
- RimcCombinedFilter: add_property_filter(result_variable, result_type)
and add_range_filter(name, start_{i,j,k}, cell_count_{i,j,k}).
Bounds are not part of add_property_filter because the Python class
generator emits a bare nan literal as the default for double fields
initialised to quiet_NaN, which fails to import. Bounds are set via
the now-scriptable lower_bound/upper_bound fields after creation,
matching the update() pattern used elsewhere in the API.
RicEclipsePropertyFilterFeatureImpl::addPropertyFilterToCombinedFilter
now returns the new RimEclipsePropertyFilter* so the CAF method can
hand it back to Python. setDefaults is relaxed to be view-tolerant:
case-level filters have no Rim3dView ancestor and the eclipse case is
already wired by RimEclipsePropertyFilter::setCase via the owning
collection's onItemsChanged hook.
End-to-end coverage in tests/test_combined_filter.py: round-trip
create, mode toggle, property-filter add/mutate, range-filter
add/mutate. Example script in PythonExamples builds an AND combined
filter that gates PERMX between 100 and 20000 against a K=5..10
slice.
Introduce RimDataFilterCollection on RimEclipseCase to hold filter
configuration that is shared across all views of the case. Each
RimEclipseView gets a RimDataFilterInViewCollection of
RimDataFilterInView wrappers that auto-sync with the case-level list
and expose an independent on/off toggle per view. The wrapper's
applyToCellVisibility delegates to the wrapped RimCellFilter via the
existing unified virtual, so property, range, and combined filters all
work uniformly.
RimDataFilterCollection is built on caf::PdmObjectCollection<RimCellFilter>
and emits a filtersChanged signal on add/remove/reorder/child changes.
The wrapper collection mirrors RimSurfaceInViewCollection's sync pattern:
new wrappers default to checked, removed sources drop their wrappers,
and the wrapper list follows the case order. Per-view wrappers feed into
RivReservoirViewPartMgr::computePropertyVisibility after the existing
view-level property-filter loop.
The RicNew*Feature commands now route into a selected RimDataFilterCollection,
and the existing combined-filter path is generalized to allow combined
filters living under either a per-view RimEclipsePropertyFilterCollection
or the new case-level collection. Several Asserted ancestor lookups in
RimEclipsePropertyFilter, RimCellFilter and RimEclipseResultDefinition
that assumed a Rim3dView ancestor were relaxed to the non-asserting
variant with graceful fallbacks, so case-level filters can be created
and edited without a host view.
Backwards compatible: empty Data Filter collection is a no-op,
existing per-view RimEclipsePropertyFilterCollection and
RimCellFilterCollection paths are unchanged. GeoMech parity deferred.
Replace the six typed addNewXxxFilter factories with a single generic
addNewFilter<T>(init) template. The combined filter no longer references
any concrete RimCellFilter subclass; callers supply the type and an init
lambda for type-specific configuration, while the combined filter handles
cycle checks, parent-case propagation, signal wiring, and host notification.
Addresses PR #13911 review feedback.
Add RimCombinedFilter, a node placed under the Eclipse property-filter
collection that holds child filters (cell or property) and combines their
results with a user-chosen AND or OR mode. Supports nesting and is exposed
to Python via the generated rips CombinedFilter class.
To let the same evaluation machinery handle any filter type, introduce a
unified applyToCellVisibility(cellVis, grid, timeStep) virtual on
RimCellFilter with a default implementation that bridges the existing
range/index dispatch. RimEclipsePropertyFilter overrides it with the body
extracted from RivReservoirViewPartMgr::computePropertyVisibility, which
collapses to a generic per-child call and preserves the prior behavior
for ordinary property filters.
Loosen RimEclipsePropertyFilterCollection::m_propertyFilters to
PdmChildArrayField<RimCellFilter*>, keeping the XML tag "PropertyFilters"
and the typed propertyFilters() accessor. Add recursive helpers
(hasActiveEvaluatableDescendant, hasActiveDynamicPropertyDescendant,
hasActiveFormationNamesPropertyDescendant) so hasActiveFilters,
hasActiveDynamicFilters and isUsingFormationNames see property filters
nested inside a combined filter. Bridge filter changes inside a combined
filter to updateDisplayModelNotifyManagedViews, since the property-filter
collection doesn't subscribe to filterChanged signals.
The existing RicNew* cell-filter creation features now route the new child
into a selected combined filter when one is selected, otherwise into the
top-level cell-filter collection as before. The combined filter's context
menu offers the full mixed set: property, polygon, range, index,
user-defined, and nested combined filter.
Remove the redundant wrapper function and update all call sites to use RimWellPathCollection::instance() directly.
Remove unused #include "RimTools.h" from files using RimWellPathCollection::instance() directly
Extract auto-import logic into public static method
importPvdSurfacesForGridFiles() and call it from:
- Command line case loading (--case argument)
- Replace case menu action
Introduce RimReservoirGridEnsemble and RimReservoirGridEnsembleBase to manage ensembles of grid-only Eclipse cases. Enable detection of identical grids for shared operations and statistics. Integrate grid ensembles into project structure, UI, and menu system. Refactor statistics and view handling to support both case groups and grid ensembles via a common interface. Add deferred grid loading, robust case referencing, and migration for well data source fields. New features and menu items allow creation and management of grid ensembles from file sets, enabling new workflows for grid-only ensemble analysis.
* Remove unused includes
* Use designated initializers struct members
* Add warning for active cell opm grid reader
* Moves radial grid import to file readers
* Adapts cell range filter labels for radial grids
* Use same naming for ensemble grid cases as ensemble summary cases
* Create Polygons: Ask for polygon area cutoff when polygon count is high
* Show Create Polygons from Contour Map in polygon collection menu
* Update titles in crossplots
* Clear message panel when project is closed
* Show text message for start and complete of replace ensemble
* Support loading formation names when importing an ensemble
* Enable support for formation filtering when calculating contour map
* Add option to limit calculation area to a selection of polygons
* Enable time step selections and controls in view
* Support loading just what we need for statistics contour maps by using custom reader settings
* Close case once done with it unless there are active views.
* Add selection of user interface case (for result selection, display of wells, faults...)
* Avoid int overflow for nested progresses by using double
* Improve auto naming
* Misc. UI improvements
* Use appendMenuItems instead of ContextCommandBuilder
* Specify RimEclipseCaseCollection menu features once
* Add function to enable up/down arrows for combo box
* Guard crash when closing project
* Improve UI for grid case ensemble
- Create a view for the first case in the ensemble
- Show case name in view title
- Enable up/down buttons to Eclipse case
* Make sure 3D views in grid ensemble are created on project load