Rewriting physics from OpenCL to C++ for tests