/*
Copyright 2021 Equinor ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see .
*/
#ifndef OPM_PERFDATA_HEADER_INCLUDED
#define OPM_PERFDATA_HEADER_INCLUDED
#include
#include
namespace Opm {
class PerfData
{
private:
bool injector;
public:
PerfData() = default;
PerfData(std::size_t num_perf, double pressure_first_connection_, bool injector_, std::size_t num_phases);
static PerfData serializationTestObject();
std::size_t size() const;
bool empty() const;
bool try_assign(const PerfData& other);
template
void serializeOp(Serializer& serializer)
{
serializer(pressure_first_connection);
serializer(pressure);
serializer(rates);
serializer(phase_rates);
serializer(solvent_rates);
serializer(polymer_rates);
serializer(brine_rates);
serializer(prod_index);
serializer(micp_rates);
serializer(cell_index);
serializer(connection_transmissibility_factor);
serializer(satnum_id);
serializer(ecl_index);
serializer(water_throughput);
serializer(skin_pressure);
serializer(water_velocity);
}
bool operator==(const PerfData&) const;
double pressure_first_connection{};
std::vector pressure;
std::vector rates;
std::vector phase_rates;
std::vector solvent_rates;
std::vector polymer_rates;
std::vector brine_rates;
std::vector prod_index;
std::vector micp_rates;
std::vector cell_index;
std::vector connection_transmissibility_factor;
std::vector satnum_id;
std::vector ecl_index;
// The water_throughput, skin_pressure and water_velocity variables are only
// used for injectors to check the injectivity.
std::vector water_throughput;
std::vector skin_pressure;
std::vector water_velocity;
};
} // namespace Opm
#endif // OPM_PERFORATIONDATA_HEADER_INCLUDED