mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make getWaterFlux() take const ref argument. Minor formatting cleanups.
This commit is contained in:
@@ -253,7 +253,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class ElemCtx>
|
template <class ElemCtx>
|
||||||
const double getWaterFlux(ElemCtx& elem_ctx, unsigned face_idx) const
|
const double getWaterFlux(const ElemCtx& elem_ctx, unsigned face_idx) const
|
||||||
{
|
{
|
||||||
const auto& exQuants = elem_ctx.extensiveQuantities(face_idx, /*timeIdx*/ 0);
|
const auto& exQuants = elem_ctx.extensiveQuantities(face_idx, /*timeIdx*/ 0);
|
||||||
const double water_flux = Toolbox::value(exQuants.volumeFlux(this->phaseIdx_()));
|
const double water_flux = Toolbox::value(exQuants.volumeFlux(this->phaseIdx_()));
|
||||||
@@ -312,7 +312,6 @@ private:
|
|||||||
elem_ctx.updateAllExtensiveQuantities();
|
elem_ctx.updateAllExtensiveQuantities();
|
||||||
|
|
||||||
const double water_flux = getWaterFlux(elem_ctx,face_idx);
|
const double water_flux = getWaterFlux(elem_ctx,face_idx);
|
||||||
|
|
||||||
const std::size_t up_id = water_flux >= 0.0 ? i : j;
|
const std::size_t up_id = water_flux >= 0.0 ? i : j;
|
||||||
const auto& intQuantsIn = elem_ctx.intensiveQuantities(up_id, 0);
|
const auto& intQuantsIn = elem_ctx.intensiveQuantities(up_id, 0);
|
||||||
const double invB = Toolbox::value(intQuantsIn.fluidState().invB(this->phaseIdx_()));
|
const double invB = Toolbox::value(intQuantsIn.fluidState().invB(this->phaseIdx_()));
|
||||||
@@ -326,7 +325,6 @@ private:
|
|||||||
|
|
||||||
return aquifer_flux;
|
return aquifer_flux;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user