Added code from KrisDavis for sources written for SimPEG.