Only END_IJK denotes a cell range, DIRECTION alone is a single cell and the MD
interval is split. A defaulted start MD is zero. Without an end MD the record is
copied to each sub-cell so all refined COMPDAT connections are attached to a segment.
Lateral refinement reduces the Peaceman pressure equivalent radius r0 of the
completed center sub-cell. Explicit CF is scaled by
(ln(r0_old/rw)+S)/(ln(r0_new/rw)+S), and an explicit PR item is updated to r0_new.
r0_old is taken from PR, or computed from the original cell size and permeability.
COMPDAT and COMPSEGS cells were mapped to the center refined sub-cell only,
so with K refinement only every other refined layer was completed, and the
original connection factor was copied unchanged.
Along the connection penetration direction (COMPDAT DIR) all sub-cells are
now completed, with explicit CF and KH scaled by the sub-cell length
fraction. COMPSEGS records are split the same way with the MD interval
divided between the sub-cells. Perpendicular directions still use the
center sub-cell.
Sector model export removed all ACTNUM and FAULTS keywords from the deck
and re-inserted the sector-specific replacements at the end of the GRID
section, which always lands in the main DATA file. Decks that keep these
keywords in separate include files lost their file organization, leaving
the original include files empty while the data was written inline.
Collapse duplicates to a single occurrence instead of removing all
occurrences, so the subsequent in-place replacement keeps the keyword in
its original file when the deck is saved with OutputMode::COPY. ACTNUM
keeps the last occurrence since a later ACTNUM overrides an earlier one;
FAULTS keeps the first so fault definitions do not move past keywords
referencing them.
Wrap the discarded calls to the [[nodiscard]] std::expected-returning
transformKeywordsInDeckFile in EXPECT_TRUE(...has_value()) to silence
C4834 and assert that the transformation succeeded.
Pad-model extension assumed OPM-style "Z+" for the positive-Z exterior face,
but ResInsight emits "Z" (OPM-Flow short form). The K1/K2 shift never fired,
leaving the bottom boundary face at the original NZ instead of the new
padded NZ. Match both "Z" and "Z+" so the extension applies.
Adds a regression test verifying that with BCCON_BCPROP and padding the "Z"
exterior face is shifted by nzUpper + nzLower while the "Z-" face remains
at K=1, and documents the exterior-face semantics of the direction mapping.
Replace the monolithic RigNonUniformRefinement class with a proper
polymorphic hierarchy: RigRefinement (abstract base), RigNoRefinement
(identity), RigUniformRefinement (O(1) uniform), and
RigNonUniformRefinement (per-cell custom fractions).
Ownership uses std::unique_ptr<RigRefinement>, consumers receive
const RigRefinement&. This eliminates the misleading class name,
removes effectiveRefinement() indirection, and gives each refinement
mode an appropriately optimized implementation.
Add effectiveRefinement() to RicRefinementSettings, RicExportSectorModelUi, and
RigSimulationInputSettings, always returning RigNonUniformRefinement regardless of
whether uniform, non-uniform, or no refinement is active.
Merge the dual RigGridExportAdapter constructors into a single one taking
RigNonUniformRefinement, and unify transformIjkToSectorCoordinates to a single
overload. Eliminate all hasNonUniformRefinement() branching patterns in
RigSimulationInputTool.cpp in favour of effectiveRefinement().
Add regression tests verifying that custom FIPABC keyword in the
REGIONS section is correctly cropped and padded during sector model
export, similar to how FIPNUM is handled.
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.
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.
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.
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.
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.
Add refined grid border detection for BCCON_BCPROP boundary conditions.
The refined functions operate on the exported refined grid dimensions,
ensuring border cells are correctly identified when using grid refinement.
* Add sector model export wizard
* GUI cleanup
* Use job name as deck name for simulation runs
* Remove new things from old export GUI
* Use radio-buttons for enum dropdowns