21 #ifndef OPM_AUTODIFF_VFPHELPERS_HPP_
22 #define OPM_AUTODIFF_VFPHELPERS_HPP_
45 T getFlo(
const VFPProdTable& table,
56 T getFlo(
const VFPInjTable& table,
66 T getWFR(
const VFPProdTable& table,
76 T getGFR(
const VFPProdTable& table,
85 InterpData() : ind_{0, 0}, inv_dist_(0.0), factor_(0.0) {}
97 InterpData findInterpData(
const double value_in,
const std::vector<double>& values);
103 VFPEvaluation() : value(0.0), dthp(0.0), dwfr(0.0), dgfr(0.0), dalq(0.0), dflo(0.0) {};
151 template <
typename T>
152 const T& getTable(
const std::map<
int, std::reference_wrapper<const T>> tables,
int table_id);
157 template <
typename T>
158 bool hasTable(
const std::map<
int, std::reference_wrapper<const T>> tables,
int table_id) {
159 const auto entry = tables.find(table_id);
160 return (entry != tables.end() );
167 template <
typename TYPE,
typename TABLE>
168 TYPE getType(
const TABLE& table);
177 double findTHP(
const std::vector<double>& bhp_array,
178 const std::vector<double>& thp_array,
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:26
Helper struct for linear interpolation.
Definition: VFPHelpers.hpp:84
An "ADB-like" structure with a single value and a set of derivatives.
Definition: VFPHelpers.hpp:102