(#397) (#398) Added globalGridCellIndex access to the ResultAccessors

To prepare for well log extraction
This commit is contained in:
Jacob Støren
2015-08-30 21:25:31 +02:00
parent 371902378e
commit 7794a66b04
10 changed files with 123 additions and 0 deletions

View File

@@ -22,6 +22,8 @@
#include "RigGridBase.h"
#include <cmath>
#include "RigCell.h"
#include "RigMainGrid.h"
//--------------------------------------------------------------------------------------------------
@@ -147,3 +149,22 @@ double RigCombMultResultAccessor::nativeMultScalar(size_t gridLocalCellIndex, cv
return faceScalar;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigCombMultResultAccessor::cellScalarGlobIdx(size_t globCellIndex) const
{
CVF_TIGHT_ASSERT(false);
return HUGE_VAL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigCombMultResultAccessor::cellFaceScalarGlobIdx(size_t globCellIndex, cvf::StructGridInterface::FaceType faceId) const
{
size_t gridLocalCellIndex = m_grid->mainGrid()->cell(globCellIndex).gridLocalCellIndex();
return this->cellFaceScalar(gridLocalCellIndex, faceId);
}