mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'origin/dev' into pre-proto
This commit is contained in:
@@ -35,7 +35,6 @@ TEST(RigGridManager, BasicTest)
|
||||
cvf::ref<RigEclipseCaseData> eclipseCase = new RigEclipseCaseData;
|
||||
eclipseCase->setMainGrid(mainGridA.p());
|
||||
|
||||
int count = mainGridA->refCount();
|
||||
EXPECT_EQ(mainGridA->refCount(), 2);
|
||||
|
||||
RigGridManager gridCollection;
|
||||
|
||||
@@ -130,7 +130,7 @@ TEST(RigStatisticsMath, HistogramPercentiles)
|
||||
std::vector<size_t> histogram;
|
||||
RigHistogramCalculator histCalc(min, max, 100, &histogram);
|
||||
histCalc.addData(values);
|
||||
std::vector<double> pVals;
|
||||
|
||||
double p10, p50, p90;
|
||||
p10 = histCalc.calculatePercentil(0.1);
|
||||
p50 = histCalc.calculatePercentil(0.5);
|
||||
|
||||
@@ -14,11 +14,8 @@ TEST(ScalarMapperTest, TestHumanReadableTickmarks)
|
||||
cvf::ref<cvf::ScalarMapperDiscreteLinear> m_linDiscreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
|
||||
|
||||
|
||||
double adjustedMin = 0.0;
|
||||
double adjustedMax = 0.0;
|
||||
|
||||
adjustedMin = 2141234;
|
||||
adjustedMax = 2165239;
|
||||
double adjustedMin = 2141234;
|
||||
double adjustedMax = 2165239;
|
||||
|
||||
size_t m_numLevels = 10;
|
||||
|
||||
|
||||
@@ -94,56 +94,6 @@ NodeType quadNormal (ArrayWrapperConst<NodeArrayType, NodeType> nodeCoords,
|
||||
( nodeCoords[cubeFaceIndices[3]] - nodeCoords[cubeFaceIndices[1]]);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
class QuadFaceIntersectorImplHandle
|
||||
{
|
||||
public:
|
||||
virtual ~QuadFaceIntersectorImplHandle() {}
|
||||
virtual bool intersect() = 0;
|
||||
};
|
||||
|
||||
template < typename NodeArrayType, typename NodeType, typename IndicesArrayType, typename IndicesType>
|
||||
class QuadFaceIntersectorImpl : public QuadFaceIntersectorImplHandle
|
||||
{
|
||||
public:
|
||||
QuadFaceIntersectorImpl( ArrayWrapperToEdit<NodeArrayType, NodeType> nodeArray, ArrayWrapperToEdit<IndicesArrayType, IndicesType> indices)
|
||||
: m_nodeArray(nodeArray),
|
||||
m_indices(indices){}
|
||||
|
||||
|
||||
virtual bool intersect()
|
||||
{
|
||||
size_t nodeCount = m_nodeArray.size();
|
||||
NodeType a = m_nodeArray[0];
|
||||
IndicesType idx = m_indices[0];
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
ArrayWrapperToEdit<NodeArrayType, NodeType> m_nodeArray;
|
||||
ArrayWrapperToEdit<IndicesArrayType, IndicesType> m_indices;
|
||||
};
|
||||
|
||||
|
||||
class QuadFaceIntersector
|
||||
{
|
||||
public:
|
||||
template <typename NodeArrayType, typename NodeType, typename IndicesArrayType, typename IndicesType>
|
||||
void setup( ArrayWrapperToEdit<NodeArrayType, NodeType> nodeArray, ArrayWrapperToEdit<IndicesArrayType, IndicesType> indices)
|
||||
{
|
||||
|
||||
m_implementation = new QuadFaceIntersectorImpl< NodeArrayType, NodeType, IndicesArrayType, IndicesType>( nodeArray, indices);
|
||||
}
|
||||
|
||||
bool intersect() { return m_implementation->intersect(); }
|
||||
private:
|
||||
QuadFaceIntersectorImplHandle * m_implementation;
|
||||
};
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -217,14 +167,13 @@ TEST(CellFaceIntersectionTst, Intersection1)
|
||||
edgeIntersectionStorage.setVertexCount(nodes.size());
|
||||
{
|
||||
std::vector<cvf::uint> polygon;
|
||||
bool isOk = false;
|
||||
isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads(
|
||||
&polygon,
|
||||
&additionalVertices,
|
||||
&edgeIntersectionStorage,
|
||||
wrapArrayConst(&nodes),
|
||||
faces[0].data(),
|
||||
faces[1].data(),
|
||||
bool isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads(
|
||||
&polygon,
|
||||
&additionalVertices,
|
||||
&edgeIntersectionStorage,
|
||||
wrapArrayConst(&nodes),
|
||||
faces[0].data(),
|
||||
faces[1].data(),
|
||||
1e-6);
|
||||
|
||||
EXPECT_EQ( (size_t)5, polygon.size());
|
||||
@@ -237,8 +186,7 @@ TEST(CellFaceIntersectionTst, Intersection1)
|
||||
|
||||
{
|
||||
std::vector<cvf::uint> polygon;
|
||||
bool isOk = false;
|
||||
isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads(
|
||||
bool isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads(
|
||||
&polygon,
|
||||
&additionalVertices,
|
||||
&edgeIntersectionStorage,
|
||||
@@ -257,8 +205,7 @@ TEST(CellFaceIntersectionTst, Intersection1)
|
||||
|
||||
{
|
||||
std::vector<cvf::uint> polygon;
|
||||
bool isOk = false;
|
||||
isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads(
|
||||
bool isOk = GeometryTools::calculateOverlapPolygonOfTwoQuads(
|
||||
&polygon,
|
||||
&additionalVertices,
|
||||
&edgeIntersectionStorage,
|
||||
@@ -280,7 +227,7 @@ TEST(CellFaceIntersectionTst, Intersection1)
|
||||
|
||||
for (cvf::uint vxIdx = 0; vxIdx < nodes.size(); ++vxIdx)
|
||||
{
|
||||
bool inserted = GeometryTools::insertVertexInPolygon(
|
||||
GeometryTools::insertVertexInPolygon(
|
||||
&basePolygon,
|
||||
wrapArrayConst(&nodes),
|
||||
vxIdx,
|
||||
@@ -295,7 +242,7 @@ TEST(CellFaceIntersectionTst, Intersection1)
|
||||
{
|
||||
for (cvf::uint vxIdx = 0; vxIdx < nodes.size(); ++vxIdx)
|
||||
{
|
||||
bool inserted = GeometryTools::insertVertexInPolygon(
|
||||
GeometryTools::insertVertexInPolygon(
|
||||
&overlapPolygons[pIdx],
|
||||
wrapArrayConst(&nodes),
|
||||
vxIdx,
|
||||
|
||||
@@ -20,7 +20,7 @@ TEST(opm_parser_test, basicConstruction)
|
||||
std::string filename = "d:/Models/Statoil/Brillig/BRILLIG.DATA";
|
||||
*/
|
||||
|
||||
std::string filename = "d:/gitroot-magnesj/opm-parser/testdata/cases_with_issues/testcase_juli_2011/TEST10K_FLT_LGR_NNC.DATA";
|
||||
// std::string filename = "d:/gitroot-magnesj/opm-parser/testdata/cases_with_issues/testcase_juli_2011/TEST10K_FLT_LGR_NNC.DATA";
|
||||
/*
|
||||
std::string filename = "d:/Models/Statoil/1.2.0_Osesyd_segfault/BASEPRED6.DATA";
|
||||
std::string filename = "d:/Models/Statoil/1.3.0_fault_assert_binary/BV-R2-11-0.DATA";
|
||||
|
||||
Reference in New Issue
Block a user