mirror of
				https://github.com/OPM/opm-simulators.git
				synced 2025-02-25 18:55:30 -06:00 
			
		
		
		
	registerOpenWellsForWbpCalculation: move to BlackoilWellModelGeneric
This commit is contained in:
		@@ -508,8 +508,6 @@ template<class Scalar> class WellContributions;
 | 
			
		||||
            typename ParallelWBPCalculation<Scalar>::EvaluatorFactory
 | 
			
		||||
            makeWellSourceEvaluatorFactory(const std::vector<Well>::size_type wellIdx) const;
 | 
			
		||||
 | 
			
		||||
            void registerOpenWellsForWBPCalculation();
 | 
			
		||||
 | 
			
		||||
            void updateAverageFormationFactor();
 | 
			
		||||
 | 
			
		||||
            void computePotentials(const std::size_t widx,
 | 
			
		||||
 
 | 
			
		||||
@@ -2085,6 +2085,22 @@ setPrimaryVarsDomain(const int domainIdx, const std::vector<Scalar>& vars)
 | 
			
		||||
    assert(offset == vars.size());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template<class Scalar>
 | 
			
		||||
void BlackoilWellModelGeneric<Scalar>::
 | 
			
		||||
registerOpenWellsForWBPCalculation()
 | 
			
		||||
{
 | 
			
		||||
    assert (this->wbpCalcMap_.size() == this->wells_ecl_.size());
 | 
			
		||||
 | 
			
		||||
    for (auto& wbpCalc : this->wbpCalcMap_) {
 | 
			
		||||
        wbpCalc.openWellIdx_.reset();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    auto openWellIdx = typename std::vector<WellInterfaceGeneric<Scalar>*>::size_type{0};
 | 
			
		||||
    for (const auto* openWell : this->well_container_generic_) {
 | 
			
		||||
        this->wbpCalcMap_[openWell->indexOfWell()].openWellIdx_ = openWellIdx++;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template class BlackoilWellModelGeneric<double>;
 | 
			
		||||
 | 
			
		||||
#if FLOW_INSTANTIATE_FLOAT
 | 
			
		||||
 
 | 
			
		||||
@@ -458,6 +458,8 @@ protected:
 | 
			
		||||
    void assignMassGasRate(data::Wells& wsrpt,
 | 
			
		||||
                           const Scalar& gasDensity) const;
 | 
			
		||||
 | 
			
		||||
    void registerOpenWellsForWBPCalculation();
 | 
			
		||||
 | 
			
		||||
    Schedule& schedule_;
 | 
			
		||||
    const SummaryState& summaryState_;
 | 
			
		||||
    const EclipseState& eclState_;
 | 
			
		||||
 
 | 
			
		||||
@@ -2486,27 +2486,6 @@ namespace Opm {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    template <typename TypeTag>
 | 
			
		||||
    void
 | 
			
		||||
    BlackoilWellModel<TypeTag>::
 | 
			
		||||
    registerOpenWellsForWBPCalculation()
 | 
			
		||||
    {
 | 
			
		||||
        assert (this->wbpCalcMap_.size() == this->wells_ecl_.size());
 | 
			
		||||
 | 
			
		||||
        for (auto& wbpCalc : this->wbpCalcMap_) {
 | 
			
		||||
            wbpCalc.openWellIdx_.reset();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        auto openWellIdx = typename std::vector<WellInterfacePtr>::size_type{0};
 | 
			
		||||
        for (const auto* openWell : this->well_container_generic_) {
 | 
			
		||||
            this->wbpCalcMap_[openWell->indexOfWell()].openWellIdx_ = openWellIdx++;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    template<typename TypeTag>
 | 
			
		||||
    void
 | 
			
		||||
    BlackoilWellModel<TypeTag>::
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user