waveModels: Updated to compile single-precision

This commit is contained in:
Henry Weller
2017-08-01 11:56:11 +01:00
parent d8f3b0f3d8
commit 0308d34c80
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ Foam::tmp<Foam::vector2DField> Foam::waveModels::Airy::vi
else else
{ {
const scalar kd = k()*depth(); const scalar kd = k()*depth();
const scalarField kdz(max(0.0, kd - mag(kz))); const scalarField kdz(max(scalar(0), kd - mag(kz)));
return i*zip(cosh(i*kdz)*cos(i*phi), sinh(i*kdz)*sin(i*phi))/sinh(kd); return i*zip(cosh(i*kdz)*cos(i*phi), sinh(i*kdz)*sin(i*phi))/sinh(kd);
} }
} }

View File

@ -132,7 +132,7 @@ Foam::tmp<Foam::vector2DField> Foam::waveModels::solitary::velocity
) const ) const
{ {
const scalar A = alpha(t); const scalar A = alpha(t);
const scalarField Z(max(0.0, 1 - mag(xz.component(1)/depth()))); const scalarField Z(max(scalar(0), 1 - mag(xz.component(1)/depth())));
const scalarField P(Pi(t, u, xz.component(0))); const scalarField P(Pi(t, u, xz.component(0)));
return return