use of parfor in matlab for a lattice boltzmann code
Mostrar comentarios más antiguos
i'm working on lattice boltzmann method and i've written a matlab code. I would like to parallelize some parts of the code but i'm new to this so i'd appreciate your help. I'd like to know if it's possible to use the parfor for this part(collision operator):
for i=1:lx
for j=1:ly
for k=1:9
f(k,i,j)=f(k,i,j) .* (1 - omega) + omega .* feq(k,i,j);
end
end
end
I've tried to replace the outermost for loop with a parfor but the code seems to be slower.
any suggestions?
thanks in advance
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Parallel for-Loops (parfor) en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!