Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refined grid export appears to give wrong number of cells #10503

Closed
gdfldm opened this issue Aug 14, 2023 · 2 comments · Fixed by #10517
Closed

Refined grid export appears to give wrong number of cells #10503

gdfldm opened this issue Aug 14, 2023 · 2 comments · Fixed by #10517
Assignees
Labels
BugInRelease Bug in an official release

Comments

@gdfldm
Copy link

gdfldm commented Aug 14, 2023

I tried to export a refined sector grid but found that the exported grid had the wrong number of cells. I think this is due to a few lines in ...

ApplicationLibCode/FileInterface/RifEclipseInputFileTools.cpp

...in the function ...

bool RifEclipseInputFileTools::exportGrid()

...the code currently looks like ...

    int ecl_nx = static_cast<int>( ( max.x() - min.x() ) * refinement.x() + 1 );
    int ecl_ny = static_cast<int>( ( max.y() - min.y() ) * refinement.y() + 1 );
    int ecl_nz = static_cast<int>( ( max.z() - min.z() ) * refinement.z() + 1 );

I believe the lines above should be changed to...

    int ecl_nx = static_cast<int>( ( max.x() - min.x() + 1 ) * refinement.x() );
    int ecl_ny = static_cast<int>( ( max.y() - min.y() + 1 ) * refinement.y() );
    int ecl_nz = static_cast<int>( ( max.z() - min.z() + 1 ) * refinement.z() );

(This is only a problem for refinement > 1)

@magnesj magnesj self-assigned this Aug 17, 2023
@magnesj magnesj added the BugInRelease Bug in an official release label Aug 17, 2023
@magnesj magnesj added this to the Maintenance 2023 - Sprint 8 milestone Aug 17, 2023
magnesj added a commit that referenced this issue Aug 17, 2023
Make sure size of exported grid is correct
Refactor computation of cell indices
@magnesj
Copy link
Member

magnesj commented Aug 17, 2023

Thanks for the bug report. This will be fixed and included in the next release.

magnesj added a commit that referenced this issue Aug 18, 2023
* #10503 Refined grid export appears to give wrong number of cells
Make sure size of exported grid is correct
Refactor computation of cell indices
@github-actions github-actions bot added the PendingRelease Issues is fixed and will be available in next release label Aug 18, 2023
@gdfldm
Copy link
Author

gdfldm commented Aug 18, 2023

Thank you :-)

@magnesj magnesj removed the PendingRelease Issues is fixed and will be available in next release label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugInRelease Bug in an official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants