3D discrete element method algorithm with optional fluid coupling, written in CUDA C