WellState: template Scalar type

This commit is contained in:
Arne Morten Kvarving
2024-02-17 18:13:46 +01:00
parent 58f334b264
commit be57843296
75 changed files with 730 additions and 664 deletions

View File

@@ -136,11 +136,11 @@ struct Setup
};
namespace {
Opm::WellState
Opm::WellState<double>
buildWellState(const Setup& setup, const std::size_t timeStep,
std::vector<Opm::ParallelWellInfo>& pinfos)
{
auto state = Opm::WellState{setup.pu};
auto state = Opm::WellState<double>{setup.pu};
const auto cpress =
std::vector<double>(setup.grid.c_grid()->number_of_cells,
@@ -171,7 +171,7 @@ namespace {
void setSegPress(const std::vector<Opm::Well>& wells,
Opm::WellState& wstate)
Opm::WellState<double>& wstate)
{
const auto nWell = wells.size();
@@ -200,8 +200,8 @@ namespace {
void setSegRates(const std::vector<Opm::Well>& wells,
const Opm::PhaseUsage& pu,
Opm::WellState& wstate)
const Opm::PhaseUsage& pu,
Opm::WellState<double>& wstate)
{
const auto wat = pu.phase_used[Opm::BlackoilPhases::Aqua];
const auto iw = wat ? pu.phase_pos[Opm::BlackoilPhases::Aqua] : -1;