Dikes and sills are the moving building blocks of the plumbing system of volcanoes and play a fundamental role in the accretionary processes of the crust. They nucleate, propagate, halt, resume propagation, and sometimes change trajectory with drastic implications for the outcome of eruptions (Sigmundsson et al., 2010). Their dynamics is still poorly understood, in particular when different external influencing factors are interacting. Here we apply a boundary element model to study dike and sill formation, propagation and arrest in different scenarios. We model dikes as finite batches of compressible fluid magma, propagating quasi-statically in an elastic medium, and calculate their trajectories by maximising the energy release of the magm...