Guarded two unconditional null derefs: dockWidget->setWidget(viewWidget) when viewWidget creation fails, and viewPdmObject() in handleViewerDeletion() when no view has ever been assigned to control. Added regression test for the handleViewerDeletion() case; the setWidget() path requires a running GUI/main window and isn't reachable from the headless unit test harness.
synchronize2dIntersectionViews() could crash in two ways: when the view's ownerCase() is null, and when the collection has no Rim3dView ancestor at all (e.g. mid-destruction after detaching from the PDM tree, where firstAncestorOrThisOfTypeAsserted<Rim3dView>() returns null since CAF_ASSERT is compiled out in release). Both cases are now guarded.
A system HDF5 reports /usr/include. CMake filters implicit dirs from
target include directories but not from the source-file
INCLUDE_DIRECTORIES property, so -I/usr/include reached the command line
and broke #include_next <math.h> in <cmath> on gcc-toolset.
RigConnectionContainer was a thin wrapper around std::vector<RigConnection> with no added value beyond push_back/reserve/remove_duplicates. Replace it everywhere with std::vector<RigConnection> and inline the remaining container-merge and deduplication logic at their single call sites.
RigConnection had user-defined copy operations and no move operations, so
sorting in remove_duplicates() and merging connections copied the polygon of
every connection.
- Remove the member-wise copy operations, so the implicit noexcept move
operations are used.
- Take the polygon by value and move it into the connection.
- Add move overloads of RigConnectionContainer::push_back(), and use them when
collecting the computed connections.
- Avoid copying each native connection when building the set of cell pairs.
Computing additional NNCs spent most of its time running quad overlap tests on
candidate cells outside the neighbor pillar column. Most of these touch the
fault face along an edge only. Restrict candidates for I and J faces to the
neighbor column. This intentionally skips a small number of non-zero area
overlaps outside the column.
- 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
* #14806 Faults: Compute unnamed fault faces in parallel and only from positive faces
- A negative I or J face is the positive face of the neighbor cell with a lower
index, and is already handled when that neighbor is processed. Only visit the
positive faces.
- Each cell only writes the fault index of its own positive faces and the
opposite faces of its neighbors, so process the cells in parallel. The
thread results are appended in thread order, so the fault faces keep the
same order as before.
* #14806 Faults: Add unit tests for parallel unnamed fault face computation
Build a small in-memory grid (no file, no view) with geometric faults at
every I interface, and verify that calculateFaults() finds all unnamed
fault faces, keeps them ordered by native cell index (the per-thread
results are appended in thread order), and separates faces touching an
inactive cell into the dedicated inactive fault face list.
Building the cell search tree was dominated by one small std::vector<int>
allocation per leaf, and a tree with one cell per leaf becomes very deep for
large grids.
- BoundingBoxTree: Store leaf ids in flat arrays, and move the input data
instead of copying it. The tree shape is unchanged. Queries no longer copy
the ids of each leaf.
- RigMainGrid: Always group at least 8 cells along K in each leaf.
findIntersectingCells() removes cells not intersecting the query bounding
box, so the result is the same set of cells as for a tree with one cell per
leaf. This also applies to very large grids, which previously got the
cells of the whole leaf.
- Include cells of nested LGRs and LGR cells in invalid main grid cells in
the grouped tree, as the previous tree with one cell per leaf did.
Fixes a set of related bugs affecting ensemble contour maps that use a GENERATED (grid calculation) result, plus a related bug where switching a view's case lost generated results.
- Remove unused SOURCE_GROUP_HEADER_FILES from GrpcInterface CMakeLists
- Scope the following defines to the files that need it ENABLE_GRPC, USE_ODB_API , USE_OPENVDS, USE_HDF5
- RifOdbReader.cpp copied an odb_InstanceRepository by value, which
fails to compile under MSVC's strict conformance mode due to an
ambiguous implicit copy constructor in the vendor headers (diamond
inheritance). Use a reference instead, since it was only ever read
from.
Add fetch og polygons from cloud using ri-cloud-api service as submodule
Current version of submodule fetches polygons from Sumo, prodviding polygons with standard results tag.
- RimContourMapPeaksCollection: clamp m_peakCount to [1,20] and m_minDistance to >= 0.0
- RigContourMapPeakFinder: assert z.size() matches nx*ny before indexing in computeProminenceAndRegionSize
Each contour map projection owns a peaks collection. Computed peaks are shown in the project tree and visualized as single-point marker polygons in the global polygon collection. Markers are deleted with their peak, copied views drop peaks sharing markers with the original, and peaks are flagged as outdated when the result, time step or value filter changes.
Add setters for line and sphere appearance on RimPolygon. Add RimPolygonCollection::updateViewsAfterPolygonsChanged(), shared with the contour map polygon tools, and a deferred variant that is safe to call from destructors.
Union-find sweep from highest to lowest value computes the prominence of each peak. Peaks are filtered on prominence and edge contact, ranked by prominence or value, and thinned by minimum distance. Flat shoulders and plateaus are rejected, and prominence is measured against the minimum of each connected data region.
- Only consider visible well paths when computing the generic view bounding box.
- Fix polygon visibility filtering so individually hidden polygons no longer contribute to the bounding box.
- The bounding box is no longer implicitly invalidated when object visibility is toggled; it now only changes on initial load or when explicitly recomputed.
- Add RicUpdateGenericViewBoundingBoxFeature, a context menu command on RimGeneric3dView that recomputes the domain bounding box from currently visible objects, updates the grid box geometry, and zooms to fit.
Based on magnesj/ResInsight#1078:
- Lift surfaceInViewCollection()/polygonInViewCollection() to virtual Rim3dView methods
- Make RimGeneric3dView scriptable as GenericView
- Add Project.create_generic_view() Python method
- RimcGridView surface/polygon methods now work on any Rim3dView
- Add Python tests and example script
- Added RimGeneric3dView, a 3D view that is not tied to any grid case,
useful for wells, surfaces and other data not requiring a reservoir
grid. The view supports a custom name.
- Introduced RimGenericViewCollection, a new top-level collection that
holds both Eclipse views and RimGeneric3dView instances. It overrides
defineUiTreeOrdering() to display both types as a single flat list
under the top-level 'Views' node.
- RimOilField now exposes a single genericViewCollection instead of a
plain eclipseViewCollection field.
- RimEclipseViewCollection is unchanged and continues to be used for
per-case and ensemble view collections.
- Updated RimEclipseCase::globalViewCollection() and related helpers to
use RimGenericViewCollection, and added matching overloads in
RicNewViewFeature for creating eclipse views from the merged
collection.
- Added RicNewGenericDataViewFeature to create a new generic data view
from the context menu.
cvf::ref<RivContourMapProjectionPartMgr> requires the type to be complete
at the point the implicit destructor is instantiated. Declaring the
destructor and defining it in the .cpp (where RivContourMapProjectionPartMgr.h
is included) avoids the incomplete-type error on clang/gcc Linux builds.
A static property with an active dynamic filter now produces a contour map per time step. Adds a synthetic ensemble fixture with unified restart files, as the OPM reader used for statistics does not support per-step restart files.
Replace the built-in formation filter with ensemble data filters. Load ensemble data filters after project read, and parent new views before assigning the case so the ensemble filter collection is resolved correctly.
The opm-common reader only reads unified restart files (UNRST). When the
opm-common reader was selected in preferences, cases with one restart file per
time step (X0000, X0001, ...) were opened without dynamic results.
- Fall back to the resdata reader when there is no unified restart file but
non-unified restart files are present.
- Unit tests using dynamic results check that the result and time step exist
before accessing them, so a missing result fails the test instead of
crashing the test executable.
The import and schedule export of simulator events are two halves of the same
workflow, so they share the "simulator-events" flag instead of having one
keyword each. Users who enabled "simulator-events-import" have to tick the new
entry once in Preferences -> System -> Experimental Features.
The schedule generated from the well event timeline can now be written to
file from the GUI, without scripting.
- RicScheduleDataGenerator::generateScheduleForTimeline() collects the dates
and wells from the timeline (honoring the last applied timestamp, never
filtering insert-date events). The Python generate_schedule() method now
calls it, so GUI and Python export the same schedule.
- New RicExportScheduleFeature "Export Schedule from Events" asks only for the
file name and uses fixed defaults: the Eclipse case of the active view (else
the first case of the project), MSW keywords for every well with events, the
first date as a comment and aligned columns.
- Available from the context menu of the well event timeline and the well path
collection, and from File -> Export, gated by the new experimental feature
"simulator-events-export".
INSERT_DATE statements are now expanded into one timeline event per
occurrence instead of a list of bare dates, so each generated date keeps
the COMMENT of its statement.
- New RimWellEventInsertDate (EventType::INSERT_DATE): a date-only event
that generates no keyword, added with
WellEventTimeline.add_insert_date_event(event_date, comment).
- The schedule generator writes the comment of an insert-date event as
"--" lines directly below its DATES keyword.
- generate_schedule(_text) no longer takes additional_dates; insert-date
events are part of the timeline, but keep the previous behavior of not
being filtered by set_timestamp().
- SimulatorEventsDocument.report_dates and ApplyReport.report_dates are
replaced by SimulatorEventsDocument.insert_date_events/insert_dates;
merging files drops insert dates repeating both date and comment.
Importing several SIMEVENTS files together now merges them into one document
before coalescing, so keyword events with the same owner, type and timestamp
are combined across files, not only within one file.
- Add merge_simulator_events_documents, parse_simulator_events_files and
apply_simulator_events_files. Source locations carry the file name, so
conflict warnings and errors identify both files.
- Reject mismatched UNIT, and a second RESTART or duplicate WELSPECS across
files. Collect parse errors from all files in one pass.
- Warn when files declare the same FILTER name with different expressions,
and keep each file's filter instead of reusing the first one.
- CLI accepts multiple files; the import dialog allows multi-selection.
Add a test covering a flat 'realization-N/CASE.EXT' folder structure
(no iter-N level) grouped with EnsembleGroupingMode::NONE, verifying
all files end up in a single best-effort ensemble. Also add a test
confirming empty input produces no bogus ensemble entry.
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.