Adding changes to take into account the PML from k-Wave.
Needs testing.