mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
std::tuple to pair and revert unnecessary changes.
Minor changes according to review comments as well.
This commit is contained in:
parent
a6cbb2a7bb
commit
264ac8e0c0
@ -544,7 +544,7 @@ private:
|
|||||||
/// \param[in] pcow O/W capillary pressure value (Po - Pw).
|
/// \param[in] pcow O/W capillary pressure value (Po - Pw).
|
||||||
///
|
///
|
||||||
/// \return Water saturation value.
|
/// \return Water saturation value.
|
||||||
std::tuple<double, bool> applySwatInit(const double pcow);
|
std::pair<double, bool> applySwatInit(const double pcow);
|
||||||
|
|
||||||
/// Derive water saturation from SWATINIT data.
|
/// Derive water saturation from SWATINIT data.
|
||||||
///
|
///
|
||||||
@ -558,7 +558,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// \return Water saturation value. Input value, possibly mollified by
|
/// \return Water saturation value. Input value, possibly mollified by
|
||||||
/// current set of material laws.
|
/// current set of material laws.
|
||||||
std::tuple<double, bool> applySwatInit(const double pc, const double sw);
|
std::pair<double, bool> applySwatInit(const double pc, const double sw);
|
||||||
|
|
||||||
/// Invoke material law container's capillary pressure calculator on
|
/// Invoke material law container's capillary pressure calculator on
|
||||||
/// current fluid state.
|
/// current fluid state.
|
||||||
|
@ -699,10 +699,11 @@ void PhaseSaturations<MaterialLawManager, FluidSystem, Region, CellID>::deriveWa
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
auto [swout, newSwatInit] = this->applySwatInit(pcow);
|
auto [swout, newSwatInit] = this->applySwatInit(pcow);
|
||||||
if (newSwatInit == true)
|
if (newSwatInit)
|
||||||
sw = this->invertCapPress(pcow, this->waterPos(), isIncr);
|
sw = this->invertCapPress(pcow, this->waterPos(), isIncr);
|
||||||
else
|
else {
|
||||||
sw = swout;
|
sw = swout;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -730,8 +731,9 @@ fixUnphysicalTransition()
|
|||||||
const auto isIncr = false; // dPcow/dSw <= 0 for all Sw.
|
const auto isIncr = false; // dPcow/dSw <= 0 for all Sw.
|
||||||
sw = this->invertCapPress(pcgw, this->waterPos(), isIncr);
|
sw = this->invertCapPress(pcgw, this->waterPos(), isIncr);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
sw = swout;
|
sw = swout;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sw = satFromSumOfPcs<FluidSystem>
|
sw = satFromSumOfPcs<FluidSystem>
|
||||||
@ -859,21 +861,19 @@ accountForScaledSaturations()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class MaterialLawManager, class FluidSystem, class Region, typename CellID>
|
template <class MaterialLawManager, class FluidSystem, class Region, typename CellID>
|
||||||
std::tuple<double, bool>
|
std::pair<double, bool>
|
||||||
PhaseSaturations<MaterialLawManager, FluidSystem, Region, CellID>::
|
PhaseSaturations<MaterialLawManager, FluidSystem, Region, CellID>::
|
||||||
applySwatInit(const double pcow)
|
applySwatInit(const double pcow)
|
||||||
{
|
{
|
||||||
auto [swout, newSwatInit] = this->applySwatInit(pcow, this->swatInit_[this->evalPt_.position->cell]);
|
return this->applySwatInit(pcow, this->swatInit_[this->evalPt_.position->cell]);
|
||||||
return {swout, newSwatInit};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class MaterialLawManager, class FluidSystem, class Region, typename CellID>
|
template <class MaterialLawManager, class FluidSystem, class Region, typename CellID>
|
||||||
std::tuple<double, bool>
|
std::pair<double, bool>
|
||||||
PhaseSaturations<MaterialLawManager, FluidSystem, Region, CellID>::
|
PhaseSaturations<MaterialLawManager, FluidSystem, Region, CellID>::
|
||||||
applySwatInit(const double pcow, const double sw)
|
applySwatInit(const double pcow, const double sw)
|
||||||
{
|
{
|
||||||
auto [swout, newSwatInit] =this->matLawMgr_.applySwatinit(this->evalPt_.position->cell, pcow, sw);
|
return this->matLawMgr_.applySwatinit(this->evalPt_.position->cell, pcow, sw);
|
||||||
return {swout, newSwatInit};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class MaterialLawManager, class FluidSystem, class Region, typename CellID>
|
template <class MaterialLawManager, class FluidSystem, class Region, typename CellID>
|
||||||
|
Loading…
Reference in New Issue
Block a user