removing BlackoilPhases and PhaseUsage

replacing it with a new PhaseUsageInfo and FluidSystem, both of which
are using the same implementation of PhaseUsageInfo, and only one set of
indices is used. Currently, it is the BlackOilDefaultFluidSystemIndices.
This commit is contained in:
Kai Bao committed 2025-09-02 10:19:36 +02:00
1 parent 45e0f45d64
commit b3e4c4d0d0
117 files changed
+3706 -4013

No files matched your search

+8 -5
View File
@@ -33,7 +33,8 @@
#include <opm/simulators/wells/VFPProperties.hpp>
#include <opm/simulators/wells/WellState.hpp>
#include <opm/simulators/utils/phaseUsageFromDeck.hpp>
#include <opm/material/fluidsystems/PhaseUsageInfo.hpp>
#include <opm/material/fluidsystems/BlackOilDefaultFluidSystemIndices.hpp>
#include <opm/input/eclipse/Units/Units.hpp>
@@ -55,6 +56,8 @@ namespace {
struct Setup
{
using IndexTraits = BlackOilDefaultFluidSystemIndices;
using PhaseUsage = PhaseUsageInfo<IndexTraits>;
explicit Setup(const std::string& file)
: Setup { Parser{}.parseFile(file) }
{}
@@ -62,19 +65,19 @@ struct Setup
explicit Setup(const Deck& deck)
: ecl_state { std::make_unique<EclipseState>(deck) }
, schedule { std::make_unique<Schedule>(deck, *ecl_state, std::make_shared<Python>()) }
, well_state { std::make_unique<WellState<double>>(phaseUsage(ecl_state->runspec().phases())) }
, well_state { std::make_unique<WellState<double, IndexTraits>>(PhaseUsage(ecl_state->runspec().phases())) }
{
const int step = 0;
const auto& sched_state = (*this->schedule)[step];
this->vfp_properties = std::make_unique<VFPProperties<double>>
this->vfp_properties = std::make_unique<VFPProperties<double, IndexTraits>>
(sched_state.vfpinj(), sched_state.vfpprod(), *well_state);
}
std::unique_ptr<EclipseState> ecl_state;
std::unique_ptr<Schedule> schedule;
std::unique_ptr<WellState<double>> well_state;
std::unique_ptr<VFPProperties<double>> vfp_properties;
std::unique_ptr<WellState<double, IndexTraits>> well_state;
std::unique_ptr<VFPProperties<double, IndexTraits>> vfp_properties;
};