2D finite grid code written in CUDA C