add cartesianCoordianteLevel in ALUCartIdxMapp, used in RelperDiag

This commit is contained in:
Antonella Ritorto 2023-11-27 15:12:40 +01:00
parent 5fe1eafb34
commit 8017ff9a02
2 changed files with 10 additions and 1 deletions

View File

@ -241,6 +241,15 @@ public:
throw std::invalid_argument("cartesianCoordinate not implemented for dimension " + std::to_string(dimension));
}
/** \brief Only for unifying calls with CartesianIndexMapper<CpGrid> where levels are relevant */
void cartesianCoordinateLevel(const int compressedElementIndex, std::array<int, dimension>& coords, int level) const
{
if (level) {
throw std::invalid_argument("Invalid level.\n");
}
cartesianCoordinate(compressedElementIndex, coords);
}
template <class GridView>
std::unique_ptr<GlobalIndexDataHandle<GridView> > dataHandle(const GridView& gridView)
{

View File

@ -850,7 +850,7 @@ namespace Opm {
std::string cellIdx;
{
std::array<int, 3> ijk;
cartesianIndexMapper.cartesianCoordinate(c, ijk);
cartesianIndexMapper.cartesianCoordinateLevel(c, ijk, 0);
cellIdx = "(" + std::to_string(ijk[0]) + ", " +
std::to_string(ijk[1]) + ", " +
std::to_string(ijk[2]) + ")";