StandardWellAssemble: remove unnecessary Scalar template parameter

use the Scalar type from the FluidSystem
This commit is contained in:
Arne Morten Kvarving 2024-02-22 15:17:09 +01:00
parent 9e726f5430
commit b2139d2cdf
3 changed files with 18 additions and 17 deletions

View File

@ -81,9 +81,9 @@ private:
StandardWellEquations<Scalar,numEq>& eqns_; //!< Reference to equation system StandardWellEquations<Scalar,numEq>& eqns_; //!< Reference to equation system
}; };
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices>
void void
StandardWellAssemble<FluidSystem,Indices,Scalar>:: StandardWellAssemble<FluidSystem,Indices>::
assembleControlEq(const WellState& well_state, assembleControlEq(const WellState& well_state,
const GroupState& group_state, const GroupState& group_state,
const Schedule& schedule, const Schedule& schedule,
@ -180,8 +180,8 @@ assembleControlEq(const WellState& well_state,
} }
} }
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices>
void StandardWellAssemble<FluidSystem,Indices,Scalar>:: void StandardWellAssemble<FluidSystem,Indices>::
assembleInjectivityEq(const EvalWell& eq_pskin, assembleInjectivityEq(const EvalWell& eq_pskin,
const EvalWell& eq_wat_vel, const EvalWell& eq_wat_vel,
const int pskin_index, const int pskin_index,
@ -204,8 +204,8 @@ assembleInjectivityEq(const EvalWell& eq_pskin,
} }
} }
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices>
void StandardWellAssemble<FluidSystem,Indices,Scalar>:: void StandardWellAssemble<FluidSystem,Indices>::
assemblePerforationEq(const EvalWell& cq_s_effective, assemblePerforationEq(const EvalWell& cq_s_effective,
const int componentIdx, const int componentIdx,
const int cell_idx, const int cell_idx,
@ -229,8 +229,8 @@ assemblePerforationEq(const EvalWell& cq_s_effective,
} }
} }
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices>
void StandardWellAssemble<FluidSystem,Indices,Scalar>:: void StandardWellAssemble<FluidSystem,Indices>::
assembleSourceEq(const EvalWell& resWell_loc, assembleSourceEq(const EvalWell& resWell_loc,
const int componentIdx, const int componentIdx,
const int numWellEq, const int numWellEq,
@ -243,8 +243,8 @@ assembleSourceEq(const EvalWell& resWell_loc,
eqns.residual()[0][componentIdx] += resWell_loc.value(); eqns.residual()[0][componentIdx] += resWell_loc.value();
} }
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices>
void StandardWellAssemble<FluidSystem,Indices,Scalar>:: void StandardWellAssemble<FluidSystem,Indices>::
assembleZFracEq(const EvalWell& cq_s_zfrac_effective, assembleZFracEq(const EvalWell& cq_s_zfrac_effective,
const int cell_idx, const int cell_idx,
const int numWellEq, const int numWellEq,
@ -257,7 +257,7 @@ assembleZFracEq(const EvalWell& cq_s_zfrac_effective,
} }
#define INSTANCE(Dim,...) \ #define INSTANCE(Dim,...) \
template class StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>; template class StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__>;
// One phase // One phase
INSTANCE(4u, BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>) INSTANCE(4u, BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)

View File

@ -38,10 +38,11 @@ template<class FluidSystem> class WellInterfaceFluidSystem;
class WellState; class WellState;
//! \brief Class handling assemble of the equation system for StandardWell. //! \brief Class handling assemble of the equation system for StandardWell.
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices>
class StandardWellAssemble class StandardWellAssemble
{ {
public: public:
using Scalar = typename FluidSystem::Scalar;
using PrimaryVariables = StandardWellPrimaryVariables<FluidSystem,Indices,Scalar>; using PrimaryVariables = StandardWellPrimaryVariables<FluidSystem,Indices,Scalar>;
using EvalWell = typename PrimaryVariables::EvalWell; using EvalWell = typename PrimaryVariables::EvalWell;

View File

@ -398,7 +398,7 @@ namespace Opm
connectionRates[perf][componentIdx] = Base::restrictEval(cq_s_effective); connectionRates[perf][componentIdx] = Base::restrictEval(cq_s_effective);
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this). StandardWellAssemble<FluidSystem,Indices>(*this).
assemblePerforationEq(cq_s_effective, assemblePerforationEq(cq_s_effective,
componentIdx, componentIdx,
cell_idx, cell_idx,
@ -415,7 +415,7 @@ namespace Opm
} }
if constexpr (has_zFraction) { if constexpr (has_zFraction) {
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this). StandardWellAssemble<FluidSystem,Indices>(*this).
assembleZFracEq(cq_s_zfrac_effective, assembleZFracEq(cq_s_zfrac_effective,
cell_idx, cell_idx,
this->primary_variables_.numWellEq(), this->primary_variables_.numWellEq(),
@ -446,7 +446,7 @@ namespace Opm
this->F0_[componentIdx]) * volume / dt; this->F0_[componentIdx]) * volume / dt;
} }
resWell_loc -= this->primary_variables_.getQs(componentIdx) * this->well_efficiency_factor_; resWell_loc -= this->primary_variables_.getQs(componentIdx) * this->well_efficiency_factor_;
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this). StandardWellAssemble<FluidSystem,Indices>(*this).
assembleSourceEq(resWell_loc, assembleSourceEq(resWell_loc,
componentIdx, componentIdx,
this->primary_variables_.numWellEq(), this->primary_variables_.numWellEq(),
@ -455,7 +455,7 @@ namespace Opm
const auto& summaryState = simulator.vanguard().summaryState(); const auto& summaryState = simulator.vanguard().summaryState();
const Schedule& schedule = simulator.vanguard().schedule(); const Schedule& schedule = simulator.vanguard().schedule();
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this). StandardWellAssemble<FluidSystem,Indices>(*this).
assembleControlEq(well_state, group_state, assembleControlEq(well_state, group_state,
schedule, summaryState, schedule, summaryState,
inj_controls, prod_controls, inj_controls, prod_controls,
@ -2075,7 +2075,7 @@ namespace Opm
const EvalWell eq_pskin = this->primary_variables_.eval(pskin_index) const EvalWell eq_pskin = this->primary_variables_.eval(pskin_index)
- pskin(throughput, this->primary_variables_.eval(wat_vel_index), poly_conc, deferred_logger); - pskin(throughput, this->primary_variables_.eval(wat_vel_index), poly_conc, deferred_logger);
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this). StandardWellAssemble<FluidSystem,Indices>(*this).
assembleInjectivityEq(eq_pskin, assembleInjectivityEq(eq_pskin,
eq_wat_vel, eq_wat_vel,
pskin_index, pskin_index,