Merge branch 'dev' of https://github.com/OPM/ResInsight into dev

This commit is contained in:
Ruben Manuel Thoms
2020-09-25 17:09:27 +02:00
211 changed files with 5256 additions and 2112 deletions

View File

@@ -47,13 +47,6 @@ RigCell::RigCell()
, m_isInvalid( false )
{
memcpy( m_cornerIndices.data(), undefinedCornersArray, 8 * sizeof( size_t ) );
m_cellFaceFaults[0] = false;
m_cellFaceFaults[1] = false;
m_cellFaceFaults[2] = false;
m_cellFaceFaults[3] = false;
m_cellFaceFaults[4] = false;
m_cellFaceFaults[5] = false;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -65,9 +65,6 @@ public:
size_t coarseningBoxIndex() const { return m_coarseningBoxIndex; }
void setCoarseningBoxIndex( size_t coarseningBoxIndex ) { m_coarseningBoxIndex = coarseningBoxIndex; }
void setCellFaceFault( cvf::StructGridInterface::FaceType face ) { m_cellFaceFaults[face] = true; }
bool isCellFaceFault( cvf::StructGridInterface::FaceType face ) const { return m_cellFaceFaults[face]; }
cvf::Vec3d center() const;
cvf::Vec3d faceCenter( cvf::StructGridInterface::FaceType face ) const;
cvf::Vec3d faceNormalWithAreaLength( cvf::StructGridInterface::FaceType face ) const;
@@ -89,7 +86,5 @@ private:
size_t m_coarseningBoxIndex; ///< If defined, index into list of coarsening boxes in RigGridBase
bool m_cellFaceFaults[6];
bool m_isInvalid;
};

View File

@@ -72,6 +72,9 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath* w
double currMd = wellPathGeom->measureDepths().front() - mdStepSize;
double endMd = wellPathGeom->measureDepths().back();
bool isFirst = true;
double prevMd = 0.0;
double prevTvd = 0.0;
while ( currMd < endMd )
{
currMd += mdStepSize;
@@ -80,9 +83,26 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( const RigWellPath* w
auto pt = wellPathGeom->interpolatedPointAlongWellPath( currMd );
double tvd = -pt.z();
// The change in measured depth (MD) must be greater or equal to change in
// true vertical depth (TVD), and this was not always the case due to
// interpolation imprecision. Fix by adjusting TVD.
if ( !isFirst )
{
double deltaMd = currMd - prevMd;
double deltaTvd = tvd - prevTvd;
if ( deltaMd < deltaTvd )
{
tvd = prevTvd + deltaMd;
}
}
xValues.push_back( pt.x() );
yValues.push_back( pt.y() );
tvdValues.push_back( tvd );
mdValues.push_back( currMd + rkbOffset );
prevMd = currMd;
prevTvd = tvd;
isFirst = false;
}
}