A Quick Aside
So some early testing of a better optimised GasCode program suggests that code like:
∫▽●V[i] = 0.0
Is really badly optimised. Instead, you're better off using
∫▽●V = zeros(ncells)
Or potentially
@inbounds @sync @distributed for i in 1:ncells ∫▽●V[i] = 0.0 end
If you're using the Distributed package
Note that if you don't include the @sync in this style of distributed loop, you don't actually update the array.
Comments
Post a Comment