mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Debug Tools : Add globalCellIndicesToOneBasedIJKText used as input to cell based range filter
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RigActiveCellInfo;
|
||||
class RigFemPartCollection;
|
||||
class RigMainGrid;
|
||||
@@ -26,7 +30,7 @@ class Rim3dView;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
class StructGridInterface;
|
||||
class StructGridInterface;
|
||||
}
|
||||
|
||||
class QString;
|
||||
@@ -45,8 +49,34 @@ public:
|
||||
|
||||
static const RigActiveCellInfo* activeCellInfo(Rim3dView* rimView);
|
||||
|
||||
template<class InputIterator>
|
||||
static QString globalCellIndicesToOneBasedIJKText(InputIterator first, InputIterator last, const RigMainGrid* mainGrid)
|
||||
{
|
||||
QString txt;
|
||||
|
||||
if (mainGrid)
|
||||
{
|
||||
while (first != last)
|
||||
{
|
||||
size_t globalCellIndex = *first;
|
||||
size_t i, j, k;
|
||||
mainGrid->ijkFromCellIndex(globalCellIndex, &i, &j, &k);
|
||||
i++;
|
||||
j++;
|
||||
k++;
|
||||
|
||||
QString itemText = QString("%1 %2 %3").arg(i).arg(j).arg(k);
|
||||
|
||||
txt += itemText + "\n";
|
||||
|
||||
++first;
|
||||
}
|
||||
}
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
private:
|
||||
static RigMainGrid* eclipseMainGrid(RimCase* rimCase);
|
||||
static RigFemPartCollection* geoMechPartCollection(RimCase* rimCase);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user