Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions opm/material/fluidstates/BlackOilFluidState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,17 @@ class BlackOilFluidState
}
}

/// \brief Return a pointer to the fluid system used by this fluid state.
OPM_HOST_DEVICE FluidSystem const* fluidSystemPtr() const
{
if constexpr (fluidSystemIsStatic) {
static FluidSystem instance;
return &instance;
} else {
return fluidSystemPtr_;
}
}

private:
OPM_HOST_DEVICE static unsigned storageToCanonicalPhaseIndex_(unsigned storagePhaseIdx, const FluidSystem& fluidSystem)
{
Expand Down