mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
StandardWellEval: remove unnecessary Scalar template parameter
use the Scalar type from the FluidSystem
This commit is contained in:
parent
2fb05a4996
commit
9997cde07a
@ -55,15 +55,13 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
class StandardWell : public WellInterface<TypeTag>
|
||||
, public StandardWellEval<GetPropType<TypeTag, Properties::FluidSystem>,
|
||||
GetPropType<TypeTag, Properties::Indices>,
|
||||
GetPropType<TypeTag, Properties::Scalar>>
|
||||
GetPropType<TypeTag, Properties::Indices>>
|
||||
{
|
||||
|
||||
public:
|
||||
using Base = WellInterface<TypeTag>;
|
||||
using StdWellEval = StandardWellEval<GetPropType<TypeTag, Properties::FluidSystem>,
|
||||
GetPropType<TypeTag, Properties::Indices>,
|
||||
GetPropType<TypeTag, Properties::Scalar>>;
|
||||
GetPropType<TypeTag, Properties::Indices>>;
|
||||
|
||||
// TODO: some functions working with AD variables handles only with values (double) without
|
||||
// dealing with derivatives. It can be beneficial to make functions can work with either AD or scalar value.
|
||||
|
@ -43,8 +43,8 @@
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
template<class FluidSystem, class Indices>
|
||||
StandardWellEval<FluidSystem,Indices>::
|
||||
StandardWellEval(const WellInterfaceIndices<FluidSystem,Indices,Scalar>& baseif)
|
||||
: baseif_(baseif)
|
||||
, primary_variables_(baseif_)
|
||||
@ -54,9 +54,9 @@ StandardWellEval(const WellInterfaceIndices<FluidSystem,Indices,Scalar>& baseif)
|
||||
{
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
typename StandardWellEval<FluidSystem,Indices,Scalar>::EvalWell
|
||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
template<class FluidSystem, class Indices>
|
||||
typename StandardWellEval<FluidSystem,Indices>::EvalWell
|
||||
StandardWellEval<FluidSystem,Indices>::
|
||||
extendEval(const Eval& in) const
|
||||
{
|
||||
EvalWell out(primary_variables_.numWellEq() + Indices::numEq, in.value());
|
||||
@ -66,9 +66,9 @@ extendEval(const Eval& in) const
|
||||
return out;
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class FluidSystem, class Indices>
|
||||
void
|
||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
StandardWellEval<FluidSystem,Indices>::
|
||||
updateWellStateFromPrimaryVariables(const bool stop_or_zero_rate_target,
|
||||
WellState& well_state,
|
||||
const SummaryState& summary_state,
|
||||
@ -86,9 +86,9 @@ updateWellStateFromPrimaryVariables(const bool stop_or_zero_rate_target,
|
||||
well_state, summary_state, deferred_logger);
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class FluidSystem, class Indices>
|
||||
void
|
||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
StandardWellEval<FluidSystem,Indices>::
|
||||
computeAccumWell()
|
||||
{
|
||||
for (std::size_t eq_idx = 0; eq_idx < F0_.size(); ++eq_idx) {
|
||||
@ -96,9 +96,9 @@ computeAccumWell()
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class FluidSystem, class Indices>
|
||||
ConvergenceReport
|
||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
StandardWellEval<FluidSystem,Indices>::
|
||||
getWellConvergence(const WellState& well_state,
|
||||
const std::vector<double>& B_avg,
|
||||
const double maxResidualAllowed,
|
||||
@ -170,9 +170,9 @@ getWellConvergence(const WellState& well_state,
|
||||
return report;
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class FluidSystem, class Indices>
|
||||
void
|
||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||
StandardWellEval<FluidSystem,Indices>::
|
||||
init(std::vector<double>& perf_depth,
|
||||
const std::vector<double>& depth_arg,
|
||||
const int num_cells,
|
||||
@ -203,7 +203,7 @@ init(std::vector<double>& perf_depth,
|
||||
}
|
||||
|
||||
#define INSTANCE(...) \
|
||||
template class StandardWellEval<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||
template class StandardWellEval<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__>;
|
||||
|
||||
// One phase
|
||||
INSTANCE(BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)
|
||||
|
@ -43,10 +43,11 @@ class WellContributions;
|
||||
template<class FluidSystem, class Indices, class Scalar> class WellInterfaceIndices;
|
||||
class WellState;
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class FluidSystem, class Indices>
|
||||
class StandardWellEval
|
||||
{
|
||||
protected:
|
||||
using Scalar = typename FluidSystem::Scalar;
|
||||
using PrimaryVariables = StandardWellPrimaryVariables<FluidSystem,Indices,Scalar>;
|
||||
using StdWellConnections = StandardWellConnections<FluidSystem,Indices>;
|
||||
static constexpr int Bhp = PrimaryVariables::Bhp;
|
||||
|
Loading…
Reference in New Issue
Block a user