Repository navigation
Scripting: geomechanical cell result (replaces #14952) - #14985
Merged
Merged
Conversation
magnesj
force-pushed
the
pr-14952-result-definition-interface
branch
from
October 20, 2026 07:03
5b22519 to
b34fffd
Compare
kriben
reviewed
Oct 20, 2026
The cell result of a geomechanical view could not be read or set from
Python. Make RimGeoMechResultDefinition (position, field and component)
and the view's cell result scriptable, as for grid views:
cr = geomech_view.cell_result()
cr.result_position_type = "ELEMENT_NODAL"
cr.result_field_name = "SE"
cr.result_component_name = "S1"
cr.update()
On update the UI fields are synced and the result loaded, as for the
grid result definition. rips View.case() now also works for
geomechanical views, so View.export_snapshot() does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace separate dynamic_casts for RimEclipseResultDefinition and RimGeoMechResultDefinition in RiaGrpcPdmObjectService with a single cast to a shared RimResultDefinitionInterface, implemented by both classes. This removes the TODO about needing a more general interface for updating UI fields after a scripted result change.
Demonstrates the new scriptable fields on RimGeoMechResultDefinition (ResultPositionType, ResultFieldName, ResultComponentName) by applying a stress tensor component to the first view of the first GeoMech case.
…mActiveResult, use per-subclass case() methods instead of attribute check
magnesj
force-pushed
the
pr-14952-result-definition-interface
branch
from
October 20, 2026 18:05
13fa47a to
7f10509
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes/replaces #14952, including all of its original commits plus the following additions:
RimResultDefinitionInterfaceto replace the duplicateddynamic_castlogic forRimEclipseResultDefinitionandRimGeoMechResultDefinitioninRiaGrpcPdmObjectService.cpp.set_geomech_cell_result.py).setUiReadOnlycall form_timeLapseBaseTimestepintoupdateUiFieldsFromActiveResult()so it stays in sync whenever results change (including from scripting), not only on project load.hasattr(self, "eclipse_case")check inrips/view.py'scase()with separate per-subclass implementations (EclipseView/GeoMechView), using normal polymorphic dispatch instead of an attribute probe.Closes #14952