COMP: avoid ambiguous construct from tmp - randomProcesses

This commit is contained in:
Mark Olesen
2010-12-17 17:12:38 +01:00
parent 8de19df4a7
commit f4a5bea2b9
2 changed files with 9 additions and 6 deletions

View File

@ -34,6 +34,7 @@ License
Foam::scalar Foam::noiseFFT::p0 = 2e-5; Foam::scalar Foam::noiseFFT::p0 = 2e-5;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from pressure field // Construct from pressure field
@ -226,9 +227,9 @@ Foam::graph Foam::noiseFFT::meanPf
scalarField MeanPf(N/2, 0.0); scalarField MeanPf(N/2, 0.0);
scalarField Hwf = Hanning(N); scalarField Hwf(Hanning(N));
for (label wi=0; wi<nw; wi++) for (label wi=0; wi<nw; ++wi)
{ {
MeanPf += Pf(Hwf*window(N, wi)); MeanPf += Pf(Hwf*window(N, wi));
} }
@ -272,9 +273,9 @@ Foam::graph Foam::noiseFFT::RMSmeanPf
scalarField RMSMeanPf(N/2, 0.0); scalarField RMSMeanPf(N/2, 0.0);
scalarField Hwf = Hanning(N); scalarField Hwf(Hanning(N));
for (label wi=0; wi<nw; wi++) for (label wi=0; wi<nw; ++wi)
{ {
RMSMeanPf += sqr(Pf(Hwf*window(N, wi))); RMSMeanPf += sqr(Pf(Hwf*window(N, wi)));
} }

View File

@ -60,13 +60,15 @@ Foam::vectorField Foam::turbGen::U()
s = Ek(Ea, k0, mag(K))*s; s = Ek(Ea, k0, mag(K))*s;
complexVectorField up = complexVectorField up
(
fft::reverseTransform fft::reverseTransform
( (
ComplexField(cos(constant::mathematical::twoPi*rndPhases)*s, ComplexField(cos(constant::mathematical::twoPi*rndPhases)*s,
sin(constant::mathematical::twoPi*rndPhases)*s), sin(constant::mathematical::twoPi*rndPhases)*s),
K.nn() K.nn()
); )
);
return ReImSum(up); return ReImSum(up);
} }