mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add optional IJK to ResultPoint for easier debugging
This commit is contained in:
@@ -1243,6 +1243,12 @@ RigWellResultPoint RifReaderEclipseOutput::createWellResultPoint( const RigGridB
|
||||
resultPoint.setFlowData( volumeRate, oilRate, adjustedGasRate, waterRate );
|
||||
|
||||
resultPoint.setConnectionFactor( connectionFactor );
|
||||
|
||||
auto ijkOneBased = grid->ijkFromCellIndexOneBased( gridCellIndex );
|
||||
if ( ijkOneBased )
|
||||
{
|
||||
resultPoint.setIjk( *ijkOneBased );
|
||||
}
|
||||
}
|
||||
|
||||
return resultPoint;
|
||||
|
||||
@@ -220,19 +220,26 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterlineForTimeSt
|
||||
|
||||
bool isMultiSegmentWell = wellResults->isMultiSegmentWell();
|
||||
|
||||
#if 0 // Fancy branch splitting, but with artifacts. Needs a bit more work to be better overall than the one we have.
|
||||
RigWellResultFrame splittedWellFrame;
|
||||
if (!isMultiSegmentWell && isAutoDetectBranches)
|
||||
{
|
||||
splittedWellFrame = splitIntoBranches(*wellFramePtr, eclipseCaseData);
|
||||
wellFramePtr = &splittedWellFrame;
|
||||
isMultiSegmentWell = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
const RigWellResultFrame& wellFrame = *wellFramePtr;
|
||||
const std::vector<RigWellResultBranch> resBranches = wellFrame.wellResultBranches();
|
||||
|
||||
const bool debugOutput = false;
|
||||
if ( debugOutput )
|
||||
{
|
||||
for ( const auto& branch : resBranches )
|
||||
{
|
||||
QString branchTxt;
|
||||
for ( const auto& resultPoint : branch.branchResultPoints() )
|
||||
{
|
||||
if ( resultPoint.cellIjk().has_value() )
|
||||
{
|
||||
branchTxt += QString( " %1 \n" ).arg( QString::fromStdString( ( *resultPoint.cellIjk() ).toString() ) );
|
||||
}
|
||||
}
|
||||
RiaLogging::debug( branchTxt );
|
||||
}
|
||||
}
|
||||
|
||||
// Well head
|
||||
// Match this position with well head position in RivWellHeadPartMgr::buildWellHeadParts()
|
||||
|
||||
|
||||
@@ -301,3 +301,19 @@ cvf::Vec3d RigWellResultPoint::bottomPosition() const
|
||||
{
|
||||
return m_bottomPosition;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::optional<caf::VecIjk> RigWellResultPoint::cellIjk() const
|
||||
{
|
||||
return m_cellIjk;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellResultPoint::setIjk( caf::VecIjk cellIJK )
|
||||
{
|
||||
m_cellIjk = cellIJK;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,11 @@
|
||||
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include "cafVecIjk.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
//==================================================================================================
|
||||
@@ -70,6 +73,9 @@ struct RigWellResultPoint
|
||||
|
||||
cvf::Vec3d bottomPosition() const;
|
||||
|
||||
std::optional<caf::VecIjk> cellIjk() const;
|
||||
void setIjk( caf::VecIjk cellIJK );
|
||||
|
||||
private:
|
||||
size_t m_gridIndex;
|
||||
size_t m_cellIndex; //< Index to cell which is included in the well
|
||||
@@ -89,4 +95,6 @@ private:
|
||||
|
||||
double m_connectionFactor;
|
||||
bool m_isConnectedToValve;
|
||||
|
||||
std::optional<caf::VecIjk> m_cellIjk;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user