20 #ifndef OPM_BLACKOIL_STATE_TO_FLUID_STATE_HEADER_INCLUDED
21 #define OPM_BLACKOIL_STATE_TO_FLUID_STATE_HEADER_INCLUDED
23 #include <opm/core/simulator/BlackoilState.hpp>
41 typedef double Scalar;
43 enum { numPhases = 3 };
44 enum { numComponents = 3 };
53 : blackoilState_(blackoilState)
55 if (blackoilState_.numPhases() != numPhases) {
56 OPM_THROW(std::runtime_error,
57 "Only " << numPhases <<
" are supported, but the deck specifies " << blackoilState_.numPhases());
68 { cellIdx_ = cellIdx; }
74 {
return blackoilState_.saturation()[numPhases*cellIdx_ + phaseIdx]; }
80 {
return blackoilState_.temperature()[cellIdx_]; }
85 size_t numCells()
const
86 {
return blackoilState_.pressure().size(); }
88 const BlackoilState& blackoilState_;
94 #endif // OPM_SIMULATORTIMER_HEADER_INCLUDED
This is an light weight "impedance adaption" class with a well defined API for saturation and PVT fun...
Definition: BlackoilStateToFluidState.hpp:38
BlackoilStateToFluidState(const BlackoilState &blackoilState)
Create a BlackoilState to Fluid state wrapper object.
Definition: BlackoilStateToFluidState.hpp:52
void setCurrentCellIndex(unsigned cellIdx)
Sets the index of the currently used cell.
Definition: BlackoilStateToFluidState.hpp:67
Scalar temperature(int phaseIdx) const
Returns the temperature [K] of a phase for the current cell index.
Definition: BlackoilStateToFluidState.hpp:79
Simulator state for a blackoil simulator.
Definition: BlackoilState.hpp:40
Scalar saturation(int phaseIdx) const
Returns the saturation of a phase for the current cell index.
Definition: BlackoilStateToFluidState.hpp:73