mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adjust to PAvgCalculator templating
This commit is contained in:
@@ -2035,7 +2035,7 @@ namespace Opm {
|
||||
{
|
||||
auto wbpResult = data::WellBlockAveragePressures{};
|
||||
|
||||
using Calculated = PAvgCalculator::Result::WBPMode;
|
||||
using Calculated = typename PAvgCalculator<Scalar>::Result::WBPMode;
|
||||
using Output = data::WellBlockAvgPress::Quantity;
|
||||
|
||||
this->wbpCalculationService_.collectDynamicValues();
|
||||
|
@@ -38,7 +38,7 @@ namespace Opm {
|
||||
/// have a flowing bottom-hole pressure. Mainly useful for reporting.
|
||||
///
|
||||
/// Parallel edition. Handles distributed wells.
|
||||
class ParallelPAvgCalculator : public PAvgCalculator
|
||||
class ParallelPAvgCalculator : public PAvgCalculator<double>
|
||||
{
|
||||
public:
|
||||
/// Constructor
|
||||
|
@@ -240,7 +240,7 @@ inferBlockAveragePressures(const std::size_t calcIndex,
|
||||
controls, gravity, refDepth);
|
||||
}
|
||||
|
||||
const Opm::PAvgCalculator::Result&
|
||||
const Opm::PAvgCalculator<double>::Result&
|
||||
Opm::ParallelWBPCalculation::averagePressures(const std::size_t calcIndex) const
|
||||
{
|
||||
return this->calculators_[calcIndex].averagePressures();
|
||||
@@ -334,10 +334,10 @@ void Opm::ParallelWBPCalculation::defineWellCommunication(const std::size_t well
|
||||
.buildStructure(this->calculators_[well].allWellConnections());
|
||||
}
|
||||
|
||||
Opm::PAvgCalculator::Sources
|
||||
Opm::PAvgCalculator<double>::Sources
|
||||
Opm::ParallelWBPCalculation::makeEvaluationSources(const WellID well) const
|
||||
{
|
||||
return PAvgCalculator::Sources{}
|
||||
return PAvgCalculator<double>::Sources{}
|
||||
.wellBlocks(this->reservoirSrc_)
|
||||
.wellConns (this->wellConnSrc_[well]);
|
||||
}
|
||||
|
@@ -163,7 +163,7 @@ public:
|
||||
///
|
||||
/// \return Result set from most recent call to member function \c
|
||||
/// inferBlockAveragePressures() for \c calcIndex.
|
||||
const PAvgCalculator::Result&
|
||||
const PAvgCalculator<double>::Result&
|
||||
averagePressures(const std::size_t calcIndex) const;
|
||||
|
||||
private:
|
||||
@@ -360,7 +360,7 @@ private:
|
||||
/// terms.
|
||||
///
|
||||
/// \return WBPn source terms aggregated for \p well.
|
||||
PAvgCalculator::Sources makeEvaluationSources(const WellID well) const;
|
||||
PAvgCalculator<double>::Sources makeEvaluationSources(const WellID well) const;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@@ -599,7 +599,7 @@ BOOST_AUTO_TEST_CASE(TopOfFormation_Well_OpenConns)
|
||||
cse.wbpCalcService.inferBlockAveragePressures(calcIndex, controls, gravity, refDepth);
|
||||
|
||||
const auto avgPress = cse.wbpCalcService.averagePressures(calcIndex);
|
||||
using WBPMode = Opm::PAvgCalculator::Result::WBPMode;
|
||||
using WBPMode = Opm::PAvgCalculator<double>::Result::WBPMode;
|
||||
|
||||
BOOST_CHECK_CLOSE(avgPress.value(WBPMode::WBP) , 1254.806625666667, 1.0e-8);
|
||||
BOOST_CHECK_CLOSE(avgPress.value(WBPMode::WBP4), 1295.348292333333, 1.0e-8);
|
||||
|
Reference in New Issue
Block a user