#1758 Use RigMainGrid in interface to CompletionDataGridCell

This commit is contained in:
Magne Sjaastad
2018-01-30 13:29:45 +01:00
parent 6f0f73a017
commit e18a08a425
5 changed files with 10 additions and 14 deletions

View File

@@ -348,7 +348,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
eclCellIdxToTransPrFractureMap[externalCell.m_globalCellIdx][fracture] = trans;
RigCompletionData compDat(wellPathName, RigCompletionDataGridCell(externalCell.m_globalCellIdx, caseToApply));
RigCompletionData compDat(wellPathName, RigCompletionDataGridCell(externalCell.m_globalCellIdx, caseToApply->mainGrid()));
compDat.setFromFracture(trans, fracture->fractureTemplate()->skinFactor());
compDat.addMetadata(fracture->name(), QString::number(trans));
fractureCompletions.push_back(compDat);

View File

@@ -117,7 +117,7 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
for (WellBorePartForTransCalc wellBorePart : wellBoreParts)
{
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(globalCellIndex, settings.caseToApply));
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(globalCellIndex, settings.caseToApply->mainGrid()));
double transmissibility = 0.0;
if (wellBorePart.isMainBore)

View File

@@ -909,7 +909,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
bool cellIsActive = activeCellInfo->isActive(cell.globCellIndex);
if (!cellIsActive) continue;
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(cell.globCellIndex, settings.caseToApply));
RigCompletionData completion(wellPath->completions()->wellNameForExport(), RigCompletionDataGridCell(cell.globCellIndex, settings.caseToApply->mainGrid()));
CellDirection direction = calculateDirectionInCell(settings.caseToApply, cell.globCellIndex, cell.intersectionLengthsInCellCS);
double transmissibility = RicWellPathExportCompletionDataFeature::calculateTransmissibility(settings.caseToApply,

View File

@@ -18,11 +18,8 @@
#include "RigCompletionDataGridCell.h"
#include "RigEclipseCaseData.h"
#include "RigMainGrid.h"
#include "RimEclipseCase.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -31,14 +28,13 @@ RigCompletionDataGridCell::RigCompletionDataGridCell() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigCompletionDataGridCell::RigCompletionDataGridCell(size_t globalCellIndex, const RimEclipseCase* eclipseCase)
RigCompletionDataGridCell::RigCompletionDataGridCell(size_t globalCellIndex, const RigMainGrid* mainGrid)
: m_globalCellIndex(globalCellIndex)
{
if (eclipseCase && eclipseCase->eclipseCaseData() && eclipseCase->eclipseCaseData()->mainGrid())
if (mainGrid)
{
const RigMainGrid* mainGrid = eclipseCase->eclipseCaseData()->mainGrid();
const RigCell& cell = mainGrid->globalCellArray()[globalCellIndex];
RigGridBase* grid = cell.hostGrid();
const RigCell& cell = mainGrid->globalCellArray()[globalCellIndex];
RigGridBase* grid = cell.hostGrid();
if (grid)
{
size_t gridLocalCellIndex = cell.gridLocalCellIndex();
@@ -76,7 +72,7 @@ bool RigCompletionDataGridCell::operator<(const RigCompletionDataGridCell& other
if (m_localCellIndexI != other.m_localCellIndexI) return m_localCellIndexI < other.m_localCellIndexI;
if (m_localCellIndexJ != other.m_localCellIndexJ) return m_localCellIndexJ < other.m_localCellIndexJ;
if (m_localCellIndexK != other.m_localCellIndexK) return m_localCellIndexK < other.m_localCellIndexK;
return false;
}

View File

@@ -20,7 +20,7 @@
#include <QString>
class RimEclipseCase;
class RigMainGrid;
//==================================================================================================
///
@@ -30,7 +30,7 @@ class RigCompletionDataGridCell
public:
RigCompletionDataGridCell();
RigCompletionDataGridCell(size_t globalCellIndex, const RimEclipseCase* eclipseCase);
RigCompletionDataGridCell(size_t globalCellIndex, const RigMainGrid* mainGrid);
bool operator==(const RigCompletionDataGridCell& other) const;