20 #ifndef OPM_EXPLICIT_ARRAYS_FLUID_STATE_HEADER_INCLUDED 21 #define OPM_EXPLICIT_ARRAYS_FLUID_STATE_HEADER_INCLUDED 23 #include <opm/core/props/BlackoilPhases.hpp> 39 typedef double Scalar;
40 enum { numPhases = BlackoilPhases::MaxNumPhases };
43 : phaseUsage_(phaseUsage)
54 int np = phaseUsage_.num_phases;
55 for (
int phaseIdx = 0; phaseIdx < BlackoilPhases::MaxNumPhases; ++phaseIdx) {
56 if (!phaseUsage_.phase_used[phaseIdx]) {
57 sats_[phaseIdx] = 0.0;
60 sats_[phaseIdx] = saturations_[np*arrayIdx + phaseUsage_.phase_pos[phaseIdx]];
74 { saturations_ = saturations; }
80 {
return sats_[phaseIdx]; }
86 const double* saturations_;
87 std::array<Scalar, BlackoilPhases::MaxNumPhases> sats_;
92 #endif // OPM_SIMULATORTIMER_HEADER_INCLUDED void setSaturationArray(const double *saturations)
Set the array containing the phase saturations.
Definition: ExplicitArraysFluidState.hpp:73
Scalar saturation(int phaseIdx) const
Returns the saturation of a phase for the current cell index.
Definition: ExplicitArraysFluidState.hpp:79
void setIndex(unsigned arrayIdx)
Sets the currently used array index.
Definition: ExplicitArraysFluidState.hpp:52
Definition: AnisotropicEikonal.cpp:446
Definition: BlackoilPhases.hpp:36
This is a fluid state which translates global arrays and translates them to a subset of the fluid sta...
Definition: ExplicitArraysFluidState.hpp:36