Refactor: simplify API for configuring cell counts in IJK.

The old API was based on "grid points", but it was always used to
specify number of cells in each direction.
This commit is contained in:
Kristian Bendiksen
2025-09-18 11:46:57 +02:00
committed by Magne Sjaastad
parent e0df487eaa
commit 5133ae620b
18 changed files with 64 additions and 83 deletions
@@ -201,7 +201,7 @@ void RicCreateTemporaryLgrFeature::createLgr( const LgrInfo& lgrInfo, RigMainGri
localGrid->setGridId( lgrId );
localGrid->setIndexToStartOfCells( totalCellCount );
localGrid->setGridName( lgrInfo.name.toStdString() );
localGrid->setGridPointDimensions( cvf::Vec3st( lgrInfo.sizes.i() + 1, lgrInfo.sizes.j() + 1, lgrInfo.sizes.k() + 1 ) );
localGrid->setCellCounts( cvf::Vec3st( lgrInfo.sizes.i(), lgrInfo.sizes.j(), lgrInfo.sizes.k() ) );
mainGrid->addLocalGrid( localGrid );
size_t cellStartIndex = mainGrid->totalCellCount();
@@ -256,13 +256,7 @@ bool RifReaderEclipseOutput::transferGeometry( const ecl_grid_type* mainEclGrid,
RigMainGrid* mainGrid = eclipseCase->mainGrid();
CVF_ASSERT( mainGrid );
{
cvf::Vec3st gridPointDim( 0, 0, 0 );
gridPointDim.x() = ecl_grid_get_nx( mainEclGrid ) + 1;
gridPointDim.y() = ecl_grid_get_ny( mainEclGrid ) + 1;
gridPointDim.z() = ecl_grid_get_nz( mainEclGrid ) + 1;
mainGrid->setGridPointDimensions( gridPointDim );
}
mainGrid->setCellCounts( cvf::Vec3st( ecl_grid_get_nx( mainEclGrid ), ecl_grid_get_ny( mainEclGrid ), ecl_grid_get_nz( mainEclGrid ) ) );
// std::string mainGridName = ecl_grid_get_name(mainEclGrid);
// ERT returns file path to grid file as name for main grid
@@ -283,18 +277,15 @@ bool RifReaderEclipseOutput::transferGeometry( const ecl_grid_type* mainEclGrid,
std::string lgrName = ecl_grid_get_name( localEclGrid );
int lgrId = ecl_grid_get_lgr_nr( localEclGrid );
cvf::Vec3st gridPointDim( 0, 0, 0 );
gridPointDim.x() = ecl_grid_get_nx( localEclGrid ) + 1;
gridPointDim.y() = ecl_grid_get_ny( localEclGrid ) + 1;
gridPointDim.z() = ecl_grid_get_nz( localEclGrid ) + 1;
RigLocalGrid* localGrid = new RigLocalGrid( mainGrid );
localGrid->setGridId( lgrId );
mainGrid->addLocalGrid( localGrid );
localGrid->setIndexToStartOfCells( totalCellCount );
localGrid->setGridName( lgrName );
localGrid->setGridPointDimensions( gridPointDim );
cvf::Vec3st cellCounts( ecl_grid_get_nx( localEclGrid ), ecl_grid_get_ny( localEclGrid ), ecl_grid_get_nz( localEclGrid ) );
localGrid->setCellCounts( cellCounts );
totalCellCount += ecl_grid_get_global_size( localEclGrid );
}
@@ -156,9 +156,9 @@ void RifReaderMockModel::setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cvf
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifReaderMockModel::setGridPointDimensions( const cvf::Vec3st& gridPointDimensions )
void RifReaderMockModel::setCellCounts( const cvf::Vec3st& cellCounts )
{
m_reservoirBuilder.setGridPointDimensions( gridPointDimensions );
m_reservoirBuilder.setCellCounts( cellCounts );
}
//--------------------------------------------------------------------------------------------------
@@ -30,7 +30,7 @@ public:
~RifReaderMockModel() override;
void setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cvf::Vec3d maxWorldCoordinate );
void setGridPointDimensions( const cvf::Vec3st& gridPointDimensions );
void setCellCounts( const cvf::Vec3st& cellCounts );
void setResultInfo( size_t resultCount, size_t timeStepCount );
void enableWellData( bool enableWellData );
@@ -159,7 +159,7 @@ bool RifReaderOpmCommon::importGrid( RigMainGrid* mainGrid, RigEclipseCaseData*
Opm::EclIO::EGrid opmGrid( m_gridFileName );
const auto& dims = opmGrid.dimension();
mainGrid->setGridPointDimensions( cvf::Vec3st( dims[0] + 1, dims[1] + 1, dims[2] + 1 ) );
mainGrid->setCellCounts( cvf::Vec3st( dims[0], dims[1], dims[2] ) );
mainGrid->setGridName( "Main grid" );
mainGrid->setDualPorosity( opmGrid.porosity_mode() > 0 );
@@ -191,7 +191,7 @@ bool RifReaderOpmCommon::importGrid( RigMainGrid* mainGrid, RigEclipseCaseData*
RigLocalGrid* localGrid = new RigLocalGrid( mainGrid );
const auto& lgrDims = lgrGrids[lgrIdx].dimension();
localGrid->setGridPointDimensions( cvf::Vec3st( lgrDims[0] + 1, lgrDims[1] + 1, lgrDims[2] + 1 ) );
localGrid->setCellCounts( cvf::Vec3st( lgrDims[0], lgrDims[1], lgrDims[2] ) );
localGrid->setGridId( lgrIdx + 1 );
localGrid->setGridName( lgr_names[lgrIdx] );
localGrid->setIndexToStartOfCells( totalCellCount );
@@ -63,7 +63,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips
Opm::EclIO::EGrid opmGrid( m_gridFileName );
const auto& dims = opmGrid.dimension();
activeGrid->setGridPointDimensions( cvf::Vec3st( dims[0] + 1, dims[1] + 1, dims[2] + 1 ) );
activeGrid->setCellCounts( cvf::Vec3st( dims[0], dims[1], dims[2] ) );
activeGrid->setGridName( "Main grid" );
activeGrid->setDualPorosity( opmGrid.porosity_mode() > 0 );
@@ -97,7 +97,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips
RigActiveCellLocalGrid* localGrid = new RigActiveCellLocalGrid( activeGrid );
const auto& lgrDims = lgrGrids[lgrIdx].dimension();
localGrid->setGridPointDimensions( cvf::Vec3st( lgrDims[0] + 1, lgrDims[1] + 1, lgrDims[2] + 1 ) );
localGrid->setCellCounts( cvf::Vec3st( lgrDims[0], lgrDims[1], lgrDims[2] ) );
localGrid->setGridId( lgrIdx + 1 );
localGrid->setGridName( lgr_names[lgrIdx] );
localGrid->setIndexToStartOfCells( totalCellCount );
@@ -176,8 +176,7 @@ bool RifRoffFileTools::openGridFile( const QString& fileName, RigEclipseCaseData
RigMainGrid* mainGrid = eclipseCase->mainGrid();
CVF_ASSERT( mainGrid );
cvf::Vec3st gridPointDim( nx + 1, ny + 1, nz + 1 );
mainGrid->setGridPointDimensions( gridPointDim );
mainGrid->setCellCounts( cvf::Vec3st( nx, ny, nz ) );
mainGrid->setGridName( "Main grid" );
size_t totalCellCount = nx * ny * nz;
@@ -200,8 +200,8 @@ void RimCornerPointCase::buildGrid( RigEclipseCaseData& eclipseCaseData,
RigMainGrid* mainGrid = eclipseCaseData.mainGrid();
CVF_ASSERT( mainGrid );
cvf::Vec3st gridPointDim( nx + 1, ny + 1, nz + 1 );
mainGrid->setGridPointDimensions( gridPointDim );
mainGrid->setCellCounts( cvf::Vec3st( nx, ny, nz ) );
mainGrid->setGridName( "Main grid" );
size_t totalCellCount = nx * ny * nz;
@@ -249,7 +249,7 @@ cvf::ref<RifReaderInterface> RimEclipseInputCase::createMockModel( QString model
// Create the mock file interface and and RigSerervoir and set them up.
mockFileInterface->setWorldCoordinates( cvf::Vec3d( 10, 10, 10 ), cvf::Vec3d( 20, 20, 20 ) );
mockFileInterface->setGridPointDimensions( cvf::Vec3st( 4, 5, 6 ) );
mockFileInterface->setCellCounts( cvf::Vec3st( 5, 6, 7 ) );
mockFileInterface->addLocalGridRefinement( cvf::Vec3st( 0, 2, 2 ), cvf::Vec3st( 0, 2, 2 ), cvf::Vec3st( 3, 3, 3 ) );
mockFileInterface->setResultInfo( 3, 10 );
@@ -448,7 +448,7 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel( QString mode
{
// Create the mock file interface and and RigSerervoir and set them up.
mockFileInterface->setWorldCoordinates( cvf::Vec3d( 10, 10, 10 ), cvf::Vec3d( 20, 20, 20 ) );
mockFileInterface->setGridPointDimensions( cvf::Vec3st( 4, 5, 6 ) );
mockFileInterface->setCellCounts( cvf::Vec3st( 5, 6, 7 ) );
mockFileInterface->addLocalGridRefinement( cvf::Vec3st( 0, 2, 2 ), cvf::Vec3st( 0, 2, 2 ), cvf::Vec3st( 3, 3, 3 ) );
mockFileInterface->enableWellData( false );
@@ -457,7 +457,7 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel( QString mode
else if ( modelName == RiaDefines::mockModelBasicWithResults() )
{
mockFileInterface->setWorldCoordinates( cvf::Vec3d( 10, 10, 10 ), cvf::Vec3d( -20, -20, -20 ) );
mockFileInterface->setGridPointDimensions( cvf::Vec3st( 5, 10, 20 ) );
mockFileInterface->setCellCounts( cvf::Vec3st( 6, 11, 21 ) );
mockFileInterface->addLocalGridRefinement( cvf::Vec3st( 0, 3, 3 ), cvf::Vec3st( 1, 4, 9 ), cvf::Vec3st( 2, 2, 2 ) );
mockFileInterface->setResultInfo( 3, 10 );
@@ -488,7 +488,7 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel( QString mode
mockFileInterface->setWorldCoordinates( cvf::Vec3d( startX + offsetX, startY + offsetY, startZ + offsetZ ),
cvf::Vec3d( startX + widthX + offsetX, startY + widthY + offsetY, startZ + widthZ + offsetZ ) );
mockFileInterface->setGridPointDimensions( cvf::Vec3st( 50, 100, 200 ) );
mockFileInterface->setCellCounts( cvf::Vec3st( 51, 101, 201 ) );
mockFileInterface->addLocalGridRefinement( cvf::Vec3st( 0, 30, 30 ), cvf::Vec3st( 1, 40, 90 ), cvf::Vec3st( 2, 2, 2 ) );
mockFileInterface->setResultInfo( 3, 10 );
@@ -524,8 +524,8 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel( QString mode
mockFileInterface->setWorldCoordinates( cvf::Vec3d( startX + offsetX, startY + offsetY, startZ + offsetZ ),
cvf::Vec3d( startX + widthX + offsetX, startY + widthY + offsetY, startZ + widthZ + offsetZ ) );
mockFileInterface->setGridPointDimensions(
cvf::Vec3st( mockModelSettings->cellCountX + 1, mockModelSettings->cellCountY + 1, mockModelSettings->cellCountZ + 1 ) );
mockFileInterface->setCellCounts(
cvf::Vec3st( mockModelSettings->cellCountX, mockModelSettings->cellCountY, mockModelSettings->cellCountZ ) );
mockFileInterface->setResultInfo( mockModelSettings->resultCount, mockModelSettings->timeStepCount );
mockFileInterface->enableWellData( false );
@@ -79,8 +79,7 @@ void RimRegularGridCase::createModel()
RigReservoirBuilder reservoirBuilder;
reservoirBuilder.setWorldCoordinates( m_minimum, m_maximum );
cvf::Vec3st gridPointDimensions( m_cellCountI, m_cellCountJ, m_cellCountK );
reservoirBuilder.setIJKCount( gridPointDimensions );
reservoirBuilder.setIJKCount( cvf::Vec3st( m_cellCountI, m_cellCountJ, m_cellCountK ) );
reservoirBuilder.createGridsAndCells( reservoir.p() );
@@ -29,7 +29,7 @@
#include <cstdlib>
RigGridBase::RigGridBase( RigMainGrid* mainGrid )
: m_gridPointDimensions( 0, 0, 0 )
: m_cellCounts( 0, 0, 0 )
, m_indexToStartOfCells( 0 )
, m_mainGrid( mainGrid )
, m_cellCountIJK( 0 )
@@ -54,14 +54,9 @@ RigGridBase::~RigGridBase()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigGridBase::setGridPointDimensions( const cvf::Vec3st& gridDimensions )
void RigGridBase::setCellCounts( const cvf::Vec3st& cellCount )
{
m_gridPointDimensions = gridDimensions;
m_cellCount.x() = ( m_gridPointDimensions.x() > 0 ? m_gridPointDimensions.x() - 1 : 0 );
m_cellCount.y() = ( m_gridPointDimensions.y() > 0 ? m_gridPointDimensions.y() - 1 : 0 );
m_cellCount.z() = ( m_gridPointDimensions.z() > 0 ? m_gridPointDimensions.z() - 1 : 0 );
m_cellCounts = cellCount;
m_cellCountIJ = cellCountI() * cellCountJ();
m_cellCountIJK = m_cellCountIJ * cellCountK();
}
@@ -190,9 +185,9 @@ std::array<cvf::Vec3d, 8> RigGridBase::cellCornerVertices( size_t cellIndex ) co
size_t RigGridBase::cellIndexFromIJK( size_t i, size_t j, size_t k ) const
{
CVF_TIGHT_ASSERT( i != cvf::UNDEFINED_SIZE_T && j != cvf::UNDEFINED_SIZE_T && k != cvf::UNDEFINED_SIZE_T );
CVF_TIGHT_ASSERT( i < m_gridPointDimensions.x() && j < m_gridPointDimensions.y() && k < m_gridPointDimensions.z() );
CVF_TIGHT_ASSERT( i < m_cellCounts.x() && j < m_cellCounts.y() && k < m_cellCounts.z() );
return i + j * m_cellCount.x() + k * m_cellCountIJ;
return i + j * m_cellCounts.x() + k * m_cellCountIJ;
}
//--------------------------------------------------------------------------------------------------
@@ -200,7 +195,7 @@ size_t RigGridBase::cellIndexFromIJK( size_t i, size_t j, size_t k ) const
//--------------------------------------------------------------------------------------------------
size_t RigGridBase::cellIndexFromIJKUnguarded( size_t i, size_t j, size_t k ) const
{
return i + j * m_cellCount.x() + k * m_cellCountIJ;
return i + j * m_cellCounts.x() + k * m_cellCountIJ;
}
//--------------------------------------------------------------------------------------------------
@@ -219,13 +214,13 @@ bool RigGridBase::ijkFromCellIndex( size_t cellIndex, size_t* i, size_t* j, size
size_t index = cellIndex;
if ( m_gridPointDimensions[0] <= 1u || m_gridPointDimensions[1] <= 1u )
if ( m_cellCounts[0] <= 0u || m_cellCounts[1] <= 0u )
{
return false;
}
const size_t cellCountI = m_cellCount.x();
const size_t cellCountJ = m_cellCount.y();
const size_t cellCountI = m_cellCounts.x();
const size_t cellCountJ = m_cellCounts.y();
*i = index % cellCountI;
index /= cellCountI;
@@ -257,8 +252,8 @@ void RigGridBase::ijkFromCellIndexUnguarded( size_t cellIndex, size_t* i, size_t
{
size_t index = cellIndex;
const size_t cellCountI = m_cellCount.x();
const size_t cellCountJ = m_cellCount.y();
const size_t cellCountI = m_cellCounts.x();
const size_t cellCountJ = m_cellCounts.y();
*i = index % cellCountI;
index /= cellCountI;
@@ -327,7 +322,7 @@ cvf::Vec3d RigGridBase::maxCoordinate() const
//--------------------------------------------------------------------------------------------------
bool RigGridBase::isCellValid( size_t i, size_t j, size_t k ) const
{
if ( i >= m_cellCount.x() || j >= m_cellCount.y() || k >= m_cellCount.z() )
if ( i >= m_cellCounts.x() || j >= m_cellCounts.y() || k >= m_cellCounts.z() )
{
return false;
}
@@ -20,7 +20,6 @@
#pragma once
#include "RifReaderInterface.h"
#include "RigFault.h"
#include "cafVecIjk.h"
@@ -28,8 +27,8 @@
#include "cvfStructGrid.h"
#include "cvfStructGridGeometryGenerator.h"
#include "cvfVector3.h"
#include <array>
#include <array>
#include <optional>
#include <string>
#include <vector>
@@ -44,11 +43,12 @@ public:
explicit RigGridBase( RigMainGrid* mainGrid );
~RigGridBase() override;
void setGridPointDimensions( const cvf::Vec3st& gridDimensions );
void setCellCounts( const cvf::Vec3st& cellCounts );
size_t cellCountI() const override { return m_cellCount.x(); }
size_t cellCountJ() const override { return m_cellCount.y(); }
size_t cellCountK() const override { return m_cellCount.z(); }
size_t cellCountI() const override { return m_cellCounts.x(); }
size_t cellCountJ() const override { return m_cellCounts.y(); }
size_t cellCountK() const override { return m_cellCounts.z(); }
cvf::Vec3st cellCounts() const { return m_cellCounts; }
virtual size_t cellCount() const { return m_cellCountIJK; }
virtual RigCell& cell( size_t gridLocalCellIndex );
@@ -121,8 +121,7 @@ protected:
private:
std::string m_gridName;
cvf::Vec3st m_gridPointDimensions;
cvf::Vec3st m_cellCount;
cvf::Vec3st m_cellCounts;
size_t m_gridIndex; ///< The LGR index of this grid. Starts with 1. Main grid has index 0.
int m_gridId; ///< The LGR id of this grid. Main grid has id 0.
RigMainGrid* m_mainGrid;
@@ -29,7 +29,7 @@
RigReservoirBuilder::RigReservoirBuilder()
: m_minWorldCoordinate( 0.0, 0.0, 0.0 )
, m_maxWorldCoordinate( 0.0, 0.0, 0.0 )
, m_gridPointDimensions( 0, 0, 0 )
, m_ijkCount( 0, 0, 0 )
{
}
@@ -47,7 +47,7 @@ void RigReservoirBuilder::setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cv
//--------------------------------------------------------------------------------------------------
void RigReservoirBuilder::setIJKCount( const cvf::Vec3st& ijkCount )
{
m_gridPointDimensions = { ijkCount.x() + 1, ijkCount.y() + 1, ijkCount.z() + 1 };
m_ijkCount = ijkCount;
}
//--------------------------------------------------------------------------------------------------
@@ -106,16 +106,14 @@ void RigReservoirBuilder::createGridsAndCells( RigEclipseCaseData* eclipseCase )
localGrid->setParentGrid( eclipseCase->mainGrid() );
localGrid->setIndexToStartOfCells( mainGridNodes.size() / 8 );
cvf::Vec3st gridPointDimensions( lgr.m_singleCellRefinementFactors.x() *
( lgr.m_mainGridMaxCellPosition.x() - lgr.m_mainGridMinCellPosition.x() + 1 ) +
1,
lgr.m_singleCellRefinementFactors.y() *
( lgr.m_mainGridMaxCellPosition.y() - lgr.m_mainGridMinCellPosition.y() + 1 ) +
1,
lgr.m_singleCellRefinementFactors.z() *
( lgr.m_mainGridMaxCellPosition.z() - lgr.m_mainGridMinCellPosition.z() + 1 ) +
1 );
localGrid->setGridPointDimensions( gridPointDimensions );
cvf::Vec3st cellCounts( lgr.m_singleCellRefinementFactors.x() *
( lgr.m_mainGridMaxCellPosition.x() - lgr.m_mainGridMinCellPosition.x() ),
lgr.m_singleCellRefinementFactors.y() *
( lgr.m_mainGridMaxCellPosition.y() - lgr.m_mainGridMinCellPosition.y() ),
lgr.m_singleCellRefinementFactors.z() *
( lgr.m_mainGridMaxCellPosition.z() - lgr.m_mainGridMinCellPosition.z() ) );
localGrid->setCellCounts( cellCounts );
cvf::BoundingBox bb;
for ( size_t cellIdx = 0; cellIdx < mainGridIndicesWithSubGrid.size(); cellIdx++ )
@@ -131,15 +129,15 @@ void RigReservoirBuilder::createGridsAndCells( RigEclipseCaseData* eclipseCase )
cell.setSubGrid( localGrid );
}
cvf::Vec3st lgrCellDimensions = gridPointDimensions - cvf::Vec3st( 1, 1, 1 );
appendNodes( bb.min(), bb.max(), lgrCellDimensions, mainGridNodes );
cvf::Vec3st lgrCellCounts = cellCounts;
appendNodes( bb.min(), bb.max(), lgrCellCounts, mainGridNodes );
size_t subGridCellCount = ( mainGridNodes.size() / 8 ) - totalCellCount;
appendCells( totalCellCount * 8, subGridCellCount, localGrid, eclipseCase->mainGrid()->reservoirCells() );
totalCellCount += subGridCellCount;
}
eclipseCase->mainGrid()->setGridPointDimensions( m_gridPointDimensions );
eclipseCase->mainGrid()->setCellCounts( m_ijkCount );
// Set all cells active
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
@@ -262,11 +260,11 @@ void RigReservoirBuilder::appendCubeNodes( const cvf::Vec3d& min, const cvf::Vec
//--------------------------------------------------------------------------------------------------
size_t RigReservoirBuilder::cellIndexFromIJK( size_t i, size_t j, size_t k ) const
{
CVF_TIGHT_ASSERT( i < ( m_gridPointDimensions.x() - 1 ) );
CVF_TIGHT_ASSERT( j < ( m_gridPointDimensions.y() - 1 ) );
CVF_TIGHT_ASSERT( k < ( m_gridPointDimensions.z() - 1 ) );
CVF_TIGHT_ASSERT( i < m_ijkCount.x() );
CVF_TIGHT_ASSERT( j < m_ijkCount.y() );
CVF_TIGHT_ASSERT( k < m_ijkCount.z() );
size_t ci = i + j * ( m_gridPointDimensions.x() - 1 ) + k * ( ( m_gridPointDimensions.x() - 1 ) * ( m_gridPointDimensions.y() - 1 ) );
size_t ci = i + j * m_ijkCount.x() + k * m_ijkCount.x() * m_ijkCount.y();
return ci;
}
@@ -275,5 +273,5 @@ size_t RigReservoirBuilder::cellIndexFromIJK( size_t i, size_t j, size_t k ) con
//--------------------------------------------------------------------------------------------------
cvf::Vec3st RigReservoirBuilder::ijkCount() const
{
return cvf::Vec3st( m_gridPointDimensions.x() - 1, m_gridPointDimensions.y() - 1, m_gridPointDimensions.z() - 1 );
return m_ijkCount;
}
@@ -67,7 +67,7 @@ private:
private:
cvf::Vec3d m_minWorldCoordinate;
cvf::Vec3d m_maxWorldCoordinate;
cvf::Vec3st m_gridPointDimensions;
cvf::Vec3st m_ijkCount;
std::vector<LocalGridRefinement> m_localGridRefinements;
};
@@ -49,9 +49,9 @@ RigReservoirBuilderMock::RigReservoirBuilderMock()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirBuilderMock::setGridPointDimensions( const cvf::Vec3st& gridPointDimensions )
void RigReservoirBuilderMock::setCellCounts( const cvf::Vec3st& cellCounts )
{
m_reservoirBuilder.setIJKCount( { gridPointDimensions.x() - 1, gridPointDimensions.y() - 1, gridPointDimensions.z() - 1 } );
m_reservoirBuilder.setIJKCount( cellCounts );
}
//--------------------------------------------------------------------------------------------------
@@ -40,7 +40,7 @@ public:
RigReservoirBuilderMock();
void setWorldCoordinates( cvf::Vec3d minWorldCoordinate, cvf::Vec3d maxWorldCoordinate );
void setGridPointDimensions( const cvf::Vec3st& gridPointDimensions );
void setCellCounts( const cvf::Vec3st& cellCounts );
void setResultInfo( size_t resultCount, size_t timeStepCount );
void enableWellData( bool enableWellData );
@@ -37,7 +37,7 @@ TEST( RigEclipseWellLogExtractor, ShortWellPathInsideOneCell )
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
mockFileInterface->setWorldCoordinates( cvf::Vec3d( 10, 10, 10 ), cvf::Vec3d( 20, 20, 20 ) );
mockFileInterface->setGridPointDimensions( cvf::Vec3st( 4, 5, 6 ) );
mockFileInterface->setCellCounts( cvf::Vec3st( 5, 6, 7 ) );
mockFileInterface->enableWellData( false );
mockFileInterface->open( "", reservoir.p() );