You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rif (file I/O) objects currently have direct dependencies on Rim (PDM model) objects, creating unwanted coupling between the data layer and the model layer. The goal is to decouple Rif classes so they work with plain data structs or Rig (data) objects instead of Rim (model) objects.
General rule: If a Rif function only reads data from a Rim object to produce output, it should accept a plain struct. If a Rif function returns data that Rim will consume, it should return a plain struct. Rim is responsible for the translation at both ends.
Current State
21 Rif files include Rim headers, grouped into 5 coupling patterns:
Description
Rif (file I/O) objects currently have direct dependencies on Rim (PDM model) objects, creating unwanted coupling between the data layer and the model layer. The goal is to decouple Rif classes so they work with plain data structs or Rig (data) objects instead of Rim (model) objects.
General rule: If a Rif function only reads data from a Rim object to produce output, it should accept a plain struct. If a Rif function returns data that Rim will consume, it should return a plain struct. Rim is responsible for the translation at both ends.
Current State
21 Rif files include Rim headers, grouped into 5 coupling patterns:
RifStimPlanModel*Exporter(4),RifThermalFracture*(2),RifEventKeywordFormatter,RifWellIAFileWriterRim*, call property getters onlyRifParameterXmlReader,RifInputPropertyLoader,RifEclipseInputPropertyLoaderRifReaderRegularGridModel,RifRoffFileTools,RifReaderEnsembleStatisticsRftRifDataSourceForRftPltcaf::PdmPointer<Rim*>for 6+ types{ SourceType, caseId, name, filePath }RifMultipleSummaryReadersdynamic_cast<RimCalculatedSummaryCurveReader*>isCalculated()to reader interfaceSteps
Group A — Exporters: extract data structs (highest impact)
RifStimPlanModelAsymmetricFrkExporter: extract{ formationDip, hasBarrier, distanceToBarrier, barrierDip, wellPenetrationLayer }into struct; update callerRifStimPlanModelDeviationFrkExporter: pass computed depth vectors instead ofRimStimPlanModel*/RimWellPath*RifStimPlanModelPerfsFrkExporter: extract{ fractureOrientation, perforationLength, anchorPosition }into struct; update callerRifStimPlanModelGeologicalFrkExporter: createStimPlanGeologicalExportDatastruct populated by calculator in Rim layerRifStimPlanModelExporter: orchestrator — extract all sub-exporter inputs into structs; update dispatcherRifThermalFractureTemplateSurfaceExporter: passRigThermalFractureDefinition*directly instead ofRimThermalFractureTemplate*RifThermalToStimPlanFractureXmlOutput: extract{ fractureGrid, resultNames, resultValues, timeStepIndex }into structRifEventKeywordFormatter: createRifWellEventDataPOD struct; Rim layer populates it fromRimWellEvent*before calling formatterRifWellIAFileWriter: extract{ outputDir, parameters, modelBoxVertices }into struct; update caller in Rim layerGroup B — Readers: intermediate data model
RifParameterXmlReader: returnstd::vector<RifParameterDefinition>instead of creating Rim objects; add factory in Rim layerRifInputPropertyLoader: return property metadata structs; move Rim collection insertion to callerRifEclipseInputPropertyLoader: passRigEclipseCaseData*and metadata directly; remove Rim property creationGroup C — Pass Rig objects directly
RifReaderRegularGridModel: change signature to acceptRigEclipseCaseData*instead ofRimEclipseCase*RifRoffFileTools: passRigEclipseCaseData*and color legend collection directly; removeRimProject::current()singleton accessRifReaderEnsembleStatisticsRft: pass vector of RFT reader interfaces instead ofRimSummaryEnsemble*Group D — RifDataSourceForRftPlt
caf::PdmPointer<Rim*>members with plain struct{ SourceType type; int caseId; QString name; QString filePath; }; update all callersGroup E — Dynamic cast fix (minimal)
RifMultipleSummaryReaders: add virtualisCalculated()to reader interface; removedynamic_castand Rim includeLinks
ApplicationLibCode/FileInterface/