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

BlackoilFluidSystem: use int for component indices #4460

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

Conversation

akva2
Copy link
Member

@akva2 akva2 commented Feb 4, 2025

The one/two phase indices class uses negative values for inactive components (though not really relevant, but it's a source of confusion). Likewise, the GenericOilGasFluidSystem uses ints.

To avoid nasty casts in generic code, make the fluidsystems consistently use int, even though the blackoil indices are always positive.

@akva2
Copy link
Member Author

akva2 commented Feb 4, 2025

jenkins build this opm-simulators=5950 please

@akva2
Copy link
Member Author

akva2 commented Feb 4, 2025

These indices in the BlackoilFluidSystem is a bit confusing for one/two-phase. One would get the impression that the BlackoilFluidSystem would use different traits for this, but this is not the case. It's always using the default index traits, while the Indices typetag class is a translation layer from the canonical indices used in the fluid system. It would be probably be a good idea to rename the members in the fluid system to better reflect this and potentially get rid of the Traits entirely.

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