diff --git a/flowexperimental/comp/wells/CompWellInterface.hpp b/flowexperimental/comp/wells/CompWellInterface.hpp index de87bd6dd7..9efb70b0b6 100644 --- a/flowexperimental/comp/wells/CompWellInterface.hpp +++ b/flowexperimental/comp/wells/CompWellInterface.hpp @@ -43,7 +43,7 @@ public: using VectorBlockType = Dune::FieldVector; using BVector = Dune::BlockVector; using CompConnectionData = PerforationData; - using SingleWellState = SingleCompWellState; + using SingleWellState = SingleCompWellState; CompWellInterface(const Well& well, const int index_of_well, diff --git a/flowexperimental/comp/wells/CompWellModel.hpp b/flowexperimental/comp/wells/CompWellModel.hpp index 92f7e0dbd8..d8348ae69f 100644 --- a/flowexperimental/comp/wells/CompWellModel.hpp +++ b/flowexperimental/comp/wells/CompWellModel.hpp @@ -143,7 +143,7 @@ private: const CompositionalConfig& comp_config_; // we will need two to handle the changes between time stepping - CompWellState comp_well_states_; + CompWellState comp_well_states_; // this is needed for parallel running, not all the wells will be in the same process std::vector wells_ecl_; diff --git a/flowexperimental/comp/wells/CompWellPrimaryVariables.hpp b/flowexperimental/comp/wells/CompWellPrimaryVariables.hpp index c9cb8ae1a3..0598d69220 100644 --- a/flowexperimental/comp/wells/CompWellPrimaryVariables.hpp +++ b/flowexperimental/comp/wells/CompWellPrimaryVariables.hpp @@ -28,7 +28,7 @@ namespace Opm { -template +template class SingleCompWellState; template @@ -56,7 +56,7 @@ public: using Eval = DenseAd::Evaluation; using BVectorWell = typename CompWellEquations::BVectorWell; - using SingleWellState = SingleCompWellState; + using SingleWellState = SingleCompWellState; template using FluidState = CompositionalFluidState; diff --git a/flowexperimental/comp/wells/CompWellState.hpp b/flowexperimental/comp/wells/CompWellState.hpp index 9b05aa03a3..bcd705ef8a 100644 --- a/flowexperimental/comp/wells/CompWellState.hpp +++ b/flowexperimental/comp/wells/CompWellState.hpp @@ -35,12 +35,13 @@ namespace Opm { -template +template class CompWellState { public: + using Scalar = typename FluidSystem::Scalar; using CompConnectionData = PerforationData; - using SingleWellState = SingleCompWellState; + using SingleWellState = SingleCompWellState; explicit CompWellState(const CompositionalConfig& comp_config); diff --git a/flowexperimental/comp/wells/CompWellState_impl.hpp b/flowexperimental/comp/wells/CompWellState_impl.hpp index 8043ad4709..c2231c108e 100644 --- a/flowexperimental/comp/wells/CompWellState_impl.hpp +++ b/flowexperimental/comp/wells/CompWellState_impl.hpp @@ -19,16 +19,16 @@ namespace Opm { -template -CompWellState:: +template +CompWellState:: CompWellState(const CompositionalConfig& comp_config) : comp_config_(comp_config) { } -template -void CompWellState:: +template +void CompWellState:: init(const std::vector& wells_ecl, const std::vector& cell_pressures, const Scalar temperature, @@ -43,8 +43,8 @@ init(const std::vector& wells_ecl, // let us see how we gonna use it though } -template -void CompWellState:: +template +void CompWellState:: base_init(const std::vector& wells_ecl, const std::vector& cell_pressures, const Scalar temperature, @@ -64,8 +64,8 @@ base_init(const std::vector& wells_ecl, } -template -void CompWellState:: +template +void CompWellState:: initSingleWell(const Well& well, const std::vector& cell_pressures, const Scalar tempearture, @@ -81,8 +81,8 @@ initSingleWell(const Well& well, } -template -void CompWellState:: +template +void CompWellState:: initSingleInjector(const Well& well, const std::vector& /* cell_pressures */, const Scalar temperature, @@ -98,8 +98,8 @@ initSingleInjector(const Well& well, ws.update_injector_targets(well, summary_state); } -template -void CompWellState:: +template +void CompWellState:: initSingleProducer(const Well& well, const std::vector& /* cell_pressures */, const Scalar temperature, @@ -116,25 +116,25 @@ initSingleProducer(const Well& well, ws.update_producer_targets(well, cell_mole_fractions, summary_state); } -template -const typename CompWellState::SingleWellState& -CompWellState:: +template +const typename CompWellState::SingleWellState& +CompWellState:: operator[](const std::string& well_name) const { return this->wells_[well_name]; } -template -typename CompWellState::SingleWellState& -CompWellState:: +template +typename CompWellState::SingleWellState& +CompWellState:: operator[](const std::string& well_name) { return this->wells_[well_name]; } -template +template data::Wells -CompWellState:: +CompWellState:: report() const { if (this->wells_.empty()) { diff --git a/flowexperimental/comp/wells/SingleCompWellState.hpp b/flowexperimental/comp/wells/SingleCompWellState.hpp index faaacd3b35..093fceb84f 100644 --- a/flowexperimental/comp/wells/SingleCompWellState.hpp +++ b/flowexperimental/comp/wells/SingleCompWellState.hpp @@ -53,10 +53,12 @@ public: std::vector ecl_index {}; }; -template +template class SingleCompWellState { public: + using Scalar = typename FluidSystem::Scalar; + SingleCompWellState(const std::string& name, const CompositionalConfig& comp_config, const Scalar temperature, diff --git a/flowexperimental/comp/wells/SingleCompWellState_impl.hpp b/flowexperimental/comp/wells/SingleCompWellState_impl.hpp index ac7cfcff20..7730500dca 100644 --- a/flowexperimental/comp/wells/SingleCompWellState_impl.hpp +++ b/flowexperimental/comp/wells/SingleCompWellState_impl.hpp @@ -49,8 +49,8 @@ CompConnectionData(const std::vector>& connections, } } -template -SingleCompWellState:: +template +SingleCompWellState:: SingleCompWellState(const std::string& well_name, const CompositionalConfig& comp_config, const Scalar temperature_arg, @@ -67,8 +67,8 @@ SingleCompWellState(const std::string& well_name, { } -template -void SingleCompWellState:: +template +void SingleCompWellState:: update_injector_targets(const Well& well, const SummaryState& st) { @@ -113,8 +113,8 @@ update_injector_targets(const Well& well, } } -template -void SingleCompWellState:: +template +void SingleCompWellState:: update_producer_targets(const Well& well, const std::vector>& cell_mole_fractions, const SummaryState& st) @@ -144,9 +144,9 @@ update_producer_targets(const Well& well, } } -template -Scalar -SingleCompWellState:: +template +typename SingleCompWellState::Scalar +SingleCompWellState:: get_total_surface_rate() const { return std::accumulate(surface_phase_rates.begin(), surface_phase_rates.end(), Scalar(0));