In this paper, a new scalable hydrodynamic code GPUPEGAS (GPU-accelerated Performance Gas Astrophysical Simulation) for the simulation of interacting galaxies is proposed. This code is based on a combination of the Godunov method as well as on the original implementation of the FlIC method, specially adapted to the GPU-implementation. Fast Fourier Transform is used for the Pois-son equation solution in GPUPEGAS. Software implementation of the above methods was tested on classical gas dynamics problems, new Aksenov's test and classical gravitational gas dynamics problems. Collisionless hydrodynamic approach was used for modeling of stars and dark matter. The scalability of GPUPEGAS computational accelerators is shown.