adjust to PAvgCalculator templating

This commit is contained in:
Arne Morten Kvarving
2024-04-11 10:21:02 +02:00
parent 59e6d4db08
commit 0481c7c0b2
5 changed files with 8 additions and 8 deletions

View File

@@ -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();

View File

@@ -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

View File

@@ -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]);
}

View File

@@ -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

View File

@@ -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);