Merged
Conversation
Add cropDataKeywordsInDeckFile() that reads raw cell values directly from OPM deck keywords (via isDataKeyword/getRawDoubleData/getIntData) and crops them to the sector box. This handles relperm endpoint arrays (SWL, SWU, SGCR, SOWCR, etc.) that are specified via direct listing in the .DATA file and not available in eclipse case results. Runs before replaceKeywordValuesInDeckFile, which now skips already-cropped keywords.
… export Verify that PORO, EQLNUM, and SATNUM are correctly cropped from 6000 to 600 values when exporting a 10x10x6 sector from the 20x30x10 model5 grid, and that cropped values match the original uniform data.
ACTNUM is handled separately during export, so it should not be cropped by the generic data keyword cropping logic.
Add a new .DATA file with K-layer based EQLNUM regions (1-4) and a test that verifies correct spatial cropping of EQLNUM, EQUIL records, and PORO when exporting a sector model.
…ector intersection Data keywords (PORO, EQLNUM, etc.) inside BOX/ENDBOX contain values for the sub-box only. When BOX coordinates are transformed to sector coordinates, the data size must match the transformed box dimensions. Crop boxed data keywords to the intersection of the BOX region with the sector, preserving the BOX/ENDBOX structure in the exported deck. If the box does not intersect the sector, the data keyword is removed.
Replace 7 separate deck iterations (cropDataKeywordsInsideBoxContext, expandBoxContextInDeckFile, and 5 replace*KeywordIndices wrappers) with a single transformKeywordsInDeckFile function that tracks BOX/ENDBOX state once and handles all keyword types as they are encountered.
…File ACTNUM is already correctly computed by updateCornerPointGridInDeckFile with proper inactive cell handling. Prevent replaceKeywordValuesInDeckFile from overwriting it with all-1s via extractKeywordData, which treats ACTNUM as a category result and sets defaultExportValue=1 for all cells.
cd96225 to
841c324
Compare
Member
|
can be simplified by using initializer list to |
Tests cover record-level processing (no overlap, partial overlap with clamping, completely inside sector) and full deck transformation with BOX/ENDBOX for both MULTIPLY and ADD keywords.
a24b90d to
fe8735a
Compare
jonjenssen
reviewed
Mar 20, 2026
ApplicationLibCode/ReservoirDataModel/SimulationFile/RigSimulationInputTool.cpp
Show resolved
Hide resolved
jonjenssen
approved these changes
Mar 20, 2026
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.
No description provided.