Modeling of tectonic processes associated with earthquakes