Well cell transparency: Turned off well cell transparency when no well pipe is visible.

For results visulaization, cell edge and faults faces.
Not yet done for visualization without result colors.
p4#: 21462
This commit is contained in:
Jacob Støren
2013-04-26 16:46:38 +02:00
parent 2e2212d7ea
commit 3806ff9baf
14 changed files with 193 additions and 27 deletions

View File

@@ -136,6 +136,7 @@ void RigCaseData::computeWellCellsPrGrid()
// Allocate and initialize the arrays
m_wellCellsInGrid.resize(grids.size());
m_gridCellToWellIndex.resize(grids.size());
for (gIdx = 0; gIdx < grids.size(); ++gIdx)
{
@@ -144,8 +145,11 @@ void RigCaseData::computeWellCellsPrGrid()
m_wellCellsInGrid[gIdx] = new cvf::UByteArray;
m_wellCellsInGrid[gIdx]->resize(grids[gIdx]->cellCount());
m_gridCellToWellIndex[gIdx] = new cvf::UIntArray;
m_gridCellToWellIndex[gIdx]->resize(grids[gIdx]->cellCount());
}
m_wellCellsInGrid[gIdx]->setAll(false);
m_gridCellToWellIndex[gIdx]->setAll(cvf::UNDEFINED_UINT);
}
// Fill arrays with data
@@ -162,6 +166,7 @@ void RigCaseData::computeWellCellsPrGrid()
CVF_ASSERT(gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size());
m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true);
m_gridCellToWellIndex[gridIndex]->set(gridCellIndex, static_cast<cvf::uint>(wIdx));
size_t sIdx;
for (sIdx = 0; sIdx < wellCells.m_wellResultBranches.size(); ++sIdx)
@@ -176,6 +181,7 @@ void RigCaseData::computeWellCellsPrGrid()
CVF_ASSERT(gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size());
m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true);
m_gridCellToWellIndex[gridIndex]->set(gridCellIndex, static_cast<cvf::uint>(wIdx));
}
}
}
@@ -189,6 +195,8 @@ void RigCaseData::setWellResults(const cvf::Collection<RigSingleWellResultsData>
{
m_wellResults = data;
m_wellCellsInGrid.clear();
m_gridCellToWellIndex.clear();
computeWellCellsPrGrid();
}
@@ -203,6 +211,18 @@ cvf::UByteArray* RigCaseData::wellCellsInGrid(size_t gridIndex)
return m_wellCellsInGrid[gridIndex].p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::UIntArray* RigCaseData::gridCellToWellIndex(size_t gridIndex)
{
computeWellCellsPrGrid();
CVF_ASSERT(gridIndex < m_gridCellToWellIndex.size());
return m_gridCellToWellIndex[gridIndex].p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -63,6 +63,7 @@ public:
const cvf::Collection<RigSingleWellResultsData>& wellResults() { return m_wellResults; }
cvf::UByteArray* wellCellsInGrid(size_t gridIndex);
cvf::UIntArray* gridCellToWellIndex(size_t gridIndex);
RigCell& cellFromWellResultCell(const RigWellResultCell& wellResultCell);
bool findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace, const RigWellResultCell& sourceWellCellResult, const RigWellResultCell& otherWellCellResult) const;
@@ -73,7 +74,6 @@ private:
void computeActiveCellIJKBBox();
void computeWellCellsPrGrid();
void computeActiveCellsGeometryBoundingBox();
private:
cvf::ref<RigMainGrid> m_mainGrid;
@@ -85,4 +85,5 @@ private:
cvf::Collection<RigSingleWellResultsData> m_wellResults; //< A WellResults object for each well in the reservoir
cvf::Collection<cvf::UByteArray> m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling wether the cell is a well cell or not
cvf::Collection<cvf::UIntArray> m_gridCellToWellIndex; //< Array pr grid with index to well pr cell telling which well a cell is in
};