2017-05-26 04:10:54 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RigCell.h"
|
|
|
|
|
2017-06-14 07:15:29 -05:00
|
|
|
#include "RigHexIntersectionTools.h"
|
2017-05-26 04:10:54 -05:00
|
|
|
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
|
|
|
|
class RigWellPath;
|
|
|
|
class RigMainGrid;
|
|
|
|
class RigEclipseCaseData;
|
2017-12-12 07:49:10 -06:00
|
|
|
struct WellPathCellIntersectionInfo;
|
2017-05-26 04:10:54 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2017-05-29 08:39:37 -05:00
|
|
|
class RigWellPathIntersectionTools
|
2017-05-26 04:10:54 -05:00
|
|
|
{
|
|
|
|
public:
|
2017-12-12 07:49:10 -06:00
|
|
|
static std::vector<WellPathCellIntersectionInfo> findCellsIntersectedByPath(const RigEclipseCaseData* caseData,
|
2017-09-19 10:20:49 -05:00
|
|
|
const std::vector<cvf::Vec3d>& pathCoords,
|
|
|
|
const std::vector<double>& pathMds);
|
2017-05-26 04:10:54 -05:00
|
|
|
|
|
|
|
static std::vector<HexIntersectionInfo> getIntersectedCells(const RigMainGrid* grid, const std::vector<cvf::Vec3d>& coords);
|
|
|
|
|
2017-06-07 09:04:34 -05:00
|
|
|
static cvf::Vec3d calculateLengthInCell(const std::array<cvf::Vec3d, 8>& hexCorners, const cvf::Vec3d& startPoint, const cvf::Vec3d& endPoint);
|
|
|
|
static cvf::Vec3d calculateLengthInCell(const RigMainGrid* grid, size_t cellIndex, const cvf::Vec3d& startPoint, const cvf::Vec3d& endPoint);
|
2017-05-26 04:10:54 -05:00
|
|
|
|
|
|
|
static std::vector<size_t> findCloseCells(const RigMainGrid* grid, const cvf::BoundingBox& bb);
|
2017-05-30 05:10:05 -05:00
|
|
|
static size_t findCellFromCoords(const RigMainGrid* caseData, const cvf::Vec3d& coords, bool* foundCell);
|
2017-05-26 04:10:54 -05:00
|
|
|
|
2017-05-29 08:39:37 -05:00
|
|
|
private:
|
2017-05-26 04:10:54 -05:00
|
|
|
static void removeEnteringIntersections(std::vector<HexIntersectionInfo>* intersections);
|
|
|
|
};
|