mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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<Scalar> PerfData<Scalar>::serializationTestObject()
|
||||||
{
|
{
|
||||||
PerfData result;
|
PerfData result;
|
||||||
|
result.injector = true;
|
||||||
result.pressure_first_connection = 1.0;
|
result.pressure_first_connection = 1.0;
|
||||||
result.pressure = {2.0, 3.0, 4.0};
|
result.pressure = {2.0, 3.0, 4.0};
|
||||||
result.rates = {5.0, 6.0};
|
result.rates = {5.0, 6.0};
|
||||||
@ -130,7 +131,8 @@ bool PerfData<Scalar>::try_assign(const PerfData& other)
|
|||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
bool PerfData<Scalar>::operator==(const PerfData& rhs) const
|
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->pressure == rhs.pressure)
|
||||||
&& (this->rates == rhs.rates)
|
&& (this->rates == rhs.rates)
|
||||||
&& (this->phase_rates == rhs.phase_rates)
|
&& (this->phase_rates == rhs.phase_rates)
|
||||||
|
@ -32,7 +32,7 @@ template<class Scalar>
|
|||||||
class PerfData
|
class PerfData
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool injector;
|
bool injector{false};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PerfData() = default;
|
PerfData() = default;
|
||||||
@ -50,6 +50,7 @@ public:
|
|||||||
template<class Serializer>
|
template<class Serializer>
|
||||||
void serializeOp(Serializer& serializer)
|
void serializeOp(Serializer& serializer)
|
||||||
{
|
{
|
||||||
|
serializer(injector);
|
||||||
serializer(pressure_first_connection);
|
serializer(pressure_first_connection);
|
||||||
serializer(pressure);
|
serializer(pressure);
|
||||||
serializer(rates);
|
serializer(rates);
|
||||||
|
Loading…
Reference in New Issue
Block a user