mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1041 - pre-proto - Adding new functions transformMatrix (for calculating transform Matrix for fracture) and getPotentiallyFracturedCells (finding all cells in bounding box for fracture geometry) in RimFracture. Relevant code is updated to use these functions.
This commit is contained in:
@@ -160,32 +160,32 @@ void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<size_t, size_t>> RimSimWellFracture::getFracturedCells()
|
||||
{
|
||||
std::vector<std::pair<size_t, size_t>> cells;
|
||||
|
||||
size_t gridindex = 0; //TODO! For now assuming only one grid
|
||||
|
||||
|
||||
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
|
||||
if (!objHandle) return cells;
|
||||
|
||||
RimEclipseView* mainView = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(mainView);
|
||||
if (!mainView) return cells;
|
||||
|
||||
const RigMainGrid* mainGrid = mainView->mainGrid();
|
||||
if (!mainGrid) return cells;
|
||||
|
||||
size_t cellIndex = mainGrid->cellIndexFromIJK(m_i - 1, m_j - 1, m_k - 1); // cellIndexFromIJK uses 0-based indexing
|
||||
|
||||
cells.push_back(std::make_pair(cellIndex, gridindex));
|
||||
|
||||
return cells;
|
||||
}
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// /
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// std::vector<std::pair<size_t, size_t>> RimSimWellFracture::getFracturedCells()
|
||||
// {
|
||||
// std::vector<std::pair<size_t, size_t>> cells;
|
||||
//
|
||||
// size_t gridindex = 0; //TODO! For now assuming only one grid
|
||||
//
|
||||
//
|
||||
// caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
|
||||
// if (!objHandle) return cells;
|
||||
//
|
||||
// RimEclipseView* mainView = nullptr;
|
||||
// objHandle->firstAncestorOrThisOfType(mainView);
|
||||
// if (!mainView) return cells;
|
||||
//
|
||||
// const RigMainGrid* mainGrid = mainView->mainGrid();
|
||||
// if (!mainGrid) return cells;
|
||||
//
|
||||
// size_t cellIndex = mainGrid->cellIndexFromIJK(m_i - 1, m_j - 1, m_k - 1); // cellIndexFromIJK uses 0-based indexing
|
||||
//
|
||||
// cells.push_back(std::make_pair(cellIndex, gridindex));
|
||||
//
|
||||
// return cells;
|
||||
// }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user