Remove unneeded timeIdx arguments, also silence other warnings.

This commit is contained in:
Atgeirr Flø Rasmussen 2022-08-10 10:01:54 +02:00
parent 923b1c555c
commit a5c8d40cfa
5 changed files with 11 additions and 13 deletions

View File

@ -263,7 +263,6 @@ public:
pressureDifferences[phaseIdx],
intQuantsIn,
intQuantsEx,
timeIdx,//input
phaseIdx,//input
interiorDofIdx,//input
exteriorDofIdx,//intput
@ -278,12 +277,13 @@ public:
continue;
}
const IntensiveQuantities& up = (upIdx[phaseIdx] == interiorDofIdx) ? intQuantsIn : intQuantsEx;
const bool upwindIsInterior = (static_cast<unsigned>(upIdx[phaseIdx]) == interiorDofIdx);
const IntensiveQuantities& up = upwindIsInterior ? intQuantsIn : intQuantsEx;
// TODO: should the rock compaction transmissibility multiplier be upstreamed
// or averaged? all fluids should see the same compaction?!
const Evaluation& transMult = up.rockCompTransMultiplier();
if (upIdx[phaseIdx] == interiorDofIdx)
if (upwindIsInterior)
volumeFlux[phaseIdx] =
pressureDifferences[phaseIdx]*up.mobility(phaseIdx)*transMult*(-trans/faceArea);
else
@ -298,7 +298,6 @@ public:
EvalType& pressureDifference,
const IntensiveQuantities& intQuantsIn,
const IntensiveQuantities& intQuantsEx,
const unsigned timeIdx,
const unsigned phaseIdx,
const unsigned interiorDofIdx,
const unsigned exteriorDofIdx,
@ -475,7 +474,7 @@ protected:
Evaluation transModified = trans;
short upstreamIdx = upstreamIndex_(phaseIdx);
unsigned upstreamIdx = upstreamIndex_(phaseIdx);
if (upstreamIdx == interiorDofIdx) {
// this is slightly hacky because in the automatic differentiation case, it

View File

@ -2024,7 +2024,7 @@ public:
{
rate = 0.0;
wellModel_.computeTotalRatesForDof(rate, globalDofIdx, timeIdx);
wellModel_.computeTotalRatesForDof(rate, globalDofIdx);
// convert the source term from the total mass rate of the
// cell to the one per unit of volume as used by the model.

View File

@ -253,7 +253,7 @@ private:
}
template <class ElemCtx>
const double getWaterFlux(const ElemCtx& elem_ctx, unsigned face_idx) const
double getWaterFlux(const ElemCtx& elem_ctx, unsigned face_idx) const
{
const auto& exQuants = elem_ctx.extensiveQuantities(face_idx, /*timeIdx*/ 0);
const double water_flux = Toolbox::value(exQuants.volumeFlux(this->phaseIdx_()));

View File

@ -210,8 +210,7 @@ namespace Opm {
}
void computeTotalRatesForDof(RateVector& rate,
unsigned globalIdx,
unsigned timeIdx) const;
unsigned globalIdx) const;
template <class Context>
void computeTotalRatesForDof(RateVector& rate,

View File

@ -499,15 +499,15 @@ namespace Opm {
this->computeWellTemperature();
}
template<typename TypeTag>
void
BlackoilWellModel<TypeTag>::
computeTotalRatesForDof(RateVector& rate,
unsigned elemIdx,
unsigned timeIdx) const
unsigned elemIdx) const
{
rate = 0;
if (!is_cell_perforated_[elemIdx])
return;
@ -515,7 +515,7 @@ namespace Opm {
well->addCellRates(rate, elemIdx);
}
template<typename TypeTag>
template <class Context>
void