Model of frontogenesis: Subduction and upwelling