mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-14 04:31:56 -06:00
Ensure the 'injector' member is initialized, compared etc.
This commit is contained in:
parent
9c744190eb
commit
74fc1d4a67
@ -62,6 +62,7 @@ template<class Scalar>
|
||||
PerfData<Scalar> PerfData<Scalar>::serializationTestObject()
|
||||
{
|
||||
PerfData result;
|
||||
result.injector = true;
|
||||
result.pressure_first_connection = 1.0;
|
||||
result.pressure = {2.0, 3.0, 4.0};
|
||||
result.rates = {5.0, 6.0};
|
||||
@ -130,7 +131,8 @@ bool PerfData<Scalar>::try_assign(const PerfData& other)
|
||||
template<class Scalar>
|
||||
bool PerfData<Scalar>::operator==(const PerfData& rhs) const
|
||||
{
|
||||
return (this->pressure_first_connection == rhs.pressure_first_connection)
|
||||
return (this->injector == rhs.injector)
|
||||
&& (this->pressure_first_connection == rhs.pressure_first_connection)
|
||||
&& (this->pressure == rhs.pressure)
|
||||
&& (this->rates == rhs.rates)
|
||||
&& (this->phase_rates == rhs.phase_rates)
|
||||
|
@ -32,7 +32,7 @@ template<class Scalar>
|
||||
class PerfData
|
||||
{
|
||||
private:
|
||||
bool injector;
|
||||
bool injector{false};
|
||||
|
||||
public:
|
||||
PerfData() = default;
|
||||
@ -50,6 +50,7 @@ public:
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(injector);
|
||||
serializer(pressure_first_connection);
|
||||
serializer(pressure);
|
||||
serializer(rates);
|
||||
|
Loading…
Reference in New Issue
Block a user