opm-simulators
FIBlackOilModelNoCache.hpp
1 #ifndef OPM_FI_BLACK_OIL_MODEL_NOCACHE_HPP
2 #define OPM_FI_BLACK_OIL_MODEL_NOCACHE_HPP
3 
5 
6 namespace Opm {
7 
8 template<typename TypeTag>
9 class FIBlackOilModelNoCache: public FIBlackOilModel<TypeTag>
10 {
13 
14 public:
15  explicit FIBlackOilModelNoCache(Simulator& simulator)
16  : FIBlackOilModel<TypeTag>(simulator)
17  {}
18 
19  IntensiveQuantities intensiveQuantities(unsigned globalIdx, unsigned timeIdx) const
20  {
21  OPM_TIMEBLOCK_LOCAL(intensiveQuantitiesNoCache, Subsystem::PvtProps | Subsystem::SatProps);
22  const auto& primaryVar = this->solution(timeIdx)[globalIdx];
23  const auto& problem = this->simulator_.problem();
24  if (!(this->enableIntensiveQuantityCache_) ||
25  !(this->intensiveQuantityCacheUpToDate_[timeIdx][globalIdx])) {
26  IntensiveQuantities intQuants;
27  intQuants.update(problem,primaryVar, globalIdx, timeIdx);
28  return intQuants;// reqiored for updating extrution factor
29  } else {
30  IntensiveQuantities intQuants = (this->intensiveQuantityCache_[timeIdx][globalIdx]);
31  return intQuants;
32  }
33  }
34 };
35 
36 } // namespace Opm
37 
38 #endif
Definition: FIBlackoilModel.hpp:52
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(...))
Definition: propertysystem.hh:233
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Definition: FIBlackOilModelNoCache.hpp:9