Cluster dynamics method for simulation of dynamic processes of continuum mechanics