diff --git a/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C b/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C index 185536e1ec..f9f0d7f30f 100644 --- a/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C +++ b/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C @@ -142,7 +142,7 @@ void Foam::waveVelocityFvPatchVectorField::updateCoeffs() const scalarField& phip = patch().lookupPatchField(phiName_); - const scalarField out = pos0(phip); + const scalarField out(pos0(phip)); // Where inflow, fix all velocity components to values specified by the // wave model. @@ -154,7 +154,7 @@ void Foam::waveVelocityFvPatchVectorField::updateCoeffs() // specified by the wave model. Tangential components are extrapolated. const scalar QPhip = gSum(out*phip); const scalar QWave = gSum(out*(UWave & patch().Sf())); - const vectorField nBySf = patch().Sf()/sqr(patch().magSf()); + const vectorField nBySf(patch().Sf()/sqr(patch().magSf())); if (QPhip > VSMALL) { refValue() += out*(QWave/QPhip)*phip*nBySf;