mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-26 23:50:08 -05:00
Allow preparing injector containers of PerfData after construction.
Needed to be able to switch producers to injectors during ACTIONX.
This commit is contained in:
1 parent
5b528d6f44
commit
4df94af7f0
2 files changed
+15
-4
No files matched your search
@@ -51,13 +51,19 @@ PerfData<Scalar>::PerfData(const std::size_t num_perf,
|
||||
, ecl_index(num_perf)
|
||||
{
|
||||
if (injector) {
|
||||
this->water_throughput.resize(num_perf);
|
||||
this->skin_pressure.resize(num_perf);
|
||||
this->water_velocity.resize(num_perf);
|
||||
this->filtrate_data.resize(num_perf);
|
||||
prepareInjectorContainers();
|
||||
}
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void PerfData<Scalar>::prepareInjectorContainers()
|
||||
{
|
||||
auto num_perf = pressure.size();
|
||||
this->water_throughput.resize(num_perf);
|
||||
this->skin_pressure.resize(num_perf);
|
||||
this->water_velocity.resize(num_perf);
|
||||
this->filtrate_data.resize(num_perf);
|
||||
}
|
||||
template<class Scalar>
|
||||
PerfData<Scalar> PerfData<Scalar>::serializationTestObject()
|
||||
{
|
||||
|
||||
@@ -48,6 +48,11 @@ public:
|
||||
bool empty() const;
|
||||
bool try_assign(const PerfData& other);
|
||||
|
||||
/// \brief Make containers valid for injectors
|
||||
///
|
||||
/// Needed if a producer is switched to an injector,
|
||||
void prepareInjectorContainers();
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user