Transition layer for the heterogeneous Allen-Cahn equation