add some missing initializers

This commit is contained in:
Arne Morten Kvarving 2025-01-23 10:46:55 +01:00
parent 4d2b07432c
commit 8f293ba5e5
10 changed files with 52 additions and 52 deletions

View File

@ -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

View File

@ -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

View File

@ -122,7 +122,7 @@ public:
{};
private:
int dofOffset_;
int dofOffset_{};
};
} // namespace Opm

View File

@ -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

View File

@ -341,9 +341,9 @@ private:
#if HAVE_DUNE_LOCALFUNCTIONS
static LocalFiniteElementCache feCache_;
const LocalFiniteElement* localFiniteElement_;
std::vector<Dune::FieldVector<Scalar, 1>> p1Value_[maxFap];
DimVector p1Gradient_[maxFap][maxDof];
const LocalFiniteElement* localFiniteElement_{nullptr};
std::vector<Dune::FieldVector<Scalar, 1>> p1Value_[maxFap]{};
DimVector p1Gradient_[maxFap][maxDof]{};
#endif // HAVE_DUNE_LOCALFUNCTIONS
};

View File

@ -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.
///

View File

@ -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.
///

View File

@ -77,10 +77,10 @@ namespace Opm {
NoFamily
};
SaturationFunctionFamily satFamily_;
SaturationFunctionFamily satFamily_{NoFamily};
std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_;
std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_;
std::vector<EclEpsScalingPointsInfo<double> > unscaledEpsInfo_{};
std::vector<EclEpsScalingPointsInfo<double> > scaledEpsInfo_{};
///Check the phase that used.

View File

@ -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.
///

View File

@ -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.
///