#2374 Fracture : Incomplete results when computing intersected StimPlan cells

This commit is contained in:
Magne Sjaastad
2018-01-16 07:54:03 +01:00
parent 96bff27519
commit 2457f968cf
4 changed files with 89 additions and 14 deletions

View File

@@ -18,7 +18,75 @@
#include "gtest/gtest.h"
#include "RigWellPathIntersectionTools.h"
#include "RigWellPath.h"
#include "cvfStructGrid.h"
#include "cvfBase.h"
#include "cvfVector3.h"
#include <vector>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(RigWellPathTest, FindWellPathCoordsIncludingIntersectionPoint)
{
RigWellPath wellPathGeometry;
{
std::vector<cvf::Vec3d> wellPathPoints;
std::vector<double> mdValues;
wellPathPoints.push_back(cvf::Vec3d(0.0, 0.0, 0.0));
wellPathPoints.push_back(cvf::Vec3d(0.0, 1.0, 0.0));
wellPathPoints.push_back(cvf::Vec3d(0.0, 2.0, 0.0));
wellPathPoints.push_back(cvf::Vec3d(0.0, 3.0, 0.0));
wellPathPoints.push_back(cvf::Vec3d(0.0, 4.0, 0.0));
mdValues.push_back(0.0);
mdValues.push_back(1.0);
mdValues.push_back(2.0);
mdValues.push_back(3.0);
mdValues.push_back(4.0);
wellPathGeometry.m_wellPathPoints = wellPathPoints;
wellPathGeometry.m_measuredDepths = mdValues;
}
// Before first MD
{
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(-1.0);
EXPECT_EQ(5u, wellPathPoints.size());
}
// Identical to first MD
{
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(0.0);
EXPECT_EQ(5u, wellPathPoints.size());
}
// Identical to second MD
{
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(1.0);
EXPECT_EQ(5u, wellPathPoints.size());
}
// Between first and second MD
{
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(0.3);
EXPECT_EQ(6u, wellPathPoints.size());
}
// Identical to lastMD
{
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(4.0);
EXPECT_EQ(5u, wellPathPoints.size());
}
// Larger than lastMD
{
auto wellPathPoints = wellPathGeometry.wellPathPointsIncludingInterpolatedIntersectionPoint(10.0);
EXPECT_EQ(5u, wellPathPoints.size());
}
}