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.
Remove 95 cvf include lines that the including file does not use. Found by
extracting the symbols declared by every VizFwk header, including symbols they
re-export, and flagging includes where none of those symbols appear anywhere in
the file. Each removal is verified by a full build.
Most of them are cvfVector3.h and cvfObject.h, left behind as the files they
were once needed by changed.
pch.h is left untouched. It includes cvfObject.h and cvfVector3.h on purpose, so
that the files using the precompiled header do not have to.
Note that a clean build after removing an include does not prove the include was
unnecessary, only that the declarations still arrive some other way. That path
can differ between platforms and with RESINSIGHT_ENABLE_UNITY_BUILD, so this
needs a CI round on Linux as well.
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().
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 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.
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.