mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5029 from aritorto/cartCoord
CartesianCoordinateLevel added for ALUGrid
This commit is contained in:
commit
c6bb607cdc
@ -241,6 +241,15 @@ public:
|
|||||||
throw std::invalid_argument("cartesianCoordinate not implemented for dimension " + std::to_string(dimension));
|
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>
|
template <class GridView>
|
||||||
std::unique_ptr<GlobalIndexDataHandle<GridView> > dataHandle(const GridView& gridView)
|
std::unique_ptr<GlobalIndexDataHandle<GridView> > dataHandle(const GridView& gridView)
|
||||||
{
|
{
|
||||||
|
@ -850,7 +850,7 @@ namespace Opm {
|
|||||||
std::string cellIdx;
|
std::string cellIdx;
|
||||||
{
|
{
|
||||||
std::array<int, 3> ijk;
|
std::array<int, 3> ijk;
|
||||||
cartesianIndexMapper.cartesianCoordinate(c, ijk);
|
cartesianIndexMapper.cartesianCoordinateLevel(c, ijk, 0);
|
||||||
cellIdx = "(" + std::to_string(ijk[0]) + ", " +
|
cellIdx = "(" + std::to_string(ijk[0]) + ", " +
|
||||||
std::to_string(ijk[1]) + ", " +
|
std::to_string(ijk[1]) + ", " +
|
||||||
std::to_string(ijk[2]) + ")";
|
std::to_string(ijk[2]) + ")";
|
||||||
|
Loading…
Reference in New Issue
Block a user