An immersed boundary method for compressible multiphase flows: application to the dynamics of pyroclastic density currents