mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-25 07:07:42 -05:00
Merge pull request #6236 from GitPaean/removing_scalar_template_parameter
removing Scalar template paramter from CompWellState and SingleCompWellState.
This commit is contained in:
7 files changed
+39
-36
No files matched your search
@@ -43,7 +43,7 @@ public:
|
||||
using VectorBlockType = Dune::FieldVector<Scalar, Indices::numEq>;
|
||||
using BVector = Dune::BlockVector<VectorBlockType>;
|
||||
using CompConnectionData = PerforationData<Scalar>;
|
||||
using SingleWellState = SingleCompWellState<FluidSystem, Scalar>;
|
||||
using SingleWellState = SingleCompWellState<FluidSystem>;
|
||||
|
||||
CompWellInterface(const Well& well,
|
||||
const int index_of_well,
|
||||
|
||||
@@ -143,7 +143,7 @@ private:
|
||||
const CompositionalConfig& comp_config_;
|
||||
|
||||
// we will need two to handle the changes between time stepping
|
||||
CompWellState<FluidSystem, Scalar> comp_well_states_;
|
||||
CompWellState<FluidSystem> comp_well_states_;
|
||||
|
||||
// this is needed for parallel running, not all the wells will be in the same process
|
||||
std::vector<Well> wells_ecl_;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
template <typename FluidSystem>
|
||||
class SingleCompWellState;
|
||||
|
||||
template <typename FluidSystem, typename Indices>
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
using Eval = DenseAd::Evaluation<Scalar, numResEq>;
|
||||
|
||||
using BVectorWell = typename CompWellEquations<Scalar, numWellEq, numResEq>::BVectorWell;
|
||||
using SingleWellState = SingleCompWellState<FluidSystem, Scalar>;
|
||||
using SingleWellState = SingleCompWellState<FluidSystem>;
|
||||
|
||||
template <typename T>
|
||||
using FluidState = CompositionalFluidState<T, FluidSystem>;
|
||||
|
||||
@@ -35,12 +35,13 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
template <typename FluidSystem>
|
||||
class CompWellState
|
||||
{
|
||||
public:
|
||||
using Scalar = typename FluidSystem::Scalar;
|
||||
using CompConnectionData = PerforationData<Scalar>;
|
||||
using SingleWellState = SingleCompWellState<FluidSystem, Scalar>;
|
||||
using SingleWellState = SingleCompWellState<FluidSystem>;
|
||||
|
||||
explicit CompWellState(const CompositionalConfig& comp_config);
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
CompWellState<FluidSystem>::
|
||||
CompWellState(const CompositionalConfig& comp_config)
|
||||
: comp_config_(comp_config)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
void CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void CompWellState<FluidSystem>::
|
||||
init(const std::vector<Well>& wells_ecl,
|
||||
const std::vector<Scalar>& cell_pressures,
|
||||
const Scalar temperature,
|
||||
@@ -43,8 +43,8 @@ init(const std::vector<Well>& wells_ecl,
|
||||
// let us see how we gonna use it though
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
void CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void CompWellState<FluidSystem>::
|
||||
base_init(const std::vector<Well>& wells_ecl,
|
||||
const std::vector<Scalar>& cell_pressures,
|
||||
const Scalar temperature,
|
||||
@@ -64,8 +64,8 @@ base_init(const std::vector<Well>& wells_ecl,
|
||||
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
void CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void CompWellState<FluidSystem>::
|
||||
initSingleWell(const Well& well,
|
||||
const std::vector<Scalar>& cell_pressures,
|
||||
const Scalar tempearture,
|
||||
@@ -81,8 +81,8 @@ initSingleWell(const Well& well,
|
||||
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
void CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void CompWellState<FluidSystem>::
|
||||
initSingleInjector(const Well& well,
|
||||
const std::vector<Scalar>& /* cell_pressures */,
|
||||
const Scalar temperature,
|
||||
@@ -98,8 +98,8 @@ initSingleInjector(const Well& well,
|
||||
ws.update_injector_targets(well, summary_state);
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
void CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void CompWellState<FluidSystem>::
|
||||
initSingleProducer(const Well& well,
|
||||
const std::vector<Scalar>& /* cell_pressures */,
|
||||
const Scalar temperature,
|
||||
@@ -116,25 +116,25 @@ initSingleProducer(const Well& well,
|
||||
ws.update_producer_targets(well, cell_mole_fractions, summary_state);
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
const typename CompWellState<FluidSystem, Scalar>::SingleWellState&
|
||||
CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
const typename CompWellState<FluidSystem>::SingleWellState&
|
||||
CompWellState<FluidSystem>::
|
||||
operator[](const std::string& well_name) const
|
||||
{
|
||||
return this->wells_[well_name];
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
typename CompWellState<FluidSystem, Scalar>::SingleWellState&
|
||||
CompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
typename CompWellState<FluidSystem>::SingleWellState&
|
||||
CompWellState<FluidSystem>::
|
||||
operator[](const std::string& well_name)
|
||||
{
|
||||
return this->wells_[well_name];
|
||||
}
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
template <typename FluidSystem>
|
||||
data::Wells
|
||||
CompWellState<FluidSystem, Scalar>::
|
||||
CompWellState<FluidSystem>::
|
||||
report() const
|
||||
{
|
||||
if (this->wells_.empty()) {
|
||||
|
||||
@@ -53,10 +53,12 @@ public:
|
||||
std::vector<std::size_t> ecl_index {};
|
||||
};
|
||||
|
||||
template <typename FluidSystem, typename Scalar>
|
||||
template <typename FluidSystem>
|
||||
class SingleCompWellState
|
||||
{
|
||||
public:
|
||||
using Scalar = typename FluidSystem::Scalar;
|
||||
|
||||
SingleCompWellState(const std::string& name,
|
||||
const CompositionalConfig& comp_config,
|
||||
const Scalar temperature,
|
||||
|
||||
@@ -49,8 +49,8 @@ CompConnectionData(const std::vector<PerforationData<Scalar>>& connections,
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FluidSystem, class Scalar>
|
||||
SingleCompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
SingleCompWellState<FluidSystem>::
|
||||
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 <typename FluidSystem, class Scalar>
|
||||
void SingleCompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void SingleCompWellState<FluidSystem>::
|
||||
update_injector_targets(const Well& well,
|
||||
const SummaryState& st)
|
||||
{
|
||||
@@ -113,8 +113,8 @@ update_injector_targets(const Well& well,
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FluidSystem, class Scalar>
|
||||
void SingleCompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
void SingleCompWellState<FluidSystem>::
|
||||
update_producer_targets(const Well& well,
|
||||
const std::vector<std::vector<Scalar>>& cell_mole_fractions,
|
||||
const SummaryState& st)
|
||||
@@ -144,9 +144,9 @@ update_producer_targets(const Well& well,
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FluidSystem, class Scalar>
|
||||
Scalar
|
||||
SingleCompWellState<FluidSystem, Scalar>::
|
||||
template <typename FluidSystem>
|
||||
typename SingleCompWellState<FluidSystem>::Scalar
|
||||
SingleCompWellState<FluidSystem>::
|
||||
get_total_surface_rate() const
|
||||
{
|
||||
return std::accumulate(surface_phase_rates.begin(), surface_phase_rates.end(), Scalar(0));
|
||||
|
||||
Reference in new issue
Block a user