Commit Graph
29 Commits
Author SHA1 Message Date
Kristian Bendiksen 9a01e09ecd Sector export: Complete all refined sub-cells along well connections
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.
2026-10-21 14:42:53 +02:00
Magne Sjaastad 1c4c304064 #14476 ApplicationLibCode: Remove unused cvf includes
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.
2026-08-07 15:05:57 +02:00
Kristian Bendiksen 87e9ab7b5b Sector Export: scale MINPV with refinement
This avoids marking small cells as inactive.
2026-04-29 13:14:49 +02:00
Kristian Bendiksen 3067823e71 #12957 Sector Model Export: introduce RigRefinement interface hierarchy
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.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 5d6aba0f70 #12957 Sector Model Export: unified refinement abstraction via effectiveRefinement()
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().
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 27c0647611 Refactor: split long method. 2026-03-20 14:30:34 +01:00
Kristian Bendiksen 539eec6cc5 #13411 Sector Model Export: unify BOX/ENDBOX processing into single pass
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.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen fce37b8fdb #13411 Sector Model Export: crop data keywords inside BOX/ENDBOX to sector 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.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen 983be234c1 #13411 Sector Model Export: crop direct listing data keywords from deck
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.
2026-03-20 14:30:34 +01:00
Jon Jenssen 04dc045b19 Handle AQUNUM and AQUANCON keywords in sector export 2026-03-10 13:40:51 +01:00
JJ ecd89bc8ab Sector model export: support WLIST kw (#13641)
* Support ADD and NEW operations in WLIST kw
* Add support for DEL operation
2026-02-23 20:15:04 +01:00
Kristian Bendiksen 7db39cf092 #13467 Add model padding functionality for sector model export
Add Z-direction padding support for sector models based on OPM-Flow's
padmodel.cpp. This feature enables users to add padding layers above
and/or below the exported sector model grid.

Adapts padmodel.cpp from
https://github.com/hnil/opm-flowgeomechanics/blob/geomech_hypre_cgal/examples/padmodel.cpp
Commit: 5ee483e

Fixes #13467.
2026-02-16 18:42:15 +01:00
Kristian Bendiksen 1c9c5a85ad #13333 Simulation Input: Add EDITNNC export functionality for sector models 2026-01-12 17:19:38 +01:00
Kristian Bendiksen 11dfdc2c21 Refactor: convert RigBoundingBoxIjk to template class. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen a4ade9e595 Remove duplicated code. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen fe609def88 Simulation Input: Add refinement support for border boundary conditions
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.
2025-12-12 13:38:22 +01:00
Kristian Bendiksen cfcdd67255 Simulation Input: Refactor border conditions to use in-memory results. 2025-12-12 13:38:22 +01:00
Kristian Bendiksen 101b4f4926 Refactor: extract common code for converting sector box 2025-12-11 12:07:21 +01:00
Kristian Bendiksen ab708f5e0e Simulation Input: Handle AQUNUM keyword. 2025-12-11 12:07:21 +01:00
Kristian Bendiksen 799c774cbe Simulation Input: refactor to remove duplicated code. 2025-12-08 15:27:51 +01:00
Kristian Bendiksen afbcc13606 Simulation Input: Handle ADD keyword. 2025-12-08 15:27:51 +01:00
Kristian Bendiksen cfd5f3a310 Simulation Input: Handle COPY keyword. 2025-12-08 15:27:51 +01:00
Kristian Bendiksen 90ce34ac6c Simulation Input: handle BOX records. 2025-12-08 15:27:51 +01:00
Kristian Bendiksen d053d4b0a6 Simulation Input: Handle MULTIPLY keyword. 2025-12-08 15:27:51 +01:00
Kristian Bendiksen 475e05da88 Update well dims keyword for refinement. 2025-12-01 14:20:49 +01:00
Kristian Bendiksen c4177b6282 Simulation Input: Reintroduce porv multiplier. 2025-11-19 16:47:27 +01:00
Kristian Bendiksen 0626c2e199 Simulation Input: reintroduce OPERNUM+OPERATER/BCCON+BCPROP.
Was incorrectly removed in the refactoring in c47e8ac76f
2025-11-19 16:47:27 +01:00
Kristian Bendiksen 59584b5681 Simulation Input: Remove unused argument. 2025-11-19 16:47:27 +01:00
Kristian Bendiksen c47e8ac76f Refactor: move simulation file/input code to separate class. 2025-11-17 15:48:12 +01:00