mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved simulation well visualization
* Move members to private in RigWellResultPoint * Create simulation well path geometry using well topology * Add separate MSW well pipe centerline computations * Review comments --------- Co-authored-by: magnesj <magnesj@users.noreply.github.com>
This commit is contained in:
@@ -248,8 +248,8 @@ void RigEclipseCaseData::computeWellCellsPrGrid()
|
||||
size_t cdIdx;
|
||||
for ( cdIdx = 0; cdIdx < wellSegment.m_branchResultPoints.size(); ++cdIdx )
|
||||
{
|
||||
size_t gridIndex = wellSegment.m_branchResultPoints[cdIdx].m_gridIndex;
|
||||
size_t gridCellIndex = wellSegment.m_branchResultPoints[cdIdx].m_gridCellIndex;
|
||||
size_t gridIndex = wellSegment.m_branchResultPoints[cdIdx].gridIndex();
|
||||
size_t gridCellIndex = wellSegment.m_branchResultPoints[cdIdx].cellIndex();
|
||||
|
||||
if ( gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size() )
|
||||
{
|
||||
@@ -340,8 +340,8 @@ const RigCell& RigEclipseCaseData::cellFromWellResultCell( const RigWellResultPo
|
||||
{
|
||||
CVF_ASSERT( wellResultCell.isCell() );
|
||||
|
||||
size_t gridIndex = wellResultCell.m_gridIndex;
|
||||
size_t gridCellIndex = wellResultCell.m_gridCellIndex;
|
||||
size_t gridIndex = wellResultCell.gridIndex();
|
||||
size_t gridCellIndex = wellResultCell.cellIndex();
|
||||
|
||||
std::vector<const RigGridBase*> grids;
|
||||
allGrids( &grids );
|
||||
@@ -356,11 +356,11 @@ bool RigEclipseCaseData::findSharedSourceFace( cvf::StructGridInterface::FaceTyp
|
||||
const RigWellResultPoint& sourceWellCellResult,
|
||||
const RigWellResultPoint& otherWellCellResult ) const
|
||||
{
|
||||
size_t gridIndex = sourceWellCellResult.m_gridIndex;
|
||||
size_t gridCellIndex = sourceWellCellResult.m_gridCellIndex;
|
||||
size_t gridIndex = sourceWellCellResult.gridIndex();
|
||||
size_t gridCellIndex = sourceWellCellResult.cellIndex();
|
||||
|
||||
size_t otherGridIndex = otherWellCellResult.m_gridIndex;
|
||||
size_t otherGridCellIndex = otherWellCellResult.m_gridCellIndex;
|
||||
size_t otherGridIndex = otherWellCellResult.gridIndex();
|
||||
size_t otherGridCellIndex = otherWellCellResult.cellIndex();
|
||||
|
||||
if ( gridIndex != otherGridIndex ) return false;
|
||||
|
||||
@@ -504,22 +504,17 @@ std::vector<const RigWellPath*>
|
||||
|
||||
if ( m_simWellBranchCache.find( simWellSeachItem ) == m_simWellBranchCache.end() )
|
||||
{
|
||||
std::vector<std::vector<cvf::Vec3d>> pipeBranchesCLCoords;
|
||||
std::vector<std::vector<RigWellResultPoint>> pipeBranchesCellIds;
|
||||
|
||||
RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineFromWellFrame( this,
|
||||
simWellData,
|
||||
-1,
|
||||
useAutoDetectionOfBranches,
|
||||
includeAllCellCenters,
|
||||
pipeBranchesCLCoords,
|
||||
pipeBranchesCellIds );
|
||||
const auto simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineForTimeStep( this,
|
||||
simWellData,
|
||||
-1,
|
||||
useAutoDetectionOfBranches,
|
||||
includeAllCellCenters );
|
||||
|
||||
m_simWellBranchCache.insert( std::make_pair( simWellSeachItem, cvf::Collection<RigWellPath>() ) );
|
||||
|
||||
for ( size_t brIdx = 0; brIdx < pipeBranchesCLCoords.size(); ++brIdx )
|
||||
for ( const auto& [coords, wellCells] : simWellBranches )
|
||||
{
|
||||
auto wellMdCalculator = RigSimulationWellCoordsAndMD( pipeBranchesCLCoords[brIdx] );
|
||||
auto wellMdCalculator = RigSimulationWellCoordsAndMD( coords );
|
||||
|
||||
cvf::ref<RigWellPath> newWellPath = new RigWellPath( wellMdCalculator.wellPathPoints(), wellMdCalculator.measuredDepths() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user