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

Return -1 in WellState::numPhases if there are no wells. #1049

Closed
wants to merge 1 commit into from

Conversation

blattms
Copy link
Member

@blattms blattms commented Jun 27, 2016

This is an alternative to #1047. Closes OPM/opm-simulators#731

This prevents division by zero in this case.
@blattms
Copy link
Member Author

blattms commented Jun 27, 2016

On second thought this is also not a nice fix. Now we might get a segmentation fault later on instead of a floating point exception where the the problem is. Seems much harder to debug.

@blattms
Copy link
Member Author

blattms commented Jun 27, 2016

Wrong usage might still result in using a wrong number of phases and will lead to bugs that are hard to find. I prefer to get a floating point exception that make debugging much more easy. Closing...

@blattms blattms closed this Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant