Remove some dependencies from Rig to ApplicationLibCode#854
Remove some dependencies from Rig to ApplicationLibCode#854
Conversation
Remove dead updateFilters method which was the only Rim* dependency. Also remove the now-unused RiaApplication include.
…erpolationTools The class has no Ria/Rim dependencies — pure numeric utility — so it belongs in the Rig layer. All 12 call sites updated to use the new name and include path.
Move GridPart, BorderSurface, Boundary and ElementSets into a new RigFaultReactivationEnums.h in namespace RigFaultReactivation. RimFaultReactivationEnums.h now includes the Rig header and provides using-aliases in namespace RimFaultReactivation for backward compatibility with all Rim* callers.
Change postProcessElementSets to take RigMainGrid* and RigActiveCellInfo* directly instead of RimEclipseCase*. The Rim caller (RimFaultReactivationModel) now extracts these from eclipseCase() before calling.
Replace RimFracture* constructor parameter with the four Rig/primitive values it extracted: fractureXf, wellRadius, perforationLength, fractureGrid. Callers in RimMeshFractureTemplate and RicExportFractureCompletionsImpl now unpack from RimFracture before calling.
Remove unused RimStimPlanFractureTemplate.h include. Add explicit RigFractureGrid.h include that was previously pulled in transitively.
Replace the RimSimWellInView* public entry point with explicit Rig/primitive parameters (eclipseCaseData, simWellData, timeStepIndex, shortBranchMergeThreshold). The former private wrapper is gone; the caller in RimSimWellInView::wellBranchesForVisualization now unpacks these values from the Rim objects before calling.
Replace the RimSimWellInView* entry point with explicit parameters (eclipseCaseData, simWellData, isAutoDetectBranches, useAllCellCenters). The static centerline method now delegates directly to calculateWellPipeCenterlineForTimeStep with timeStepIndex=-1. Both callers in RimSimWellInView unpack from the view/case before calling.
Replace RimEclipseCase* constructor parameter with RigEclipseCaseData*, RigCaseCellResultsData*, and a std::function for uiToNativeTimeStepIndex. Private methods now take RigActiveCellInfo* directly instead of going through RimEclipseCase. Also removes RimEclipseCase.h from RigFlowDiagResults.cpp.
Review Summary by QodoReduce Rig to ApplicationLibCode dependencies by decoupling from Rim types
WalkthroughsDescription• Move RiaInterpolationTools to ReservoirDataModel layer as RigInterpolationTools • Decouple RigWellPathStimplanIntersector from RimFracture by accepting primitive parameters • Decouple RigFaultReactivationModel from RimEclipseCase by accepting RigMainGrid and RigActiveCellInfo • Move fault reactivation enums to Rig layer with backward-compatible Rim aliases • Decouple well centerline calculators from Rim types by accepting explicit Rig parameters • Decouple RigNumberOfFloodedPoreVolumesCalculator from RimEclipseCase Diagramflowchart LR
RiaInterpolationTools["RiaInterpolationTools<br/>ApplicationLibCode"]
RigInterpolationTools["RigInterpolationTools<br/>ReservoirDataModel"]
RimTypes["Rim* Types<br/>ProjectDataModel"]
RigTypes["Rig* Types<br/>ReservoirDataModel"]
RiaInterpolationTools -- "moved to" --> RigInterpolationTools
RigInterpolationTools -- "no dependency on" --> RimTypes
RigInterpolationTools -- "uses" --> RigTypes
RigWellPathStimplanIntersector["RigWellPathStimplanIntersector"]
RigWellPathStimplanIntersector -- "decoupled from RimFracture" --> RigTypes
RigFaultReactivationModel["RigFaultReactivationModel"]
RigFaultReactivationModel -- "decoupled from RimEclipseCase" --> RigTypes
File Changes1. ApplicationLibCode/ReservoirDataModel/RigInterpolationTools.h
|
Code Review by Qodo
1.
|
Prevent potential null dereference when eclipseCaseData() or results() return nullptr for a partially loaded case. Add warning logs for both the missing ancestor case and unloaded data scenarios.
No description provided.