56 GetPropType<TypeTag, Properties::GridView>,
57 GetPropType<TypeTag, Properties::ElementMapper>,
58 GetPropType<TypeTag, Properties::Scalar>>
70 enum { numPhases = FluidSystem::numPhases };
74 :
BaseType(simulator.vanguard().cartesianIndexMapper(),
75 simulator.vanguard().gridView(),
76 simulator.model().elementMapper(),
77 simulator.vanguard().eclState())
78 , simulator_(simulator)
88 if (this->enableThresholdPressure_ && !this->thpresDefault_.empty() && !
this->restart_) {
89 this->computeDefaultThresholdPressures_();
90 this->applyExplicitThresholdPressures_();
91 simulator_.vanguard().gridView().comm().max(&this->thpres_[0], this->thpres_.size());
97 void computeDefaultThresholdPressures_()
99 const auto& vanguard = simulator_.vanguard();
100 const auto& gridView = vanguard.gridView();
105 ElementContext elemCtx(simulator_);
107 elemCtx.updateAll(
elem);
108 const auto& stencil = elemCtx.stencil(0);
113 unsigned i =
face.interiorIndex();
114 unsigned j =
face.exteriorIndex();
127 const Evaluation& trans = simulator_.problem().transmissibility(elemCtx, i, j);
128 Scalar faceArea =
face.area();
129 if (std::abs(faceArea*
getValue(trans)) < 1
e-18)
138 const auto&
up = elemCtx.intensiveQuantities(
upIdx, 0);
156 for (
unsigned i = 0; i < this->thpresDefault_.size(); ++i)
157 this->thpresDefault_[i] = gridView.comm().max(this->thpresDefault_[i]);
159 this->logPressures();
162 const Simulator& simulator_;
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
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:235