Added well branch number and segment number to result info view

p4#: 21968
This commit is contained in:
Magne Sjaastad
2013-06-21 16:20:11 +02:00
parent cd6d60d896
commit 12a0040473
6 changed files with 439 additions and 283 deletions

View File

@@ -178,10 +178,11 @@ void RigCaseData::computeWellCellsPrGrid()
gridIndex = wellSegment.m_wellCells[cdIdx].m_gridIndex;
gridCellIndex = wellSegment.m_wellCells[cdIdx].m_gridCellIndex;
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));
if(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));
}
}
}
}

View File

@@ -25,27 +25,53 @@
#include "RimDefines.h"
#include <QDateTime>
#include <vector>
#include "cvfVector3.h"
struct RigWellResultCell
{
RigWellResultCell() :
m_gridIndex(cvf::UNDEFINED_SIZE_T),
m_gridCellIndex(cvf::UNDEFINED_SIZE_T),
m_isOpen(false)
m_isOpen(false),
m_ertBranchId(-1),
m_ertSegmentId(-1),
m_interpolatedCenter(cvf::Vec3d::UNDEFINED),
m_connectedBranchCount(0)
{ }
bool hasBranchConnections() const
{
return m_connectedBranchCount != 0;
}
bool hasGridConnections() const
{
return m_gridCellIndex != cvf::UNDEFINED_SIZE_T;
}
bool hasConnections() const
{
return hasGridConnections() || hasBranchConnections();
}
size_t m_gridIndex;
size_t m_gridCellIndex; //< Index to cell which is included in the well
bool m_isOpen; //< Marks the well as open or closed as of Eclipse simulation
int m_ertBranchId;
int m_ertSegmentId;
cvf::Vec3d m_interpolatedCenter;
size_t m_connectedBranchCount;
};
struct RigWellResultBranch
{
RigWellResultBranch() :
m_branchIndex(cvf::UNDEFINED_SIZE_T),
m_ertBranchId(-1),
m_useBranchHeadAsCenterLineIntersectionTop(false)
m_ertBranchId(-1)
{}
size_t m_branchIndex;
@@ -57,8 +83,6 @@ struct RigWellResultBranch
// For standard wells, this is always well head.
RigWellResultCell m_branchHead;
bool m_useBranchHeadAsCenterLineIntersectionTop;
// If the outlet segment does not have any connections, it is not possible to populate branch head
// Instead, use the intersection segment outlet branch index and the depth of this segment to identify intersection point
// when computing centerline coords in RivWellPipesPartMgr
@@ -79,6 +103,8 @@ public:
const RigWellResultCell* findResultCell(size_t gridIndex, size_t gridCellIndex) const
{
CVF_ASSERT(gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T);
if (m_wellHead.m_gridCellIndex == gridCellIndex && m_wellHead.m_gridIndex == gridIndex )
{
return &m_wellHead;