PLUV.jl take computation of I outside of loop
This commit is contained in:
parent
94c05c3d6f
commit
248db3bc68
1 changed files with 5 additions and 4 deletions
3
PLUV.jl
3
PLUV.jl
|
@ -280,11 +280,12 @@ function intensity(P::AbstractArray{Float64}, q)
|
||||||
############### Ensemble average
|
############### Ensemble average
|
||||||
# multiply each columns of Am by Normal and sum along the columns,
|
# multiply each columns of Am by Normal and sum along the columns,
|
||||||
# then multiply by integration step
|
# then multiply by integration step
|
||||||
|
end
|
||||||
|
|
||||||
I = vec(sum(Am .^ 2 .* Normal'; dims=2)) * integration_step
|
I = vec(sum(Am .^ 2 .* Normal'; dims=2)) * integration_step
|
||||||
|
|
||||||
alp = Rm / (Z + 1)
|
alp = Rm / (Z + 1)
|
||||||
return @. (Norm * nv * 1e-6) * I * (16 * pi^2 * mu4(q, Z, alp)) + Con * (0.99 * (1.0 / (1 + exp(-8 * (q - 1.0)))) + 0.01)
|
return @. (Norm * nv * 1e-6) * I * (16 * pi^2 * mu4(q, Z, alp)) + Con * (0.99 * (1.0 / (1 + exp(-8 * (q - 1.0)))) + 0.01)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
|
Loading…
Reference in a new issue