mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Geomech Range filters working
The algorithm for the IJK assignment now works on the simple test example.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RivGeoMechPartMgrCache.h"
|
||||
#include "RivGeoMechVizLogic.h"
|
||||
#include "RigFemPartGrid.h"
|
||||
|
||||
|
||||
|
||||
@@ -493,6 +494,14 @@ RimCase* RimGeoMechView::ownerCase()
|
||||
return m_geomechCase;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechView::scheduleGeometryRegen(unsigned short geometryType)
|
||||
{
|
||||
m_vizLogic->scheduleGeometryRegen(geometryType);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -506,8 +515,23 @@ void RivElmVisibilityCalculator::computeAllVisible(cvf::UByteArray* elmVisibilit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivElmVisibilityCalculator::computeRangeVisibility(cvf::UByteArray* elmVisibilities, const RigFemPart* femPart, const cvf::CellRangeFilter& rangeFilter)
|
||||
void RivElmVisibilityCalculator::computeRangeVisibility(cvf::UByteArray* elmVisibilities, RigFemPart* femPart,
|
||||
const cvf::CellRangeFilter& rangeFilter)
|
||||
{
|
||||
|
||||
elmVisibilities->resize(femPart->elementCount());
|
||||
|
||||
const RigFemPartGrid* grid = femPart->structGrid();
|
||||
|
||||
for (int elmIdx = 0; elmIdx < femPart->elementCount(); ++elmIdx)
|
||||
{
|
||||
size_t mainGridI;
|
||||
size_t mainGridJ;
|
||||
size_t mainGridK;
|
||||
|
||||
grid->ijkFromCellIndex(elmIdx, &mainGridI, &mainGridJ, &mainGridK);
|
||||
(*elmVisibilities)[elmIdx] = rangeFilter.isCellVisible(mainGridI, mainGridJ, mainGridK, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user