From 8f293ba5e5c024c8d09a7ae2bdaaea5df357b98b Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 23 Jan 2025 10:46:55 +0100 Subject: [PATCH] add some missing initializers --- .../multiphasebaseextensivequantities.hh | 4 +-- opm/models/common/transfluxmodule.hh | 8 ++--- .../common/baseauxiliarymodule.hh | 2 +- .../common/fvbaseextensivequantities.hh | 6 ++-- .../vcfv/p1fegradientcalculator.hh | 6 ++-- .../satfunc/GasPhaseConsistencyChecks.hpp | 10 +++--- .../satfunc/OilPhaseConsistencyChecks.hpp | 36 +++++++++---------- .../utils/satfunc/RelpermDiagnostics.hpp | 6 ++-- .../ThreePointHorizontalConsistencyChecks.hpp | 16 ++++----- .../satfunc/WaterPhaseConsistencyChecks.hpp | 10 +++--- 10 files changed, 52 insertions(+), 52 deletions(-) diff --git a/opm/models/common/multiphasebaseextensivequantities.hh b/opm/models/common/multiphasebaseextensivequantities.hh index b372cd129..0438d8b62 100644 --- a/opm/models/common/multiphasebaseextensivequantities.hh +++ b/opm/models/common/multiphasebaseextensivequantities.hh @@ -167,8 +167,8 @@ public: { return 1.0 - upstreamWeight(phaseIdx); } private: - short upstreamScvIdx_[numPhases]; - short downstreamScvIdx_[numPhases]; + short upstreamScvIdx_[numPhases]{}; + short downstreamScvIdx_[numPhases]{}; }; } // namespace Opm diff --git a/opm/models/common/transfluxmodule.hh b/opm/models/common/transfluxmodule.hh index 7f9797cef..2a72d8149 100644 --- a/opm/models/common/transfluxmodule.hh +++ b/opm/models/common/transfluxmodule.hh @@ -500,10 +500,10 @@ private: Evaluation pressureDifference_[numPhases]; // the local indices of the interior and exterior degrees of freedom - unsigned short interiorDofIdx_; - unsigned short exteriorDofIdx_; - short upIdx_[numPhases]; - short dnIdx_[numPhases]; + unsigned short interiorDofIdx_{}; + unsigned short exteriorDofIdx_{}; + short upIdx_[numPhases]{}; + short dnIdx_[numPhases]{}; }; } // namespace Opm diff --git a/opm/models/discretization/common/baseauxiliarymodule.hh b/opm/models/discretization/common/baseauxiliarymodule.hh index 61dc6624d..2cea8a54d 100644 --- a/opm/models/discretization/common/baseauxiliarymodule.hh +++ b/opm/models/discretization/common/baseauxiliarymodule.hh @@ -122,7 +122,7 @@ public: {}; private: - int dofOffset_; + int dofOffset_{}; }; } // namespace Opm diff --git a/opm/models/discretization/common/fvbaseextensivequantities.hh b/opm/models/discretization/common/fvbaseextensivequantities.hh index 35c97cbb6..0ba451e08 100644 --- a/opm/models/discretization/common/fvbaseextensivequantities.hh +++ b/opm/models/discretization/common/fvbaseextensivequantities.hh @@ -124,10 +124,10 @@ public: private: // local indices of the interior and the exterior sub-control-volumes - unsigned short interiorScvIdx_; - unsigned short exteriorScvIdx_; + unsigned short interiorScvIdx_{}; + unsigned short exteriorScvIdx_{}; - Scalar extrusionFactor_; + Scalar extrusionFactor_{}; }; } // namespace Opm diff --git a/opm/models/discretization/vcfv/p1fegradientcalculator.hh b/opm/models/discretization/vcfv/p1fegradientcalculator.hh index 4149fef08..a1731cf56 100644 --- a/opm/models/discretization/vcfv/p1fegradientcalculator.hh +++ b/opm/models/discretization/vcfv/p1fegradientcalculator.hh @@ -341,9 +341,9 @@ private: #if HAVE_DUNE_LOCALFUNCTIONS static LocalFiniteElementCache feCache_; - const LocalFiniteElement* localFiniteElement_; - std::vector> p1Value_[maxFap]; - DimVector p1Gradient_[maxFap][maxDof]; + const LocalFiniteElement* localFiniteElement_{nullptr}; + std::vector> p1Value_[maxFap]{}; + DimVector p1Gradient_[maxFap][maxDof]{}; #endif // HAVE_DUNE_LOCALFUNCTIONS }; diff --git a/opm/simulators/utils/satfunc/GasPhaseConsistencyChecks.hpp b/opm/simulators/utils/satfunc/GasPhaseConsistencyChecks.hpp index 7f015ff4d..ef325763c 100644 --- a/opm/simulators/utils/satfunc/GasPhaseConsistencyChecks.hpp +++ b/opm/simulators/utils/satfunc/GasPhaseConsistencyChecks.hpp @@ -70,7 +70,7 @@ namespace Opm::Satfunc::PhaseChecks::Gas { private: /// Minimum gas saturation. - Scalar sgl_; + Scalar sgl_{}; /// Run check against a set of saturation function end-points. /// @@ -124,7 +124,7 @@ namespace Opm::Satfunc::PhaseChecks::Gas { private: /// Maximum gas saturation. - Scalar sgu_; + Scalar sgu_{}; /// Run check against a set of saturation function end-points. /// @@ -182,13 +182,13 @@ namespace Opm::Satfunc::PhaseChecks::Gas { private: /// Minimum gas saturation. - Scalar sgl_; + Scalar sgl_{}; /// Critical gas saturation. - Scalar sgcr_; + Scalar sgcr_{}; /// Maximum gas saturation. - Scalar sgu_; + Scalar sgu_{}; /// Run check against a set of saturation function end-points. /// diff --git a/opm/simulators/utils/satfunc/OilPhaseConsistencyChecks.hpp b/opm/simulators/utils/satfunc/OilPhaseConsistencyChecks.hpp index 9c346d433..eeea3f775 100644 --- a/opm/simulators/utils/satfunc/OilPhaseConsistencyChecks.hpp +++ b/opm/simulators/utils/satfunc/OilPhaseConsistencyChecks.hpp @@ -70,7 +70,7 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Critical oil saturation in gas/oil system. - Scalar sogcr_; + Scalar sogcr_{}; /// Run check against a set of saturation function end-points. /// @@ -128,10 +128,10 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Minimum (connate) water saturation in gas/oil system. - Scalar swl_; + Scalar swl_{}; /// Maximum gas saturation in gas/oil system. - Scalar sgu_; + Scalar sgu_{}; /// Run check against a set of saturation function end-points. /// @@ -192,13 +192,13 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Minimum water saturation. - Scalar swl_; + Scalar swl_{}; /// Minimum gas saturation. - Scalar sgl_; + Scalar sgl_{}; /// Critical oil saturation in gas/oil system. - Scalar sogcr_; + Scalar sogcr_{}; /// Run check against a set of saturation function end-points. /// @@ -259,13 +259,13 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Minimum water saturation. - Scalar swl_; + Scalar swl_{}; /// Critical gas saturation. - Scalar sgcr_; + Scalar sgcr_{}; /// Critical oil saturation in gas/oil system - Scalar sogcr_; + Scalar sogcr_{}; /// Run check against a set of saturation function end-points. /// @@ -321,7 +321,7 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Critical oil saturation in oil/water system. - Scalar sowcr_; + Scalar sowcr_{}; /// Run check against a set of saturation function end-points. /// @@ -379,10 +379,10 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Minimum gas saturation. Typically zero. - Scalar sgl_; + Scalar sgl_{}; /// Minimum (connate) saturation. - Scalar swu_; + Scalar swu_{}; /// Run check against a set of saturation function end-points. /// @@ -443,13 +443,13 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Minimum (connate) water saturation. - Scalar swl_; + Scalar swl_{}; /// Minimum gas saturation. Typically zero. - Scalar sgl_; + Scalar sgl_{}; /// Critical oil saturation in oil/water system. - Scalar sowcr_; + Scalar sowcr_{}; /// Run check against a set of saturation function end-points. /// @@ -510,13 +510,13 @@ namespace Opm::Satfunc::PhaseChecks::Oil { private: /// Minimum gas saturation. Typically zero. - Scalar sgl_; + Scalar sgl_{}; /// Critical water saturation. - Scalar swcr_; + Scalar swcr_{}; /// Critical oil saturation in oil/water system. - Scalar sowcr_; + Scalar sowcr_{}; /// Run check against a set of saturation function end-points. /// diff --git a/opm/simulators/utils/satfunc/RelpermDiagnostics.hpp b/opm/simulators/utils/satfunc/RelpermDiagnostics.hpp index 4ea30d145..efd3fe435 100644 --- a/opm/simulators/utils/satfunc/RelpermDiagnostics.hpp +++ b/opm/simulators/utils/satfunc/RelpermDiagnostics.hpp @@ -77,10 +77,10 @@ namespace Opm { NoFamily }; - SaturationFunctionFamily satFamily_; + SaturationFunctionFamily satFamily_{NoFamily}; - std::vector > unscaledEpsInfo_; - std::vector > scaledEpsInfo_; + std::vector > unscaledEpsInfo_{}; + std::vector > scaledEpsInfo_{}; ///Check the phase that used. diff --git a/opm/simulators/utils/satfunc/ThreePointHorizontalConsistencyChecks.hpp b/opm/simulators/utils/satfunc/ThreePointHorizontalConsistencyChecks.hpp index 1261bb6b8..355f9fb8e 100644 --- a/opm/simulators/utils/satfunc/ThreePointHorizontalConsistencyChecks.hpp +++ b/opm/simulators/utils/satfunc/ThreePointHorizontalConsistencyChecks.hpp @@ -82,16 +82,16 @@ namespace Opm::Satfunc::PhaseChecks::ThreePointHorizontal { private: /// Minimum (connate) water saturation. - Scalar swl_; + Scalar swl_{}; /// Critical oil saturation in two-phase gas/oil system. - Scalar sogcr_; + Scalar sogcr_{}; /// Critical gas saturation. - Scalar sgcr_; + Scalar sgcr_{}; /// Maximum gas saturation. - Scalar sgu_; + Scalar sgu_{}; /// Run check against a set of saturation function end-points. /// @@ -157,16 +157,16 @@ namespace Opm::Satfunc::PhaseChecks::ThreePointHorizontal { private: /// Minimum gas saturation. - Scalar sgl_; + Scalar sgl_{}; /// Critical oil saturation in two-phase oil/water system. - Scalar sowcr_; + Scalar sowcr_{}; /// Critical water saturation. - Scalar swcr_; + Scalar swcr_{}; /// Maximum water saturation. - Scalar swu_; + Scalar swu_{}; /// Run check against a set of saturation function end-points. /// diff --git a/opm/simulators/utils/satfunc/WaterPhaseConsistencyChecks.hpp b/opm/simulators/utils/satfunc/WaterPhaseConsistencyChecks.hpp index aab6db022..22a9b10dd 100644 --- a/opm/simulators/utils/satfunc/WaterPhaseConsistencyChecks.hpp +++ b/opm/simulators/utils/satfunc/WaterPhaseConsistencyChecks.hpp @@ -70,7 +70,7 @@ namespace Opm::Satfunc::PhaseChecks::Water { private: /// Minimum (connate) water saturation. - Scalar swl_; + Scalar swl_{}; /// Run check against a set of saturation function end-points. /// @@ -124,7 +124,7 @@ namespace Opm::Satfunc::PhaseChecks::Water { private: /// Maximum water saturation. - Scalar swu_; + Scalar swu_{}; /// Run check against a set of saturation function end-points. /// @@ -182,13 +182,13 @@ namespace Opm::Satfunc::PhaseChecks::Water { private: /// Minimum (connate) water saturation. - Scalar swl_; + Scalar swl_{}; /// Critical water saturation. - Scalar swcr_; + Scalar swcr_{}; /// Maximum water saturation. - Scalar swu_; + Scalar swu_{}; /// Run check against a set of saturation function end-points. ///