what are the factors that determine how a volcano will erupt