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

Popular posts from this blog

Creating a Julia Executable

Creating a Node-Node Connectivity Array

Creating an Element-Element Connectivity Array