#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.
This commit is contained in:
Kristian Bendiksen committed 2026-03-30 11:24:56 +02:00
1 parent 4aa0910db3
commit 3067823e71
33 files changed
+922 -796

No files matched your search

@@ -30,7 +30,7 @@
#include "RigEclipseResultAddress.h"
#include "RigGridExportAdapter.h"
#include "RigMainGrid.h"
#include "RigNonUniformRefinement.h"
#include "RigNoRefinement.h"
#include "RigResdataGridConverter.h"
#include "RigResultAccessor.h"
#include "RigResultAccessorFactory.h"
@@ -248,9 +248,9 @@ std::expected<caf::PdmObjectHandle*, QString> RimcEclipseCase_exportCornerPointG
// Use RigGridExportAdapter to handle full grid export
// Export the full grid (no min/max bounds, no refinement, no visibility override)
const auto* mainGrid = eclipseCaseData->mainGrid();
cvf::Vec3st fullSize( mainGrid->cellCountI(), mainGrid->cellCountJ(), mainGrid->cellCountK() );
RigGridExportAdapter gridAdapter( eclipseCaseData, cvf::Vec3st::ZERO, cvf::Vec3st::UNDEFINED, RigNonUniformRefinement( fullSize ), nullptr );
const auto* mainGrid = eclipseCaseData->mainGrid();
cvf::Vec3st fullSize( mainGrid->cellCountI(), mainGrid->cellCountJ(), mainGrid->cellCountK() );
RigGridExportAdapter gridAdapter( eclipseCaseData, cvf::Vec3st::ZERO, cvf::Vec3st::UNDEFINED, RigNoRefinement( fullSize ), nullptr );
// Use the existing conversion utility to get the arrays in the correct format
std::vector<float> coordArray;