mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-14 01:13:52 -06:00
#1487 Remove wrongful use of RiaApplication and active view in fracture cell intersection calculation
This commit is contained in:
parent
d298963d94
commit
ceb260e5da
@ -139,24 +139,15 @@ const std::vector<cvf::Vec3f>& RimFracture::nodeCoords() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RimFracture::getPotentiallyFracturedCells()
|
||||
std::vector<size_t> RimFracture::getPotentiallyFracturedCells(const RigMainGrid* mainGrid)
|
||||
{
|
||||
std::vector<size_t> cellindecies;
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimView* activeView = RiaApplication::instance()->activeReservoirView();
|
||||
if (!activeView) return cellindecies;
|
||||
|
||||
RimEclipseView* activeRiv = dynamic_cast<RimEclipseView*>(activeView);
|
||||
if (!activeRiv) return cellindecies;
|
||||
|
||||
const RigMainGrid* mainGrid = activeRiv->mainGrid();
|
||||
if (!mainGrid) return cellindecies;
|
||||
|
||||
const std::vector<cvf::Vec3f>& nodeCoordVec = nodeCoords();
|
||||
|
||||
if (!hasValidGeometry()) computeGeometry();
|
||||
|
||||
const std::vector<cvf::Vec3f>& nodeCoordVec = nodeCoords();
|
||||
|
||||
cvf::BoundingBox polygonBBox;
|
||||
for (cvf::Vec3f nodeCoord : nodeCoordVec) polygonBBox.add(nodeCoord);
|
||||
|
||||
|
@ -40,6 +40,7 @@ class RimEllipseFractureTemplate;
|
||||
class RivWellFracturePartMgr;
|
||||
class RimFractureTemplate;
|
||||
class RigFracturedEclipseCellExportData;
|
||||
class RigMainGrid;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -86,7 +87,7 @@ public:
|
||||
const std::vector<cvf::uint>& triangleIndices() const;
|
||||
const std::vector<cvf::Vec3f>& nodeCoords() const;
|
||||
|
||||
std::vector<size_t> getPotentiallyFracturedCells();
|
||||
std::vector<size_t> getPotentiallyFracturedCells(const RigMainGrid* mainGrid);
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
cvf::Vec3d fracturePosition() const;
|
||||
|
@ -115,7 +115,7 @@ std::vector<RigFracturedEclipseCellExportData> RigFractureTransCalc::computeTra
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCaseData->activeCellInfo(porosityModel);
|
||||
|
||||
std::vector<RigFracturedEclipseCellExportData> fracDataVec;
|
||||
std::vector<size_t> fracCells = m_fracture->getPotentiallyFracturedCells();
|
||||
std::vector<size_t> fracCells = m_fracture->getPotentiallyFracturedCells(eclipseCaseData->mainGrid());
|
||||
|
||||
for (size_t fracCell : fracCells)
|
||||
{
|
||||
@ -546,12 +546,11 @@ std::vector<RigFracturedEclipseCellExportData> RigFractureTransCalc::computeUps
|
||||
|
||||
//TODO: A lot of common code with function above... Can be cleaned up...?
|
||||
|
||||
std::vector<size_t> fracCells = m_fracture->getPotentiallyFracturedCells();
|
||||
std::vector<size_t> fracCells = m_fracture->getPotentiallyFracturedCells(m_case->eclipseCaseData()->mainGrid());
|
||||
|
||||
RigEclipseCaseData* eclipseCaseData = m_case->eclipseCaseData();
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RifReaderInterface::MATRIX_RESULTS;
|
||||
RimReservoirCellResultsStorage* gridCellResults = m_case->results(porosityModel);
|
||||
RigActiveCellInfo* activeCellInfo = eclipseCaseData->activeCellInfo(porosityModel);
|
||||
RigActiveCellInfo* activeCellInfo = m_case->eclipseCaseData()->activeCellInfo(porosityModel);
|
||||
|
||||
for (size_t fracCell : fracCells)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user