Optimisation of computational fluid dynamics applications on multicore and manycore architectures