Get rid off TypeTag system in StandardWellsDense.

Previously, we kind of hard coded the problem using the TypeTag system.
Instead of this we now simply pass the only additional thing needed, the
ElementContext, as an additional template parameter.

Removes the include of removed header BlackoilModelEbosTypeTags.hpp.
This commit is contained in:
Markus Blatt 2017-04-04 10:56:26 +02:00
parent 312aa24f86
commit 30f3d4e2d0
4 changed files with 130 additions and 133 deletions

View File

@ -163,7 +163,7 @@ namespace Opm {
const ModelParameters& param, const ModelParameters& param,
const BlackoilPropsAdFromDeck& fluid, const BlackoilPropsAdFromDeck& fluid,
const DerivedGeology& geo , const DerivedGeology& geo ,
const StandardWellsDense<FluidSystem, BlackoilIndices>& well_model, const StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>& well_model,
const NewtonIterationBlackoilInterface& linsolver, const NewtonIterationBlackoilInterface& linsolver,
const bool terminal_output) const bool terminal_output)
: ebosSimulator_(ebosSimulator) : ebosSimulator_(ebosSimulator)
@ -1423,7 +1423,7 @@ namespace Opm {
ModelParameters param_; ModelParameters param_;
// Well Model // Well Model
StandardWellsDense<FluidSystem, BlackoilIndices> well_model_; StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext> well_model_;
/// \brief Whether we print something to std::cout /// \brief Whether we print something to std::cout
bool terminal_output_; bool terminal_output_;
@ -1441,8 +1441,10 @@ namespace Opm {
public: public:
/// return the StandardWells object /// return the StandardWells object
StandardWellsDense<FluidSystem, BlackoilIndices>& wellModel() { return well_model_; } StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>&
const StandardWellsDense<FluidSystem, BlackoilIndices>& wellModel() const { return well_model_; } wellModel() { return well_model_; }
const StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>&
wellModel() const { return well_model_; }
/// return the Well struct in the StandardWells /// return the Well struct in the StandardWells
const Wells& wells() const { return well_model_.wells(); } const Wells& wells() const { return well_model_.wells(); }

View File

@ -64,7 +64,7 @@ public:
typedef BlackoilModelEbos Model; typedef BlackoilModelEbos Model;
typedef BlackoilModelParameters ModelParameters; typedef BlackoilModelParameters ModelParameters;
typedef NonlinearSolver<Model> Solver; typedef NonlinearSolver<Model> Solver;
typedef StandardWellsDense<FluidSystem, BlackoilIndices> WellModel; typedef StandardWellsDense<FluidSystem, BlackoilIndices,ElementContext> WellModel;
/// Initialise from parameters and objects to observe. /// Initialise from parameters and objects to observe.

View File

@ -24,8 +24,6 @@
#ifndef OPM_STANDARDWELLSDENSE_HEADER_INCLUDED #ifndef OPM_STANDARDWELLSDENSE_HEADER_INCLUDED
#define OPM_STANDARDWELLSDENSE_HEADER_INCLUDED #define OPM_STANDARDWELLSDENSE_HEADER_INCLUDED
#include <opm/autodiff/BlackoilModelEbosTypeTags.hpp>
#include <opm/common/OpmLog/OpmLog.hpp> #include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/common/utility/platform_dependent/disable_warnings.h> #include <opm/common/utility/platform_dependent/disable_warnings.h>
@ -69,12 +67,9 @@ enum WellVariablePositions {
/// Class for handling the standard well model. /// Class for handling the standard well model.
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
class StandardWellsDense { class StandardWellsDense {
public: public:
// --------- Ebos property system stuff -------
typedef typename TTAG(EclFlowProblem) TypeTag;
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
// --------- Types --------- // --------- Types ---------
typedef WellStateFullyImplicitBlackoilDense WellState; typedef WellStateFullyImplicitBlackoilDense WellState;
typedef BlackoilModelParameters ModelParameters; typedef BlackoilModelParameters ModelParameters;

View File

@ -3,8 +3,8 @@
namespace Opm { namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
StandardWellsDense(const Wells* wells_arg, StandardWellsDense(const Wells* wells_arg,
WellCollection* well_collection, WellCollection* well_collection,
const ModelParameters& param, const ModelParameters& param,
@ -32,9 +32,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
init(const PhaseUsage phase_usage_arg, init(const PhaseUsage phase_usage_arg,
const std::vector<bool>& active_arg, const std::vector<bool>& active_arg,
const VFPProperties* vfp_properties_arg, const VFPProperties* vfp_properties_arg,
@ -120,10 +120,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
SimulatorReport SimulatorReport
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
assemble(Simulator& ebosSimulator, assemble(Simulator& ebosSimulator,
const int iterationIdx, const int iterationIdx,
const double dt, const double dt,
@ -162,10 +162,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
assembleWellEq(Simulator& ebosSimulator, assembleWellEq(Simulator& ebosSimulator,
const double dt, const double dt,
WellState& well_state, WellState& well_state,
@ -252,10 +252,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
bool bool
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
allow_cross_flow(const int w, Simulator& ebosSimulator) const allow_cross_flow(const int w, Simulator& ebosSimulator) const
{ {
if (wells().allow_cf[w]) { if (wells().allow_cf[w]) {
@ -290,9 +290,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
localInvert(Mat& istlA) const localInvert(Mat& istlA) const
{ {
for (auto row = istlA.begin(), rowend = istlA.end(); row != rowend; ++row ) { for (auto row = istlA.begin(), rowend = istlA.end(); row != rowend; ++row ) {
@ -307,9 +307,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
print(Mat& istlA) const print(Mat& istlA) const
{ {
for (auto row = istlA.begin(), rowend = istlA.end(); row != rowend; ++row ) { for (auto row = istlA.begin(), rowend = istlA.end(); row != rowend; ++row ) {
@ -323,9 +323,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
apply( BVector& r) const apply( BVector& r) const
{ {
if ( ! localWellsActive() ) { if ( ! localWellsActive() ) {
@ -342,9 +342,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
apply(const BVector& x, BVector& Ax) apply(const BVector& x, BVector& Ax)
{ {
if ( ! localWellsActive() ) { if ( ! localWellsActive() ) {
@ -365,9 +365,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax) applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax)
{ {
if ( ! localWellsActive() ) { if ( ! localWellsActive() ) {
@ -387,9 +387,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
recoverVariable(const BVector& x, BVector& xw) const recoverVariable(const BVector& x, BVector& xw) const
{ {
if ( ! localWellsActive() ) { if ( ! localWellsActive() ) {
@ -404,9 +404,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
flowPhaseToEbosCompIdx( const int phaseIdx ) const flowPhaseToEbosCompIdx( const int phaseIdx ) const
{ {
const int phaseToComp[ 3 ] = { FluidSystem::waterCompIdx, FluidSystem::oilCompIdx, FluidSystem::gasCompIdx }; const int phaseToComp[ 3 ] = { FluidSystem::waterCompIdx, FluidSystem::oilCompIdx, FluidSystem::gasCompIdx };
@ -417,9 +417,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
flowToEbosPvIdx( const int flowPv ) const flowToEbosPvIdx( const int flowPv ) const
{ {
const int flowToEbos[ 3 ] = { const int flowToEbos[ 3 ] = {
@ -434,9 +434,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
flowPhaseToEbosPhaseIdx( const int phaseIdx ) const flowPhaseToEbosPhaseIdx( const int phaseIdx ) const
{ {
const int flowToEbos[ 3 ] = { FluidSystem::waterPhaseIdx, FluidSystem::oilPhaseIdx, FluidSystem::gasPhaseIdx }; const int flowToEbos[ 3 ] = { FluidSystem::waterPhaseIdx, FluidSystem::oilPhaseIdx, FluidSystem::gasPhaseIdx };
@ -447,9 +447,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
ebosCompToFlowPhaseIdx( const int compIdx ) const ebosCompToFlowPhaseIdx( const int compIdx ) const
{ {
const int compToPhase[ 3 ] = { Oil, Water, Gas }; const int compToPhase[ 3 ] = { Oil, Water, Gas };
@ -460,9 +460,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
std::vector<double> std::vector<double>
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
extractPerfData(const std::vector<double>& in) const extractPerfData(const std::vector<double>& in) const
{ {
const int nw = wells().number_of_wells; const int nw = wells().number_of_wells;
@ -481,9 +481,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
numPhases() const numPhases() const
{ {
return wells().number_of_phases; return wells().number_of_phases;
@ -493,9 +493,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
numCells() const numCells() const
{ {
return pv_.size(); return pv_.size();
@ -505,9 +505,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
resetWellControlFromState(WellState xw) const resetWellControlFromState(WellState xw) const
{ {
const int nw = wells_->number_of_wells; const int nw = wells_->number_of_wells;
@ -521,9 +521,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
const Wells& const Wells&
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wells() const wells() const
{ {
assert(wells_ != 0); assert(wells_ != 0);
@ -534,9 +534,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
const Wells* const Wells*
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellsPointer() const wellsPointer() const
{ {
return wells_; return wells_;
@ -546,9 +546,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
bool bool
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellsActive() const wellsActive() const
{ {
return wells_active_; return wells_active_;
@ -558,9 +558,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
setWellsActive(const bool wells_active) setWellsActive(const bool wells_active)
{ {
wells_active_ = wells_active; wells_active_ = wells_active;
@ -570,9 +570,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
bool bool
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
localWellsActive() const localWellsActive() const
{ {
return wells_ ? (wells_->number_of_wells > 0 ) : false; return wells_ ? (wells_->number_of_wells > 0 ) : false;
@ -582,9 +582,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
int int
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
numWellVars() const numWellVars() const
{ {
if ( !localWellsActive() ) { if ( !localWellsActive() ) {
@ -600,9 +600,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
const std::vector<double>& const std::vector<double>&
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellPerforationDensities() const wellPerforationDensities() const
{ {
return well_perforation_densities_; return well_perforation_densities_;
@ -612,9 +612,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
const std::vector<double>& const std::vector<double>&
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellPerforationPressureDiffs() const wellPerforationPressureDiffs() const
{ {
return well_perforation_pressure_diffs_; return well_perforation_pressure_diffs_;
@ -624,9 +624,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
extendEval(Eval in) const { extendEval(Eval in) const {
EvalWell out = 0.0; EvalWell out = 0.0;
out.setValue(in.value()); out.setValue(in.value());
@ -640,9 +640,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
setWellVariables(const WellState& xw) setWellVariables(const WellState& xw)
{ {
const int np = wells().number_of_phases; const int np = wells().number_of_phases;
@ -660,9 +660,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
print(EvalWell in) const print(EvalWell in) const
{ {
std::cout << in.value() << std::endl; std::cout << in.value() << std::endl;
@ -675,9 +675,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computeAccumWells() computeAccumWells()
{ {
const int np = wells().number_of_phases; const int np = wells().number_of_phases;
@ -693,10 +693,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template<typename intensiveQuants> template<typename intensiveQuants>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computeWellFlux(const int& w, const double& Tw, computeWellFlux(const int& w, const double& Tw,
const intensiveQuants& intQuants, const intensiveQuants& intQuants,
const EvalWell& bhp, const double& cdp, const EvalWell& bhp, const double& cdp,
@ -823,10 +823,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
SimulatorReport SimulatorReport
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
solveWellEq(Simulator& ebosSimulator, solveWellEq(Simulator& ebosSimulator,
const double dt, const double dt,
WellState& well_state) WellState& well_state)
@ -875,9 +875,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
printIf(const int c, const double x, const double y, const double eps, const std::string type) const printIf(const int c, const double x, const double y, const double eps, const std::string type) const
{ {
if (std::abs(x-y) > eps) { if (std::abs(x-y) > eps) {
@ -889,9 +889,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
std::vector<double> std::vector<double>
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
residual() const residual() const
{ {
if( ! wellsActive() ) if( ! wellsActive() )
@ -916,10 +916,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
bool bool
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
getWellConvergence(Simulator& ebosSimulator, getWellConvergence(Simulator& ebosSimulator,
const int iteration) const const int iteration) const
{ {
@ -1029,10 +1029,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computeWellConnectionPressures(const Simulator& ebosSimulator, computeWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& xw) const WellState& xw)
{ {
@ -1053,10 +1053,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computePropertiesForWellConnectionPressures(const Simulator& ebosSimulator, computePropertiesForWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& xw, const WellState& xw,
std::vector<double>& b_perf, std::vector<double>& b_perf,
@ -1156,9 +1156,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
updateWellState(const BVector& dwells, updateWellState(const BVector& dwells,
WellState& well_state) const WellState& well_state) const
{ {
@ -1428,9 +1428,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
updateWellControls(WellState& xw) const updateWellControls(WellState& xw) const
{ {
if( !localWellsActive() ) return ; if( !localWellsActive() ) return ;
@ -1524,9 +1524,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
updateListEconLimited(const Schedule& schedule, updateListEconLimited(const Schedule& schedule,
const int current_step, const int current_step,
const Wells* wells_struct, const Wells* wells_struct,
@ -1632,9 +1632,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computeWellConnectionDensitesPressures(const WellState& xw, computeWellConnectionDensitesPressures(const WellState& xw,
const std::vector<double>& b_perf, const std::vector<double>& b_perf,
const std::vector<double>& rsmax_perf, const std::vector<double>& rsmax_perf,
@ -1659,10 +1659,10 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
template <typename Simulator> template <typename Simulator>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computeWellPotentials(const Simulator& ebosSimulator, computeWellPotentials(const Simulator& ebosSimulator,
WellState& well_state) const WellState& well_state) const
{ {
@ -1793,9 +1793,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
WellCollection* WellCollection*
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellCollection() const wellCollection() const
{ {
return well_collection_; return well_collection_;
@ -1804,9 +1804,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
const std::vector<double>& const std::vector<double>&
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellPerfEfficiencyFactors() const wellPerfEfficiencyFactors() const
{ {
return well_perforation_efficiency_factors_; return well_perforation_efficiency_factors_;
@ -1816,9 +1816,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
calculateEfficiencyFactors() calculateEfficiencyFactors()
{ {
if ( !localWellsActive() ) { if ( !localWellsActive() ) {
@ -1844,9 +1844,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
computeWellVoidageRates(const WellState& well_state, computeWellVoidageRates(const WellState& well_state,
std::vector<double>& well_voidage_rates, std::vector<double>& well_voidage_rates,
std::vector<double>& voidage_conversion_coeffs) const std::vector<double>& voidage_conversion_coeffs) const
@ -1904,9 +1904,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
applyVREPGroupControl(WellState& well_state) const applyVREPGroupControl(WellState& well_state) const
{ {
if ( wellCollection()->havingVREPGroups() ) { if ( wellCollection()->havingVREPGroups() ) {
@ -1929,9 +1929,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
getBhp(const int wellIdx) const { getBhp(const int wellIdx) const {
const WellControls* wc = wells().ctrls[wellIdx]; const WellControls* wc = wells().ctrls[wellIdx];
if (well_controls_get_current_type(wc) == BHP) { if (well_controls_get_current_type(wc) == BHP) {
@ -1985,9 +1985,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
getQs(const int wellIdx, const int phaseIdx) const getQs(const int wellIdx, const int phaseIdx) const
{ {
EvalWell qs = 0.0; EvalWell qs = 0.0;
@ -2088,9 +2088,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellVolumeFraction(const int wellIdx, const int phaseIdx) const wellVolumeFraction(const int wellIdx, const int phaseIdx) const
{ {
const int nw = wells().number_of_wells; const int nw = wells().number_of_wells;
@ -2118,9 +2118,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellVolumeFractionScaled(const int wellIdx, const int phaseIdx) const wellVolumeFractionScaled(const int wellIdx, const int phaseIdx) const
{ {
const WellControls* wc = wells().ctrls[wellIdx]; const WellControls* wc = wells().ctrls[wellIdx];
@ -2136,9 +2136,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::EvalWell typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::EvalWell
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
wellSurfaceVolumeFraction(const int well_index, const int phase) const wellSurfaceVolumeFraction(const int well_index, const int phase) const
{ {
EvalWell sum_volume_fraction_scaled = 0.; EvalWell sum_volume_fraction_scaled = 0.;
@ -2156,9 +2156,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
bool bool
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
checkRateEconLimits(const WellEconProductionLimits& econ_production_limits, checkRateEconLimits(const WellEconProductionLimits& econ_production_limits,
const WellState& well_state, const WellState& well_state,
const int well_number) const const int well_number) const
@ -2207,9 +2207,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::RatioCheckTuple typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::RatioCheckTuple
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
checkRatioEconLimits(const WellEconProductionLimits& econ_production_limits, checkRatioEconLimits(const WellEconProductionLimits& econ_production_limits,
const WellState& well_state, const WellState& well_state,
const WellMapEntryType& map_entry) const const WellMapEntryType& map_entry) const
@ -2265,9 +2265,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
typename StandardWellsDense<FluidSystem, BlackoilIndices>::RatioCheckTuple typename StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::RatioCheckTuple
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
checkMaxWaterCutLimit(const WellEconProductionLimits& econ_production_limits, checkMaxWaterCutLimit(const WellEconProductionLimits& econ_production_limits,
const WellState& well_state, const WellState& well_state,
const WellMapEntryType& map_entry) const const WellMapEntryType& map_entry) const
@ -2345,9 +2345,9 @@ namespace Opm {
template<typename FluidSystem, typename BlackoilIndices> template<typename FluidSystem, typename BlackoilIndices, typename ElementContext>
void void
StandardWellsDense<FluidSystem, BlackoilIndices>:: StandardWellsDense<FluidSystem, BlackoilIndices, ElementContext>::
updateWellStateWithTarget(const WellControls* wc, updateWellStateWithTarget(const WellControls* wc,
const int current, const int current,
const int well_index, const int well_index,