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

Avoid deleting derivative i.e. getting "wrong" matrix in case of zero… #5236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hnil
Copy link
Member

@hnil hnil commented Feb 29, 2024

  • avoid getting zero in matrix in zero pressure/zero flux case
  • may make it easier to have lower/upper limits on pressures

This should be the correct, but it will may change many tests so it should be investigated carefully. This is same change as in model (OPM/opm-models#877) but will only affect legacy assembly.

Comment on lines -281 to -284
if (pressureDifferences[phaseIdx] == 0) {
volumeFlux[phaseIdx] = 0.0;
continue;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why this changes anything. Souldn't volumeFlux[phaseindex] still be zero as there is a multiplication with zero below. What am I missing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may have nonzero derivatives.

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.

None yet

3 participants