mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use more traditional implementation of cartCoord().
This commit is contained in:
@@ -173,9 +173,11 @@ namespace Opm
|
|||||||
const int* dims,
|
const int* dims,
|
||||||
int* ijk)
|
int* ijk)
|
||||||
{
|
{
|
||||||
ijk[2] = log_cart_coord / (dims[0]*dims[1]);
|
int ix = log_cart_coord;
|
||||||
ijk[1] = (log_cart_coord - ijk[2]*(dims[0]*dims[1])) / dims[0];
|
|
||||||
ijk[0] = log_cart_coord % dims[0];
|
ijk[0] = ix % dims[0]; ix /= dims[0];
|
||||||
|
ijk[1] = ix % dims[1]; ix /= dims[1];
|
||||||
|
ijk[2] = ix % dims[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user